diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ce44f93caadcea..5f4393dc8efd2a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "BUILD_VERSION": "0.5.84" + "BUILD_VERSION": "0.5.89" } }, "remoteUser": "vscode", diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index e2519b014ef6f2..7b748179b6da85 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -127,6 +127,7 @@ BeagleBone befc betaprogram BinaryInputBasic +Binfmt bitbake bld BLE @@ -161,7 +162,9 @@ btmgmt BTN BTP btvirt +BuildKit buildwithmatter +buildX burndown ButtonIsr BytesMain @@ -179,6 +182,7 @@ CatalogVendorId CBB cbd CBOR +Ccache ccf CCMP CCS diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 3e6e6856a8c0ce..53af9108e7ea35 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.84 + image: connectedhomeip/chip-build:0.5.89 steps: - uses: Wandalen/wretry.action@v1.0.15 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d53628fb6274e0..6246cf7fbddde8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.84 + image: connectedhomeip/chip-build:0.5.89 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -128,7 +128,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.84 + image: connectedhomeip/chip-build:0.5.89 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -279,7 +279,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.84 + image: connectedhomeip/chip-build:0.5.89 volumes: - "/tmp/log_output:/tmp/test_logs" options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -384,14 +384,10 @@ jobs: # (similar to what examples-linux-standalone.yaml # does), so use target_os="all" to get those picked # up as part of the "unified" build. But then to - # save CI resources we want to exclude a few - # redundant things: - # - # * the mbedtls build, since we don't really plan to - # use that on Darwin. - # * the "host clang" build, which uses the pigweed - # clang. - "default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false enable_host_gcc_mbedtls_build=false';; + # save CI resources we want to exclude the + # "host clang" build, which uses the pigweed + # clang. + "default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false';; "python_lib") GN_ARGS='enable_rtti=true enable_pylib=true';; esac BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 7a3e9f86bd7946..732475eecc2d07 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -30,7 +30,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.84 + image: connectedhomeip/chip-build:0.5.89 options: --user root steps: @@ -58,7 +58,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.5.84 + image: connectedhomeip/chip-build-esp32:0.5.89 options: --user root steps: @@ -86,7 +86,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.5.84 + image: connectedhomeip/chip-build-nrf-platform:0.5.89 options: --user root steps: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index e867790820231a..6c41fafdc2d3d4 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -38,7 +38,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: - # image: connectedhomeip/chip-build-cirque:0.5.84 + # image: connectedhomeip/chip-build-cirque:0.5.89 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" @@ -110,10 +110,11 @@ jobs: chip_build_tests=false \ chip_enable_wifi=false \ chip_im_force_fabric_quota_check=true \ + enable_default_builds=false \ enable_host_gcc_build=true \ - enable_host_gcc_mbedtls_build=false \ - enable_host_clang_build=false \ - enable_fake_tests=false + enable_standalone_chip_tool_build=true \ + enable_linux_all_clusters_app_build=true \ + enable_linux_lighting_app_build=true - name: Run Tests timeout-minutes: 25 run: | diff --git a/.github/workflows/docker_img.yaml b/.github/workflows/docker_img.yaml index 9ea7ae9c7ea06a..b706dbcac39e42 100644 --- a/.github/workflows/docker_img.yaml +++ b/.github/workflows/docker_img.yaml @@ -65,9 +65,3 @@ jobs: run: | cd integrations/docker/images/chip-build${{ matrix.img }} ./build.sh --latest - - name: Scan for vulnerabilities - uses: crazy-max/docker-scan-action@master - with: - # NOTE: This task validates the images built previously with latest tag - image: connectedhomeip/chip-build${{ matrix.img }}:latest - annotations: true diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index ec6cb8671a44af..df2e50f7da6430 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build-doxygen:0.5.84 + image: connectedhomeip/chip-build-doxygen:0.5.89 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 08e8a0a46bac75..4f45eae7767aa5 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ameba:0.5.84 + image: connectedhomeip/chip-build-ameba:0.5.89 options: --user root steps: diff --git a/.github/workflows/examples-cc13x2x7_26x2x7.yaml b/.github/workflows/examples-cc13x2x7_26x2x7.yaml index 3e9612c5823a0a..00a81a484a425b 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ti:0.5.84 + image: connectedhomeip/chip-build-ti:0.5.89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 71b556a4bc0a6a..51ebc7ae9f60ab 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-efr32:0.5.84 + image: connectedhomeip/chip-build-efr32:0.5.89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 839913cd2ebc05..a991decd7d91d7 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.5.84 + image: connectedhomeip/chip-build-esp32:0.5.89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -118,7 +118,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.5.84 + image: connectedhomeip/chip-build-esp32:0.5.89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index f6b45a7f4b6fa0..e7ec996aac41b8 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-infineon:0.5.84 + image: connectedhomeip/chip-build-infineon:0.5.89 steps: - uses: Wandalen/wretry.action@v1.0.15 diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 9885e1e43788b6..1c478a78b114b4 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-k32w:0.5.84 + image: connectedhomeip/chip-build-k32w:0.5.89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -82,15 +82,15 @@ jobs: timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - k32w k32w061+release light \ - out/artifacts/k32w-light-release-no-ota/chip-k32w061-light-example \ + k32w k32w0+release light \ + out/artifacts/k32w-light-release-no-ota/chip-k32w0x-light-example \ /tmp/bloat_reports/ - name: Get lock size stats timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - k32w k32w061+release lock \ - out/artifacts/k32w-lock-low-power-release/chip-k32w061-lock-example \ + k32w k32w0+release lock \ + out/artifacts/k32w-lock-low-power-release/chip-k32w0x-lock-example \ /tmp/bloat_reports/ - name: Uploading Size Reports uses: actions/upload-artifact@v2 diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 59df7eabc678b0..e477fbc3dc6199 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -31,7 +31,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-crosscompile:0.5.84 + image: connectedhomeip/chip-build-crosscompile:0.5.89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -69,11 +69,11 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target linux-arm64-all-clusters \ - --target linux-arm64-chip-tool-ipv6only \ - --target linux-arm64-lock \ - --target linux-arm64-minmdns \ - --target linux-arm64-thermostat-no-ble \ + --target linux-arm64-clang-all-clusters \ + --target linux-arm64-clang-chip-tool-ipv6only \ + --target linux-arm64-clang-lock \ + --target linux-arm64-clang-minmdns \ + --target linux-arm64-clang-thermostat-no-ble \ build \ " - name: Bloat report - chip-tool @@ -81,14 +81,14 @@ jobs: run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ linux arm64 chip-tool-ipv6only \ - out/linux-arm64-chip-tool-ipv6only/chip-tool \ + out/linux-arm64-clang-chip-tool-ipv6only/chip-tool \ /tmp/bloat_reports/ - name: Bloat report - thermostat timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ linux arm64 thermostat-no-ble \ - out/linux-arm64-thermostat-no-ble/thermostat-app \ + out/linux-arm64-clang-thermostat-no-ble/thermostat-app \ /tmp/bloat_reports/ - name: Uploading Size Reports uses: actions/upload-artifact@v2 diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 6aefd6d6e4a4ff..72f366acb9b3d9 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.84 + image: connectedhomeip/chip-build:0.5.89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 5facc4ae1d6bba..283966f1d08ca4 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-mbed-os:0.5.84 + image: connectedhomeip/chip-build-mbed-os:0.5.89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index c22e74b8c86c8a..1238752c02327d 100755 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.84 + image: connectedhomeip/chip-build:0.5.89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index e1c06b6a4a3abb..5ede79eda1d262 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.5.84 + image: connectedhomeip/chip-build-nrf-platform:0.5.89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index b903c0d1d1ba66..b75a882449573d 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.84 + image: connectedhomeip/chip-build:0.5.89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index c74de0749c66ed..be9eac3cbb7f18 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-telink:0.5.84 + image: connectedhomeip/chip-build-telink:0.5.89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index b34e6426ecfa5c..d8617f42a3be44 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen:0.5.84 + image: connectedhomeip/chip-build-tizen:0.5.89 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 87079eee23e86c..0c8530ee9ced01 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.5.84 + image: connectedhomeip/chip-build-android:0.5.89 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index 70f3a88f8fcc5a..bbf9045a3bb1ce 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -31,7 +31,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.84 + image: connectedhomeip/chip-build:0.5.89 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 30e70d95ec452d..090e7dde5cd2d7 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32-qemu:0.5.84 + image: connectedhomeip/chip-build-esp32-qemu:0.5.89 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 60c4cc1454c128..018d353aee21aa 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-esp32:0.5.84 + image: connectedhomeip/chip-build-esp32:0.5.89 steps: - uses: Wandalen/wretry.action@v1.0.15 @@ -75,7 +75,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-efr32:0.5.84 + image: connectedhomeip/chip-build-efr32:0.5.89 steps: - uses: Wandalen/wretry.action@v1.0.15 name: Checkout diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index aae77701773fd1..a1b411048c62c4 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.5.84 + image: connectedhomeip/chip-build-android:0.5.89 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a89692f6c50655..2a1b7b2a7947b8 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.84 + image: connectedhomeip/chip-build:0.5.89 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -239,7 +239,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.84 + image: connectedhomeip/chip-build:0.5.89 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index be8ff0af07bb06..2bf4caf3e791bf 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.84 + image: connectedhomeip/chip-build:0.5.89 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 0f8a3bf232dc19..652b6b91f4d91f 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build-zap:0.5.84 + image: connectedhomeip/chip-build-zap:0.5.89 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 6d1b2f2e59682a..b80f5efbeb402f 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build-zap:0.5.84 + image: connectedhomeip/chip-build-zap:0.5.89 defaults: run: shell: sh diff --git a/.gitmodules b/.gitmodules index 0c00fa444bedb5..16d589e739d539 100644 --- a/.gitmodules +++ b/.gitmodules @@ -225,7 +225,7 @@ platforms = p6 [submodule "third_party/telink_sdk/repo"] path = third_party/telink_sdk/repo - url = https://github.com/rikorsev/telink_b91_ble_sdk + url = https://github.com/telink-semi/telink_b91_ble_single_connection_sdk_matter platforms = telink [submodule "ti_simplelink_sdk"] path = third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx diff --git a/BUILD.gn b/BUILD.gn index 390a4b7706d6a8..a31f5fd0563058 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -235,7 +235,20 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { enable_host_gcc_build = enable_default_builds && host_os != "win" # Enable building chip with gcc & mbedtls. - enable_host_gcc_mbedtls_build = enable_default_builds && host_os != "win" + enable_host_gcc_mbedtls_build = false + + # Enable limited testing with gcc & mbedtls. + enable_host_gcc_mbedtls_crypto_tests = + enable_default_builds && host_os != "win" + + # Enable building chip with clang & boringssl + enable_host_clang_boringssl_build = false + + # Enable limited testing with clang & boringssl. On Mac, boringssl does + # not compile with ASAN enabled. + enable_host_clang_boringssl_crypto_tests = + enable_default_builds && host_os != "win" && + !(is_asan == true && host_os == "mac") # Build the chip-cert tool. enable_standalone_chip_cert_build = @@ -349,6 +362,32 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { builds += [ ":host_gcc_mbedtls" ] } + if (enable_host_gcc_mbedtls_crypto_tests) { + chip_build("host_gcc_mbedtls_crypto_tests") { + test_group = "//src:crypto_tests" + toolchain = "${chip_root}/config/mbedtls/toolchain:${host_os}_${host_cpu}_gcc_mbedtls" + } + + builds += [ ":host_gcc_mbedtls_crypto_tests" ] + } + + if (enable_host_clang_boringssl_build) { + chip_build("host_clang_boringssl") { + toolchain = "${chip_root}/config/boringssl/toolchain:${host_os}_${host_cpu}_clang_boringssl" + } + + builds += [ ":host_clang_boringssl" ] + } + + if (enable_host_clang_boringssl_crypto_tests) { + chip_build("host_clang_boringssl_crypto_tests") { + test_group = "//src:crypto_tests" + toolchain = "${chip_root}/config/boringssl/toolchain:${host_os}_${host_cpu}_clang_boringssl" + } + + builds += [ ":host_clang_boringssl_crypto_tests" ] + } + if (enable_android_builds) { chip_build("android_arm") { toolchain = "${build_root}/toolchain/android:android_arm" @@ -376,6 +415,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { if (enable_fake_tests) { chip_build("fake_platform") { + test_group = "//src:fake_platform_tests" toolchain = "${build_root}/toolchain/fake:fake_${host_cpu}_gcc" } diff --git a/build/chip/chip_build.gni b/build/chip/chip_build.gni index 1521f585a8d0ae..ce3a483d1be77d 100644 --- a/build/chip/chip_build.gni +++ b/build/chip/chip_build.gni @@ -20,11 +20,21 @@ template("chip_build") { _build_name = target_name _toolchain = invoker.toolchain + if (defined(invoker.test_group) && chip_build_tests) { + _build_target = invoker.test_group + _check_target = get_label_info(invoker.test_group, "dir") + ":" + + get_label_info(invoker.test_group, "name") + "_run" + } else { + _build_target = ":default" + _check_target = ":check" + not_needed(invoker, [ "test_group" ]) + } + group("${_build_name}") { - deps = [ ":default(${_toolchain})" ] + deps = [ "${_build_target}(${_toolchain})" ] } group("check_${_build_name}") { - deps = [ ":check(${_toolchain})" ] + deps = [ "${_check_target}(${_toolchain})" ] } } diff --git a/build/chip/chip_test_group.gni b/build/chip/chip_test_group.gni index b98622cf71f6f2..bb4c9def4bfb9b 100644 --- a/build/chip/chip_test_group.gni +++ b/build/chip/chip_test_group.gni @@ -60,8 +60,8 @@ template("chip_test_group") { } } - if (chip_link_tests) { - group("${_test_group_name}_run") { + 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/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index c5f6392613b749..c23d35bd8b496b 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -262,7 +262,7 @@ config("strict_warnings") { ] } - if (current_os == "linux" || current_os == "android") { + if (!is_asan && (current_os == "linux" || current_os == "android")) { ldflags += [ "-Wl,-z,defs" ] } } @@ -348,9 +348,6 @@ declare_args() { # Enable Thread sanitizer is_tsan = false - # Enable address sanitizer - is_asan = false - # Enable memory sanitizer is_msan = false diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni index 4d502a997bf2a1..842500c73f5c0c 100644 --- a/build/config/compiler/compiler.gni +++ b/build/config/compiler/compiler.gni @@ -50,4 +50,7 @@ declare_args() { # Generate code coverage analysis artifacts when enabled. use_coverage = false + + # Enable address sanitizer + is_asan = false } diff --git a/config/ameba/chip.cmake b/config/ameba/chip.cmake index 93997dd318a69d..2e665c65339d08 100644 --- a/config/ameba/chip.cmake +++ b/config/ameba/chip.cmake @@ -123,18 +123,24 @@ string(APPEND CHIP_GN_ARGS "pw_build_LINK_DEPS = [\"//third_party/connectedhomei string(APPEND CHIP_GN_ARGS "pw_rpc_CONFIG = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc:disable_global_mutex\"") endif (matter_enable_rpc) +# Build Matter Shell +if (matter_enable_shell) +string(APPEND CHIP_GN_ARGS "chip_build_libshell = true\n") +endif (matter_enable_shell) + # Build ota-requestor if (matter_enable_ota_requestor) string(APPEND CHIP_GN_ARGS "chip_enable_ota_requestor = true\n") endif (matter_enable_ota_requestor) +# Rotating ID if (matter_enable_rotating_id) string(APPEND CHIP_GN_ARGS "chip_enable_additional_data_advertising = true\n") string(APPEND CHIP_GN_ARGS "chip_enable_rotating_device_id = true\n") -else(matter_enable_rotating_id) +else (matter_enable_rotating_id) string(APPEND CHIP_GN_ARGS "chip_enable_additional_data_advertising = false\n") string(APPEND CHIP_GN_ARGS "chip_enable_rotating_device_id = false\n") -endif(matter_enable_rotating_id) +endif (matter_enable_rotating_id) file(GENERATE OUTPUT ${CHIP_OUTPUT}/args.gn CONTENT ${CHIP_GN_ARGS}) diff --git a/config/boringssl/toolchain/BUILD.gn b/config/boringssl/toolchain/BUILD.gn new file mode 100644 index 00000000000000..e342311e27a4bd --- /dev/null +++ b/config/boringssl/toolchain/BUILD.gn @@ -0,0 +1,26 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +import("${build_root}/toolchain/gcc_toolchain.gni") + +gcc_toolchain("${host_os}_${host_cpu}_clang_boringssl") { + toolchain_args = { + current_os = host_os + current_cpu = host_cpu + is_clang = true + chip_crypto = "boringssl" + } +} diff --git a/config/nrfconnect/chip-module/Kconfig.defaults b/config/nrfconnect/chip-module/Kconfig.defaults index 4ffa2034b9b22a..1ee5841b05067c 100644 --- a/config/nrfconnect/chip-module/Kconfig.defaults +++ b/config/nrfconnect/chip-module/Kconfig.defaults @@ -289,6 +289,10 @@ config MBEDTLS_SHA512_C bool default n +config PSA_WANT_ALG_SHA_512 + bool + default n + config MBEDTLS_CIPHER_MODE_XTS bool default n diff --git a/config/telink/app/zephyr.conf b/config/telink/app/zephyr.conf index 080ea97ce4e475..92944dbed8616f 100644 --- a/config/telink/app/zephyr.conf +++ b/config/telink/app/zephyr.conf @@ -66,7 +66,7 @@ CONFIG_OPENTHREAD_DEBUG=y CONFIG_OPENTHREAD_L2_DEBUG=y CONFIG_OPENTHREAD_L2_LOG_LEVEL_INF=y -CONFIG_NET_CONFIG_IEEE802154_DEV_NAME="IEEE802154_b91" +CONFIG_NET_CONFIG_IEEE802154_DEV_NAME="IEEE802154" CONFIG_NET_CONFIG_MY_IPV6_ADDR="fdde:ad00:beef::1" CONFIG_NET_CONFIG_PEER_IPV6_ADDR="fdde:ad00:beef::2" diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index cb4a0cd0424a57..21b01472bf427d 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -101,7 +101,7 @@ set(GN_ROOT_TARGET ${CHIP_ROOT}/config/telink/chip-gn) if (CONFIG_POSIX_API) list(APPEND CHIP_CFLAGS -D_SYS__PTHREADTYPES_H_ - -isystem${ZEPHYR_BASE}/include/posix + -isystem${ZEPHYR_BASE}/include/zephyr/posix ) endif() 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 e5569355e063e9..e1d48f4f655e42 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 @@ -99,12 +99,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -206,13 +206,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } server cluster OnOff = 6 { @@ -320,44 +320,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -367,7 +378,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster BinaryInputBasic = 15 { @@ -451,7 +462,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -459,7 +470,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -565,6 +576,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -911,7 +923,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -1180,7 +1192,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1540,7 +1552,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1566,7 +1577,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1632,8 +1643,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1699,10 +1710,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { @@ -3466,7 +3477,7 @@ server cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationStatusEnum status = 5; @@ -3607,7 +3618,7 @@ server cluster TestCluster = 4294048773 { } info event TestFabricScopedEvent = 2 { - fabric_idx arg1 = 254; + fabric_idx fabricIndex = 254; } attribute boolean boolean = 0; diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index 3c51bc43cabda9..ee57479ba79628 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -8,12 +8,13 @@ control. - [CHIP Ameba All Clusters Example](#chip-ameba-all-clusters-example) - [Supported Device](#supported-device) - [Building the Example Application](#building-the-example-application) - - [Commissioning and cluster control](#commissioning-and-cluster-control) - - [Commissioning](#commissioning) - - [BLE mode](#ble-mode) - - [IP mode](#ip-mode) - - [Cluster control](#cluster-control) + - [Commissioning](#commissioning) + - [BLE mode](#ble-mode) + - [IP mode](#ip-mode) + - [Cluster control](#cluster-control) - [Running RPC Console](#running-rpc-console) + - [Running Matter Shell](#running-matter-shell) + - [Binding and Controlling a Lighting Device](#binding-and-controlling-a-lighting-device) --- @@ -26,27 +27,19 @@ The CHIP demo application is supported on - Pull docker image: - ``` $ docker pull connectedhomeip/chip-build-ameba:latest - ``` - Run docker container: - ``` $ docker run -it -v ${CHIP_DIR}:/root/chip connectedhomeip/chip-build-ameba:latest - ``` - Setup build environment: - ``` $ source ./scripts/bootstrap.sh - ``` - To build the demo application: - ``` $ ./scripts/build/build_examples.py --target ameba-amebad-all-clusters build - ``` The output image files are stored in `out/ameba-amebad-all-clusters/asdk/image` folder. @@ -63,43 +56,25 @@ The CHIP demo application is supported on the correct locations 4. Click **Download** button. -## Commissioning and Cluster Control - ## Commissioning There are two commissioning modes supported by Ameba platform: ### BLE mode -1. In "connectedhomeip/config/ameba/args.gni" - - - Set `chip_config_network_layer_ble = true` - -2. In `connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h` - - - Set `#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1` - -3. Build and Flash -4. The all-clusters example will run automatically after booting the Ameba +1. Build and Flash +2. The all-clusters example will run automatically after booting the Ameba board. -5. Test with +3. Test with [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) ### IP mode -1. In `connectedhomeip/config/ameba/args.gni` - - - Set `chip_config_network_layer_ble = false` - -2. In `connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h` - - - Set `#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 0` - -3. Build and Flash -4. The all-clusters example will run automatically after booting the Ameba +1. Build and Flash +2. The all-clusters example will run automatically after booting the Ameba board. -5. Connect to AP using `ATW0, ATW1, ATWC` commands -6. Test with +3. Connect to AP using `ATW0, ATW1, ATWC` commands +4. Test with [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) ## Cluster Control @@ -111,43 +86,71 @@ to be On or Off. - Via [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool#using-the-client-to-send-matter-commands) - ``` - $ ./chip-tool onoff on ${NODE_ID_TO_ASSIGN} 1 - $ ./chip-tool onoff off ${NODE_ID_TO_ASSIGN} 1 - ``` + $ ./chip-tool onoff on 1 + $ ./chip-tool onoff off 1 ## Running RPC Console -- Connect a USB-TTL Adapter as shown below +- Connect a USB-TTL adapter as shown below - ``` Ameba USB-TTL A19 TX A18 RX GND GND - ``` -- Build the +* Build the [chip-rpc console](https://github.com/project-chip/connectedhomeip/tree/master/examples/common/pigweed/rpc_console) -- As part of building the example with RPCs enabled the chip_rpc python +* As part of building the example with RPCs enabled the chip_rpc python interactive console is installed into your venv. The python wheel files are also created in the output folder: out/debug/chip_rpc_console_wheels. To install the wheel files without rebuilding: - ``` $ pip3 install out/debug/chip_rpc_console_wheels/*.whl - ``` - Launch the chip-rpc console after resetting Ameba board - ``` $ chip-console --device /dev/tty -b 115200 - ``` -- Get and Set lighting directly using the RPC console +* Get and Set lighting directly using the RPC console - ```python + python rpcs.chip.rpc.Lighting.Get() rpcs.chip.rpc.Lighting.Set(on=True, level=128, color=protos.chip.rpc.LightingColor(hue=5, saturation=5)) - ``` + +## Running Matter Shell + +- Matter Shell is enabled whenever RPC is disabled. + +- RPC console and Matter Shell cannot be enabled at the same time as they use + the same UART port. + +- Connect Ameba to the USB-TTL adapter as shown in the RPC section. + +- Open the USB-TTL serial port and type `help` to view the available commands + +## Binding and Controlling a Lighting Device + +- This example shows how to bind a Switch Device to a Lighting Device and + control it through the Matter Shell. One binding client (Switch Device) and + one binding server (Lighting Device) is required. + +- Commission the switch (nodeID 1) and lighting device (nodeID 2) using + chip-tool. + + $ ./chip-tool pairing ble-wifi 1 20202021 3840 + $ ./chip-tool pairing ble-wifi 2 20202021 3840 + +* After successful commissioning, configure the ACL in the lighting device to + allow access from switch device and chip-tool. + + $ ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1], "targets": null }]' 2 0 + +- Bind the lighting device to the switch device. + + $ ./chip-tool binding write binding '[{"fabricIndex": 1, "node":2, "endpoint":1, "cluster":6}]' 1 1 + +- Control the lighting device through the switch device's Matter Shell + + > switch onoff on + > switch onoff off diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index f724d8840d697d..96e025799113af 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -125,6 +125,14 @@ list( ) endif (matter_enable_rpc) +if (matter_enable_shell) +list( + APPEND ${list_chip_main_sources} + #shell + ${chip_dir}/examples/platform/ameba/shell/launch_shell.cpp +) +endif (matter_enable_shell) + if (matter_enable_ota_requestor) list( APPEND ${list_chip_main_sources} @@ -148,6 +156,7 @@ list( ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/chipinterface.cpp + ${chip_dir}/examples/all-clusters-app/ameba/main/BindingHandler.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/Globals.cpp @@ -242,9 +251,7 @@ list( -DCHIP_DEVICE_LAYER_TARGET=Ameba -DUSE_ZAP_CONFIG -DCHIP_HAVE_CONFIG_H - -DCHIP_SUPPORT_ENABLE_STORAGE_API_AUDIT -DMBEDTLS_CONFIG_FILE= - -DMATTER_ALL_CLUSTERS_APP=1 ) if (matter_enable_persistentstorage_audit) @@ -269,6 +276,14 @@ list( ) endif (matter_enable_rpc) +if (matter_enable_shell) +list( + APPEND chip_main_flags + + -DCONFIG_ENABLE_CHIP_SHELL=1 +) +endif (matter_enable_shell) + list( APPEND chip_main_cpp_flags diff --git a/examples/all-clusters-app/ameba/main/BindingHandler.cpp b/examples/all-clusters-app/ameba/main/BindingHandler.cpp new file mode 100644 index 00000000000000..93638a811bdf77 --- /dev/null +++ b/examples/all-clusters-app/ameba/main/BindingHandler.cpp @@ -0,0 +1,425 @@ +/* + * + * 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 "BindingHandler.h" +#include "app/CommandSender.h" +#include "app/clusters/bindings/BindingManager.h" +#include "app/server/Server.h" +#include "controller/InvokeInteraction.h" +#include "platform/CHIPDeviceLayer.h" +#include +#include + +#if CONFIG_ENABLE_CHIP_SHELL +#include "lib/shell/Engine.h" +#include "lib/shell/commands/Help.h" +#endif // ENABLE_CHIP_SHELL + +using namespace chip; +using namespace chip::app; + +#if CONFIG_ENABLE_CHIP_SHELL +using Shell::Engine; +using Shell::shell_command_t; +using Shell::streamer_get; +using Shell::streamer_printf; + +Engine sShellSwitchSubCommands; +Engine sShellSwitchOnOffSubCommands; + +Engine sShellSwitchGroupsSubCommands; +Engine sShellSwitchGroupsOnOffSubCommands; + +Engine sShellSwitchBindingSubCommands; +#endif // defined(ENABLE_CHIP_SHELL) + +namespace { + +void ProcessOnOffUnicastBindingCommand(CommandId commandId, const EmberBindingTableEntry & binding, DeviceProxy * peer_device) +{ + auto onSuccess = [](const ConcreteCommandPath & commandPath, const StatusIB & status, const auto & dataResponse) { + ChipLogProgress(NotSpecified, "OnOff command succeeds"); + }; + + auto onFailure = [](CHIP_ERROR error) { + ChipLogError(NotSpecified, "OnOff command failed: %" CHIP_ERROR_FORMAT, error.Format()); + }; + + switch (commandId) + { + case Clusters::OnOff::Commands::Toggle::Id: + Clusters::OnOff::Commands::Toggle::Type toggleCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, + toggleCommand, onSuccess, onFailure); + break; + + case Clusters::OnOff::Commands::On::Id: + Clusters::OnOff::Commands::On::Type onCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, + onCommand, onSuccess, onFailure); + break; + + case Clusters::OnOff::Commands::Off::Id: + Clusters::OnOff::Commands::Off::Type offCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, + offCommand, onSuccess, onFailure); + break; + } +} + +void ProcessOnOffGroupBindingCommand(CommandId commandId, const EmberBindingTableEntry & binding) +{ + Messaging::ExchangeManager & exchangeMgr = Server::GetInstance().GetExchangeManager(); + + switch (commandId) + { + case Clusters::OnOff::Commands::Toggle::Id: + Clusters::OnOff::Commands::Toggle::Type toggleCommand; + Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, toggleCommand); + break; + + case Clusters::OnOff::Commands::On::Id: + Clusters::OnOff::Commands::On::Type onCommand; + Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, onCommand); + + break; + + case Clusters::OnOff::Commands::Off::Id: + Clusters::OnOff::Commands::Off::Type offCommand; + Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, offCommand); + break; + } +} + +void LightSwitchChangedHandler(const EmberBindingTableEntry & binding, DeviceProxy * peer_device, void * context) +{ + VerifyOrReturn(context != nullptr, ChipLogError(NotSpecified, "OnDeviceConnectedFn: context is null")); + BindingCommandData * data = static_cast(context); + + if (binding.type == EMBER_MULTICAST_BINDING && data->isGroup) + { + switch (data->clusterId) + { + case Clusters::OnOff::Id: + ProcessOnOffGroupBindingCommand(data->commandId, binding); + break; + } + } + else if (binding.type == EMBER_UNICAST_BINDING && !data->isGroup) + { + switch (data->clusterId) + { + case Clusters::OnOff::Id: + ProcessOnOffUnicastBindingCommand(data->commandId, binding, peer_device); + break; + } + } +} + +void InitBindingHandlerInternal(intptr_t arg) +{ + auto & server = chip::Server::GetInstance(); + chip::BindingManager::GetInstance().Init( + { &server.GetFabricTable(), server.GetCASESessionManager(), &server.GetPersistentStorage() }); + chip::BindingManager::GetInstance().RegisterBoundDeviceChangedHandler(LightSwitchChangedHandler); +} + +#ifdef CONFIG_ENABLE_CHIP_SHELL + +/******************************************************** + * Switch shell functions + *********************************************************/ + +CHIP_ERROR SwitchHelpHandler(int argc, char ** argv) +{ + sShellSwitchSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR SwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return SwitchHelpHandler(argc, argv); + } + + return sShellSwitchSubCommands.ExecCommand(argc, argv); +} + +/******************************************************** + * OnOff switch shell functions + *********************************************************/ + +CHIP_ERROR OnOffHelpHandler(int argc, char ** argv) +{ + sShellSwitchOnOffSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OnOffSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return OnOffHelpHandler(argc, argv); + } + + return sShellSwitchOnOffSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR OnSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::On::Id; + data->clusterId = Clusters::OnOff::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OffSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Off::Id; + data->clusterId = Clusters::OnOff::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ToggleSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Toggle::Id; + data->clusterId = Clusters::OnOff::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +/******************************************************** + * bind switch shell functions + *********************************************************/ + +CHIP_ERROR BindingHelpHandler(int argc, char ** argv) +{ + sShellSwitchBindingSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BindingSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return BindingHelpHandler(argc, argv); + } + + return sShellSwitchBindingSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR BindingGroupBindCommandHandler(int argc, char ** argv) +{ + VerifyOrReturnError(argc == 2, CHIP_ERROR_INVALID_ARGUMENT); + + EmberBindingTableEntry * entry = Platform::New(); + entry->type = EMBER_MULTICAST_BINDING; + entry->fabricIndex = atoi(argv[0]); + entry->groupId = atoi(argv[1]); + entry->local = 1; // Hardcoded to endpoint 1 for now + entry->clusterId.SetValue(6); // Hardcoded to OnOff cluster for now + + DeviceLayer::PlatformMgr().ScheduleWork(BindingWorkerFunction, reinterpret_cast(entry)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BindingUnicastBindCommandHandler(int argc, char ** argv) +{ + VerifyOrReturnError(argc == 3, CHIP_ERROR_INVALID_ARGUMENT); + + EmberBindingTableEntry * entry = Platform::New(); + entry->type = EMBER_UNICAST_BINDING; + entry->fabricIndex = atoi(argv[0]); + entry->nodeId = atoi(argv[1]); + entry->local = 1; // Hardcoded to endpoint 1 for now + entry->remote = atoi(argv[2]); + entry->clusterId.SetValue(6); // Hardcode to OnOff cluster for now + + DeviceLayer::PlatformMgr().ScheduleWork(BindingWorkerFunction, reinterpret_cast(entry)); + return CHIP_NO_ERROR; +} + +/******************************************************** + * Groups switch shell functions + *********************************************************/ + +CHIP_ERROR GroupsHelpHandler(int argc, char ** argv) +{ + sShellSwitchGroupsSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupsSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return GroupsHelpHandler(argc, argv); + } + + return sShellSwitchGroupsSubCommands.ExecCommand(argc, argv); +} + +/******************************************************** + * Groups OnOff switch shell functions + *********************************************************/ + +CHIP_ERROR GroupsOnOffHelpHandler(int argc, char ** argv) +{ + sShellSwitchGroupsOnOffSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupsOnOffSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return GroupsOnOffHelpHandler(argc, argv); + } + + return sShellSwitchGroupsOnOffSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR GroupOnSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::On::Id; + data->clusterId = Clusters::OnOff::Id; + data->isGroup = true; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupOffSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Off::Id; + data->clusterId = Clusters::OnOff::Id; + data->isGroup = true; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupToggleSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Toggle::Id; + data->clusterId = Clusters::OnOff::Id; + data->isGroup = true; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +/** + * @brief configures switch matter shell + * + */ +static void RegisterSwitchCommands() +{ + + static const shell_command_t sSwitchSubCommands[] = { + { &SwitchHelpHandler, "help", "Usage: switch " }, + { &OnOffSwitchCommandHandler, "onoff", " Usage: switch onoff " }, + { &GroupsSwitchCommandHandler, "groups", "Usage: switch groups " }, + { &BindingSwitchCommandHandler, "binding", "Usage: switch binding " } + }; + + static const shell_command_t sSwitchOnOffSubCommands[] = { + { &OnOffHelpHandler, "help", "Usage : switch ononff " }, + { &OnSwitchCommandHandler, "on", "Sends on command to bound lighting app" }, + { &OffSwitchCommandHandler, "off", "Sends off command to bound lighting app" }, + { &ToggleSwitchCommandHandler, "toggle", "Sends toggle command to bound lighting app" } + }; + + static const shell_command_t sSwitchGroupsSubCommands[] = { { &GroupsHelpHandler, "help", "Usage: switch groups " }, + { &GroupsOnOffSwitchCommandHandler, "onoff", + "Usage: switch groups onoff " } }; + + static const shell_command_t sSwitchGroupsOnOffSubCommands[] = { + { &GroupsOnOffHelpHandler, "help", "Usage: switch groups onoff " }, + { &GroupOnSwitchCommandHandler, "on", "Sends on command to bound group" }, + { &GroupOffSwitchCommandHandler, "off", "Sends off command to bound group" }, + { &GroupToggleSwitchCommandHandler, "toggle", "Sends toggle command to group" } + }; + + static const shell_command_t sSwitchBindingSubCommands[] = { + { &BindingHelpHandler, "help", "Usage: switch binding " }, + { &BindingGroupBindCommandHandler, "group", "Usage: switch binding group " }, + { &BindingUnicastBindCommandHandler, "unicast", "Usage: switch binding unicast " } + }; + + static const shell_command_t sSwitchCommand = { &SwitchCommandHandler, "switch", + "Light-switch commands. Usage: switch " }; + + sShellSwitchGroupsOnOffSubCommands.RegisterCommands(sSwitchGroupsOnOffSubCommands, ArraySize(sSwitchGroupsOnOffSubCommands)); + sShellSwitchOnOffSubCommands.RegisterCommands(sSwitchOnOffSubCommands, ArraySize(sSwitchOnOffSubCommands)); + sShellSwitchGroupsSubCommands.RegisterCommands(sSwitchGroupsSubCommands, ArraySize(sSwitchGroupsSubCommands)); + sShellSwitchBindingSubCommands.RegisterCommands(sSwitchBindingSubCommands, ArraySize(sSwitchBindingSubCommands)); + sShellSwitchSubCommands.RegisterCommands(sSwitchSubCommands, ArraySize(sSwitchSubCommands)); + + Engine::Root().RegisterCommands(&sSwitchCommand, 1); +} +#endif // ENABLE_CHIP_SHELL + +} // namespace + +/******************************************************** + * Switch functions + *********************************************************/ + +void SwitchWorkerFunction(intptr_t context) +{ + VerifyOrReturn(context != 0, ChipLogError(NotSpecified, "SwitchWorkerFunction - Invalid work data")); + + BindingCommandData * data = reinterpret_cast(context); + BindingManager::GetInstance().NotifyBoundClusterChanged(data->localEndpointId, data->clusterId, static_cast(data)); + + Platform::Delete(data); +} + +void BindingWorkerFunction(intptr_t context) +{ + VerifyOrReturn(context != 0, ChipLogError(NotSpecified, "BindingWorkerFunction - Invalid work data")); + + EmberBindingTableEntry * entry = reinterpret_cast(context); + AddBindingEntry(*entry); + + Platform::Delete(entry); +} + +CHIP_ERROR InitBindingHandler() +{ + // The initialization of binding manager will try establishing connection with unicast peers + // so it requires the Server instance to be correctly initialized. Post the init function to + // the event queue so that everything is ready when initialization is conducted. + chip::DeviceLayer::PlatformMgr().ScheduleWork(InitBindingHandlerInternal); +#if CONFIG_ENABLE_CHIP_SHELL + RegisterSwitchCommands(); +#endif + return CHIP_NO_ERROR; +} diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index 673f4d5238ee23..d0ca38ab0cf070 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -17,6 +17,7 @@ #include +#include "BindingHandler.h" #include "CHIPDeviceManager.h" #include "DeviceCallbacks.h" #include "Globals.h" @@ -41,7 +42,11 @@ #include #if CONFIG_ENABLE_PW_RPC -#include "Rpc.h" +#include +#endif + +#if CONFIG_ENABLE_CHIP_SHELL +#include #endif using namespace ::chip; @@ -110,6 +115,8 @@ static void InitServer(intptr_t context) // QR code will be used with CHIP Tool PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); } + + InitBindingHandler(); } extern "C" void ChipTest(void) @@ -138,6 +145,10 @@ extern "C" void ChipTest(void) chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, 0); statusLED1.Init(STATUS_LED_GPIO_NUM); + +#if CONFIG_ENABLE_CHIP_SHELL + chip::LaunchShell(); +#endif } bool lowPowerClusterSleep() diff --git a/examples/all-clusters-app/ameba/main/include/BindingHandler.h b/examples/all-clusters-app/ameba/main/include/BindingHandler.h new file mode 100644 index 00000000000000..280c94874f04dd --- /dev/null +++ b/examples/all-clusters-app/ameba/main/include/BindingHandler.h @@ -0,0 +1,35 @@ +/* + * + * 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 "app-common/zap-generated/ids/Clusters.h" +#include "app-common/zap-generated/ids/Commands.h" +#include "lib/core/CHIPError.h" + +CHIP_ERROR InitBindingHandler(); +void SwitchWorkerFunction(intptr_t context); +void BindingWorkerFunction(intptr_t context); + +struct BindingCommandData +{ + chip::EndpointId localEndpointId = 1; + chip::CommandId commandId; + chip::ClusterId clusterId; + bool isGroup = false; +}; diff --git a/examples/all-clusters-app/esp32/README.md b/examples/all-clusters-app/esp32/README.md index 35574ac97a9083..f1bd82ba5a817d 100644 --- a/examples/all-clusters-app/esp32/README.md +++ b/examples/all-clusters-app/esp32/README.md @@ -113,6 +113,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). $ source ./scripts/activate.sh ``` +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - Target Set To set IDF target, first: @@ -278,8 +286,8 @@ the ESP32 all-clusters-app to commission it onto a Wi-Fi network: Parameters: -1. Discriminator: 3840 (configurable through menuconfig) -2. Setup-pin-code: 20202021 (configurable through menuconfig) +1. Discriminator: 3840 +2. Setup-pin-code: 20202021 3. Node-id: 12344321 (you can assign any node id) ### Cluster control diff --git a/examples/all-clusters-app/esp32/main/AppTask.cpp b/examples/all-clusters-app/esp32/main/AppTask.cpp index 6db8c63b3c14ec..04604ba419bd17 100644 --- a/examples/all-clusters-app/esp32/main/AppTask.cpp +++ b/examples/all-clusters-app/esp32/main/AppTask.cpp @@ -26,6 +26,7 @@ #include "esp_log.h" #include "esp_spi_flash.h" #include "freertos/FreeRTOS.h" +#include #include #define APP_TASK_NAME "APP" @@ -39,6 +40,8 @@ namespace { QueueHandle_t sAppEventQueue; TaskHandle_t sAppTaskHandle; +chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; + } // namespace AppTask AppTask::sAppTask; @@ -84,6 +87,9 @@ CHIP_ERROR AppTask::Init() #if CONFIG_HAVE_DISPLAY InitDeviceDisplay(); #endif + + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + return err; } diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 4f8db9d121402d..40697450af516b 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -21,6 +21,7 @@ set(PRIV_INCLUDE_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/include" "${CMAKE_CURRENT_LIST_DIR}/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" ) set(SRC_DIRS_LIST @@ -28,6 +29,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" diff --git a/examples/all-clusters-app/esp32/main/include/ShellCommands.h b/examples/all-clusters-app/esp32/main/include/ShellCommands.h index 3e4e8536cee962..832039dd90358b 100644 --- a/examples/all-clusters-app/esp32/main/include/ShellCommands.h +++ b/examples/all-clusters-app/esp32/main/include/ShellCommands.h @@ -140,7 +140,7 @@ class CASECommands GetInstance().SetOnConnecting(false); } - static void OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error) + static void OnConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { streamer_printf(streamer_get(), "Establish CASESession Failure!\r\n"); GetInstance().SetOnConnecting(false); @@ -156,8 +156,9 @@ class CASECommands ChipLogError(SecureChannel, "Can't get the CASESessionManager"); return; } - caseSessionManager->FindOrEstablishSession(caseCommand->GetFabricInfo()->GetPeerIdForNode(caseCommand->GetNodeId()), - &sOnConnectedCallback, &sOnConnectionFailureCallback); + caseSessionManager->FindOrEstablishSession( + ScopedNodeId(caseCommand->GetNodeId(), caseCommand->GetFabricInfo()->GetFabricIndex()), &sOnConnectedCallback, + &sOnConnectionFailureCallback); } static CHIP_ERROR ConnectToNodeHandler(int argc, char ** argv) diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index fcd5703cf30e6a..3bdc63319c972d 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -29,84 +29,105 @@ using namespace chip; using namespace chip::app; +using namespace chip::app::Clusters; using namespace chip::DeviceLayer; -void AllClustersCommandDelegate::OnEventCommandReceived(const char * command) +void AllClustersCommandDelegate::OnEventCommandReceived(const char * json) { - mCurrentCommand.assign(command); + Json::Reader reader; - DeviceLayer::PlatformMgr().ScheduleWork(HandleEventCommand, reinterpret_cast(this)); + if (!reader.parse(json, mJsonValue)) + { + ChipLogError(NotSpecified, "Error parsing JSON with error %s:", reader.getFormattedErrorMessages().c_str()); + } + else + { + DeviceLayer::PlatformMgr().ScheduleWork(HandleEventCommand, reinterpret_cast(this)); + } } void AllClustersCommandDelegate::HandleEventCommand(intptr_t context) { auto * self = reinterpret_cast(context); - if (self->mCurrentCommand == "SoftwareFault") + VerifyOrReturn(!self->mJsonValue.empty(), ChipLogError(NotSpecified, "Invalid JSON event command received")); + + std::string name = self->mJsonValue["Name"].asString(); + + if (name == "SoftwareFault") { self->OnSoftwareFaultEventHandler(Clusters::SoftwareDiagnostics::Events::SoftwareFault::Id); } - else if (self->mCurrentCommand == "HardwareFaultChange") + else if (name == "HardwareFaultChange") { self->OnGeneralFaultEventHandler(Clusters::GeneralDiagnostics::Events::HardwareFaultChange::Id); } - else if (self->mCurrentCommand == "RadioFaultChange") + else if (name == "RadioFaultChange") { self->OnGeneralFaultEventHandler(Clusters::GeneralDiagnostics::Events::RadioFaultChange::Id); } - else if (self->mCurrentCommand == "NetworkFaultChange") + else if (name == "NetworkFaultChange") { self->OnGeneralFaultEventHandler(Clusters::GeneralDiagnostics::Events::NetworkFaultChange::Id); } - else if (self->mCurrentCommand == "SwitchLatched") + else if (name == "SwitchLatched") { - self->OnSwitchEventHandler(Clusters::Switch::Events::SwitchLatched::Id); + uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); + self->OnSwitchLatchedHandler(newPosition); } - else if (self->mCurrentCommand == "InitialPress") + else if (name == "InitialPress") { - self->OnSwitchEventHandler(Clusters::Switch::Events::InitialPress::Id); + uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); + self->OnSwitchInitialPressedHandler(newPosition); } - else if (self->mCurrentCommand == "LongPress") + else if (name == "LongPress") { - self->OnSwitchEventHandler(Clusters::Switch::Events::LongPress::Id); + uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); + self->OnSwitchLongPressedHandler(newPosition); } - else if (self->mCurrentCommand == "ShortRelease") + else if (name == "ShortRelease") { - self->OnSwitchEventHandler(Clusters::Switch::Events::ShortRelease::Id); + uint8_t previousPosition = static_cast(self->mJsonValue["PreviousPosition"].asUInt()); + self->OnSwitchShortReleasedHandler(previousPosition); } - else if (self->mCurrentCommand == "LongRelease") + else if (name == "LongRelease") { - self->OnSwitchEventHandler(Clusters::Switch::Events::LongRelease::Id); + uint8_t previousPosition = static_cast(self->mJsonValue["PreviousPosition"].asUInt()); + self->OnSwitchLongReleasedHandler(previousPosition); } - else if (self->mCurrentCommand == "MultiPressOngoing") + else if (name == "MultiPressOngoing") { - self->OnSwitchEventHandler(Clusters::Switch::Events::MultiPressOngoing::Id); + uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); + uint8_t count = static_cast(self->mJsonValue["CurrentNumberOfPressesCounted"].asUInt()); + self->OnSwitchMultiPressOngoingHandler(newPosition, count); } - else if (self->mCurrentCommand == "MultiPressComplete") + else if (name == "MultiPressComplete") { - self->OnSwitchEventHandler(Clusters::Switch::Events::MultiPressComplete::Id); + uint8_t previousPosition = static_cast(self->mJsonValue["PreviousPosition"].asUInt()); + uint8_t count = static_cast(self->mJsonValue["TotalNumberOfPressesCounted"].asUInt()); + self->OnSwitchMultiPressOngoingHandler(previousPosition, count); } - else if (self->mCurrentCommand == "PowerOnReboot") + else if (name == "PowerOnReboot") { self->OnRebootSignalHandler(BootReasonType::kPowerOnReboot); } - else if (self->mCurrentCommand == "BrownOutReset") + else if (name == "BrownOutReset") { self->OnRebootSignalHandler(BootReasonType::kBrownOutReset); } - else if (self->mCurrentCommand == "SoftwareWatchdogReset") + else if (name == "SoftwareWatchdogReset") { self->OnRebootSignalHandler(BootReasonType::kSoftwareWatchdogReset); } - else if (self->mCurrentCommand == "HardwareWatchdogReset") + else if (name == "HardwareWatchdogReset") { self->OnRebootSignalHandler(BootReasonType::kHardwareWatchdogReset); } - else if (self->mCurrentCommand == "SoftwareUpdateCompleted") + else if (name == "SoftwareUpdateCompleted") { self->OnRebootSignalHandler(BootReasonType::kSoftwareUpdateCompleted); } - else if (self->mCurrentCommand == "SoftwareReset") + else if (name == "SoftwareReset") { self->OnRebootSignalHandler(BootReasonType::kSoftwareReset); } @@ -114,6 +135,8 @@ void AllClustersCommandDelegate::HandleEventCommand(intptr_t context) { ChipLogError(NotSpecified, "Unhandled command: Should never happens"); } + + self->mJsonValue.clear(); } bool AllClustersCommandDelegate::IsClusterPresentOnAnyEndpoint(ClusterId clusterId) @@ -219,43 +242,87 @@ void AllClustersCommandDelegate::OnSoftwareFaultEventHandler(uint32_t eventId) Clusters::SoftwareDiagnosticsServer::Instance().OnSoftwareFaultDetect(softwareFault); } -void AllClustersCommandDelegate::OnSwitchEventHandler(uint32_t eventId) +void AllClustersCommandDelegate::OnSwitchLatchedHandler(uint8_t newPosition) { - EndpointId endpoint = 1; - uint8_t newPosition = 20; - uint8_t previousPosition = 10; - uint8_t count = 3; + EndpointId endpoint = 1; - if (eventId == Clusters::Switch::Events::SwitchLatched::Id) - { - Clusters::SwitchServer::Instance().OnSwitchLatch(endpoint, newPosition); - } - else if (eventId == Clusters::Switch::Events::InitialPress::Id) - { - Clusters::SwitchServer::Instance().OnInitialPress(endpoint, newPosition); - } - else if (eventId == Clusters::Switch::Events::LongPress::Id) - { - Clusters::SwitchServer::Instance().OnLongPress(endpoint, newPosition); - } - else if (eventId == Clusters::Switch::Events::ShortRelease::Id) - { - Clusters::SwitchServer::Instance().OnShortRelease(endpoint, previousPosition); - } - else if (eventId == Clusters::Switch::Events::LongRelease::Id) - { - Clusters::SwitchServer::Instance().OnLongRelease(endpoint, previousPosition); - } - else if (eventId == Clusters::Switch::Events::MultiPressOngoing::Id) - { - Clusters::SwitchServer::Instance().OnMultiPressOngoing(endpoint, newPosition, count); - } - else if (eventId == Clusters::Switch::Events::MultiPressComplete::Id) - { - Clusters::SwitchServer::Instance().OnMultiPressComplete(endpoint, newPosition, count); - } - else - { - ChipLogError(NotSpecified, "Unknow event ID:%d", eventId); - } + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The latching switch is moved to a new position:%d", newPosition); + + Clusters::SwitchServer::Instance().OnSwitchLatch(endpoint, newPosition); +} + +void AllClustersCommandDelegate::OnSwitchInitialPressedHandler(uint8_t newPosition) +{ + EndpointId endpoint = 1; + + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The new position when the momentary switch starts to be pressed:%d", newPosition); + + Clusters::SwitchServer::Instance().OnInitialPress(endpoint, newPosition); +} + +void AllClustersCommandDelegate::OnSwitchLongPressedHandler(uint8_t newPosition) +{ + EndpointId endpoint = 1; + + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed for a long time:%d", newPosition); + + Clusters::SwitchServer::Instance().OnLongPress(endpoint, newPosition); +} + +void AllClustersCommandDelegate::OnSwitchShortReleasedHandler(uint8_t previousPosition) +{ + EndpointId endpoint = 1; + + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The the previous value of the CurrentPosition when the momentary switch has been released:%d", + previousPosition); + + Clusters::SwitchServer::Instance().OnShortRelease(endpoint, previousPosition); +} + +void AllClustersCommandDelegate::OnSwitchLongReleasedHandler(uint8_t previousPosition) +{ + EndpointId endpoint = 1; + + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + ChipLogDetail(NotSpecified, + "The the previous value of the CurrentPosition when the momentary switch has been released after having been " + "pressed for a long time:%d", + previousPosition); + + Clusters::SwitchServer::Instance().OnLongRelease(endpoint, previousPosition); +} + +void AllClustersCommandDelegate::OnSwitchMultiPressOngoingHandler(uint8_t newPosition, uint8_t count) +{ + EndpointId endpoint = 1; + + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed in a multi-press sequence:%d", + newPosition); + ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); + + Clusters::SwitchServer::Instance().OnMultiPressOngoing(endpoint, newPosition, count); +} + +void AllClustersCommandDelegate::OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count) +{ + EndpointId endpoint = 1; + + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The previous position when the momentary switch has been pressed in a multi-press sequence:%d", + previousPosition); + ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); + + Clusters::SwitchServer::Instance().OnMultiPressComplete(endpoint, previousPosition, count); } diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h index 74285343a0f809..5a55319ed674aa 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h @@ -20,15 +20,16 @@ #include "NamedPipeCommands.h" +#include #include class AllClustersCommandDelegate : public NamedPipeCommandDelegate { public: - void OnEventCommandReceived(const char * command) override; + void OnEventCommandReceived(const char * json) override; private: - std::string mCurrentCommand; + Json::Value mJsonValue; static void HandleEventCommand(intptr_t context); @@ -50,7 +51,39 @@ class AllClustersCommandDelegate : public NamedPipeCommandDelegate void OnSoftwareFaultEventHandler(uint32_t eventId); /** - * Should be called when a switch operation takes place on the Node. + * Should be called when the latching switch is moved to a new position. */ - void OnSwitchEventHandler(uint32_t eventId); + void OnSwitchLatchedHandler(uint8_t newPosition); + + /** + * Should be called when the momentary switch starts to be pressed. + */ + void OnSwitchInitialPressedHandler(uint8_t newPosition); + + /** + * Should be called when the momentary switch has been pressed for a "long" time. + */ + void OnSwitchLongPressedHandler(uint8_t newPosition); + + /** + * Should be called when the momentary switch has been released. + */ + void OnSwitchShortReleasedHandler(uint8_t previousPosition); + + /** + * Should be called when the momentary switch has been released after having been pressed for a long time. + */ + void OnSwitchLongReleasedHandler(uint8_t previousPosition); + + /** + * Should be called to indicate how many times the momentary switch has been pressed in a multi-press + * sequence, during that sequence. + */ + void OnSwitchMultiPressOngoingHandler(uint8_t newPosition, uint8_t count); + + /** + * Should be called to indicate how many times the momentary switch has been pressed in a multi-press + * sequence, after it has been detected that the sequence has ended. + */ + void OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count); }; diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index a53f45d11006d6..5e0d4a056572bb 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -36,6 +36,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/platform/linux:app-main", "${chip_root}/src/app/tests/suites/credentials:dac_provider", "${chip_root}/src/lib", + "${chip_root}/third_party/jsoncpp", ] include_dirs = @@ -120,3 +121,7 @@ group("linux") { deps += [ ":chip-all-clusters-app" ] } } + +group("default") { + deps = [ ":linux" ] +} diff --git a/examples/all-clusters-app/linux/README.md b/examples/all-clusters-app/linux/README.md index f92e6995ef4be1..8479fd480736fa 100644 --- a/examples/all-clusters-app/linux/README.md +++ b/examples/all-clusters-app/linux/README.md @@ -1,8 +1,37 @@ # Matter Linux/Mac All Clusters Example +## Compiling all-clusters-app for testing on Linux and Mac + +To compile all-clusters-app on Intel Mac, run: + +``` +$ ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target darwin-x64-all-clusters-no-ble-asan-clang build" +``` + +at the top level of the Matter tree. + +To compile on an Arm Mac, run: + +``` +$ ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target darwin-arm64-all-clusters-no-ble-asan-clang build" +``` + +Similarly, to compile on Linux x86-64 run: + +``` +$ ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-x64-all-clusters-no-ble-asan-clang build" +``` + +And to compile on Linux ARM run: + +``` +$ ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-clang build" +``` + ## Fuzzing integration -This example supports compilation with libfuzzer enabled. +This example also supports compilation with libfuzzer enabled. This should be +used when trying to fuzz-test the Matter SDK. ### Compiling with fuzzing enabled @@ -81,7 +110,7 @@ all-cluster-app event named pipe /tmp/chip_all_clusters_fifo-. 1. Generate event `SoftwareFault` when a software fault takes place on the Node. ``` -$ echo SoftwareFault > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"SoftwareFault"}' > /tmp/chip_all_clusters_fifo- ``` #### Trigger `HardwareFault` events @@ -90,21 +119,21 @@ $ echo SoftwareFault > /tmp/chip_all_clusters_fifo- hardware faults currently detected by the Node. ``` -$ echo HardwareFaultChange > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"HardwareFaultChange"}' > /tmp/chip_all_clusters_fifo- ``` 2. Generate event `RadioFaultChange` to indicate a change in the set of radio faults currently detected by the Node. ``` -$ echo RadioFaultChange > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"RadioFaultChange"}' > /tmp/chip_all_clusters_fifo- ``` 3. Generate event `NetworkFaultChange` to indicate a change in the set of network faults currently detected by the Node. ``` -$ echo NetworkFaultChange > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"NetworkFaultChange"}' > /tmp/chip_all_clusters_fifo- ``` 4. Generate event `BootReason` to indicate the reason that caused the device to @@ -129,7 +158,7 @@ $ echo NetworkFaultChange > /tmp/chip_all_clusters_fifo- reboot. ``` -$ echo > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":""}' > /tmp/chip_all_clusters_fifo- ``` #### Trigger Switch events @@ -138,41 +167,41 @@ $ echo > /tmp/chip_all_clusters_fifo- position. ``` -$ echo SwitchLatched > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"SwitchLatched","NewPosition":3}' > /tmp/chip_all_clusters_fifo- ``` 2. Generate event `InitialPress`, when the momentary switch starts to be pressed. ``` -$ echo InitialPress > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"InitialPress","NewPosition":3}' > /tmp/chip_all_clusters_fifo- ``` 3. Generate event `LongPress`, when the momentary switch has been pressed for a "long" time. ``` -$ echo LongPress > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"LongPress","NewPosition":3}' > /tmp/chip_all_clusters_fifo- ``` 4. Generate event `ShortRelease`, when the momentary switch has been released. ``` -$ echo ShortRelease > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"ShortRelease","PreviousPosition":3}' > /tmp/chip_all_clusters_fifo- ``` 5. Generate event `LongRelease` when the momentary switch has been released and after having been pressed for a long time. ``` -$ echo LongRelease > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"LongRelease","PreviousPosition":3}' > /tmp/chip_all_clusters_fifo- ``` 6. Generate event `MultiPressOngoing` to indicate how many times the momentary switch has been pressed in a multi-press sequence, during that sequence. ``` -$ echo MultiPressOngoing > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"MultiPressOngoing","NewPosition":3,"CurrentNumberOfPressesCounted":4}' > /tmp/chip_all_clusters_fifo- ``` 7. Generate event `MultiPressComplete` to indicate how many times the momentary @@ -180,5 +209,5 @@ $ echo MultiPressOngoing > /tmp/chip_all_clusters_fifo- that the sequence has ended. ``` -$ echo MultiPressComplete > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"MultiPressComplete","PreviousPosition":3,"TotalNumberOfPressesCounted":2}' > /tmp/chip_all_clusters_fifo- ``` diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index c017d3c61a05a0..e42681d16a64e1 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -55,7 +55,7 @@ using namespace chip::DeviceLayer; namespace { -constexpr const char kChipEventFifoPathPrefix[] = "/tmp/chip_all_cluster_fifo_"; +constexpr const char kChipEventFifoPathPrefix[] = "/tmp/chip_all_clusters_fifo_"; LowPowerManager sLowPowerManager; NamedPipeCommands sChipNamedPipeCommands; AllClustersCommandDelegate sAllClustersCommandDelegate; diff --git a/examples/all-clusters-app/tizen/src/main.cpp b/examples/all-clusters-app/tizen/src/main.cpp index 89002ef05bc3e0..adeb8735752332 100644 --- a/examples/all-clusters-app/tizen/src/main.cpp +++ b/examples/all-clusters-app/tizen/src/main.cpp @@ -21,24 +21,30 @@ #include #include #include +#include #include #include using namespace chip; using namespace chip::app; -using namespace chip::app::Clusters; +using namespace chip::DeviceLayer; // Network commissioning namespace { constexpr EndpointId kNetworkCommissioningEndpointMain = 0; constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; + +NetworkCommissioning::TizenEthernetDriver sEthernetDriver; +Clusters::NetworkCommissioning::Instance sEthernetNetworkCommissioningInstance(kNetworkCommissioningEndpointMain, &sEthernetDriver); } // namespace void ApplicationInit() { // Enable secondary endpoint only when we need it. emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); + + sEthernetNetworkCommissioningInstance.Init(); } int main(int argc, char * argv[]) 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 50a151d154f03d..dac16c909b027a 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 @@ -93,12 +93,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -200,13 +200,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } server cluster OnOff = 6 { @@ -278,44 +278,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -325,7 +336,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -396,7 +407,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -404,7 +415,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -508,6 +519,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -840,7 +852,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -1103,7 +1115,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1385,7 +1397,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1411,7 +1422,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1477,8 +1488,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1544,10 +1555,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { @@ -3033,7 +3044,7 @@ server cluster TestCluster = 4294048773 { } info event TestFabricScopedEvent = 2 { - fabric_idx arg1 = 254; + fabric_idx fabricIndex = 254; } attribute boolean boolean = 0; diff --git a/examples/all-clusters-minimal-app/ameba/chip_main.cmake b/examples/all-clusters-minimal-app/ameba/chip_main.cmake index aa1542a1163241..287afee2116601 100755 --- a/examples/all-clusters-minimal-app/ameba/chip_main.cmake +++ b/examples/all-clusters-minimal-app/ameba/chip_main.cmake @@ -225,7 +225,6 @@ list( -DUSE_ZAP_CONFIG -DCHIP_HAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE= - -DMATTER_ALL_CLUSTERS_APP=1 ) if (matter_enable_persistentstorage_audit) diff --git a/examples/all-clusters-minimal-app/esp32/README.md b/examples/all-clusters-minimal-app/esp32/README.md index 8c2965a834013d..244b3567ad47e9 100644 --- a/examples/all-clusters-minimal-app/esp32/README.md +++ b/examples/all-clusters-minimal-app/esp32/README.md @@ -113,6 +113,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). $ source ./scripts/activate.sh ``` +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - Target Set To set IDF target, first: @@ -278,8 +286,8 @@ the ESP32 all-clusters-minimal-app to commission it onto a Wi-Fi network: Parameters: -1. Discriminator: 3840 (configurable through menuconfig) -2. Setup-pin-code: 20202021 (configurable through menuconfig) +1. Discriminator: 3840 +2. Setup-pin-code: 20202021 3. Node-id: 12344321 (you can assign any node id) ### Cluster control diff --git a/examples/all-clusters-minimal-app/esp32/main/include/ShellCommands.h b/examples/all-clusters-minimal-app/esp32/main/include/ShellCommands.h index 3e4e8536cee962..832039dd90358b 100644 --- a/examples/all-clusters-minimal-app/esp32/main/include/ShellCommands.h +++ b/examples/all-clusters-minimal-app/esp32/main/include/ShellCommands.h @@ -140,7 +140,7 @@ class CASECommands GetInstance().SetOnConnecting(false); } - static void OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error) + static void OnConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { streamer_printf(streamer_get(), "Establish CASESession Failure!\r\n"); GetInstance().SetOnConnecting(false); @@ -156,8 +156,9 @@ class CASECommands ChipLogError(SecureChannel, "Can't get the CASESessionManager"); return; } - caseSessionManager->FindOrEstablishSession(caseCommand->GetFabricInfo()->GetPeerIdForNode(caseCommand->GetNodeId()), - &sOnConnectedCallback, &sOnConnectionFailureCallback); + caseSessionManager->FindOrEstablishSession( + ScopedNodeId(caseCommand->GetNodeId(), caseCommand->GetFabricInfo()->GetFabricIndex()), &sOnConnectedCallback, + &sOnConnectionFailureCallback); } static CHIP_ERROR ConnectToNodeHandler(int argc, char ** argv) diff --git a/examples/all-clusters-minimal-app/linux/BUILD.gn b/examples/all-clusters-minimal-app/linux/BUILD.gn index cc2714427d4f3e..cf3f915fe0d828 100644 --- a/examples/all-clusters-minimal-app/linux/BUILD.gn +++ b/examples/all-clusters-minimal-app/linux/BUILD.gn @@ -101,3 +101,7 @@ group("linux") { deps = [] deps += [ ":chip-all-clusters-minimal-app" ] } + +group("default") { + deps = [ ":linux" ] +} diff --git a/examples/all-clusters-minimal-app/tizen/src/main.cpp b/examples/all-clusters-minimal-app/tizen/src/main.cpp index 89002ef05bc3e0..adeb8735752332 100644 --- a/examples/all-clusters-minimal-app/tizen/src/main.cpp +++ b/examples/all-clusters-minimal-app/tizen/src/main.cpp @@ -21,24 +21,30 @@ #include #include #include +#include #include #include using namespace chip; using namespace chip::app; -using namespace chip::app::Clusters; +using namespace chip::DeviceLayer; // Network commissioning namespace { constexpr EndpointId kNetworkCommissioningEndpointMain = 0; constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; + +NetworkCommissioning::TizenEthernetDriver sEthernetDriver; +Clusters::NetworkCommissioning::Instance sEthernetNetworkCommissioningInstance(kNetworkCommissioningEndpointMain, &sEthernetDriver); } // namespace void ApplicationInit() { // Enable secondary endpoint only when we need it. emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); + + sEthernetNetworkCommissioningInstance.Init(); } int main(int argc, char * argv[]) diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index b4b7248f961b4c..b47457480c4a44 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -125,44 +125,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -172,7 +183,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -254,7 +265,7 @@ client cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -262,7 +273,7 @@ client cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -322,7 +333,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -330,7 +341,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -420,11 +431,19 @@ server cluster BridgedActions = 37 { readonly attribute ActionStruct actionList[] = 0; readonly attribute EndpointListStruct endpointList[] = 1; + readonly attribute long_char_string<512> setupUrl = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct InstantActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + command InstantAction(InstantActionRequest): DefaultSuccess = 0; } server cluster Basic = 40 { @@ -441,6 +460,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -593,7 +613,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -865,7 +885,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1222,7 +1242,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1248,7 +1267,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; @@ -1317,8 +1336,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1387,10 +1406,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster UserLabel = 65 { @@ -1723,6 +1742,7 @@ endpoint 1 { server cluster BridgedActions { callback attribute actionList; callback attribute endpointList; + ram attribute setupUrl default = "https://example.com"; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 6d01b0254bb3d5..10bffcd24bbd32 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 71, + "featureLevel": 72, "creator": "zap", "keyValuePairs": [ { @@ -115,7 +115,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -131,7 +131,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -147,7 +147,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -159,7 +159,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -175,7 +175,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -191,7 +191,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -297,7 +297,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -313,7 +313,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -373,7 +373,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -389,7 +389,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -511,7 +511,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "10", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -527,7 +527,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -543,7 +543,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -559,7 +559,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -575,7 +575,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -591,7 +591,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -607,7 +607,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "XX", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -623,7 +623,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -639,7 +639,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -655,7 +655,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -671,7 +671,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -827,7 +827,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -843,7 +843,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -859,7 +859,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -965,7 +965,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "en-US", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -981,7 +981,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -993,7 +993,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1009,7 +1009,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1025,7 +1025,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1131,7 +1131,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1175,7 +1175,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1191,7 +1191,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1207,7 +1207,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": "", @@ -1341,7 +1341,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1357,7 +1357,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1589,7 +1589,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1605,7 +1605,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1621,7 +1621,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1925,7 +1925,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1941,7 +1941,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2273,7 +2273,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "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": "", @@ -4175,7 +4175,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4191,7 +4191,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4207,7 +4207,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4503,7 +4503,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4519,7 +4519,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4535,7 +4535,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4687,7 +4687,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4703,7 +4703,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4719,7 +4719,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4735,7 +4735,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4751,7 +4751,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4767,7 +4767,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4783,7 +4783,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5052,7 +5052,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5068,7 +5068,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5080,7 +5080,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5096,7 +5096,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5112,7 +5112,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5214,7 +5214,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5230,11 +5230,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5246,11 +5246,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5262,11 +5262,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5278,7 +5278,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5294,7 +5294,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5310,7 +5310,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5412,7 +5412,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5428,7 +5428,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5444,7 +5444,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5460,7 +5460,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5510,7 +5510,16 @@ "define": "BRIDGED_ACTIONS_CLUSTER", "side": "client", "enabled": 0, - "commands": [], + "commands": [ + { + "name": "InstantAction", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], "attributes": [ { "name": "FeatureMap", @@ -5562,7 +5571,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5578,7 +5587,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5593,11 +5602,11 @@ "mfgCode": null, "side": "server", "type": "long_char_string", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "https://example.com", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5610,7 +5619,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5626,7 +5635,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5642,7 +5651,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/bridge-app/esp32/README.md b/examples/bridge-app/esp32/README.md index c9a1dfbe9020a7..465cade4b0092c 100644 --- a/examples/bridge-app/esp32/README.md +++ b/examples/bridge-app/esp32/README.md @@ -135,6 +135,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). ESP32 based device types, please refer [examples/all-clusters-app/esp32](https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/esp32) +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - To build the demo application. ``` @@ -255,8 +263,8 @@ the ESP32 all-clusters-app to commission it onto a Wi-Fi network: Parameters: -1. Discriminator: 3840 (configurable through menuconfig) -2. Setup-pin-code: 20202021 (configurable through menuconfig) +1. Discriminator: 3840 +2. Setup-pin-code: 20202021 3. Node-id: 12344321 (you can assign any node id) ### Cluster control diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index 3b94d192d216e1..4f86e1872bcefa 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -29,9 +30,12 @@ #include #include #include +#include #include #include +#include +#include #include #if CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER @@ -50,6 +54,7 @@ using namespace ::chip; using namespace ::chip::DeviceManager; using namespace ::chip::Platform; using namespace ::chip::Credentials; +using namespace ::chip::app::Clusters; static AppDeviceCallbacks AppCallback; @@ -195,19 +200,6 @@ CHIP_ERROR RemoveDeviceEndpoint(Device * dev) return CHIP_ERROR_INTERNAL; } -// ZCL format -> (len, string) -uint8_t * ToZclCharString(uint8_t * zclString, const char * cString, uint8_t maxLength) -{ - size_t len = strlen(cString); - if (len > maxLength) - { - len = maxLength; - } - zclString[0] = static_cast(len); - memcpy(&zclString[1], cString, zclString[0]); - return zclString; -} - EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength) { @@ -219,7 +211,8 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::Attribut } else if ((attributeId == ZCL_NODE_LABEL_ATTRIBUTE_ID) && (maxReadLength == 32)) { - ToZclCharString(buffer, dev->GetName(), static_cast(maxReadLength - 1)); + MutableByteSpan zclNameSpan(buffer, maxReadLength); + MakeZclCharString(zclNameSpan, dev->GetName()); } else if ((attributeId == ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID) && (maxReadLength == 2)) { @@ -303,31 +296,48 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster return EMBER_ZCL_STATUS_FAILURE; } +namespace { +void CallReportingCallback(intptr_t closure) +{ + auto path = reinterpret_cast(closure); + MatterReportingAttributeChangeCallback(*path); + Platform::Delete(path); +} + +void ScheduleReportingCallback(Device * dev, ClusterId cluster, AttributeId attribute) +{ + auto * path = Platform::New(dev->GetEndpointId(), cluster, attribute); + DeviceLayer::PlatformMgr().ScheduleWork(CallReportingCallback, reinterpret_cast(path)); +} +} // anonymous namespace + void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) { if (itemChangedMask & Device::kChanged_Reachable) { - uint8_t reachable = dev->IsReachable() ? 1 : 0; - MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_REACHABLE_ATTRIBUTE_ID, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &reachable); + ScheduleReportingCallback(dev, BridgedDeviceBasic::Id, BridgedDeviceBasic::Attributes::Reachable::Id); } if (itemChangedMask & Device::kChanged_State) { - uint8_t isOn = dev->IsOn() ? 1 : 0; - MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, - ZCL_BOOLEAN_ATTRIBUTE_TYPE, &isOn); + ScheduleReportingCallback(dev, OnOff::Id, OnOff::Attributes::OnOff::Id); } if (itemChangedMask & Device::kChanged_Name) { - uint8_t zclName[kNodeLabelSize + 1]; - ToZclCharString(zclName, dev->GetName(), kNodeLabelSize); - MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_NODE_LABEL_ATTRIBUTE_ID, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, zclName); + ScheduleReportingCallback(dev, BridgedDeviceBasic::Id, BridgedDeviceBasic::Attributes::NodeLabel::Id); } } +bool emberAfBridgedActionsClusterInstantActionCallback(app::CommandHandler * commandObj, + const app::ConcreteCommandPath & commandPath, + const BridgedActions::Commands::InstantAction::DecodableType & commandData) +{ + // No actions are implemented, just return status NotFound. + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::NotFound); + return true; +} + const EmberAfDeviceType gBridgedRootDeviceTypes[] = { { DEVICE_TYPE_ROOT_NODE, DEVICE_VERSION_DEFAULT }, { DEVICE_TYPE_BRIDGE, DEVICE_VERSION_DEFAULT } }; @@ -390,17 +400,17 @@ extern "C" void app_main() // Clear database memset(gDevices, 0, sizeof(gDevices)); + gLight1.SetReachable(true); + gLight2.SetReachable(true); + gLight3.SetReachable(true); + gLight4.SetReachable(true); + // Whenever bridged device changes its state gLight1.SetChangeCallback(&HandleDeviceStatusChanged); gLight2.SetChangeCallback(&HandleDeviceStatusChanged); gLight3.SetChangeCallback(&HandleDeviceStatusChanged); gLight4.SetChangeCallback(&HandleDeviceStatusChanged); - gLight1.SetReachable(true); - gLight2.SetReachable(true); - gLight3.SetReachable(true); - gLight4.SetReachable(true); - CHIPDeviceManager & deviceMgr = CHIPDeviceManager::GetInstance(); chip_err = deviceMgr.Init(&AppCallback); diff --git a/examples/bridge-app/linux/Device.cpp b/examples/bridge-app/linux/Device.cpp index e2d2122a49ce25..12e78324ddc04c 100644 --- a/examples/bridge-app/linux/Device.cpp +++ b/examples/bridge-app/linux/Device.cpp @@ -262,3 +262,15 @@ Room::Room(std::string name, uint16_t endpointListId, EndpointListTypeEnum type, mType = type; mIsVisible = isVisible; } + +Action::Action(uint16_t actionId, std::string name, ActionTypeEnum type, uint16_t endpointListId, uint16_t supportedCommands, + ActionStateEnum status, bool isVisible) +{ + mActionId = actionId; + mName = name; + mType = type; + mEndpointListId = endpointListId; + mSupportedCommands = supportedCommands; + mStatus = status; + mIsVisible = isVisible; +} diff --git a/examples/bridge-app/linux/bridged-actions-stub.cpp b/examples/bridge-app/linux/bridged-actions-stub.cpp index 21712982dea9f7..debf2538206d57 100644 --- a/examples/bridge-app/linux/bridged-actions-stub.cpp +++ b/examples/bridge-app/linux/bridged-actions-stub.cpp @@ -57,8 +57,26 @@ constexpr uint16_t BridgedActionsAttrAccess::ClusterRevision; CHIP_ERROR BridgedActionsAttrAccess::ReadActionListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) { - // Just return an empty list - return aEncoder.EncodeEmptyList(); + CHIP_ERROR err = aEncoder.EncodeList([&endpoint](const auto & encoder) -> CHIP_ERROR { + std::vector actionList = GetActionListInfo(endpoint); + + for (auto action : actionList) + { + if (action->getIsVisible()) + { + BridgedActions::Structs::ActionStruct::Type actionStruct = { action->getActionId(), + CharSpan::fromCharString(action->getName().c_str()), + action->getType(), + action->getEndpointListId(), + action->getSupportedCommands(), + action->getStatus() }; + ReturnErrorOnFailure(encoder.Encode(actionStruct)); + } + } + + return CHIP_NO_ERROR; + }); + return err; } CHIP_ERROR BridgedActionsAttrAccess::ReadEndpointListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) diff --git a/examples/bridge-app/linux/include/Device.h b/examples/bridge-app/linux/include/Device.h index 1eea58a71a2eb1..75ea521e90d4d8 100644 --- a/examples/bridge-app/linux/include/Device.h +++ b/examples/bridge-app/linux/include/Device.h @@ -217,3 +217,28 @@ class Room uint16_t mEndpointListId; chip::app::Clusters::BridgedActions::EndpointListTypeEnum mType; }; + +class Action +{ +public: + Action(uint16_t actionId, std::string name, chip::app::Clusters::BridgedActions::ActionTypeEnum type, uint16_t endpointListId, + uint16_t supportedCommands, chip::app::Clusters::BridgedActions::ActionStateEnum status, bool isVisible); + inline void setName(std::string name) { mName = name; }; + inline std::string getName() { return mName; }; + inline chip::app::Clusters::BridgedActions::ActionTypeEnum getType() { return mType; }; + inline chip::app::Clusters::BridgedActions::ActionStateEnum getStatus() { return mStatus; }; + inline uint16_t getActionId() { return mActionId; }; + inline uint16_t getEndpointListId() { return mEndpointListId; }; + inline uint16_t getSupportedCommands() { return mSupportedCommands; }; + inline void setIsVisible(bool isVisible) { mIsVisible = isVisible; }; + inline bool getIsVisible() { return mIsVisible; }; + +private: + std::string mName; + chip::app::Clusters::BridgedActions::ActionTypeEnum mType; + chip::app::Clusters::BridgedActions::ActionStateEnum mStatus; + uint16_t mActionId; + uint16_t mEndpointListId; + uint16_t mSupportedCommands; + bool mIsVisible; +}; diff --git a/examples/bridge-app/linux/include/main.h b/examples/bridge-app/linux/include/main.h index fe81d30685f7ec..df7ba595cd6ece 100644 --- a/examples/bridge-app/linux/include/main.h +++ b/examples/bridge-app/linux/include/main.h @@ -19,3 +19,5 @@ #pragma once std::vector GetEndpointListInfo(chip::EndpointId parentId); + +std::vector GetActionListInfo(chip::EndpointId parentId); diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index d0b411446a210b..58e804782ddf1d 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -24,6 +24,8 @@ #include #include +#include +#include #include #include #include @@ -68,6 +70,7 @@ EndpointId gCurrentEndpointId; EndpointId gFirstDynamicEndpointId; Device * gDevices[CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT]; std::vector gRooms; +std::vector gActions; // ENDPOINT DEFINITIONS: // ================================================================================= @@ -118,6 +121,7 @@ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_DEVICE_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttrib DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(bridgedDeviceBasicAttrs) DECLARE_DYNAMIC_ATTRIBUTE(ZCL_NODE_LABEL_ATTRIBUTE_ID, CHAR_STRING, kNodeLabelSize, 0), /* NodeLabel */ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_REACHABLE_ATTRIBUTE_ID, BOOLEAN, 1, 0), /* Reachable */ + DECLARE_DYNAMIC_ATTRIBUTE(ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID, BITMAP32, 4, 0), /* feature map */ DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); // Declare Cluster List for Bridged Light endpoint @@ -168,6 +172,13 @@ Room room1("Room 1", 0xE001, BridgedActions::EndpointListTypeEnum::kRoom, true); Room room2("Room 2", 0xE002, BridgedActions::EndpointListTypeEnum::kRoom, true); Room room3("Zone 3", 0xE003, BridgedActions::EndpointListTypeEnum::kZone, false); +Action action1(0x1001, "Room 1 On", BridgedActions::ActionTypeEnum::kAutomation, 0xE001, 0x1, + BridgedActions::ActionStateEnum::kInactive, true); +Action action2(0x1002, "Turn On Room 2", BridgedActions::ActionTypeEnum::kAutomation, 0xE002, 0x01, + BridgedActions::ActionStateEnum::kInactive, true); +Action action3(0x1003, "Turn Off Room 1", BridgedActions::ActionTypeEnum::kAutomation, 0xE003, 0x01, + BridgedActions::ActionStateEnum::kInactive, false); + // --------------------------------------------------------------------------- // // SWITCH ENDPOINT: contains the following clusters: @@ -195,6 +206,7 @@ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_DEVICE_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttrib DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(switchBridgedDeviceBasicAttrs) DECLARE_DYNAMIC_ATTRIBUTE(ZCL_NODE_LABEL_ATTRIBUTE_ID, CHAR_STRING, kNodeLabelSize, 0), /* NodeLabel */ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_REACHABLE_ATTRIBUTE_ID, BOOLEAN, 1, 0), /* Reachable */ + DECLARE_DYNAMIC_ATTRIBUTE(ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID, BITMAP32, 4, 0), /* feature map */ DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); // Declare Cluster List for Bridged Switch endpoint @@ -254,6 +266,7 @@ DataVersion gComposedPowerSourceDataVersions[ArraySize(bridgedPowerSourceCluster #define ZCL_DESCRIPTOR_CLUSTER_REVISION (1u) #define ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_REVISION (1u) +#define ZCL_BRIDGED_DEVICE_BASIC_FEATURE_MAP (0u) #define ZCL_FIXED_LABEL_CLUSTER_REVISION (1u) #define ZCL_ON_OFF_CLUSTER_REVISION (4u) #define ZCL_SWITCH_CLUSTER_REVISION (1u) @@ -360,22 +373,36 @@ std::vector GetEndpointListInfo(chip::EndpointId parentId) return infoList; } +std::vector GetActionListInfo(chip::EndpointId parentId) +{ + return gActions; +} + +namespace { +void CallReportingCallback(intptr_t closure) +{ + auto path = reinterpret_cast(closure); + MatterReportingAttributeChangeCallback(*path); + Platform::Delete(path); +} + +void ScheduleReportingCallback(Device * dev, ClusterId cluster, AttributeId attribute) +{ + auto * path = Platform::New(dev->GetEndpointId(), cluster, attribute); + PlatformMgr().ScheduleWork(CallReportingCallback, reinterpret_cast(path)); +} +} // anonymous namespace + void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) { if (itemChangedMask & Device::kChanged_Reachable) { - uint8_t reachable = dev->IsReachable() ? 1 : 0; - MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_REACHABLE_ATTRIBUTE_ID, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &reachable); + ScheduleReportingCallback(dev, BridgedDeviceBasic::Id, BridgedDeviceBasic::Attributes::Reachable::Id); } if (itemChangedMask & Device::kChanged_Name) { - uint8_t zclName[kNodeLabelSize]; - MutableByteSpan zclNameSpan(zclName); - MakeZclCharString(zclNameSpan, dev->GetName()); - MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_NODE_LABEL_ATTRIBUTE_ID, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, zclNameSpan.data()); + ScheduleReportingCallback(dev, BridgedDeviceBasic::Id, BridgedDeviceBasic::Attributes::NodeLabel::Id); } } @@ -388,9 +415,7 @@ void HandleDeviceOnOffStatusChanged(DeviceOnOff * dev, DeviceOnOff::Changed_t it if (itemChangedMask & DeviceOnOff::kChanged_OnOff) { - uint8_t isOn = dev->IsOn() ? 1 : 0; - MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, - ZCL_BOOLEAN_ATTRIBUTE_TYPE, &isOn); + ScheduleReportingCallback(dev, OnOff::Id, OnOff::Attributes::OnOff::Id); } } @@ -463,6 +488,10 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::Attribut { *buffer = (uint16_t) ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_REVISION; } + else if ((attributeId == ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID) && (maxReadLength == 4)) + { + *buffer = (uint32_t) ZCL_BRIDGED_DEVICE_BASIC_FEATURE_MAP; + } else { return EMBER_ZCL_STATUS_FAILURE; @@ -640,6 +669,82 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster return ret; } +void runOnOffRoomAction(Room * room, bool actionOn, EndpointId endpointId, uint16_t actionID, uint32_t invokeID, bool hasInvokeID) +{ + if (hasInvokeID) + { + BridgedActions::Events::StateChanged::Type event{ actionID, invokeID, BridgedActions::ActionStateEnum::kActive }; + EventNumber eventNumber; + chip::app::LogEvent(event, endpointId, eventNumber); + } + + // Check and run the action for ActionLight1 - ActionLight4 + if (room->getName().compare(ActionLight1.GetLocation()) == 0) + { + ActionLight1.SetOnOff(actionOn); + } + if (room->getName().compare(ActionLight2.GetLocation()) == 0) + { + ActionLight2.SetOnOff(actionOn); + } + if (room->getName().compare(ActionLight3.GetLocation()) == 0) + { + ActionLight3.SetOnOff(actionOn); + } + if (room->getName().compare(ActionLight4.GetLocation()) == 0) + { + ActionLight4.SetOnOff(actionOn); + } + + if (hasInvokeID) + { + BridgedActions::Events::StateChanged::Type event{ actionID, invokeID, BridgedActions::ActionStateEnum::kInactive }; + EventNumber eventNumber; + chip::app::LogEvent(event, endpointId, eventNumber); + } +} + +bool emberAfBridgedActionsClusterInstantActionCallback(app::CommandHandler * commandObj, + const app::ConcreteCommandPath & commandPath, + const BridgedActions::Commands::InstantAction::DecodableType & commandData) +{ + bool hasInvokeID = false; + uint32_t invokeID = 0; + EndpointId endpointID = commandPath.mEndpointId; + auto & actionID = commandData.actionID; + + if (commandData.invokeID.HasValue()) + { + hasInvokeID = true; + invokeID = commandData.invokeID.Value(); + } + + if (actionID == action1.getActionId() && action1.getIsVisible()) + { + // Turn On Lights in Room 1 + runOnOffRoomAction(&room1, true, endpointID, actionID, invokeID, hasInvokeID); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::Success); + return true; + } + if (actionID == action2.getActionId() && action2.getIsVisible()) + { + // Turn On Lights in Room 2 + runOnOffRoomAction(&room2, true, endpointID, actionID, invokeID, hasInvokeID); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::Success); + return true; + } + if (actionID == action3.getActionId() && action3.getIsVisible()) + { + // Turn Off Lights in Room 1 + runOnOffRoomAction(&room1, false, endpointID, actionID, invokeID, hasInvokeID); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::Success); + return true; + } + + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::NotFound); + return true; +} + void ApplicationInit() {} const EmberAfDeviceType gBridgedOnOffDeviceTypes[] = { { DEVICE_TYPE_LO_ON_OFF_LIGHT, DEVICE_VERSION_DEFAULT }, @@ -744,6 +849,21 @@ void * bridge_polling_thread(void * context) room3.setIsVisible(true); ActionLight2.SetZone("Zone 3"); } + if (ch == 'm') + { + // TC-ACT-2.2 step 3c, rename "Turn on Room 1 lights" + action1.setName("Turn On Room 1"); + } + if (ch == 'n') + { + // TC-ACT-2.2 step 3f, remove "Turn on Room 2 lights" + action2.setIsVisible(false); + } + if (ch == 'o') + { + // TC-ACT-2.2 step 3i, add "Turn off Room 1 renamed lights" + action3.setIsVisible(true); + } continue; } @@ -760,29 +880,29 @@ int main(int argc, char * argv[]) memset(gDevices, 0, sizeof(gDevices)); // Setup Mock Devices - Light1.SetChangeCallback(&HandleDeviceOnOffStatusChanged); - Light2.SetChangeCallback(&HandleDeviceOnOffStatusChanged); - Light1.SetReachable(true); Light2.SetReachable(true); - Switch1.SetChangeCallback(&HandleDeviceSwitchStatusChanged); - Switch2.SetChangeCallback(&HandleDeviceSwitchStatusChanged); + Light1.SetChangeCallback(&HandleDeviceOnOffStatusChanged); + Light2.SetChangeCallback(&HandleDeviceOnOffStatusChanged); Switch1.SetReachable(true); Switch2.SetReachable(true); - // Setup devices for action cluster tests - ActionLight1.SetChangeCallback(&HandleDeviceOnOffStatusChanged); - ActionLight2.SetChangeCallback(&HandleDeviceOnOffStatusChanged); - ActionLight3.SetChangeCallback(&HandleDeviceOnOffStatusChanged); - ActionLight4.SetChangeCallback(&HandleDeviceOnOffStatusChanged); + Switch1.SetChangeCallback(&HandleDeviceSwitchStatusChanged); + Switch2.SetChangeCallback(&HandleDeviceSwitchStatusChanged); + // Setup devices for action cluster tests ActionLight1.SetReachable(true); ActionLight2.SetReachable(true); ActionLight3.SetReachable(true); ActionLight4.SetReachable(true); + ActionLight1.SetChangeCallback(&HandleDeviceOnOffStatusChanged); + ActionLight2.SetChangeCallback(&HandleDeviceOnOffStatusChanged); + ActionLight3.SetChangeCallback(&HandleDeviceOnOffStatusChanged); + ActionLight4.SetChangeCallback(&HandleDeviceOnOffStatusChanged); + // Define composed device with two switches ComposedDevice ComposedDevice("Composed Switcher", "Bedroom"); DeviceSwitch ComposedSwitch1("Composed Switch 1", "Bedroom", EMBER_AF_SWITCH_FEATURE_LATCHING_SWITCH); @@ -792,16 +912,16 @@ int main(int argc, char * argv[]) EMBER_AF_SWITCH_FEATURE_MOMENTARY_SWITCH_MULTI_PRESS); DevicePowerSource ComposedPowerSource("Composed Power Source", "Bedroom", EMBER_AF_POWER_SOURCE_FEATURE_BATTERY); - ComposedSwitch1.SetChangeCallback(&HandleDeviceSwitchStatusChanged); - ComposedSwitch2.SetChangeCallback(&HandleDeviceSwitchStatusChanged); - ComposedPowerSource.SetChangeCallback(&HandleDevicePowerSourceStatusChanged); - ComposedDevice.SetReachable(true); ComposedSwitch1.SetReachable(true); ComposedSwitch2.SetReachable(true); ComposedPowerSource.SetReachable(true); ComposedPowerSource.SetBatChargeLevel(58); + ComposedSwitch1.SetChangeCallback(&HandleDeviceSwitchStatusChanged); + ComposedSwitch2.SetChangeCallback(&HandleDeviceSwitchStatusChanged); + ComposedPowerSource.SetChangeCallback(&HandleDevicePowerSourceStatusChanged); + if (ChipLinuxAppInit(argc, argv) != 0) { return -1; @@ -866,6 +986,10 @@ int main(int argc, char * argv[]) gRooms.push_back(&room2); gRooms.push_back(&room3); + gActions.push_back(&action1); + gActions.push_back(&action2); + gActions.push_back(&action3); + { pthread_t poll_thread; int res = pthread_create(&poll_thread, nullptr, bridge_polling_thread, nullptr); diff --git a/examples/chef/chef.py b/examples/chef/chef.py index afeed016f1f00f..f62f40d7e021b8 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -81,6 +81,7 @@ def load_config() -> None: config["silabs-thread"]["GECKO_SDK"] = f"{_REPO_BASE_PATH}third_party/efr32_sdk/repo" config["silabs-thread"]["TTY"] = None config["silabs-thread"]["CU"] = None + config["silabs-thread"]["EFR32_BOARD"] = None flush_print(yaml.dump(config)) yaml.dump(config, configStream) @@ -474,6 +475,10 @@ def main(argv: Sequence[str]) -> None: pass elif options.build_target == "silabs-thread": flush_print('Path to gecko sdk is configured within Matter.') + if 'EFR32_BOARD' not in config['silabs-thread'] or config['silabs-thread']['EFR32_BOARD'] is None: + flush_print('EFR32_BOARD was not configured. Make sure silabs-thread.EFR32_BOARD is set on your config.yaml file') + exit(1) + efr32_board = config['silabs-thread']['EFR32_BOARD'] else: flush_print(f"Target {options.build_target} not supported") @@ -622,8 +627,21 @@ def main(argv: Sequence[str]) -> None: shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/efr32") if options.do_clean: shell.run_cmd(f"rm -rf out/{options.sample_device_type_name}") - shell.run_cmd( - f"""{_REPO_BASE_PATH}/scripts/examples/gn_efr32_example.sh ./ out/{options.sample_device_type_name} BRD4186A \'sample_name=\"{options.sample_device_type_name}\"\' enable_openthread_cli=true chip_build_libshell=true \'{'import("//with_pw_rpc.gni")' if options.do_rpc else ""}\'""") + efr32_cmd_args = [] + efr32_cmd_args.append(f'{_REPO_BASE_PATH}/scripts/examples/gn_efr32_example.sh') + efr32_cmd_args.append('./') + efr32_cmd_args.append(f'out/{options.sample_device_type_name}') + efr32_cmd_args.append(f'{efr32_board}') + efr32_cmd_args.append(f'\'sample_name=\"{options.sample_device_type_name}\"\'') + if sw_ver_string: + efr32_cmd_args.append(f'\'chip_device_config_device_software_version_string=\"{sw_ver_string}\"\'') + efr32_cmd_args.append('enable_openthread_cli=true') + if options.do_rpc: + efr32_cmd_args.append('chip_build_libshell=false') + efr32_cmd_args.append('\'import("//with_pw_rpc.gni")\'') + else: + efr32_cmd_args.append('chip_build_libshell=true') + shell.run_cmd(" ".join(efr32_cmd_args)) shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}") elif options.build_target == "linux": @@ -719,7 +737,7 @@ def main(argv: Sequence[str]) -> None: shell.run_cmd("west flash") elif (options.build_target == "silabs-thread") or (options.build_target == "silabs-wifi"): shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/efr32") - shell.run_cmd(f"python3 out/{options.sample_device_type_name}/BRD4186A/chip-efr32-chef-example.flash.py") + shell.run_cmd(f"python3 out/{options.sample_device_type_name}/{efr32_board}/chip-efr32-chef-example.flash.py") shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}") diff --git a/examples/chef/cicd_config.json b/examples/chef/cicd_config.json index f78baa7e3d3eee..27eafbe67631d3 100644 --- a/examples/chef/cicd_config.json +++ b/examples/chef/cicd_config.json @@ -2,14 +2,14 @@ "ci_allow_list": ["rootnode_dimmablelight_bCwGYSDpoe"], "cd_platforms": { "linux": { - "linux_x86": ["--cpu_type", "x64"], - "linux_arm64_ipv6only": ["--cpu_type", "arm64", "--ipv6only"] + "linux_x86": ["--cpu_type", "x64", "-a"], + "linux_arm64_ipv6only": ["--cpu_type", "arm64", "--ipv6only", "-a"] }, "esp32": { - "m5stack": [] + "m5stack": ["-a"] }, "nrfconnect": { - "nrf52840dk": [] + "nrf52840dk": ["-a"] } } } diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 3569eb47ec0efb..cadd67a1fd1247 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -99,12 +99,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -209,13 +209,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } server cluster OnOff = 6 { @@ -301,44 +301,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -348,7 +359,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -429,7 +440,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -437,7 +448,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -456,6 +467,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -709,7 +721,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster DiagnosticLogs = 50 { @@ -841,7 +853,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1198,7 +1210,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1224,7 +1235,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1290,8 +1301,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1357,10 +1368,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 2f553f5d092407..6bf99cf5abb818 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -99,12 +99,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Descriptor = 29 { @@ -185,7 +185,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -193,7 +193,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -212,6 +212,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -465,7 +466,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -731,7 +732,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1088,7 +1089,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1114,7 +1114,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1180,8 +1180,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1247,10 +1247,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index c418e260b39905..d50c2189e0c6dd 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -99,12 +99,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -209,13 +209,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } server cluster OnOff = 6 { @@ -301,44 +301,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -348,7 +359,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -429,7 +440,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -437,7 +448,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -456,6 +467,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -709,7 +721,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -975,7 +987,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1332,7 +1344,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1358,7 +1369,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1424,8 +1435,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1491,10 +1502,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 91db20992abfe3..289a20f8500804 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -112,12 +112,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Descriptor = 29 { @@ -198,7 +198,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -206,7 +206,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -225,6 +225,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -478,7 +479,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -744,7 +745,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1101,7 +1102,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1127,7 +1127,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1193,8 +1193,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1260,10 +1260,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 16d8c8f83fae22..1a4a99c3aa7c54 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -99,12 +99,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -209,13 +209,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } server cluster OnOff = 6 { @@ -294,44 +294,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -341,7 +352,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -422,7 +433,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -430,7 +441,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -449,6 +460,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -702,7 +714,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -968,7 +980,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1325,7 +1337,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1351,7 +1362,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1417,8 +1428,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1484,10 +1495,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 1f8dd74275efa6..e9ac1fb1890303 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -112,12 +112,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Descriptor = 29 { @@ -198,7 +198,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -206,7 +206,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -225,6 +225,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -478,7 +479,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -744,7 +745,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1101,7 +1102,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1127,7 +1127,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1193,8 +1193,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1260,10 +1260,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 9bc379a20349fd..7943d5d9ee76c9 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -112,12 +112,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Descriptor = 29 { @@ -198,7 +198,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -206,7 +206,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -225,6 +225,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -478,7 +479,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -744,7 +745,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1101,7 +1102,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1127,7 +1127,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1193,8 +1193,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1260,10 +1260,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 44c2d10c6975bc..08f36aa6cf63fc 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -112,12 +112,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Descriptor = 29 { @@ -198,7 +198,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -206,7 +206,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -225,6 +225,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -478,7 +479,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -744,7 +745,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1101,7 +1102,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1127,7 +1127,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1193,8 +1193,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1260,10 +1260,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 0b5ff1eab4d1f8..0b364eeaa0d0f5 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -99,12 +99,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -209,13 +209,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } server cluster OnOff = 6 { @@ -301,44 +301,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -348,7 +359,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -429,7 +440,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -437,7 +448,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -456,6 +467,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -709,7 +721,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -975,7 +987,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1332,7 +1344,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1358,7 +1369,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1424,8 +1435,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1491,10 +1502,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 76f87b241a18c5..c6c4ac7930da4e 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -99,12 +99,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } client cluster Scenes = 5 { @@ -209,13 +209,13 @@ client cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } server cluster Scenes = 5 { @@ -320,13 +320,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } client cluster OnOff = 6 { @@ -499,7 +499,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -507,7 +507,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -526,6 +526,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -779,7 +780,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -1045,7 +1046,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1402,7 +1403,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1428,7 +1428,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1494,8 +1494,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1561,10 +1561,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index e6b811977e2e30..6654270b576023 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -99,12 +99,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -209,13 +209,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } server cluster OnOff = 6 { @@ -346,7 +346,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -354,7 +354,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -373,6 +373,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -626,7 +627,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -892,7 +893,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1249,7 +1250,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1275,7 +1275,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1341,8 +1341,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1408,10 +1408,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 572eb08ca369b8..5ea7e699ff4785 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -112,12 +112,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Descriptor = 29 { @@ -198,7 +198,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -206,7 +206,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -225,6 +225,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -478,7 +479,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -744,7 +745,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1101,7 +1102,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1127,7 +1127,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1193,8 +1193,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1260,10 +1260,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 66cc663bc4def9..7e7274afe8d39d 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -96,12 +96,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster OnOff = 6 { @@ -181,44 +181,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -228,7 +239,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -309,7 +320,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -317,7 +328,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -336,6 +347,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -589,7 +601,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -855,7 +867,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1212,7 +1224,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1238,7 +1249,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1304,8 +1315,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1371,10 +1382,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 91a5ef6e428cb0..62ca53940e28d1 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -112,12 +112,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Descriptor = 29 { @@ -198,7 +198,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -206,7 +206,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -225,6 +225,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -478,7 +479,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -744,7 +745,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1101,7 +1102,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1127,7 +1127,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1193,8 +1193,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1260,10 +1260,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 086a3db0aa36c8..15abcd5da025e8 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -99,12 +99,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -209,13 +209,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } server cluster Descriptor = 29 { @@ -296,7 +296,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -304,7 +304,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -323,6 +323,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -576,7 +577,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -842,7 +843,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1199,7 +1200,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1225,7 +1225,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1291,8 +1291,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1358,10 +1358,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 26b531774f3304..960e33569fac7c 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -99,12 +99,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -209,13 +209,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } server cluster Descriptor = 29 { @@ -296,7 +296,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -304,7 +304,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -323,6 +323,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -576,7 +577,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -842,7 +843,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1199,7 +1200,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1225,7 +1225,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1291,8 +1291,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1358,10 +1358,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/chef/efr32/args.gni b/examples/chef/efr32/args.gni index 0b7ef403df72cd..7d077dce704c2f 100644 --- a/examples/chef/efr32/args.gni +++ b/examples/chef/efr32/args.gni @@ -20,6 +20,7 @@ efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_ota_requestor = true +pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" chip_enable_openthread = true diff --git a/examples/chef/efr32/include/CHIPProjectConfig.h b/examples/chef/efr32/include/CHIPProjectConfig.h index 5904b776cd601d..814a55fe253fdb 100644 --- a/examples/chef/efr32/include/CHIPProjectConfig.h +++ b/examples/chef/efr32/include/CHIPProjectConfig.h @@ -69,17 +69,6 @@ */ #define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 -/** - * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING - * - * A string identifying the software version running on the device. - * CHIP service currently expects the software version to be in the format - * {MAJOR_VERSION}.0d{MINOR_VERSION} - */ -#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "0.1ALPHA" -#endif - /** * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION * diff --git a/examples/chip-tool/commands/clusters/ModelCommand.cpp b/examples/chip-tool/commands/clusters/ModelCommand.cpp index fd255abfe204b0..c67cebb1491fe0 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.cpp +++ b/examples/chip-tool/commands/clusters/ModelCommand.cpp @@ -55,7 +55,7 @@ void ModelCommand::OnDeviceConnectedFn(void * context, chip::OperationalDevicePr VerifyOrReturn(CHIP_NO_ERROR == err, command->SetCommandExitStatus(err)); } -void ModelCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR err) +void ModelCommand::OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR err) { LogErrorOnFailure(err); diff --git a/examples/chip-tool/commands/clusters/ModelCommand.h b/examples/chip-tool/commands/clusters/ModelCommand.h index 4a0c2c08f5d469..d6581235863160 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.h +++ b/examples/chip-tool/commands/clusters/ModelCommand.h @@ -70,7 +70,7 @@ class ModelCommand : public CHIPCommand std::vector mEndPointId; static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); chip::Callback::Callback mOnDeviceConnectedCallback; chip::Callback::Callback mOnDeviceConnectionFailureCallback; diff --git a/examples/chip-tool/commands/pairing/CloseSessionCommand.cpp b/examples/chip-tool/commands/pairing/CloseSessionCommand.cpp index b30d0accae1639..210164770a6ff7 100644 --- a/examples/chip-tool/commands/pairing/CloseSessionCommand.cpp +++ b/examples/chip-tool/commands/pairing/CloseSessionCommand.cpp @@ -78,7 +78,7 @@ void CloseSessionCommand::OnDeviceConnectedFn(void * context, OperationalDeviceP VerifyOrReturn(CHIP_NO_ERROR == err, command->SetCommandExitStatus(err)); } -void CloseSessionCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR err) +void CloseSessionCommand::OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR err) { LogErrorOnFailure(err); diff --git a/examples/chip-tool/commands/pairing/CloseSessionCommand.h b/examples/chip-tool/commands/pairing/CloseSessionCommand.h index 782e334ebfe74a..270c45210f4ebe 100644 --- a/examples/chip-tool/commands/pairing/CloseSessionCommand.h +++ b/examples/chip-tool/commands/pairing/CloseSessionCommand.h @@ -47,7 +47,7 @@ class CloseSessionCommand : public CHIPCommand chip::Optional mTimeoutSecs; static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); // Try to send the action CloseSession status report. CHIP_ERROR CloseSession(chip::DeviceProxy * device); diff --git a/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp b/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp index 74abe2a0d58d16..f95932f49de97b 100644 --- a/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp +++ b/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp @@ -30,7 +30,7 @@ void SetupPayloadGenerateCommand::ConfigurePayload(SetupPayload & payload) { if (mDiscriminator.HasValue()) { - payload.discriminator = mDiscriminator.Value(); + payload.discriminator.SetLongValue(mDiscriminator.Value()); } if (mSetUpPINCode.HasValue()) @@ -95,6 +95,15 @@ CHIP_ERROR SetupPayloadGenerateQRCodeCommand::Run() std::string code; ReturnErrorOnFailure(generator.payloadBase38RepresentationWithAutoTLVBuffer(code)); + // CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE includes various prefixes we don't + // control (timestamps, process ids, etc). Let's assume (hope?) that + // those prefixes use up no more than half the total available space. + constexpr size_t chunkSize = CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE / 2; + while (code.size() > chunkSize) + { + ChipLogProgress(chipTool, "QR Code: %s", code.substr(0, chunkSize).c_str()); + code = code.substr(chunkSize); + } ChipLogProgress(chipTool, "QR Code: %s", code.c_str()); return CHIP_NO_ERROR; diff --git a/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp b/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp index 5bf65d3976b5a3..d76b6f5d94526c 100644 --- a/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp +++ b/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp @@ -70,10 +70,10 @@ CHIP_ERROR SetupPayloadParseCommand::Parse(std::string codeString, chip::SetupPa CHIP_ERROR SetupPayloadParseCommand::Print(chip::SetupPayload payload) { - ChipLogProgress(SetupPayload, "Version: %u", payload.version); - ChipLogProgress(SetupPayload, "VendorID: %u", payload.vendorID); - ChipLogProgress(SetupPayload, "ProductID: %u", payload.productID); - ChipLogProgress(SetupPayload, "Custom flow: %u (%s)", to_underlying(payload.commissioningFlow), + ChipLogProgress(SetupPayload, "Version: %u", payload.version); + ChipLogProgress(SetupPayload, "VendorID: %u", payload.vendorID); + ChipLogProgress(SetupPayload, "ProductID: %u", payload.productID); + ChipLogProgress(SetupPayload, "Custom flow: %u (%s)", to_underlying(payload.commissioningFlow), CustomFlowString(payload.commissioningFlow)); { StringBuilder<128> humanFlags; @@ -106,15 +106,24 @@ CHIP_ERROR SetupPayloadParseCommand::Print(chip::SetupPayload payload) humanFlags.Add("NONE"); } - ChipLogProgress(SetupPayload, "Capabilities: 0x%02X (%s)", payload.rendezvousInformation.Raw(), humanFlags.c_str()); + ChipLogProgress(SetupPayload, "Capabilities: 0x%02X (%s)", payload.rendezvousInformation.Raw(), humanFlags.c_str()); } - ChipLogProgress(SetupPayload, "Discriminator: %u", payload.discriminator); - ChipLogProgress(SetupPayload, "Passcode: %u", payload.setUpPINCode); + if (payload.discriminator.IsShortDiscriminator()) + { + ChipLogProgress(SetupPayload, "Short discriminator: %u (0x%x)", payload.discriminator.GetShortValue(), + payload.discriminator.GetShortValue()); + } + else + { + ChipLogProgress(SetupPayload, "Long discriminator: %u (0x%x)", payload.discriminator.GetLongValue(), + payload.discriminator.GetLongValue()); + } + ChipLogProgress(SetupPayload, "Passcode: %u", payload.setUpPINCode); std::string serialNumber; if (payload.getSerialNumber(serialNumber) == CHIP_NO_ERROR) { - ChipLogProgress(SetupPayload, "SerialNumber: %s", serialNumber.c_str()); + ChipLogProgress(SetupPayload, "SerialNumber: %s", serialNumber.c_str()); } std::vector optionalVendorData = payload.getAllOptionalVendorData(); @@ -126,11 +135,11 @@ CHIP_ERROR SetupPayloadParseCommand::Print(chip::SetupPayload payload) if (isTypeString) { - ChipLogProgress(SetupPayload, "OptionalQRCodeInfo: tag=%u,string value=%s", info.tag, info.data.c_str()); + ChipLogProgress(SetupPayload, "OptionalQRCodeInfo: tag=%u,string value=%s", info.tag, info.data.c_str()); } else { - ChipLogProgress(SetupPayload, "OptionalQRCodeInfo: tag=%u,int value=%u", info.tag, info.int32); + ChipLogProgress(SetupPayload, "OptionalQRCodeInfo: tag=%u,int value=%u", info.tag, info.int32); } } diff --git a/examples/chip-tool/commands/tests/TestCommand.cpp b/examples/chip-tool/commands/tests/TestCommand.cpp index 75c4bd34482578..6de48bd810ac79 100644 --- a/examples/chip-tool/commands/tests/TestCommand.cpp +++ b/examples/chip-tool/commands/tests/TestCommand.cpp @@ -61,7 +61,7 @@ void TestCommand::OnDeviceConnectedFn(void * context, chip::OperationalDevicePro LogErrorOnFailure(command->ContinueOnChipMainThread(CHIP_NO_ERROR)); } -void TestCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR 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()); diff --git a/examples/chip-tool/commands/tests/TestCommand.h b/examples/chip-tool/commands/tests/TestCommand.h index 11bc4041304a37..e35b64df24b7a3 100644 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ b/examples/chip-tool/commands/tests/TestCommand.h @@ -71,7 +71,7 @@ class TestCommand : public TestRunner, void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override{}; static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) override; diff --git a/examples/chip-tool/templates/ComplexArgumentParser-src.zapt b/examples/chip-tool/templates/ComplexArgumentParser-src.zapt index 580118b3d014a8..24614f96f4768e 100644 --- a/examples/chip-tool/templates/ComplexArgumentParser-src.zapt +++ b/examples/chip-tool/templates/ComplexArgumentParser-src.zapt @@ -11,7 +11,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, {{zapTypeToEncodable {{#unless isOptional}} {{~! Fabric index fields are not sent on writes, so don't force people to provide them. ~}} - {{#unless (isStrEqual label ../struct_fabric_idx_field)}} + {{#unless (is_num_equal fieldIdentifier 254)}} ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("{{parent.name}}.{{asLowerCamelCase label}}", "{{asLowerCamelCase label}}", value.isMember("{{asLowerCamelCase label}}"))); {{/unless}} {{/unless}} @@ -22,7 +22,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, {{zapTypeToEncodable {{#if isOptional}} if (value.isMember("{{asLowerCamelCase label}}")) { - {{else if (isStrEqual label ../struct_fabric_idx_field)}} + {{else if (is_num_equal fieldIdentifier 254)}} if (value.isMember("{{asLowerCamelCase label}}")) { {{/if}} @@ -30,7 +30,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, {{zapTypeToEncodable ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.{{asLowerCamelCase label}}, value["{{asLowerCamelCase label}}"])); {{#if isOptional}} } - {{else if (isStrEqual label ../struct_fabric_idx_field)}} + {{else if (is_num_equal fieldIdentifier 254)}} } {{/if}} diff --git a/examples/chip-tool/templates/helper.js b/examples/chip-tool/templates/helper.js index a59280c155ae2d..6fdc65cc32090d 100644 --- a/examples/chip-tool/templates/helper.js +++ b/examples/chip-tool/templates/helper.js @@ -116,14 +116,7 @@ async function structs_with_cluster_name(options) continue; } - s.items.forEach(i => { - if (i.type.toLowerCase() == "fabric_idx") { - s.struct_fabric_idx_field = i.label; - } - }) - - if (s.struct_cluster_count == 1) - { + if (s.struct_cluster_count == 1) { const clusters = await zclQuery.selectStructClusters(this.global.db, s.id); blocks.push( { id : s.id, name : s.name, struct_fabric_idx_field : s.struct_fabric_idx_field, clusterName : clusters[0].name }); @@ -137,6 +130,19 @@ async function structs_with_cluster_name(options) return templateUtil.collectBlocks(blocks, options, this); } +async function assertSameTestType(current, expected) +{ + if (current == expected) { + return ''; + } + + const filename = this.parent.parent.parent.filename; + const testName = this.parent.parent.parent.testName; + const error = `\nFile: ${filename}\nTest: ${testName}\nCluster ${this.parent.cluster} Attribute: ${this.name}: Constraint type "${ + expected}" does not match the current type "${current}".`; + throw error; +} + // // Module exports // @@ -144,3 +150,4 @@ exports.asDelimitedCommand = asDelimitedCommand; exports.asTypeMinValue = asTypeMinValue; exports.asTypeMaxValue = asTypeMaxValue; exports.structs_with_cluster_name = structs_with_cluster_name; +exports.assertSameTestType = assertSameTestType; diff --git a/examples/chip-tool/templates/logging/DataModelLogger-src.zapt b/examples/chip-tool/templates/logging/DataModelLogger-src.zapt index 1b0092461cde15..474169320f0c29 100644 --- a/examples/chip-tool/templates/logging/DataModelLogger-src.zapt +++ b/examples/chip-tool/templates/logging/DataModelLogger-src.zapt @@ -135,26 +135,26 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip ChipLogProgress(chipTool, "Endpoint: %u Cluster: " ChipLogFormatMEI " Event " ChipLogFormatMEI, header.mPath.mEndpointId, ChipLogValueMEI(header.mPath.mClusterId), ChipLogValueMEI(header.mPath.mEventId)); - ChipLogProgress(chipTool, "\t Event number: %" PRIu64, header.mEventNumber); + ChipLogProgress(chipTool, " Event number: %" PRIu64, header.mEventNumber); if (header.mPriorityLevel == chip::app::PriorityLevel::Info) { - ChipLogProgress(chipTool, "\t Priority: Info"); + ChipLogProgress(chipTool, " Priority: Info"); } else if (header.mPriorityLevel == chip::app::PriorityLevel::Critical) { - ChipLogProgress(chipTool, "\t Priority: Critical"); + ChipLogProgress(chipTool, " Priority: Critical"); } else if (header.mPriorityLevel == chip::app::PriorityLevel::Debug) { - ChipLogProgress(chipTool, "\t Priority: Debug"); + ChipLogProgress(chipTool, " Priority: Debug"); } else { - ChipLogProgress(chipTool, "\t Priority: Unknown"); + ChipLogProgress(chipTool, " Priority: Unknown"); } - ChipLogProgress(chipTool, "\t Timestamp: %" PRIu64, header.mTimestamp.mValue); + ChipLogProgress(chipTool, " Timestamp: %" PRIu64, header.mTimestamp.mValue); switch (header.mPath.mClusterId) { diff --git a/examples/chip-tool/templates/tests/helper.js b/examples/chip-tool/templates/tests/helper.js index a2f7cdb708b469..d50912ca9f5703 100644 --- a/examples/chip-tool/templates/tests/helper.js +++ b/examples/chip-tool/templates/tests/helper.js @@ -33,13 +33,15 @@ function asPropertyValue(options) { let rootObject = 'value'; + let context = options.hash.context || this; + // The decodable type for commands is a struct by default, even if the // command just returns a single value. - if (this.parent.isCommand) { - rootObject += '.' + asLowerCamelCase(this.name); + if (context.parent.isCommand) { + rootObject += '.' + asLowerCamelCase(context.name); } - if (this.isOptional && !options.hash.dontUnwrapValue) { + if (context.isOptional && !options.hash.dontUnwrapValue) { rootObject += '.Value()'; } diff --git a/examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt b/examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt index 8250c27ba03230..95c52a5b934c46 100644 --- a/examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt +++ b/examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt @@ -6,59 +6,66 @@ {{/if}} {{/if}} - {{~#if (hasProperty expectedConstraints "type")}}VerifyOrReturn(CheckConstraintType("{{asPropertyValue}}", "", "{{expectedConstraints.type}}"));{{/if}} + {{~#chip_tests_iterate_constraints expectedConstraints}} + {{~#if (isStrEqual constraint "hasValue")}} + {{~! Already handled above~}} + {{~else if (isStrEqual constraint "type")}} + {{~assertSameTestType (asTestType ../type ../isArray) value~}} + VerifyOrReturn(CheckConstraintType("{{asPropertyValue context=..}}", "{{asTestType ../type ../isArray}}", "{{value}}")); + {{~else if (isStrEqual constraint "format")}}VerifyOrReturn(CheckConstraintFormat("{{asPropertyValue context=..}}", "", "{{value}}")); - {{~#if (hasProperty expectedConstraints "format")}}VerifyOrReturn(CheckConstraintFormat("{{asPropertyValue}}", "", "{{expectedConstraints.format}}"));{{/if}} + {{~else if (isStrEqual constraint "startsWith")}}VerifyOrReturn(CheckConstraintStartsWith("{{asPropertyValue context=..}}", {{asPropertyValue context=..}}, "{{value}}")); - {{~#if (hasProperty expectedConstraints "startsWith")}}VerifyOrReturn(CheckConstraintStartsWith("{{asPropertyValue}}", {{asPropertyValue}}, "{{expectedConstraints.startsWith}}"));{{/if}} + {{~else if (isStrEqual constraint "endsWith")}}VerifyOrReturn(CheckConstraintEndsWith("{{asPropertyValue context=..}}", {{asPropertyValue context=..}}, "{{value}}")); - {{~#if (hasProperty expectedConstraints "endsWith")}}VerifyOrReturn(CheckConstraintEndsWith("{{asPropertyValue}}", {{asPropertyValue}}, "{{expectedConstraints.endsWith}}"));{{/if}} + {{~else if (isStrEqual constraint "isUpperCase")}}VerifyOrReturn(CheckConstraintIsUpperCase("{{asPropertyValue context=..}}", {{asPropertyValue context=..}}, {{value}})); - {{~#if (hasProperty expectedConstraints "isUpperCase")}}VerifyOrReturn(CheckConstraintIsUpperCase("{{asPropertyValue}}", {{asPropertyValue}}, {{expectedConstraints.isUpperCase}}));{{/if}} + {{~else if (isStrEqual constraint "isLowerCase")}}VerifyOrReturn(CheckConstraintIsLowerCase("{{asPropertyValue context=..}}", {{asPropertyValue context=..}}, {{value}})); - {{~#if (hasProperty expectedConstraints "isLowerCase")}}VerifyOrReturn(CheckConstraintIsLowerCase("{{asPropertyValue}}", {{asPropertyValue}}, {{expectedConstraints.isLowerCase}}));{{/if}} + {{~else if (isStrEqual constraint "isHexString")}}VerifyOrReturn(CheckConstraintIsHexString("{{asPropertyValue context=..}}", {{asPropertyValue context=..}}, {{value}})); - {{~#if (hasProperty expectedConstraints "isHexString")}}VerifyOrReturn(CheckConstraintIsHexString("{{asPropertyValue}}", {{asPropertyValue}}, {{expectedConstraints.isHexString}}));{{/if}} + {{~else if (isStrEqual constraint "minLength")}}VerifyOrReturn(CheckConstraintMinLength("{{asPropertyValue context=..}}", {{asPropertyValue context=..}}, {{value}})); - {{~#if (hasProperty expectedConstraints "minLength")}}VerifyOrReturn(CheckConstraintMinLength("{{asPropertyValue}}", {{asPropertyValue}}.size(), {{expectedConstraints.minLength}}));{{/if}} + {{~else if (isStrEqual constraint "maxLength")}}VerifyOrReturn(CheckConstraintMaxLength("{{asPropertyValue context=..}}", {{asPropertyValue context=..}}, {{value}})); - {{~#if (hasProperty expectedConstraints "maxLength")}}VerifyOrReturn(CheckConstraintMaxLength("{{asPropertyValue}}", {{asPropertyValue}}.size(), {{expectedConstraints.maxLength}}));{{/if}} + {{~else if (isStrEqual constraint "minValue")}}VerifyOrReturn(CheckConstraintMinValue("{{asPropertyValue context=..}}", {{asPropertyValue context=..}}, {{asTypedLiteral value ../type}})); - {{~#if (hasProperty expectedConstraints "minValue")}}VerifyOrReturn(CheckConstraintMinValue("{{asPropertyValue}}", {{asPropertyValue}}, {{asTypedLiteral expectedConstraints.minValue type}}));{{/if}} + {{~else if (isStrEqual constraint "maxValue")}}VerifyOrReturn(CheckConstraintMaxValue("{{asPropertyValue context=..}}", {{asPropertyValue context=..}}, {{asTypedLiteral value ../type}})); - {{~#if (hasProperty expectedConstraints "maxValue")}}VerifyOrReturn(CheckConstraintMaxValue("{{asPropertyValue}}", {{asPropertyValue}}, {{asTypedLiteral expectedConstraints.maxValue type}}));{{/if}} - - {{~#if (hasProperty expectedConstraints "contains")}} - {{#chip_tests_iterate_expected_list expectedConstraints.contains}} - VerifyOrReturn(CheckConstraintContains("{{asPropertyValue}}", {{asPropertyValue}}, {{asTypedLiteral value type}})); + {{~else if (isStrEqual constraint "contains")}} + {{#chip_tests_iterate_expected_list value context=..}} + VerifyOrReturn(CheckConstraintContains("{{asPropertyValue context=..}}", {{asPropertyValue}}, {{asTypedLiteral value type}})); {{/chip_tests_iterate_expected_list}} - {{/if}} - {{~#if (hasProperty expectedConstraints "excludes")}} - {{#chip_tests_iterate_expected_list expectedConstraints.excludes}} - VerifyOrReturn(CheckConstraintExcludes("{{asPropertyValue}}", {{asPropertyValue}}, {{asTypedLiteral value type}})); + {{~else if (isStrEqual constraint "excludes")}} + {{#chip_tests_iterate_expected_list value context=..}} + VerifyOrReturn(CheckConstraintExcludes("{{asPropertyValue context=..}}", {{asPropertyValue}}, {{asTypedLiteral value type}})); {{/chip_tests_iterate_expected_list}} - {{/if}} - {{~#if (hasProperty expectedConstraints "hasMasksSet")}} - {{#chip_tests_iterate_expected_list expectedConstraints.hasMasksSet}} - VerifyOrReturn(CheckConstraintHasMasksSet("{{asPropertyValue}}", {{asPropertyValue}}, {{asTypedLiteral value type}})); + {{~else if (isStrEqual constraint "hasMasksSet")}} + {{#chip_tests_iterate_expected_list value context=..}} + VerifyOrReturn(CheckConstraintHasMasksSet("{{asPropertyValue context=..}}", {{asPropertyValue}}, {{asTypedLiteral value type}})); {{/chip_tests_iterate_expected_list}} - {{/if}} - {{~#if (hasProperty expectedConstraints "hasMasksClear")}} - {{#chip_tests_iterate_expected_list expectedConstraints.hasMasksClear}} - VerifyOrReturn(CheckConstraintHasMasksClear("{{asPropertyValue}}", {{asPropertyValue}}, {{asTypedLiteral value type}})); + {{~else if (isStrEqual constraint "hasMasksClear")}} + {{#chip_tests_iterate_expected_list value context=..}} + VerifyOrReturn(CheckConstraintHasMasksClear("{{asPropertyValue context=..}}", {{asPropertyValue}}, {{asTypedLiteral value type}})); {{/chip_tests_iterate_expected_list}} - {{/if}} - {{~#if (hasProperty expectedConstraints "notValue")}} - {{#if (isLiteralNull expectedConstraints.notValue)}} - VerifyOrReturn(CheckValueNonNull("{{asPropertyValue}}", {{asPropertyValue}})); + {{~else if (isStrEqual constraint "notValue")}} + {{#if (isLiteralNull value)}} + VerifyOrReturn(CheckValueNonNull("{{asPropertyValue context=..}}", {{asPropertyValue context=..}})); {{else}} - VerifyOrReturn(CheckConstraintNotValue("{{asPropertyValue}}", {{asPropertyValue}}, {{asTypedLiteral expectedConstraints.notValue type}})); + VerifyOrReturn(CheckConstraintNotValue("{{asPropertyValue context=..}}", {{asPropertyValue context=..}}, {{asTypedLiteral value ../type}})); {{/if}} + + {{~else}} + {{! Ensure there's a line-break before the #error }} + #error "Unknown constraint {{constraint}}"; + {{! Ensure there's a line-break after the #error }} {{/if}} + {{/chip_tests_iterate_constraints}} + {{~#if isOptional}} {{~#unless (hasProperty expectedConstraints "hasValue")}} } diff --git a/examples/common/tracing/decoder/secure_channel/Decoder.cpp b/examples/common/tracing/decoder/secure_channel/Decoder.cpp index a1cf96ea187fc2..04ec5522ff8391 100644 --- a/examples/common/tracing/decoder/secure_channel/Decoder.cpp +++ b/examples/common/tracing/decoder/secure_channel/Decoder.cpp @@ -35,7 +35,6 @@ constexpr const char * kPBKDFParamResponse = "Password-Based Key Derivation Para constexpr const char * kPASE_Pake1 = "Password Authenticated Session Establishment '1'"; constexpr const char * kPASE_Pake2 = "Password Authenticated Session Establishment '2'"; constexpr const char * kPASE_Pake3 = "Password Authenticated Session Establishment '3'"; -constexpr const char * kPASE_PakeError = "Password-authenticated key exchange Error"; constexpr const char * kCASE_Sigma1 = "Certificate Authenticated Session Establishment Sigma '1'"; constexpr const char * kCASE_Sigma2 = "Certificate Authenticated Session Establishment Sigma '2'"; constexpr const char * kCASE_Sigma3 = "Certificate Authenticated Session Establishment Sigma '3'"; @@ -60,7 +59,6 @@ CHIP_ERROR DecodePBDFKParamResponse(TLV::TLVReader & reader); CHIP_ERROR DecodePASEPake1(TLV::TLVReader & reader); CHIP_ERROR DecodePASEPake2(TLV::TLVReader & reader); CHIP_ERROR DecodePASEPake3(TLV::TLVReader & reader); -CHIP_ERROR DecodePASEPakeError(TLV::TLVReader & reader); CHIP_ERROR DecodeCASESigma1(TLV::TLVReader & reader); CHIP_ERROR DecodeCASESigma2(TLV::TLVReader & reader); CHIP_ERROR DecodeCASESigma3(TLV::TLVReader & reader); @@ -92,8 +90,6 @@ const char * ToProtocolMessageTypeName(uint8_t protocolCode) return kPASE_Pake2; case to_underlying(MessageType::PASE_Pake3): return kPASE_Pake3; - case to_underlying(MessageType::PASE_PakeError): - return kPASE_PakeError; case to_underlying(MessageType::CASE_Sigma1): return kCASE_Sigma1; case to_underlying(MessageType::CASE_Sigma2): @@ -132,8 +128,6 @@ CHIP_ERROR LogAsProtocolMessage(uint8_t protocolCode, const uint8_t * data, size return DecodePASEPake2(reader); case to_underlying(MessageType::PASE_Pake3): return DecodePASEPake3(reader); - case to_underlying(MessageType::PASE_PakeError): - return DecodePASEPakeError(reader); case to_underlying(MessageType::CASE_Sigma1): return DecodeCASESigma1(reader); case to_underlying(MessageType::CASE_Sigma2): @@ -323,11 +317,6 @@ CHIP_ERROR DecodePASEPake3(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -CHIP_ERROR DecodePASEPakeError(TLV::TLVReader & reader) -{ - return CHIP_ERROR_NOT_IMPLEMENTED; -} - CHIP_ERROR DecodeCASESigma1(TLV::TLVReader & reader) { constexpr uint8_t kInitiatorRandomTag = 1; diff --git a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h index 0330c226fcec03..120eb5e3d4434c 100644 --- a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h @@ -94,7 +94,6 @@ class SubscribeAttribute : public ModelCommand { AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("fabric-filtered", 0, 1, &mFabricFiltered); AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions); - AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } @@ -107,7 +106,6 @@ class SubscribeAttribute : public ModelCommand { AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("fabric-filtered", 0, 1, &mFabricFiltered); AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions); - AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } @@ -119,7 +117,6 @@ class SubscribeAttribute : public ModelCommand { AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("fabric-filtered", 0, 1, &mFabricFiltered); AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions); - AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } @@ -144,9 +141,7 @@ class SubscribeAttribute : public ModelCommand { NSLog(@"Response Item: %@", [item description]); } } - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); } subscriptionEstablished:^() { mSubscriptionEstablished = YES; @@ -155,10 +150,7 @@ class SubscribeAttribute : public ModelCommand { return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(10); } protected: chip::Optional mKeepSubscriptions; @@ -166,7 +158,6 @@ class SubscribeAttribute : public ModelCommand { bool mSubscriptionEstablished = NO; uint16_t mMinInterval; uint16_t mMaxInterval; - bool mWait; void Shutdown() override { @@ -189,7 +180,6 @@ class SubscribeEvent : public ModelCommand { AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions); - AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } @@ -208,22 +198,16 @@ class SubscribeEvent : public ModelCommand { params:params cacheContainer:nil attributeReportHandler:^(NSArray * value) { - if (!mWait) { - SetCommandExitStatus(CHIP_NO_ERROR); - } + SetCommandExitStatus(CHIP_NO_ERROR); } eventReportHandler:^(NSArray * value) { for (id item in value) { NSLog(@"Response Item: %@", [item description]); } - if (!mWait) { - SetCommandExitStatus(CHIP_NO_ERROR); - } + SetCommandExitStatus(CHIP_NO_ERROR); } errorHandler:^(NSError * error) { - if (error && !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); } subscriptionEstablished:^() { mSubscriptionEstablished = YES; @@ -232,10 +216,7 @@ class SubscribeEvent : public ModelCommand { return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(10); } protected: chip::Optional mKeepSubscriptions; @@ -243,5 +224,4 @@ class SubscribeEvent : public ModelCommand { bool mSubscriptionEstablished = NO; uint16_t mMinInterval; uint16_t mMaxInterval; - bool mWait; }; diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm index 490eec1e7421b9..40d265b3e171e1 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm @@ -38,9 +38,6 @@ ChipLogProgress(chipTool, "Running Command"); ReturnErrorOnFailure(MaybeSetUpStack()); SetIdentity(mCommissionerName.HasValue() ? mCommissionerName.Value() : kIdentityAlpha); - ChipLogDetail(chipTool, "Setting OTA Provider Delegate:"); - mOTADelegate.nodeID = [CurrentCommissioner() controllerNodeId]; - [CurrentCommissioner() setOTAProviderDelegate:mOTADelegate queue:mOTAProviderCallbackQueue]; ReturnLogErrorOnFailure(RunCommand()); ReturnLogErrorOnFailure(StartWaiting(GetWaitDuration())); @@ -67,7 +64,6 @@ CHIPToolKeypair * nocSigner = [[CHIPToolKeypair alloc] init]; storage = [[CHIPToolPersistentStorageDelegate alloc] init]; - mOTAProviderCallbackQueue = dispatch_queue_create("com.darwin-framework-tool.command", DISPATCH_QUEUE_SERIAL); mOTADelegate = [[OTAProviderDelegate alloc] init]; auto factory = [MTRControllerFactory sharedInstance]; @@ -79,6 +75,7 @@ auto params = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; params.port = @(kListenPort); params.startServer = YES; + params.otaProviderDelegate = mOTADelegate; if ([factory startup:params] == NO) { ChipLogError(chipTool, "Controller factory startup failed"); diff --git a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm index 1ee29bf5da13b6..ebcf7ae0faaae6 100644 --- a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm +++ b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm @@ -17,11 +17,15 @@ #include "OTAProviderDelegate.h" #import +#include constexpr uint8_t kUpdateTokenLen = 32; @interface OTAProviderDelegate () @property NSString * mOTAFilePath; +@property NSFileHandle * mFileHandle; +@property NSNumber * mFileOffset; +@property NSNumber * mFileEndOffset; @property DeviceSoftwareVersionModel * candidate; @end @@ -30,22 +34,21 @@ @implementation OTAProviderDelegate - (instancetype)init { if (self = [super init]) { - _nodeID = @(0); _selectedCandidate = [[DeviceSoftwareVersionModel alloc] init]; _userConsentState = OTAProviderUserUnknown; } return self; } -// TODO: When BDX is added to Matter.framework, update to initialize -// it when there is an update available. - (void)handleQueryImage:(MTROtaSoftwareUpdateProviderClusterQueryImageParams * _Nonnull)params completionHandler:(void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { NSError * error; - _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable); - if (![params.protocolsSupported containsObject:@(MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXSynchronous)]) { + + auto isBDXProtocolSupported = + [params.protocolsSupported containsObject:@(MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXSynchronous)]; + if (!isBDXProtocolSupported) { _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported); error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" @@ -55,42 +58,47 @@ - (void)handleQueryImage:(MTROtaSoftwareUpdateProviderClusterQueryImageParams * return; } - if ([self SelectOTACandidate:params.vendorId rPID:params.productId rSV:params.softwareVersion]) { - _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable); - _selectedCandidate.updateToken = [self generateUpdateToken]; - if (params.requestorCanConsent.integerValue == 1) { - _selectedCandidate.userConsentNeeded - = (_userConsentState == OTAProviderUserUnknown || _userConsentState == OTAProviderUserDenied) ? @(1) : @(0); - NSLog(@"User Consent Needed: %@", _selectedCandidate.userConsentNeeded); - } else { - NSLog(@"Requestor cannot obtain user consent. Our State: %hhu", _userConsentState); - switch (_userConsentState) { - case OTAProviderUserGranted: - NSLog(@"User Consent Granted"); - _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable; - break; - - case OTAProviderUserObtaining: - NSLog(@"User Consent Obtaining"); - _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusBusy; - break; - - case OTAProviderUserDenied: - case OTAProviderUserUnknown: - NSLog(@"User Consent Denied or Uknown"); - _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable; - break; - } - _selectedCandidate.status = @(_queryImageStatus); - } - } else { + auto hasCandidate = [self SelectOTACandidate:params.vendorId rPID:params.productId rSV:params.softwareVersion]; + if (!hasCandidate) { NSLog(@"Unable to select OTA Image."); _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable); error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" code:MTRErrorCodeInvalidState userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Unable to select Candidate.", nil) }]; + return; + } + + _selectedCandidate.updateToken = [self generateUpdateToken]; + + if (params.requestorCanConsent.integerValue == 1) { + _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable); + _selectedCandidate.userConsentNeeded + = (_userConsentState == OTAProviderUserUnknown || _userConsentState == OTAProviderUserDenied) ? @(1) : @(0); + NSLog(@"User Consent Needed: %@", _selectedCandidate.userConsentNeeded); + completionHandler(_selectedCandidate, error); + return; } + + NSLog(@"Requestor cannot obtain user consent. Our State: %hhu", _userConsentState); + switch (_userConsentState) { + case OTAProviderUserGranted: + NSLog(@"User Consent Granted"); + _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable; + break; + + case OTAProviderUserObtaining: + NSLog(@"User Consent Obtaining"); + _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusBusy; + break; + + case OTAProviderUserDenied: + case OTAProviderUserUnknown: + NSLog(@"User Consent Denied or Uknown"); + _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable; + break; + } + _selectedCandidate.status = @(_queryImageStatus); completionHandler(_selectedCandidate, error); } @@ -110,6 +118,85 @@ - (void)handleNotifyUpdateApplied:(MTROtaSoftwareUpdateProviderClusterNotifyUpda completionHandler(nil); } +- (void)handleBDXTransferSessionBegin:(NSString * _Nonnull)fileDesignator + offset:(NSNumber * _Nonnull)offset + completionHandler:(void (^)(NSError * error))completionHandler +{ + NSLog(@"BDX TransferSession begin with %@ (offset: %@)", fileDesignator, offset); + + auto * handle = [NSFileHandle fileHandleForReadingAtPath:fileDesignator]; + if (handle == nil) { + auto errorString = [NSString stringWithFormat:@"Error accessing file at at %@", fileDesignator]; + auto error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" + code:MTRErrorCodeGeneralError + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(errorString, nil) }]; + completionHandler(error); + return; + } + + NSError * seekError = nil; + [handle seekToOffset:[offset unsignedLongValue] error:&seekError]; + if (seekError != nil) { + auto errorString = [NSString stringWithFormat:@"Error seeking file (%@) to offset %@", fileDesignator, offset]; + auto error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" + code:MTRErrorCodeGeneralError + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(errorString, nil) }]; + completionHandler(error); + return; + } + + uint64_t endOffset; + if (![handle seekToEndReturningOffset:&endOffset error:&seekError]) { + auto errorString = [NSString stringWithFormat:@"Error seeking file (%@) to end offset", fileDesignator]; + auto error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" + code:MTRErrorCodeGeneralError + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(errorString, nil) }]; + completionHandler(error); + return; + } + + _mFileHandle = handle; + _mFileOffset = offset; + _mFileEndOffset = @(endOffset); + completionHandler(nil); +} + +- (void)handleBDXTransferSessionEnd:(NSError * _Nullable)error +{ + NSLog(@"BDX TransferSession end with error: %@", error); + _mFileHandle = nil; + _mFileOffset = nil; + _mFileEndOffset = nil; +} + +- (void)handleBDXQuery:(NSNumber * _Nonnull)blockSize + blockIndex:(NSNumber * _Nonnull)blockIndex + bytesToSkip:(NSNumber * _Nonnull)bytesToSkip + completionHandler:(void (^)(NSData * _Nullable data, BOOL isEOF))completionHandler +{ + NSLog(@"BDX Query received blockSize: %@, blockIndex: %@", blockSize, blockIndex); + + NSError * error = nil; + auto offset = [_mFileOffset unsignedLongValue] + [bytesToSkip unsignedLongLongValue] + + ([blockSize unsignedLongValue] * [blockIndex unsignedLongValue]); + [_mFileHandle seekToOffset:offset error:&error]; + if (error != nil) { + NSLog(@"Error seeking to offset %@", @(offset)); + completionHandler(nil, NO); + return; + } + + NSData * data = [_mFileHandle readDataUpToLength:[blockSize unsignedLongValue] error:&error]; + if (error != nil) { + NSLog(@"Error reading file %@", _mFileHandle); + completionHandler(nil, NO); + return; + } + + BOOL isEOF = offset + [blockSize unsignedLongValue] >= [_mFileEndOffset unsignedLongLongValue]; + completionHandler(data, isEOF); +} + - (void)SetOTAFilePath:(const char *)path { _mOTAFilePath = [NSString stringWithUTF8String:path]; @@ -130,23 +217,30 @@ - (bool)SelectOTACandidate:(NSNumber *)requestorVendorID rPID:(NSNumber *)requestorProductID rSV:(NSNumber *)requestorSoftwareVersion { + auto vendorId = [requestorVendorID unsignedIntValue]; + auto productId = [requestorProductID unsignedIntValue]; + auto softwareVersion = [requestorSoftwareVersion unsignedLongValue]; + bool candidateFound = false; NSArray * sortedArray = [_candidates sortedArrayUsingSelector:@selector(CompareSoftwareVersions:)]; for (DeviceSoftwareVersionModel * candidate : sortedArray) { - if (candidate.deviceModelData.softwareVersionValid - && ([requestorSoftwareVersion unsignedLongValue] < [candidate.softwareVersion unsignedLongValue]) - && ([requestorSoftwareVersion unsignedLongValue] >= - [candidate.deviceModelData.minApplicableSoftwareVersion unsignedLongValue]) - && ([requestorSoftwareVersion unsignedLongValue] <= - [candidate.deviceModelData.maxApplicableSoftwareVersion unsignedLongValue]) - && ([requestorVendorID unsignedIntValue] == [candidate.deviceModelData.vendorId unsignedIntValue]) - && ([requestorProductID unsignedIntValue] == [candidate.deviceModelData.productId unsignedIntValue])) { - candidateFound = true; + auto candidateSoftwareVersionValid = candidate.deviceModelData.softwareVersionValid; + auto candidateSoftwareVersion = [candidate.softwareVersion unsignedLongValue]; + auto candidateMinApplicableSoftwareVersion = [candidate.deviceModelData.minApplicableSoftwareVersion unsignedLongValue]; + auto candidateMaxApplicableSoftwareVersion = [candidate.deviceModelData.maxApplicableSoftwareVersion unsignedLongValue]; + auto candidateVendorId = [candidate.deviceModelData.vendorId unsignedIntValue]; + auto candidateProductId = [candidate.deviceModelData.productId unsignedIntValue]; + + if (candidateSoftwareVersionValid && (softwareVersion < candidateSoftwareVersion) + && (softwareVersion >= candidateMinApplicableSoftwareVersion) + && (softwareVersion <= candidateMaxApplicableSoftwareVersion) && (vendorId == candidateVendorId) + && (productId == candidateProductId)) { _selectedCandidate = candidate; - _selectedCandidate.imageURI = [NSString - stringWithFormat:@"bdx://%016llX/%@", [_nodeID unsignedLongLongValue], _selectedCandidate.deviceModelData.otaURL]; + _selectedCandidate.imageURI = candidate.deviceModelData.otaURL; + candidateFound = true; } } + return candidateFound; } diff --git a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.h b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.h index 64af48f8bf5364..f17147c2eb4d45 100644 --- a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.h +++ b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.h @@ -27,7 +27,7 @@ class OTASoftwareUpdateBase : public CHIPCommandBridge { : CHIPCommandBridge(commandName) { } - void SetCandidatesFromFilePath(char * _Nonnull filePath); + CHIP_ERROR SetCandidatesFromFilePath(char * _Nonnull filePath); CHIP_ERROR SetUserConsentStatus(char * _Nonnull status); static constexpr size_t kFilepathBufLen = 256; diff --git a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm index fae950f04a91a6..3bc3192b743b69 100644 --- a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm +++ b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm @@ -19,12 +19,9 @@ #include #include -// TODO: Objective-C Matter.framework needs to expose this. -#include - constexpr size_t kOtaHeaderMaxSize = 1024; -bool ParseOTAHeader(chip::OTAImageHeaderParser & parser, const char * otaFilePath, chip::OTAImageHeader & header) +MTROTAHeader * ParseOTAHeader(const char * otaFilePath) { uint8_t otaFileContent[kOtaHeaderMaxSize]; chip::ByteSpan buffer(otaFileContent); @@ -32,34 +29,23 @@ bool ParseOTAHeader(chip::OTAImageHeaderParser & parser, const char * otaFilePat std::ifstream otaFile(otaFilePath, std::ifstream::in); if (!otaFile.is_open() || !otaFile.good()) { ChipLogError(SoftwareUpdate, "Error opening OTA image file: %s", otaFilePath); - return false; + return nil; } otaFile.read(reinterpret_cast(otaFileContent), kOtaHeaderMaxSize); if (otaFile.bad()) { ChipLogError(SoftwareUpdate, "Error reading OTA image file: %s", otaFilePath); - return false; - } - - parser.Init(); - if (!parser.IsInitialized()) { - return false; - } - - CHIP_ERROR error = parser.AccumulateAndDecode(buffer, header); - if (error != CHIP_NO_ERROR) { - ChipLogError(SoftwareUpdate, "Error parsing OTA image header: %" CHIP_ERROR_FORMAT, error.Format()); - return false; + return nil; } - return true; + NSError * error; + return [MTROTAHeaderParser headerFromData:[NSData dataWithBytes:buffer.data() length:buffer.size()] error:&error]; } // Parses the JSON filepath and extracts DeviceSoftwareVersionModel parameters static bool ParseJsonFileAndPopulateCandidates( const char * filepath, NSMutableArray ** _Nonnull candidates) { - bool ret = false; Json::Value root; Json::CharReaderBuilder builder; JSONCPP_STRING errs; @@ -70,85 +56,115 @@ static bool ParseJsonFileAndPopulateCandidates( if (!ifs.good()) { ChipLogError(SoftwareUpdate, "Error opening ifstream with file: \"%s\"", filepath); - return ret; + return false; } if (!parseFromStream(builder, ifs, &root, &errs)) { ChipLogError(SoftwareUpdate, "Error parsing JSON from file: \"%s\"", filepath); - return ret; + return false; } const Json::Value devSofVerModValue = root["deviceSoftwareVersionModel"]; if (!devSofVerModValue || !devSofVerModValue.isArray()) { ChipLogError(SoftwareUpdate, "Error: Key deviceSoftwareVersionModel not found or its value is not of type Array"); - } else { - *candidates = [[NSMutableArray alloc] init]; - for (auto iter : devSofVerModValue) { - DeviceSoftwareVersionModel * candidate = [[DeviceSoftwareVersionModel alloc] init]; - candidate.deviceModelData.vendorId = [NSNumber numberWithUnsignedInt:iter.get("vendorId", 1).asUInt()]; - candidate.deviceModelData.productId = [NSNumber numberWithUnsignedInt:iter.get("productId", 1).asUInt()]; - candidate.softwareVersion = [NSNumber numberWithUnsignedLong:iter.get("softwareVersion", 10).asUInt64()]; - candidate.softwareVersionString = - [NSString stringWithUTF8String:iter.get("softwareVersionString", "1.0.0").asCString()]; - candidate.deviceModelData.cDVersionNumber = [NSNumber numberWithUnsignedInt:iter.get("cDVersionNumber", 0).asUInt()]; - candidate.deviceModelData.softwareVersionValid = iter.get("softwareVersionValid", true).asBool() ? YES : NO; - candidate.deviceModelData.minApplicableSoftwareVersion = - [NSNumber numberWithUnsignedLong:iter.get("minApplicableSoftwareVersion", 0).asUInt64()]; - candidate.deviceModelData.maxApplicableSoftwareVersion = - [NSNumber numberWithUnsignedLong:iter.get("maxApplicableSoftwareVersion", 1000).asUInt64()]; - candidate.deviceModelData.otaURL = [NSString stringWithUTF8String:iter.get("otaURL", "https://test.com").asCString()]; - [*candidates addObject:candidate]; - ret = true; - } + return false; } + + *candidates = [[NSMutableArray alloc] init]; + + bool ret = false; + for (auto iter : devSofVerModValue) { + DeviceSoftwareVersionModel * candidate = [[DeviceSoftwareVersionModel alloc] init]; + + auto vendorId = [NSNumber numberWithUnsignedInt:iter.get("vendorId", 1).asUInt()]; + auto productId = [NSNumber numberWithUnsignedInt:iter.get("productId", 1).asUInt()]; + auto softwareVersion = [NSNumber numberWithUnsignedLong:iter.get("softwareVersion", 10).asUInt64()]; + auto softwareVersionString = [NSString stringWithUTF8String:iter.get("softwareVersionString", "1.0.0").asCString()]; + auto cDVersionNumber = [NSNumber numberWithUnsignedInt:iter.get("cDVersionNumber", 0).asUInt()]; + auto softwareVersionValid = iter.get("softwareVersionValid", true).asBool() ? YES : NO; + auto minApplicableSoftwareVersion = + [NSNumber numberWithUnsignedLong:iter.get("minApplicableSoftwareVersion", 0).asUInt64()]; + auto maxApplicableSoftwareVersion = + [NSNumber numberWithUnsignedLong:iter.get("maxApplicableSoftwareVersion", 1000).asUInt64()]; + auto otaURL = [NSString stringWithUTF8String:iter.get("otaURL", "https://test.com").asCString()]; + + candidate.deviceModelData.vendorId = vendorId; + candidate.deviceModelData.productId = productId; + candidate.softwareVersion = softwareVersion; + candidate.softwareVersionString = softwareVersionString; + candidate.deviceModelData.cDVersionNumber = cDVersionNumber; + candidate.deviceModelData.softwareVersionValid = softwareVersionValid; + candidate.deviceModelData.minApplicableSoftwareVersion = minApplicableSoftwareVersion; + candidate.deviceModelData.maxApplicableSoftwareVersion = maxApplicableSoftwareVersion; + candidate.deviceModelData.otaURL = otaURL; + [*candidates addObject:candidate]; + ret = true; + } + return ret; } CHIP_ERROR OTASoftwareUpdateSetFilePath::RunCommand() { - SetCandidatesFromFilePath(mOTACandidatesFilePath); + auto error = SetCandidatesFromFilePath(mOTACandidatesFilePath); SetCommandExitStatus(nil); - - return CHIP_NO_ERROR; + return error; } CHIP_ERROR OTASoftwareUpdateSetStatus::RunCommand() { - CHIP_ERROR error = CHIP_NO_ERROR; - error = SetUserConsentStatus(mUserConsentStatus); + auto error = SetUserConsentStatus(mUserConsentStatus); SetCommandExitStatus(nil); - return error; } -void OTASoftwareUpdateBase::SetCandidatesFromFilePath(char * _Nonnull filePath) +CHIP_ERROR OTASoftwareUpdateBase::SetCandidatesFromFilePath(char * _Nonnull filePath) { NSMutableArray * candidates; ChipLogDetail(chipTool, "Setting candidates from file path: %s", filePath); - ParseJsonFileAndPopulateCandidates(filePath, &candidates); + VerifyOrReturnError(ParseJsonFileAndPopulateCandidates(filePath, &candidates), CHIP_ERROR_INTERNAL); + for (DeviceSoftwareVersionModel * candidate : candidates) { - chip::OTAImageHeaderParser parser; - chip::OTAImageHeader header; - ParseOTAHeader(parser, [candidate.deviceModelData.otaURL UTF8String], header); + auto otaURL = [candidate.deviceModelData.otaURL UTF8String]; + auto header = ParseOTAHeader(otaURL); + VerifyOrReturnError(header != nil, CHIP_ERROR_INVALID_ARGUMENT); + ChipLogDetail(chipTool, "Validating image list candidate %s: ", [candidate.deviceModelData.otaURL UTF8String]); - VerifyOrDie([candidate.deviceModelData.vendorId unsignedIntValue] == header.mVendorId); - VerifyOrDie([candidate.deviceModelData.productId unsignedIntValue] == header.mProductId); - VerifyOrDie([candidate.softwareVersion unsignedLongValue] == header.mSoftwareVersion); - VerifyOrDie([candidate.softwareVersionString length] == header.mSoftwareVersionString.size()); - VerifyOrDie(memcmp([candidate.softwareVersionString UTF8String], header.mSoftwareVersionString.data(), - header.mSoftwareVersionString.size()) - == 0); - if (header.mMinApplicableVersion.HasValue()) { - VerifyOrDie( - [candidate.deviceModelData.minApplicableSoftwareVersion unsignedLongValue] == header.mMinApplicableVersion.Value()); + + auto vendorId = [candidate.deviceModelData.vendorId unsignedIntValue]; + auto productId = [candidate.deviceModelData.productId unsignedIntValue]; + auto softwareVersion = [candidate.softwareVersion unsignedLongValue]; + auto softwareVersionString = [candidate.softwareVersionString UTF8String]; + auto softwareVersionStringLength = [candidate.softwareVersionString length]; + auto minApplicableSoftwareVersion = [candidate.deviceModelData.minApplicableSoftwareVersion unsignedLongValue]; + auto maxApplicableSoftwareVersion = [candidate.deviceModelData.maxApplicableSoftwareVersion unsignedLongValue]; + + auto headerVendorId = [header.vendorID unsignedIntValue]; + auto headerProductId = [header.productID unsignedIntValue]; + auto headerSoftwareVersion = [header.softwareVersion unsignedLongValue]; + auto headerSoftwareVersionString = [header.softwareVersionString UTF8String]; + auto headerSoftwareVersionStringLength = [header.softwareVersionString length]; + + VerifyOrReturnError(vendorId == headerVendorId, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(productId == headerProductId, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(softwareVersion == headerSoftwareVersion, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(softwareVersionStringLength == headerSoftwareVersionStringLength, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(memcmp(softwareVersionString, headerSoftwareVersionString, headerSoftwareVersionStringLength) == 0, + CHIP_ERROR_INVALID_ARGUMENT); + + if (header.minApplicableVersion) { + auto version = [header.minApplicableVersion unsignedLongValue]; + VerifyOrReturnError(minApplicableSoftwareVersion == version, CHIP_ERROR_INVALID_ARGUMENT); } - if (header.mMaxApplicableVersion.HasValue()) { - VerifyOrDie( - [candidate.deviceModelData.maxApplicableSoftwareVersion unsignedLongValue] == header.mMaxApplicableVersion.Value()); + + if (header.maxApplicableVersion) { + auto version = [header.maxApplicableVersion unsignedLongValue]; + VerifyOrReturnError(maxApplicableSoftwareVersion == version, CHIP_ERROR_INVALID_ARGUMENT); } - parser.Clear(); } + mOTADelegate.candidates = candidates; + return CHIP_NO_ERROR; } CHIP_ERROR OTASoftwareUpdateBase::SetUserConsentStatus(char * _Nonnull otaSTatus) diff --git a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h index 839457a9726d81..14cd1eef4d4b94 100644 --- a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h +++ b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h @@ -372,6 +372,30 @@ class TestCommandBridge : public CHIPCommandBridge, return CheckConstraintNotValue(itemName, currentValue, @(expected)); } + using ConstraintsChecker::CheckConstraintMinLength; + + bool CheckConstraintMinLength(const char * _Nonnull itemName, NSString * _Nonnull current, uint64_t expected) + { + return CheckConstraintMinLength(itemName, [current length], expected); + } + + bool CheckConstraintMinLength(const char * _Nonnull itemName, NSArray * _Nonnull current, uint64_t expected) + { + return CheckConstraintMinLength(itemName, [current count], expected); + } + + using ConstraintsChecker::CheckConstraintMaxLength; + + bool CheckConstraintMaxLength(const char * _Nonnull itemName, NSString * _Nonnull current, uint64_t expected) + { + return CheckConstraintMaxLength(itemName, [current length], expected); + } + + bool CheckConstraintMaxLength(const char * _Nonnull itemName, NSArray * _Nonnull current, uint64_t expected) + { + return CheckConstraintMaxLength(itemName, [current count], expected); + } + using ConstraintsChecker::CheckConstraintMinValue; // Used when the minValue is a saved variable, since ConstraintsChecker does diff --git a/examples/darwin-framework-tool/templates/commands.zapt b/examples/darwin-framework-tool/templates/commands.zapt index 1bd639bfd0502a..2cc6b8a04cc979 100644 --- a/examples/darwin-framework-tool/templates/commands.zapt +++ b/examples/darwin-framework-tool/templates/commands.zapt @@ -225,9 +225,7 @@ public: subscriptionEstablished:^(){ mSubscriptionEstablished=YES; } reportHandler:^({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error) { NSLog(@"{{asUpperCamelCase parent.name}}.{{asUpperCamelCase name}} response %@", [value description]); - if (error || !mWait){ - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; diff --git a/examples/darwin-framework-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt b/examples/darwin-framework-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt index 29a0930f90772b..26293b6314d470 100644 --- a/examples/darwin-framework-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt +++ b/examples/darwin-framework-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt @@ -8,7 +8,7 @@ if ({{>actualValue}} != nil) { {{/if}} - {{#if (hasProperty expectedConstraints "type")}}VerifyOrReturn(CheckConstraintType("{{>item}}", "", "{{expectedConstraints.type}}"));{{/if}} + {{#if (hasProperty expectedConstraints "type")}}VerifyOrReturn(CheckConstraintType("{{>item}}", "{{asTestType type isArray}}", "{{expectedConstraints.type}}"));{{/if}} {{~#if (hasProperty expectedConstraints "format")}}VerifyOrReturn(CheckConstraintFormat("{{>item}}", "", "{{expectedConstraints.format}}"));{{/if}} @@ -22,9 +22,9 @@ {{~#if (hasProperty expectedConstraints "isHexString")}}VerifyOrReturn(CheckConstraintIsHexString("{{>item}}", {{>actualValue}}, {{expectedConstraints.isHexString}}));{{/if}} - {{~#if (hasProperty expectedConstraints "minLength")}}VerifyOrReturn(CheckConstraintMinLength("{{>item}}", [{{>actualValue}} length], {{expectedConstraints.minLength}}));{{/if}} + {{~#if (hasProperty expectedConstraints "minLength")}}VerifyOrReturn(CheckConstraintMinLength("{{>item}}", {{>actualValue}}, {{expectedConstraints.minLength}}));{{/if}} - {{~#if (hasProperty expectedConstraints "maxLength")}}VerifyOrReturn(CheckConstraintMaxLength("{{>item}}", [{{>actualValue}} length], {{expectedConstraints.maxLength}}));{{/if}} + {{~#if (hasProperty expectedConstraints "maxLength")}}VerifyOrReturn(CheckConstraintMaxLength("{{>item}}", {{>actualValue}}, {{expectedConstraints.maxLength}}));{{/if}} {{~#if (hasProperty expectedConstraints "minValue")}} VerifyOrReturn(CheckConstraintMinValue<{{chipType}}>("{{>item}}", [{{>actualValue}} {{asObjectiveCNumberType "" type true}}Value], {{asTypedLiteral expectedConstraints.minValue type}})); diff --git a/examples/light-switch-app/ameba/.gitignore b/examples/light-switch-app/ameba/.gitignore new file mode 100755 index 00000000000000..234526a082ad26 --- /dev/null +++ b/examples/light-switch-app/ameba/.gitignore @@ -0,0 +1,5 @@ +*.vscode + +/build/ +/sdkconfig +/sdkconfig.old diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md new file mode 100644 index 00000000000000..9d338118fa425b --- /dev/null +++ b/examples/light-switch-app/ameba/README.md @@ -0,0 +1,155 @@ +# CHIP Ameba Light Switch Example + +This example demonstrates Matter Light-Switch application on Ameba platform. + +--- + +- [CHIP Ameba Light Switch Example](#chip-ameba-light-switch-example) + - [Supported Device](#supported-device) + - [Building the Example Application](#building-the-example-application) + - [Commissioning](#commissioning) + - [BLE mode](#ble-mode) + - [IP mode](#ip-mode) + - [Cluster control](#cluster-control) + - [Running RPC Console](#running-rpc-console) + - [Running Matter Shell](#running-matter-shell) + - [Binding and Controlling a Lighting Device](#binding-and-controlling-a-lighting-device) + +--- + +## Supported Device + +The CHIP demo application is supported on +[Ameba RTL8722DM Board](https://www.amebaiot.com/en/amebad). + +## Building the Example Application + +- Pull docker image: + + $ docker pull connectedhomeip/chip-build-ameba:latest + +- Run docker container: + + $ docker run -it -v ${CHIP_DIR}:/root/chip connectedhomeip/chip-build-ameba:latest + +- Setup build environment: + + $ source ./scripts/bootstrap.sh + +- To build the demo application: + + $ ./scripts/build/build_examples.py --target ameba-amebad-light-switch build + + The output image files are stored in + `out/ameba-amebad-light-switch/asdk/image` folder. + + The bootloader image files are stored in + `out/ameba-amebad-light-switch/asdk/bootloader` folder. + +- After building the application, **Ameba Image Tool** is used to flash it to + Ameba board. + +1. Connect your device via USB and open Ameba Image Tool. +2. Select correct serial port and set baudrate as **115200**. +3. Browse and add the corresponding image files in the Flash Download list to + the correct locations +4. Click **Download** button. + +## Commissioning + +There are two commissioning modes supported by Ameba platform: + +### BLE mode + +1. Build and Flash +2. The light-switch example will run automatically after booting the Ameba + board. +3. Test with + [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) + +### IP mode + +1. Build and Flash +2. The light-switch example will run automatically after booting the Ameba + board. +3. Connect to AP using `ATW0, ATW1, ATWC` commands +4. Test with + [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) + +## Cluster Control + +After successful commissioning, use the OnOff cluster command to control the +OnOff attribute. This allows you to toggle a parameter implemented by the device +to be On or Off. + +- Via + [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool#using-the-client-to-send-matter-commands) + + $ ./chip-tool onoff on 1 + $ ./chip-tool onoff off 1 + +## Running RPC Console + +- Connect a USB-TTL adapter as shown below + + Ameba USB-TTL + A19 TX + A18 RX + GND GND + +* Build the + [chip-rpc console](https://github.com/project-chip/connectedhomeip/tree/master/examples/common/pigweed/rpc_console) + +* As part of building the example with RPCs enabled the chip_rpc python + interactive console is installed into your venv. The python wheel files are + also created in the output folder: out/debug/chip_rpc_console_wheels. To + install the wheel files without rebuilding: + + $ pip3 install out/debug/chip_rpc_console_wheels/*.whl + +- Launch the chip-rpc console after resetting Ameba board + + $ chip-console --device /dev/tty -b 115200 + +* Get and Set lighting directly using the RPC console + + python + rpcs.chip.rpc.Lighting.Get() + rpcs.chip.rpc.Lighting.Set(on=True, level=128, color=protos.chip.rpc.LightingColor(hue=5, saturation=5)) + +## Running Matter Shell + +- Matter Shell is enabled whenever RPC is disabled. + +- RPC console and Matter Shell cannot be enabled at the same time as they use + the same UART port. + +- Connect Ameba to the USB-TTL adapter as shown in the RPC section. + +- Open the USB-TTL serial port and type `help` to view the available commands + +## Binding and Controlling a Lighting Device + +- This example shows how to bind a Switch Device to a Lighting Device and + control it through the Matter Shell. One binding client (Switch Device) and + one binding server (Lighting Device) is required. + +- Commission the switch (nodeID 1) and lighting device (nodeID 2) using + chip-tool. + + $ ./chip-tool pairing ble-wifi 1 20202021 3840 + $ ./chip-tool pairing ble-wifi 2 20202021 3840 + +* After successful commissioning, configure the ACL in the lighting device to + allow access from switch device and chip-tool. + + $ ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1], "targets": null }]' 2 0 + +- Bind the lighting device to the switch device. + + $ ./chip-tool binding write binding '[{"fabricIndex": 1, "node":2, "endpoint":1, "cluster":6}]' 1 1 + +- Control the lighting device through the switch device's Matter Shell + + > switch onoff on + > switch onoff off diff --git a/examples/light-switch-app/ameba/chip_main.cmake b/examples/light-switch-app/ameba/chip_main.cmake new file mode 100755 index 00000000000000..594300a5563a23 --- /dev/null +++ b/examples/light-switch-app/ameba/chip_main.cmake @@ -0,0 +1,298 @@ +cmake_minimum_required(VERSION 3.6) + +project(chip_main) + +set(chip_dir "${ameba_matter_root}") +set(chip_dir_output "${matter_output_path}/chip") +set(dir "${sdk_root}/component/common/api") +set(chip_main chip_main) +set(list_chip_main_sources chip_main_sources) + +if (matter_enable_rpc) +set(pigweed_dir "${chip_dir}/third_party/pigweed/repo") + +include(${pigweed_dir}/pw_build/pigweed.cmake) +include(${pigweed_dir}/pw_protobuf_compiler/proto.cmake) + +set(dir_pw_third_party_nanopb "${chip_dir}/third_party/nanopb/repo" CACHE STRING "" FORCE) + +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.ameba) +pw_set_backend(pw_trace pw_trace_tokenized) + +add_subdirectory(${chip_dir}/third_party/pigweed/repo ${chip_dir}/examples/light-switch-app/ameba/out/pigweed) +add_subdirectory(${chip_dir}/third_party/nanopb/repo ${chip_dir}/examples/light-switch-app/ameba/out/nanopb) +add_subdirectory(${chip_dir}/examples/platform/ameba/pw_sys_io ${chip_dir}/examples/light-switch-app/ameba/out/pw_sys_io) + +pw_proto_library(attributes_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/attributes_service.proto + INPUTS + ${chip_dir}/examples/common/pigweed/protos/attributes_service.options + PREFIX + attributes_service + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(button_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/button_service.proto + PREFIX + button_service + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(descriptor_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/descriptor_service.proto + PREFIX + descriptor_service + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(device_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/device_service.proto + INPUTS + ${chip_dir}/examples/common/pigweed/protos/device_service.options + PREFIX + device_service + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(lighting_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/lighting_service.proto + PREFIX + lighting_service + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(locking_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/locking_service.proto + PREFIX + locking_service + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(wifi_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/wifi_service.proto + INPUTS + ${chip_dir}/examples/common/pigweed/protos/wifi_service.options + PREFIX + wifi_service + DEPS + pw_protobuf.common_proto + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos +) + +endif(matter_enable_rpc) + +include(${prj_root}/GCC-RELEASE/project_hp/asdk/includepath.cmake) + +if (matter_enable_rpc) +list( + APPEND ${list_chip_main_sources} + #rpc + ${chip_dir}/examples/platform/ameba/PigweedLogger.cpp + ${chip_dir}/examples/platform/ameba/Rpc.cpp + ${chip_dir}/examples/common/pigweed/RpcService.cpp + ${chip_dir}/examples/common/pigweed/ameba/PigweedLoggerMutex.cpp +) +endif (matter_enable_rpc) + +if (matter_enable_shell) +list( + APPEND ${list_chip_main_sources} + #shell + ${chip_dir}/examples/platform/ameba/shell/launch_shell.cpp +) +endif (matter_enable_shell) + +if (matter_enable_ota_requestor) +list( + APPEND ${list_chip_main_sources} + #OTARequestor + ${chip_dir}/src/app/clusters/ota-requestor/BDXDownloader.cpp + ${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp + ${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp + ${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp + ${chip_dir}/src/app/clusters/ota-requestor/ota-requestor-server.cpp + ${chip_dir}/examples/platform/ameba/ota/OTAInitializer.cpp +) +endif (matter_enable_ota_requestor) + +list( + APPEND ${list_chip_main_sources} + + ${chip_dir}/zzz_generated/light-switch-app/zap-generated/callback-stub.cpp + ${chip_dir}/zzz_generated/light-switch-app/zap-generated/IMClusterCommandHandler.cpp + + ${chip_dir}/examples/light-switch-app/ameba/main/chipinterface.cpp + ${chip_dir}/examples/light-switch-app/ameba/main/BindingHandler.cpp + ${chip_dir}/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp + ${chip_dir}/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp + ${chip_dir}/examples/light-switch-app/ameba/main/Globals.cpp + ${chip_dir}/examples/light-switch-app/ameba/main/LEDWidget.cpp + ${chip_dir}/examples/light-switch-app/ameba/main/DsoHack.cpp + + ${chip_dir}/examples/providers/DeviceInfoProviderImpl.cpp +) + +add_library( + ${chip_main} + STATIC + ${chip_main_sources} +) + +chip_configure_data_model(chip_main + INCLUDE_SERVER + ZAP_FILE ${matter_example_path}/../light-switch-common/light-switch-app.zap +) + +if (matter_enable_rpc) +target_include_directories( + ${chip_main} + PUBLIC + #rpc + ${chip_dir}/examples/platform/ameba + ${chip_dir}/examples/platform/ameba/pw_sys_io/public + ${chip_dir}/examples/common + ${chip_dir}/examples/common/pigweed + ${chip_dir}/examples/common/pigweed/ameba + ${chip_dir}/src + ${chip_dir}/src/lib/support + ${pigweed_dir}/pw_rpc/nanopb/public +) +endif (matter_enable_rpc) + +target_include_directories( + ${chip_main} + PUBLIC + ${inc_path} + ${chip_dir}/zzz_generated/light-switch-app + ${chip_dir}/zzz_generated/light-switch-app/zap-generated + ${chip_dir}/zzz_generated/app-common + ${chip_dir}/examples/light-switch-app/ameba/main/include + ${chip_dir}/examples/platform/ameba + ${chip_dir}/examples/providers + ${chip_dir_output}/gen/include + ${chip_dir}/src/include/ + ${chip_dir}/src/lib/ + ${chip_dir}/src/ + ${chip_dir}/third_party/nlassert/repo/include/ + ${chip_dir}/src/app/ + ${chip_dir}/src/app/util/ + ${chip_dir}/src/app/server/ + ${chip_dir}/src/controller/data_model + ${chip_dir}/third_party/nlio/repo/include/ + ${chip_dir}/third_party/nlunit-test/repo/src +) + +if (matter_enable_rpc) +target_link_libraries(${chip_main} PUBLIC + attributes_service.nanopb_rpc + button_service.nanopb_rpc + descriptor_service.nanopb_rpc + device_service.nanopb_rpc + lighting_service.nanopb_rpc + locking_service.nanopb_rpc + wifi_service.nanopb_rpc + pw_checksum + pw_hdlc + pw_log + pw_rpc.server + pw_trace_tokenized + pw_trace_tokenized.trace_buffer + pw_trace_tokenized.rpc_service + pw_trace_tokenized.protos.nanopb_rpc + PwRpc +) + +link_directories( + ${chip_dir_output}/lib +) +endif (matter_enable_rpc) + +list( + APPEND chip_main_flags + + -DINET_CONFIG_ENABLE_IPV4=0 + -DCHIP_PROJECT=1 + -DCHIP_DEVICE_LAYER_TARGET=Ameba + -DUSE_ZAP_CONFIG + -DCHIP_HAVE_CONFIG_H + -DMBEDTLS_CONFIG_FILE= +) + +if (matter_enable_persistentstorage_audit) +list( + APPEND chip_main_flags + + -DCHIP_SUPPORT_ENABLE_STORAGE_API_AUDIT +) +endif (matter_enable_persistentstorage_audit) + +if (matter_enable_rpc) +list( + APPEND chip_main_flags + + -DPW_RPC_ATTRIBUTE_SERVICE=1 + -DPW_RPC_BUTTON_SERVICE=1 + -DPW_RPC_DESCRIPTOR_SERVICE=1 + -DPW_RPC_DEVICE_SERVICE=1 + -DPW_RPC_LIGHTING_SERVICE=1 + -DPW_RPC_LOCKING_SERVICE=1 + -DCONFIG_ENABLE_PW_RPC=1 +) +endif (matter_enable_rpc) + +if (matter_enable_shell) +list( + APPEND chip_main_flags + + -DCONFIG_ENABLE_CHIP_SHELL=1 +) +endif (matter_enable_shell) + +list( + APPEND chip_main_cpp_flags + + -Wno-unused-parameter + -std=gnu++11 + -std=c++14 + -fno-rtti +) +target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) +target_compile_options(${chip_main} PRIVATE ${chip_main_cpp_flags}) + +# move static library post build command +add_custom_command( + TARGET ${chip_main} + POST_BUILD + COMMAND cp lib${chip_main}.a ${CMAKE_CURRENT_SOURCE_DIR}/lib/application +) diff --git a/examples/light-switch-app/ameba/main/BindingHandler.cpp b/examples/light-switch-app/ameba/main/BindingHandler.cpp new file mode 100644 index 00000000000000..93638a811bdf77 --- /dev/null +++ b/examples/light-switch-app/ameba/main/BindingHandler.cpp @@ -0,0 +1,425 @@ +/* + * + * 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 "BindingHandler.h" +#include "app/CommandSender.h" +#include "app/clusters/bindings/BindingManager.h" +#include "app/server/Server.h" +#include "controller/InvokeInteraction.h" +#include "platform/CHIPDeviceLayer.h" +#include +#include + +#if CONFIG_ENABLE_CHIP_SHELL +#include "lib/shell/Engine.h" +#include "lib/shell/commands/Help.h" +#endif // ENABLE_CHIP_SHELL + +using namespace chip; +using namespace chip::app; + +#if CONFIG_ENABLE_CHIP_SHELL +using Shell::Engine; +using Shell::shell_command_t; +using Shell::streamer_get; +using Shell::streamer_printf; + +Engine sShellSwitchSubCommands; +Engine sShellSwitchOnOffSubCommands; + +Engine sShellSwitchGroupsSubCommands; +Engine sShellSwitchGroupsOnOffSubCommands; + +Engine sShellSwitchBindingSubCommands; +#endif // defined(ENABLE_CHIP_SHELL) + +namespace { + +void ProcessOnOffUnicastBindingCommand(CommandId commandId, const EmberBindingTableEntry & binding, DeviceProxy * peer_device) +{ + auto onSuccess = [](const ConcreteCommandPath & commandPath, const StatusIB & status, const auto & dataResponse) { + ChipLogProgress(NotSpecified, "OnOff command succeeds"); + }; + + auto onFailure = [](CHIP_ERROR error) { + ChipLogError(NotSpecified, "OnOff command failed: %" CHIP_ERROR_FORMAT, error.Format()); + }; + + switch (commandId) + { + case Clusters::OnOff::Commands::Toggle::Id: + Clusters::OnOff::Commands::Toggle::Type toggleCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, + toggleCommand, onSuccess, onFailure); + break; + + case Clusters::OnOff::Commands::On::Id: + Clusters::OnOff::Commands::On::Type onCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, + onCommand, onSuccess, onFailure); + break; + + case Clusters::OnOff::Commands::Off::Id: + Clusters::OnOff::Commands::Off::Type offCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, + offCommand, onSuccess, onFailure); + break; + } +} + +void ProcessOnOffGroupBindingCommand(CommandId commandId, const EmberBindingTableEntry & binding) +{ + Messaging::ExchangeManager & exchangeMgr = Server::GetInstance().GetExchangeManager(); + + switch (commandId) + { + case Clusters::OnOff::Commands::Toggle::Id: + Clusters::OnOff::Commands::Toggle::Type toggleCommand; + Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, toggleCommand); + break; + + case Clusters::OnOff::Commands::On::Id: + Clusters::OnOff::Commands::On::Type onCommand; + Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, onCommand); + + break; + + case Clusters::OnOff::Commands::Off::Id: + Clusters::OnOff::Commands::Off::Type offCommand; + Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, offCommand); + break; + } +} + +void LightSwitchChangedHandler(const EmberBindingTableEntry & binding, DeviceProxy * peer_device, void * context) +{ + VerifyOrReturn(context != nullptr, ChipLogError(NotSpecified, "OnDeviceConnectedFn: context is null")); + BindingCommandData * data = static_cast(context); + + if (binding.type == EMBER_MULTICAST_BINDING && data->isGroup) + { + switch (data->clusterId) + { + case Clusters::OnOff::Id: + ProcessOnOffGroupBindingCommand(data->commandId, binding); + break; + } + } + else if (binding.type == EMBER_UNICAST_BINDING && !data->isGroup) + { + switch (data->clusterId) + { + case Clusters::OnOff::Id: + ProcessOnOffUnicastBindingCommand(data->commandId, binding, peer_device); + break; + } + } +} + +void InitBindingHandlerInternal(intptr_t arg) +{ + auto & server = chip::Server::GetInstance(); + chip::BindingManager::GetInstance().Init( + { &server.GetFabricTable(), server.GetCASESessionManager(), &server.GetPersistentStorage() }); + chip::BindingManager::GetInstance().RegisterBoundDeviceChangedHandler(LightSwitchChangedHandler); +} + +#ifdef CONFIG_ENABLE_CHIP_SHELL + +/******************************************************** + * Switch shell functions + *********************************************************/ + +CHIP_ERROR SwitchHelpHandler(int argc, char ** argv) +{ + sShellSwitchSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR SwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return SwitchHelpHandler(argc, argv); + } + + return sShellSwitchSubCommands.ExecCommand(argc, argv); +} + +/******************************************************** + * OnOff switch shell functions + *********************************************************/ + +CHIP_ERROR OnOffHelpHandler(int argc, char ** argv) +{ + sShellSwitchOnOffSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OnOffSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return OnOffHelpHandler(argc, argv); + } + + return sShellSwitchOnOffSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR OnSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::On::Id; + data->clusterId = Clusters::OnOff::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OffSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Off::Id; + data->clusterId = Clusters::OnOff::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ToggleSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Toggle::Id; + data->clusterId = Clusters::OnOff::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +/******************************************************** + * bind switch shell functions + *********************************************************/ + +CHIP_ERROR BindingHelpHandler(int argc, char ** argv) +{ + sShellSwitchBindingSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BindingSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return BindingHelpHandler(argc, argv); + } + + return sShellSwitchBindingSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR BindingGroupBindCommandHandler(int argc, char ** argv) +{ + VerifyOrReturnError(argc == 2, CHIP_ERROR_INVALID_ARGUMENT); + + EmberBindingTableEntry * entry = Platform::New(); + entry->type = EMBER_MULTICAST_BINDING; + entry->fabricIndex = atoi(argv[0]); + entry->groupId = atoi(argv[1]); + entry->local = 1; // Hardcoded to endpoint 1 for now + entry->clusterId.SetValue(6); // Hardcoded to OnOff cluster for now + + DeviceLayer::PlatformMgr().ScheduleWork(BindingWorkerFunction, reinterpret_cast(entry)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BindingUnicastBindCommandHandler(int argc, char ** argv) +{ + VerifyOrReturnError(argc == 3, CHIP_ERROR_INVALID_ARGUMENT); + + EmberBindingTableEntry * entry = Platform::New(); + entry->type = EMBER_UNICAST_BINDING; + entry->fabricIndex = atoi(argv[0]); + entry->nodeId = atoi(argv[1]); + entry->local = 1; // Hardcoded to endpoint 1 for now + entry->remote = atoi(argv[2]); + entry->clusterId.SetValue(6); // Hardcode to OnOff cluster for now + + DeviceLayer::PlatformMgr().ScheduleWork(BindingWorkerFunction, reinterpret_cast(entry)); + return CHIP_NO_ERROR; +} + +/******************************************************** + * Groups switch shell functions + *********************************************************/ + +CHIP_ERROR GroupsHelpHandler(int argc, char ** argv) +{ + sShellSwitchGroupsSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupsSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return GroupsHelpHandler(argc, argv); + } + + return sShellSwitchGroupsSubCommands.ExecCommand(argc, argv); +} + +/******************************************************** + * Groups OnOff switch shell functions + *********************************************************/ + +CHIP_ERROR GroupsOnOffHelpHandler(int argc, char ** argv) +{ + sShellSwitchGroupsOnOffSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupsOnOffSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return GroupsOnOffHelpHandler(argc, argv); + } + + return sShellSwitchGroupsOnOffSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR GroupOnSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::On::Id; + data->clusterId = Clusters::OnOff::Id; + data->isGroup = true; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupOffSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Off::Id; + data->clusterId = Clusters::OnOff::Id; + data->isGroup = true; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupToggleSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Toggle::Id; + data->clusterId = Clusters::OnOff::Id; + data->isGroup = true; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +/** + * @brief configures switch matter shell + * + */ +static void RegisterSwitchCommands() +{ + + static const shell_command_t sSwitchSubCommands[] = { + { &SwitchHelpHandler, "help", "Usage: switch " }, + { &OnOffSwitchCommandHandler, "onoff", " Usage: switch onoff " }, + { &GroupsSwitchCommandHandler, "groups", "Usage: switch groups " }, + { &BindingSwitchCommandHandler, "binding", "Usage: switch binding " } + }; + + static const shell_command_t sSwitchOnOffSubCommands[] = { + { &OnOffHelpHandler, "help", "Usage : switch ononff " }, + { &OnSwitchCommandHandler, "on", "Sends on command to bound lighting app" }, + { &OffSwitchCommandHandler, "off", "Sends off command to bound lighting app" }, + { &ToggleSwitchCommandHandler, "toggle", "Sends toggle command to bound lighting app" } + }; + + static const shell_command_t sSwitchGroupsSubCommands[] = { { &GroupsHelpHandler, "help", "Usage: switch groups " }, + { &GroupsOnOffSwitchCommandHandler, "onoff", + "Usage: switch groups onoff " } }; + + static const shell_command_t sSwitchGroupsOnOffSubCommands[] = { + { &GroupsOnOffHelpHandler, "help", "Usage: switch groups onoff " }, + { &GroupOnSwitchCommandHandler, "on", "Sends on command to bound group" }, + { &GroupOffSwitchCommandHandler, "off", "Sends off command to bound group" }, + { &GroupToggleSwitchCommandHandler, "toggle", "Sends toggle command to group" } + }; + + static const shell_command_t sSwitchBindingSubCommands[] = { + { &BindingHelpHandler, "help", "Usage: switch binding " }, + { &BindingGroupBindCommandHandler, "group", "Usage: switch binding group " }, + { &BindingUnicastBindCommandHandler, "unicast", "Usage: switch binding unicast " } + }; + + static const shell_command_t sSwitchCommand = { &SwitchCommandHandler, "switch", + "Light-switch commands. Usage: switch " }; + + sShellSwitchGroupsOnOffSubCommands.RegisterCommands(sSwitchGroupsOnOffSubCommands, ArraySize(sSwitchGroupsOnOffSubCommands)); + sShellSwitchOnOffSubCommands.RegisterCommands(sSwitchOnOffSubCommands, ArraySize(sSwitchOnOffSubCommands)); + sShellSwitchGroupsSubCommands.RegisterCommands(sSwitchGroupsSubCommands, ArraySize(sSwitchGroupsSubCommands)); + sShellSwitchBindingSubCommands.RegisterCommands(sSwitchBindingSubCommands, ArraySize(sSwitchBindingSubCommands)); + sShellSwitchSubCommands.RegisterCommands(sSwitchSubCommands, ArraySize(sSwitchSubCommands)); + + Engine::Root().RegisterCommands(&sSwitchCommand, 1); +} +#endif // ENABLE_CHIP_SHELL + +} // namespace + +/******************************************************** + * Switch functions + *********************************************************/ + +void SwitchWorkerFunction(intptr_t context) +{ + VerifyOrReturn(context != 0, ChipLogError(NotSpecified, "SwitchWorkerFunction - Invalid work data")); + + BindingCommandData * data = reinterpret_cast(context); + BindingManager::GetInstance().NotifyBoundClusterChanged(data->localEndpointId, data->clusterId, static_cast(data)); + + Platform::Delete(data); +} + +void BindingWorkerFunction(intptr_t context) +{ + VerifyOrReturn(context != 0, ChipLogError(NotSpecified, "BindingWorkerFunction - Invalid work data")); + + EmberBindingTableEntry * entry = reinterpret_cast(context); + AddBindingEntry(*entry); + + Platform::Delete(entry); +} + +CHIP_ERROR InitBindingHandler() +{ + // The initialization of binding manager will try establishing connection with unicast peers + // so it requires the Server instance to be correctly initialized. Post the init function to + // the event queue so that everything is ready when initialization is conducted. + chip::DeviceLayer::PlatformMgr().ScheduleWork(InitBindingHandlerInternal); +#if CONFIG_ENABLE_CHIP_SHELL + RegisterSwitchCommands(); +#endif + return CHIP_NO_ERROR; +} diff --git a/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp b/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp new file mode 100644 index 00000000000000..4c1b55fbddb9fc --- /dev/null +++ b/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file implements the CHIP Device Interface that is used by + * applications to interact with the CHIP stack + * + */ + +#include + +#include "CHIPDeviceManager.h" +#include +#include +#include +#include +#include + +using namespace ::chip; + +namespace chip { + +namespace DeviceManager { + +using namespace ::chip::DeviceLayer; + +void CHIPDeviceManager::CommonDeviceEventHandler(const ChipDeviceEvent * event, intptr_t arg) +{ + CHIPDeviceManagerCallbacks * cb = reinterpret_cast(arg); + if (cb != nullptr) + { + cb->DeviceEventCallback(event, reinterpret_cast(cb)); + } +} + +CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) +{ + CHIP_ERROR err; + mCB = cb; + + err = Platform::MemoryInit(); + SuccessOrExit(err); + + // Initialize the CHIP stack. + err = PlatformMgr().InitChipStack(); + SuccessOrExit(err); + + if (CONFIG_NETWORK_LAYER_BLE) + { + ConnectivityMgr().SetBLEAdvertisingEnabled(true); + } + + // Register a function to receive events from the CHIP device layer. Note that calls to + // this function will happen on the CHIP event loop thread, not the app_main thread. + PlatformMgr().AddEventHandler(CHIPDeviceManager::CommonDeviceEventHandler, reinterpret_cast(cb)); + + // Start a task to run the CHIP Device event loop. + err = PlatformMgr().StartEventLoopTask(); + SuccessOrExit(err); + +exit: + return err; +} +} // namespace DeviceManager +} // namespace chip + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & path, uint8_t type, uint16_t size, uint8_t * value) +{ + chip::DeviceManager::CHIPDeviceManagerCallbacks * cb = + chip::DeviceManager::CHIPDeviceManager::GetInstance().GetCHIPDeviceManagerCallbacks(); + if (cb != nullptr) + { + cb->PostAttributeChangeCallback(path.mEndpointId, path.mClusterId, path.mAttributeId, type, size, value); + } +} diff --git a/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp b/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp new file mode 100644 index 00000000000000..f1776a46a71426 --- /dev/null +++ b/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp @@ -0,0 +1,174 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file DeviceCallbacks.cpp + * + * Implements all the callbacks to the application from the CHIP Stack + * + **/ +#include "DeviceCallbacks.h" + +#include "CHIPDeviceManager.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR +#include +#endif + +#include "Globals.h" +#include "LEDWidget.h" + +static const char * TAG = "app-devicecallbacks"; + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::System; +using namespace ::chip::DeviceLayer; +using namespace ::chip::DeviceManager; +using namespace ::chip::Logging; +using namespace ::chip::app::Clusters; + +uint32_t identifyTimerCount; +constexpr uint32_t kIdentifyTimerDelayMS = 250; +constexpr uint32_t kInitOTARequestorDelaySec = 3; + +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR +void InitOTARequestorHandler(System::Layer * systemLayer, void * appState) +{ + OTAInitializer::Instance().InitOTARequestor(); +} +#endif + +void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) +{ + switch (event->Type) + { + case DeviceEventType::kInternetConnectivityChange: + OnInternetConnectivityChange(event); + break; + + case DeviceEventType::kInterfaceIpAddressChanged: + if ((event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV4_Assigned) || + (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned)) + { + // MDNS server restart on any ip assignment: if link local ipv6 is configured, that + // will not trigger a 'internet connectivity change' as there is no internet + // connectivity. MDNS still wants to refresh its listening interfaces to include the + // newly selected address. + chip::app::DnssdServer::Instance().StartServer(); + } + break; + } +} + +void DeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, ClusterId clusterId, AttributeId attributeId, uint8_t type, + uint16_t size, uint8_t * value) +{ + switch (clusterId) + { + case OnOffSwitchConfiguration::Id: + OnOffSwitchConfigurationAttributeChangeCallback(endpointId, attributeId, type, value, size); + break; + + case Identify::Id: + OnIdentifyPostAttributeChangeCallback(endpointId, attributeId, value); + break; + + default: + break; + } +} + +void DeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * event) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + static bool isOTAInitialized = false; +#endif + if (event->InternetConnectivityChange.IPv4 == kConnectivity_Established) + { + ChipLogProgress(DeviceLayer, "IPv4 Server ready..."); + chip::app::DnssdServer::Instance().StartServer(); + } + else if (event->InternetConnectivityChange.IPv4 == kConnectivity_Lost) + { + ChipLogProgress(DeviceLayer, "Lost IPv4 connectivity..."); + } + if (event->InternetConnectivityChange.IPv6 == kConnectivity_Established) + { + ChipLogProgress(DeviceLayer, "IPv6 Server ready..."); + chip::app::DnssdServer::Instance().StartServer(); +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + // Init OTA requestor only when we have gotten IPv6 address + if (!isOTAInitialized) + { + chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds32(kInitOTARequestorDelaySec), + InitOTARequestorHandler, nullptr); + isOTAInitialized = true; + } +#endif + } + else if (event->InternetConnectivityChange.IPv6 == kConnectivity_Lost) + { + ChipLogProgress(DeviceLayer, "Lost IPv6 connectivity..."); + } +} + +void DeviceCallbacks::OnOffSwitchConfigurationAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t type, + uint8_t * value, uint16_t size) +{ + ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); +} + +void IdentifyTimerHandler(Layer * systemLayer, void * appState, CHIP_ERROR error) +{ + if (identifyTimerCount) + { + identifyTimerCount--; + } +} + +void DeviceCallbacks::OnIdentifyPostAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) +{ + VerifyOrExit(attributeId == ZCL_IDENTIFY_TIME_ATTRIBUTE_ID, + ChipLogError(DeviceLayer, "[%s] Unhandled Attribute ID: '0x%04x", TAG, attributeId)); + VerifyOrExit(endpointId == 1, ChipLogError(DeviceLayer, "[%s] Unexpected EndPoint ID: `0x%02x'", TAG, endpointId)); + + // timerCount represents the number of callback executions before we stop the timer. + // value is expressed in seconds and the timer is fired every 250ms, so just multiply value by 4. + // Also, we want timerCount to be odd number, so the ligth state ends in the same state it starts. + identifyTimerCount = (*value) * 4; +exit: + return; +} + +bool emberAfBasicClusterMfgSpecificPingCallback(chip::app::CommandHandler * commandObj) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} diff --git a/examples/light-switch-app/ameba/main/DsoHack.cpp b/examples/light-switch-app/ameba/main/DsoHack.cpp new file mode 100644 index 00000000000000..6fc5d7a63307c5 --- /dev/null +++ b/examples/light-switch-app/ameba/main/DsoHack.cpp @@ -0,0 +1,20 @@ +/* + * 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. + */ + +// This hack is needed because Ameba SDK is not linking against libstdc++ correctly. +extern "C" { +void * __dso_handle = 0; +} diff --git a/examples/light-switch-app/ameba/main/Globals.cpp b/examples/light-switch-app/ameba/main/Globals.cpp new file mode 100755 index 00000000000000..71d9b6c9f0b940 --- /dev/null +++ b/examples/light-switch-app/ameba/main/Globals.cpp @@ -0,0 +1,21 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Globals.h" + +LEDWidget statusLED1; diff --git a/examples/light-switch-app/ameba/main/LEDWidget.cpp b/examples/light-switch-app/ameba/main/LEDWidget.cpp new file mode 100755 index 00000000000000..a050f4a4d4f0f0 --- /dev/null +++ b/examples/light-switch-app/ameba/main/LEDWidget.cpp @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2018 Nest Labs, Inc. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file LEDWidget.cpp + * + * Implements an LED Widget controller that is usually tied to a GPIO + * It also updates the display widget if it's enabled + */ + +#include "LEDWidget.h" + +gpio_t gpio_led; + +void LEDWidget::Init(PinName gpioNum) +{ + + mGPIONum = gpioNum; + mState = false; + + if (gpioNum != (PinName) NC) + { + // Init LED control pin + gpio_init(&gpio_led, gpioNum); + gpio_dir(&gpio_led, PIN_OUTPUT); // Direction: Output + gpio_mode(&gpio_led, PullNone); // No pull + gpio_write(&gpio_led, mState); + } +} + +void LEDWidget::Set(bool state) +{ + DoSet(state); +} + +void LEDWidget::DoSet(bool state) +{ + bool stateChange = (mState != state); + mState = state; + + if (stateChange) + { + gpio_write(&gpio_led, state); + } +} diff --git a/examples/light-switch-app/ameba/main/chipinterface.cpp b/examples/light-switch-app/ameba/main/chipinterface.cpp new file mode 100644 index 00000000000000..b0a8b6dd1d6ce3 --- /dev/null +++ b/examples/light-switch-app/ameba/main/chipinterface.cpp @@ -0,0 +1,157 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "BindingHandler.h" +#include "CHIPDeviceManager.h" +#include "DeviceCallbacks.h" +#include "Globals.h" +#include "LEDWidget.h" +#include "chip_porting.h" +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if CONFIG_ENABLE_PW_RPC +#include +#endif + +#if CONFIG_ENABLE_CHIP_SHELL +#include +#endif + +using namespace ::chip; +using namespace ::chip::Credentials; +using namespace ::chip::DeviceManager; +using namespace ::chip::DeviceLayer; +using namespace ::chip::System; + +namespace { // Network Commissioning +constexpr EndpointId kNetworkCommissioningEndpointMain = 0; +constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; + +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(kNetworkCommissioningEndpointMain /* Endpoint Id */, + &(NetworkCommissioning::AmebaWiFiDriver::GetInstance())); +} // namespace + +void NetWorkCommissioningInstInit() +{ + sWiFiNetworkCommissioningInstance.Init(); + + // We only have network commissioning on endpoint 0. + emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); +} + +Identify gIdentify0 = { + chip::EndpointId{ 0 }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, + EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, +}; + +Identify gIdentify1 = { + chip::EndpointId{ 1 }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, + EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, +}; + +#ifdef CONFIG_PLATFORM_8721D +#define STATUS_LED_GPIO_NUM PB_5 +#elif defined(CONFIG_PLATFORM_8710C) +#define STATUS_LED_GPIO_NUM PA_20 +#else +#define STATUS_LED_GPIO_NUM NC +#endif + +static DeviceCallbacks EchoCallbacks; +chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; + +static void InitServer(intptr_t context) +{ + // Init ZCL Data Model and CHIP App Server + static chip::CommonCaseDeviceServerInitParams initParams; + initParams.InitializeStaticResourcesBeforeServerInit(); + chip::Server::GetInstance().Init(initParams); + gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage()); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + + // Initialize device attestation config + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + NetWorkCommissioningInstInit(); + + if (RTW_SUCCESS != wifi_is_connected_to_ap()) + { + // QR code will be used with CHIP Tool + PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); + } + + InitBindingHandler(); +} + +extern "C" void ChipTest(void) +{ + ChipLogProgress(DeviceLayer, "Light Switch Demo!"); + CHIP_ERROR err = CHIP_NO_ERROR; + +#if CONFIG_ENABLE_PW_RPC + chip::rpc::Init(); +#endif + + initPref(); + + CHIPDeviceManager & deviceMgr = CHIPDeviceManager::GetInstance(); + + err = deviceMgr.Init(&EchoCallbacks); + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "DeviceManagerInit() - ERROR!\r\n"); + } + else + { + ChipLogProgress(DeviceLayer, "DeviceManagerInit() - OK\r\n"); + } + + chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, 0); + + statusLED1.Init(STATUS_LED_GPIO_NUM); + +#if CONFIG_ENABLE_CHIP_SHELL + chip::LaunchShell(); +#endif +} + +bool lowPowerClusterSleep() +{ + return true; +} diff --git a/examples/light-switch-app/ameba/main/include/BindingHandler.h b/examples/light-switch-app/ameba/main/include/BindingHandler.h new file mode 100644 index 00000000000000..280c94874f04dd --- /dev/null +++ b/examples/light-switch-app/ameba/main/include/BindingHandler.h @@ -0,0 +1,35 @@ +/* + * + * 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 "app-common/zap-generated/ids/Clusters.h" +#include "app-common/zap-generated/ids/Commands.h" +#include "lib/core/CHIPError.h" + +CHIP_ERROR InitBindingHandler(); +void SwitchWorkerFunction(intptr_t context); +void BindingWorkerFunction(intptr_t context); + +struct BindingCommandData +{ + chip::EndpointId localEndpointId = 1; + chip::CommandId commandId; + chip::ClusterId clusterId; + bool isGroup = false; +}; diff --git a/examples/light-switch-app/ameba/main/include/CHIPDeviceManager.h b/examples/light-switch-app/ameba/main/include/CHIPDeviceManager.h new file mode 100644 index 00000000000000..4a4efd1d4d39dd --- /dev/null +++ b/examples/light-switch-app/ameba/main/include/CHIPDeviceManager.h @@ -0,0 +1,124 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file contains definitions for the CHIP DeviceManager Interface + * + * This object will co-ordinate multiple activities such as + * initialisation, rendezvous, session mgmt and other such + * activities within the CHIP stack. This is a singleton object. + */ + +#pragma once + +#include +#include +#include + +#include + +#include +#include + +#include "af-types.h" + +namespace chip { +namespace DeviceManager { + +/** + * @brief + * This class provides a skeleton for all the callback functions. The functions will be + * called by other objects within the CHIP stack for specific events. + * Applications interested in receiving specific callbacks can specialize this class and handle + * these events in their implementation of this class. + */ +class CHIPDeviceManagerCallbacks +{ +public: + /** + * @brief + * Called when CHIP Device events (PublicEventTypes) are triggered. + * + * @param event ChipDeviceEvent that occurred + * @param arg arguments specific to the event, if any + */ + virtual void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg) {} + + /** + * @brief + * Called after an attribute has been changed + * + * @param endpoint endpoint id + * @param clusterID cluster id + * @param attributeId attribute id that was changed + * @param manufacturerCode manufacturer code + * @param type attribute type + * @param size size of the attribute + * @param value pointer to the new value + */ + virtual void PostAttributeChangeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, + uint8_t type, uint16_t size, uint8_t * value) + {} + virtual ~CHIPDeviceManagerCallbacks() {} +}; + +/** + * @brief + * A common class that drives other components of the CHIP stack + */ +class DLL_EXPORT CHIPDeviceManager +{ +public: + CHIPDeviceManager(const CHIPDeviceManager &) = delete; + CHIPDeviceManager(const CHIPDeviceManager &&) = delete; + CHIPDeviceManager & operator=(const CHIPDeviceManager &) = delete; + + static CHIPDeviceManager & GetInstance() + { + static CHIPDeviceManager instance; + return instance; + } + + /** + * @brief + * Initialise CHIPDeviceManager + * + * @param cb Application's instance of the CHIPDeviceManagerCallbacks for consuming events + */ + CHIP_ERROR Init(CHIPDeviceManagerCallbacks * cb); + + /** + * @brief + * Fetch a pointer to the registered CHIPDeviceManagerCallbacks object. + * + */ + CHIPDeviceManagerCallbacks * GetCHIPDeviceManagerCallbacks() { return mCB; } + + /** + * Use internally for registration of the ChipDeviceEvents + */ + static void CommonDeviceEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); + +private: + CHIPDeviceManagerCallbacks * mCB = nullptr; + CHIPDeviceManager() {} +}; + +} // namespace DeviceManager +} // namespace chip diff --git a/examples/light-switch-app/ameba/main/include/DeviceCallbacks.h b/examples/light-switch-app/ameba/main/include/DeviceCallbacks.h new file mode 100644 index 00000000000000..745d1663f29a31 --- /dev/null +++ b/examples/light-switch-app/ameba/main/include/DeviceCallbacks.h @@ -0,0 +1,45 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file DeviceCallbacks.h + * + * Implementations for the DeviceManager callbacks for this application + * + **/ + +#pragma once + +#include "CHIPDeviceManager.h" +#include +#include +#include + +class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks +{ +public: + void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg) override; + void PostAttributeChangeCallback(chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId, + uint8_t type, uint16_t size, uint8_t * value) override; + +private: + void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); + void OnOffSwitchConfigurationAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t type, + uint8_t * value, uint16_t size); + void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); +}; diff --git a/examples/light-switch-app/ameba/main/include/Globals.h b/examples/light-switch-app/ameba/main/include/Globals.h new file mode 100755 index 00000000000000..4033f2d0a996ee --- /dev/null +++ b/examples/light-switch-app/ameba/main/include/Globals.h @@ -0,0 +1,23 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "LEDWidget.h" + +extern LEDWidget statusLED1; diff --git a/examples/light-switch-app/ameba/main/include/LEDWidget.h b/examples/light-switch-app/ameba/main/include/LEDWidget.h new file mode 100755 index 00000000000000..9f1456daa7492d --- /dev/null +++ b/examples/light-switch-app/ameba/main/include/LEDWidget.h @@ -0,0 +1,158 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#ifdef CONFIG_PLATFORM_8710C +#include "gpio_api.h" +#include "rtl8710c_pin_name.h" + +#else + +typedef enum +{ + PORT_A = 0, + PORT_B = 1, +} GPIO_PORT; + +typedef enum +{ + PIN_INPUT = 0, + PIN_OUTPUT +} PinDirection; + +typedef enum +{ + PullNone = 0, // IN HIGHZ + PullUp = 1, + PullDown = 2, + PullDefault = PullNone +} PinMode; + +/* (((port)<<5)|(pin)) */ +typedef enum +{ + PA_0 = (PORT_A << 5 | 0), + PA_1 = (PORT_A << 5 | 1), + PA_2 = (PORT_A << 5 | 2), + PA_3 = (PORT_A << 5 | 3), + PA_4 = (PORT_A << 5 | 4), + PA_5 = (PORT_A << 5 | 5), + PA_6 = (PORT_A << 5 | 6), + PA_7 = (PORT_A << 5 | 7), + PA_8 = (PORT_A << 5 | 8), + PA_9 = (PORT_A << 5 | 9), + PA_10 = (PORT_A << 5 | 10), + PA_11 = (PORT_A << 5 | 11), + PA_12 = (PORT_A << 5 | 12), + PA_13 = (PORT_A << 5 | 13), + PA_14 = (PORT_A << 5 | 14), + PA_15 = (PORT_A << 5 | 15), + PA_16 = (PORT_A << 5 | 16), + PA_17 = (PORT_A << 5 | 17), + PA_18 = (PORT_A << 5 | 18), + PA_19 = (PORT_A << 5 | 19), + PA_20 = (PORT_A << 5 | 20), + PA_21 = (PORT_A << 5 | 21), + PA_22 = (PORT_A << 5 | 22), + PA_23 = (PORT_A << 5 | 23), + PA_24 = (PORT_A << 5 | 24), + PA_25 = (PORT_A << 5 | 25), + PA_26 = (PORT_A << 5 | 26), + PA_27 = (PORT_A << 5 | 27), + PA_28 = (PORT_A << 5 | 28), + PA_29 = (PORT_A << 5 | 29), + PA_30 = (PORT_A << 5 | 30), + PA_31 = (PORT_A << 5 | 31), + + PB_0 = (PORT_B << 5 | 0), + PB_1 = (PORT_B << 5 | 1), + PB_2 = (PORT_B << 5 | 2), + PB_3 = (PORT_B << 5 | 3), + PB_4 = (PORT_B << 5 | 4), + PB_5 = (PORT_B << 5 | 5), + PB_6 = (PORT_B << 5 | 6), + PB_7 = (PORT_B << 5 | 7), + PB_8 = (PORT_B << 5 | 8), + PB_9 = (PORT_B << 5 | 9), + PB_10 = (PORT_B << 5 | 10), + PB_11 = (PORT_B << 5 | 11), + PB_12 = (PORT_B << 5 | 12), + PB_13 = (PORT_B << 5 | 13), + PB_14 = (PORT_B << 5 | 14), + PB_15 = (PORT_B << 5 | 15), + PB_16 = (PORT_B << 5 | 16), + PB_17 = (PORT_B << 5 | 17), + PB_18 = (PORT_B << 5 | 18), + PB_19 = (PORT_B << 5 | 19), + PB_20 = (PORT_B << 5 | 20), + PB_21 = (PORT_B << 5 | 21), + PB_22 = (PORT_B << 5 | 22), + PB_23 = (PORT_B << 5 | 23), + PB_24 = (PORT_B << 5 | 24), + PB_25 = (PORT_B << 5 | 25), + PB_26 = (PORT_B << 5 | 26), + PB_27 = (PORT_B << 5 | 27), + PB_28 = (PORT_B << 5 | 28), + PB_29 = (PORT_B << 5 | 29), + PB_30 = (PORT_B << 5 | 30), + PB_31 = (PORT_B << 5 | 31), + + VBAT_MEAS = (0x7 << 5 | 2), + AD_0 = PB_4, // CH0 + AD_1 = PB_5, // CH1 + AD_2 = PB_6, // CH2 + AD_3 = PB_7, // CH3 + AD_4 = PB_1, // CH4 + AD_5 = PB_2, // CH5 + AD_6 = PB_3, // CH6 + AD_7 = VBAT_MEAS, // CH7 + + // Not connected + NC = (uint32_t) 0xFFFFFFFF +} PinName; + +typedef struct gpio_s +{ + PinName pin; +} gpio_t; + +#endif + +typedef struct gpio_s gpio_t; + +extern "C" void gpio_init(gpio_t * obj, PinName pin); +extern "C" uint32_t gpio_set(PinName pin); +extern "C" void gpio_mode(gpio_t * obj, PinMode mode); +extern "C" void gpio_dir(gpio_t * obj, PinDirection direction); +extern "C" void gpio_write(gpio_t * obj, int value); +extern "C" int gpio_read(gpio_t * obj); + +class LEDWidget +{ +public: + void Init(PinName gpioNum); + void Set(bool state); + +private: + PinName mGPIONum; + bool mState; + void DoSet(bool state); +}; diff --git a/examples/light-switch-app/ameba/third_party/connectedhomeip b/examples/light-switch-app/ameba/third_party/connectedhomeip new file mode 120000 index 00000000000000..11a54ed360106c --- /dev/null +++ b/examples/light-switch-app/ameba/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../ \ No newline at end of file diff --git a/examples/light-switch-app/esp32/README.md b/examples/light-switch-app/esp32/README.md index 9616c250526933..c0d238585163a2 100644 --- a/examples/light-switch-app/esp32/README.md +++ b/examples/light-switch-app/esp32/README.md @@ -65,6 +65,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). $ source ./scripts/activate.sh +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - Target Set $ idf.py set-target esp32 diff --git a/examples/light-switch-app/esp32/main/AppTask.cpp b/examples/light-switch-app/esp32/main/AppTask.cpp index f29b4a0927f783..6a1531940a1197 100644 --- a/examples/light-switch-app/esp32/main/AppTask.cpp +++ b/examples/light-switch-app/esp32/main/AppTask.cpp @@ -20,6 +20,7 @@ #include "BindingHandler.h" #include "esp_log.h" #include "freertos/FreeRTOS.h" +#include #define APP_TASK_NAME "APP" #define APP_EVENT_QUEUE_SIZE 10 @@ -37,6 +38,7 @@ namespace { QueueHandle_t sAppEventQueue; TaskHandle_t sAppTaskHandle; +chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; } // namespace @@ -62,8 +64,8 @@ CHIP_ERROR AppTask::Init() CHIP_ERROR err = CHIP_NO_ERROR; AppButton.Init(); - AppButton.SetButtonPressCallback(ButtonPressCallback); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); return err; } diff --git a/examples/light-switch-app/esp32/main/CMakeLists.txt b/examples/light-switch-app/esp32/main/CMakeLists.txt index 959a9bdb37f123..3abe09f4040e8b 100644 --- a/examples/light-switch-app/esp32/main/CMakeLists.txt +++ b/examples/light-switch-app/esp32/main/CMakeLists.txt @@ -19,12 +19,14 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/light-switch-app" "${CMAKE_CURRENT_LIST_DIR}/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/light-switch-app/zap-generated" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" 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 ae8c31908036ca..1229fc2c1fce3e 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 @@ -134,12 +134,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } client cluster Scenes = 5 { @@ -241,13 +241,13 @@ client cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } client cluster OnOff = 6 { @@ -374,7 +374,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -382,7 +382,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -409,6 +409,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -665,7 +666,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -931,7 +932,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1293,7 +1294,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1319,7 +1319,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1385,8 +1385,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1452,10 +1452,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/light-switch-app/telink/prj.conf b/examples/light-switch-app/telink/prj.conf index c7946f01819c34..7d492d122486e8 100755 --- a/examples/light-switch-app/telink/prj.conf +++ b/examples/light-switch-app/telink/prj.conf @@ -33,7 +33,7 @@ CONFIG_OPENTHREAD_PANID=4660 CONFIG_OPENTHREAD_CHANNEL=15 CONFIG_OPENTHREAD_NETWORK_NAME="OpenThreadDemo" CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" -CONFIG_NET_CONFIG_IEEE802154_DEV_NAME="IEEE802154_b91" +CONFIG_NET_CONFIG_IEEE802154_DEV_NAME="IEEE802154" # CHIP configuration CONFIG_CHIP_PROJECT_CONFIG="include/CHIPProjectConfig.h" diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index 19cc15e7a8234c..77b7fb016b644a 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -7,11 +7,10 @@ This example demonstrates the Matter Lighting application on Ameba platform. - [CHIP Ameba Lighting Example](#chip-ameba-lighting-example) - [Supported Device](#supported-device) - [Building the Example Application](#building-the-example-application) - - [Commissioning and cluster control](#commissioning-and-cluster-control) - - [Commissioning](#commissioning) - - [BLE mode](#ble-mode) - - [IP mode](#ip-mode) - - [Cluster control](#cluster-control) + - [Commissioning](#commissioning) + - [BLE mode](#ble-mode) + - [IP mode](#ip-mode) + - [Cluster control](#cluster-control) --- @@ -53,41 +52,23 @@ The CHIP demo application is supported on the correct locations 4. Click **Download** button. -## Commissioning and Cluster Control - ## Commissioning There are two commissioning modes supported by Ameba platform: ### BLE mode -1. In "connectedhomeip/config/ameba/args.gni" - - - Set `chip_config_network_layer_ble = true` - -2. In "connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h" - - - Set `#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1` - -3. Build and Flash -4. The example will run automatically after booting the Ameba board. -5. Test with +1. Build and Flash +2. The example will run automatically after booting the Ameba board. +3. Test with [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) ### IP mode -1. In "connectedhomeip/config/ameba/args.gni" - - - Set `chip_config_network_layer_ble = false` - -2. In "connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h" - - - Set `#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 0` - -3. Build and Flash -4. The example will run automatically after booting the Ameba board. -5. Connect to AP using `ATW0, ATW1, ATWC` commands -6. Test with +1. Build and Flash +2. The example will run automatically after booting the Ameba board. +3. Connect to AP using `ATW0, ATW1, ATWC` commands +4. Test with [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) ## Cluster Control diff --git a/examples/lighting-app/ameba/chip_main.cmake b/examples/lighting-app/ameba/chip_main.cmake index 447f65d5767f62..730751b16aab1b 100755 --- a/examples/lighting-app/ameba/chip_main.cmake +++ b/examples/lighting-app/ameba/chip_main.cmake @@ -242,7 +242,6 @@ list( -DUSE_ZAP_CONFIG -DCHIP_HAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE= - -DMATTER_LIGHTING_APP=1 ) if (matter_enable_persistentstorage_audit) diff --git a/examples/lighting-app/esp32/README.md b/examples/lighting-app/esp32/README.md index eae01ad14d2978..44e6d6c4ec3087 100644 --- a/examples/lighting-app/esp32/README.md +++ b/examples/lighting-app/esp32/README.md @@ -75,6 +75,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). $ source ./scripts/activate.sh +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - Target Set $ idf.py set-target esp32 diff --git a/examples/lighting-app/esp32/main/AppTask.cpp b/examples/lighting-app/esp32/main/AppTask.cpp index bfa8a8d1401973..f175af3a3c5eeb 100644 --- a/examples/lighting-app/esp32/main/AppTask.cpp +++ b/examples/lighting-app/esp32/main/AppTask.cpp @@ -20,6 +20,7 @@ #include "esp_log.h" #include "freertos/FreeRTOS.h" +#include #include #include #include @@ -46,6 +47,8 @@ constexpr EndpointId kLightEndpointId = 1; QueueHandle_t sAppEventQueue; TaskHandle_t sAppTaskHandle; +chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; + } // namespace AppTask AppTask::sAppTask; @@ -74,6 +77,8 @@ CHIP_ERROR AppTask::Init() AppButton.SetButtonPressCallback(ButtonPressCallback); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + return err; } diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index 93ff9dc67217bd..c30c6995c44e8f 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -18,6 +18,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lighting-app" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lighting-app/lighting-common/include" "${CMAKE_CURRENT_LIST_DIR}/include" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" @@ -26,11 +27,12 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lighting-app/zap-generated" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lighting-app/lighting-common/src" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 67b8e0386adecb..5478b00116e3d5 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -99,12 +99,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster OnOff = 6 { @@ -205,44 +205,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -252,7 +263,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -314,7 +325,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -322,7 +333,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -349,6 +360,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -605,7 +617,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -871,7 +883,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1228,7 +1240,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1254,7 +1265,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1320,8 +1331,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1387,10 +1398,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/lighting-app/nxp/k32w/k32w0/BUILD.gn b/examples/lighting-app/nxp/k32w/k32w0/BUILD.gn index 5e811f8900e0d8..c19ccbac46f23a 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/BUILD.gn +++ b/examples/lighting-app/nxp/k32w/k32w0/BUILD.gn @@ -21,7 +21,6 @@ import("${k32w0_sdk_build_root}/k32w0_sdk.gni") import("${chip_root}/src/crypto/crypto.gni") import("${chip_root}/src/lib/core/core.gni") -import("${chip_root}/src/lib/core/core.gni") import("${chip_root}/src/platform/device.gni") if (chip_pw_tokenizer_logging) { @@ -66,7 +65,7 @@ k32w0_sdk("sdk") { } k32w0_executable("light_app") { - output_name = "chip-k32w061-light-example" + output_name = "chip-k32w0x-light-example" sources = [ "${k32w0_platform_dir}/util/LEDWidget.cpp", @@ -103,7 +102,7 @@ k32w0_executable("light_app") { cflags = [ "-Wconversion" ] - ldscript = "${k32w0_platform_dir}/app/ldscripts/chip-k32w061-linker.ld" + ldscript = "${k32w0_platform_dir}/app/ldscripts/chip-k32w0x-linker.ld" inputs = [ ldscript ] @@ -118,15 +117,24 @@ k32w0_executable("light_app") { ] } + if (chip_enable_ota_requestor) { + ldflags += [ + "-Wl,--defsym", + "-Wl,__app_load_address__=0x4000", + "-Wl,--defsym", + "-Wl,__app_stated_size__=0x99A00", + ] + } + output_dir = root_out_dir } if (chip_pw_tokenizer_logging) { pw_tokenizer_database("light_app.database") { - database = "$root_build_dir/chip-k32w061-light-example-database.bin" + database = "$root_build_dir/chip-k32w0x-light-example-database.bin" create = "binary" deps = [ ":light_app" ] - optional_paths = [ "$root_build_dir/chip-k32w061-light-example" ] + optional_paths = [ "$root_build_dir/chip-k32w0x-light-example" ] } } diff --git a/examples/lighting-app/nxp/k32w/k32w0/README.md b/examples/lighting-app/nxp/k32w/k32w0/README.md index 51385c7d0edba2..6b638d0660447a 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/README.md +++ b/examples/lighting-app/nxp/k32w/k32w0/README.md @@ -174,24 +174,23 @@ will be initiated. In order to build the Project CHIP example, we recommend using a Linux distribution (the demo-application was compiled on Ubuntu 20.04). -- Download [K32W061 SDK 2.6.4 for Project CHIP](https://mcuxpresso.nxp.com/). +- Download [K32W0 SDK 2.6.6 for Project CHIP](https://mcuxpresso.nxp.com/). Creating an nxp.com account is required before being able to download the SDK. Once the account is created, login and follow the steps for downloading - SDK_2_6_4_K32W061DK6. The SDK Builder UI selection should be similar with - the one from the image below. + SDK_2_6_6_K32W061DK6 (required for K32W061 flavor). The SDK Builder UI + selection should be similar with the one from the image below. ![MCUXpresso SDK Download](../../../../platform/nxp/k32w/k32w0/doc/images/mcux-sdk-download.JPG) - Start building the application either with Secure Element or without - without Secure Element ``` -user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W061_SDK_ROOT=/home/user/Desktop/SDK_2_6_4_K32W061DK6/ -user@ubuntu:~/Desktop/git/connectedhomeip$ ./third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh +user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=/home/user/Desktop/SDK_2_6_6_K32W061DK6/ user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lighting-app/nxp/k32w/k32w0 -user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ gn gen out/debug --args="k32w0_sdk_root=\"${NXP_K32W061_SDK_ROOT}\" chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"mbedtls\" chip_with_se05x=0 mbedtls_use_tinycrypt=true chip_pw_tokenizer_logging=true mbedtls_repo=\"//third_party/connectedhomeip/third_party/nxp/libs/mbedtls\"" +user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ gn gen out/debug --args="k32w0_sdk_root=\"${NXP_K32W0_SDK_ROOT}\" chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"tinycrypt\" chip_with_se05x=0 chip_pw_tokenizer_logging=true mbedtls_repo=\"//third_party/connectedhomeip/third_party/nxp/libs/mbedtls\"" user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ ninja -C out/debug -user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ $NXP_K32W061_SDK_ROOT/tools/imagetool/sign_images.sh out/debug/ +user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ $NXP_K32W0_SDK_ROOT/tools/imagetool/sign_images.sh out/debug/ ``` - with Secure element @@ -201,8 +200,9 @@ user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ Note that option chip_enable_ota_requestor=false are required for building with Secure Element. These can be changed if building without Secure Element -Note that "patch_k32w_sdk.sh" script must be run for patching the K32W061 SDK -2.6.4. + - for K32W041AM flavor: + Exactly the same steps as above but set build_for_k32w041am=1 in the gn command. + Also, select the K32W041AM SDK from the SDK Builder. Also, in case the OM15082 Expansion Board is not attached to the DK6 board, the build argument (chip_with_OM15082) inside the gn build instruction should be set @@ -225,7 +225,7 @@ pycrypto 2.6.1 pycryptodome 3.9.8 ``` -The resulting output file can be found in out/debug/chip-k32w061-light-example. +The resulting output file can be found in out/debug/chip-k32w0x-light-example. @@ -235,8 +235,8 @@ Program the firmware using the official [OpenThread Flash Instructions](https://github.com/openthread/ot-nxp/tree/main/src/k32w0/k32w061#flash-binaries). All you have to do is to replace the Openthread binaries from the above -documentation with _out/debug/chip-k32w061-light-example.bin_ if DK6Programmer -is used or with _out/debug/chip-k32w061-light-example_ if MCUXpresso is used. +documentation with _out/debug/chip-k32w0x-light-example.bin_ if DK6Programmer is +used or with _out/debug/chip-k32w0x-light-example_ if MCUXpresso is used. @@ -252,8 +252,10 @@ needed for parsing the hashed scripts. ### Detokenizer script The python3 script detokenizer.py is a script that decodes the tokenized logs -either from a file or from a serial port. The script can be used in the -following ways: +either from a file or from a serial port. It is located in the following path +`examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py`. + +The script can be used in the following ways: ``` usage: detokenizer.py serial [-h] -i INPUT -d DATABASE [-o OUTPUT] @@ -268,7 +270,7 @@ the serial to decode from. The third parameter is _-d DATABASE_ and represents the path to the token database to be used for decoding. The default path is -_out/debug/chip-k32w061-light-example-database.bin_ after a successful build. +_out/debug/chip-k32w0x-light-example-database.bin_ after a successful build. The forth parameter is _-o OUTPUT_ and it represents the path to the output file where the decoded logs will be stored. This parameter is required for file usage @@ -284,7 +286,12 @@ argument _chip_pw_tokenizer_logging=true_ was used. The detokenizer script must be run inside the example's folder after a successful run of the _scripts/activate.sh_ script. The pw_tokenizer module used -by the script is loaded by the environment. +by the script is loaded by the environment. An example of running the +detokenizer script to see logs of a lighting app: + +``` +python3 ../../../../../examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py serial -i /dev/ttyACM0 -d out/debug/chip-k32w0x-light-example-database.bin -o device.txt +``` @@ -318,11 +325,12 @@ Note: This solution is temporary. In order to use the tinycrypt ecc operations, use the following build arguments: - Build without Secure element (_chip_with_se05x=0_), with tinycrypt enabled - (_mbedtls_use_tinycrypt=true_) and with the `NXPmicro/mbedtls` library + (_chip_crypto=\"tinycrypt\"_) and with the `NXPmicro/mbedtls` library (_mbedtls_repo=`\"//third_party/connectedhomeip/third_party/nxp/libs/mbedtls\"`_). -To disable tinycrypt ecc operations, simply build without -_mbedtls_use_tinycrypt=true_ and without _mbedtls_repo_. +To disable tinycrypt ecc operations, simply build with _chip_crypto=\"mbedtls\"_ +and with or without _mbedtls_repo_. If used with _mbedtls_repo_ the mbedtls +implementation from `NXPmicro/mbedtls` library will be used. @@ -406,7 +414,7 @@ CD04 -> 0x4CD pages of 512-bytes (= 614,5kB) DK6Programmer can be used for flashing the application: ``` -DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x4000="chip-k32w061-light-example.bin" +DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x4000="chip-k32w0x-light-example.bin" ``` If debugging is needed, MCUXpresso can be used then for flashing the @@ -461,9 +469,9 @@ doru@computer1:~/connectedhomeip$ : ./scripts/examples/gn_build_example.sh examp Build OTA image and start the OTA Provider Application: ``` -doru@computer1:~/connectedhomeip$ : ./src/app/ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 1 -vs "1.0" -da sha256 chip-k32w061-light-example.bin chip-k32w061-light-example.ota +doru@computer1:~/connectedhomeip$ : ./src/app/ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 1 -vs "1.0" -da sha256 chip-k32w0x-light-example.bin chip-k32w0x-light-example.ota doru@computer1:~/connectedhomeip$ : rm -rf /tmp/chip_* -doru@computer1:~/connectedhomeip$ : ./out/ota-provider-app/chip-ota-provider-app -f chip-k32w061-light-example.ota +doru@computer1:~/connectedhomeip$ : ./out/ota-provider-app/chip-ota-provider-app -f chip-k32w0x-light-example.ota ``` Build Linux chip-tool: diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/main.cpp b/examples/lighting-app/nxp/k32w/k32w0/main/main.cpp index f3c4096c4d5a8a..58091c8fba4dae 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/main.cpp +++ b/examples/lighting-app/nxp/k32w/k32w0/main/main.cpp @@ -43,6 +43,8 @@ extern InitFunc __init_array_end; /* needed for FreeRtos Heap 4 */ uint8_t __attribute__((section(".heap"))) ucHeap[HEAP_SIZE]; +extern "C" void sched_enable(); + extern "C" void main_task(void const * argument) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -85,6 +87,11 @@ extern "C" void main_task(void const * argument) goto exit; } + /* Enable the MAC scheduler after BLEManagerImpl::_Init() and V2MMAC_Enable(). + * This is needed to register properly the active protocols. + */ + sched_enable(); + err = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_MinimalEndDevice); if (err != CHIP_NO_ERROR) { diff --git a/examples/lighting-app/qpg/include/AppTask.h b/examples/lighting-app/qpg/include/AppTask.h index edc33a5f88a0c3..510478fb9be3e3 100644 --- a/examples/lighting-app/qpg/include/AppTask.h +++ b/examples/lighting-app/qpg/include/AppTask.h @@ -48,12 +48,12 @@ class AppTask friend AppTask & GetAppTask(void); CHIP_ERROR Init(); + static void InitServer(intptr_t arg); + static void OpenCommissioning(intptr_t arg); static void ActionInitiated(LightingManager::Action_t aAction); static void ActionCompleted(LightingManager::Action_t aAction); - void CancelTimer(void); - void DispatchEvent(AppEvent * event); static void FunctionTimerEventHandler(AppEvent * aEvent); @@ -63,6 +63,7 @@ class AppTask static void TimerEventHandler(chip::System::Layer * aLayer, void * aAppState); void StartTimer(uint32_t aTimeoutMs); + void CancelTimer(void); enum Function_t { diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index 774754312989d6..13e78387cc4a99 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -208,28 +208,8 @@ CHIP_ERROR AppTask::StartAppTask() return CHIP_NO_ERROR; } -CHIP_ERROR AppTask::Init() +void AppTask::InitServer(intptr_t arg) { - CHIP_ERROR err = CHIP_NO_ERROR; - - ChipLogProgress(NotSpecified, "Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); - - err = LightingMgr().Init(); - if (err != CHIP_NO_ERROR) - { - ChipLogError(NotSpecified, "LightingMgr().Init() failed"); - return err; - } - LightingMgr().SetCallbacks(ActionInitiated, ActionCompleted); - - // Subscribe with our button callback to the qvCHIP button handler. - qvIO_SetBtnCallback(ButtonEventHandler); - -#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY - chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); -#endif - - // Init ZCL Data Model static chip::CommonCaseDeviceServerInitParams initParams; (void) initParams.InitializeStaticResourcesBeforeServerInit(); @@ -243,18 +223,52 @@ CHIP_ERROR AppTask::Init() initParams.endpointNativeParams = static_cast(&nativeParams); chip::Server::GetInstance().Init(initParams); +#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY + chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); +#endif + + // Open commissioning after boot if no fabric was available + if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) + { + PlatformMgr().ScheduleWork(OpenCommissioning, 0); + } +} + +void AppTask::OpenCommissioning(intptr_t arg) +{ + // Enable BLE advertisements + chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow(); + ChipLogProgress(NotSpecified, "BLE advertising started. Waiting for Pairing."); +} + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + ChipLogProgress(NotSpecified, "Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + + // Init ZCL Data Model and start server + PlatformMgr().ScheduleWork(InitServer, 0); + // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); - UpdateClusterState(); + // Setup light + err = LightingMgr().Init(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "LightingMgr().Init() failed"); + return err; + } + LightingMgr().SetCallbacks(ActionInitiated, ActionCompleted); + // Setup button handler + qvIO_SetBtnCallback(ButtonEventHandler); + + // Log device configuration ConfigurationMgr().LogDeviceConfig(); PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); - // Enable BLE advertisements - chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow(); - ChipLogProgress(NotSpecified, "BLE advertising started. Waiting for Pairing."); - return err; } diff --git a/examples/lighting-app/telink/prj.conf b/examples/lighting-app/telink/prj.conf index 93670fc50320f6..064f8a040a255e 100644 --- a/examples/lighting-app/telink/prj.conf +++ b/examples/lighting-app/telink/prj.conf @@ -33,7 +33,7 @@ CONFIG_OPENTHREAD_PANID=4660 CONFIG_OPENTHREAD_CHANNEL=15 CONFIG_OPENTHREAD_NETWORK_NAME="OpenThreadDemo" CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" -CONFIG_NET_CONFIG_IEEE802154_DEV_NAME="IEEE802154_b91" +CONFIG_NET_CONFIG_IEEE802154_DEV_NAME="IEEE802154" # CHIP configuration CONFIG_CHIP_PROJECT_CONFIG="include/CHIPProjectConfig.h" diff --git a/examples/lock-app/efr32/src/LockManager.cpp b/examples/lock-app/efr32/src/LockManager.cpp index 93fce17e47ffdd..57c1ee68584550 100644 --- a/examples/lock-app/efr32/src/LockManager.cpp +++ b/examples/lock-app/efr32/src/LockManager.cpp @@ -106,12 +106,10 @@ bool LockManager::IsValidUserIndex(uint16_t userIndex) bool LockManager::IsValidCredentialIndex(uint16_t credentialIndex, DlCredentialType type) { - // appclusters, 5.2.6.3.1: 0 is allowed index for Programming PIN credential only if (DlCredentialType::kProgrammingPIN == type) { - return (0 == credentialIndex); + return (0 == credentialIndex); // 0 is required index for Programming PIN } - return (credentialIndex < kMaxCredentialsPerUser); } @@ -406,19 +404,19 @@ bool LockManager::GetCredential(chip::EndpointId endpointId, uint16_t credential EmberAfPluginDoorLockCredentialInfo & credential) { - VerifyOrReturnValue(IsValidCredentialIndex(--credentialIndex, credentialType), false); // indices are one-indexed + if (DlCredentialType::kProgrammingPIN == credentialType) + { + VerifyOrReturnValue(IsValidCredentialIndex(credentialIndex, credentialType), + false); // programming pin index is only index allowed to contain 0 + } + else + { + VerifyOrReturnValue(IsValidCredentialIndex(--credentialIndex, credentialType), false); // otherwise, indices are one-indexed + } ChipLogProgress(Zcl, "Lock App: LockManager::GetCredential [credentialType=%u], credentialIndex=%d", to_underlying(credentialType), credentialIndex); - if (credentialType == DlCredentialType::kProgrammingPIN) - { - ChipLogError(Zcl, "Programming user not supported [credentialType=%u], credentialIndex=%d", to_underlying(credentialType), - credentialIndex); - - return true; - } - const auto & credentialInStorage = mLockCredentials[credentialIndex]; credential.status = credentialInStorage.status; @@ -449,7 +447,15 @@ bool LockManager::SetCredential(chip::EndpointId endpointId, uint16_t credential const chip::ByteSpan & credentialData) { - VerifyOrReturnValue(IsValidCredentialIndex(--credentialIndex, credentialType), false); // indices are one-indexed + if (DlCredentialType::kProgrammingPIN == credentialType) + { + VerifyOrReturnValue(IsValidCredentialIndex(credentialIndex, credentialType), + false); // programming pin index is only index allowed to contain 0 + } + else + { + VerifyOrReturnValue(IsValidCredentialIndex(--credentialIndex, credentialType), false); // otherwise, indices are one-indexed + } ChipLogProgress(Zcl, "Door Lock App: LockManager::SetCredential " diff --git a/examples/lock-app/esp32/README.md b/examples/lock-app/esp32/README.md index 2d5ecd9cb9795d..dc172d6468ace9 100644 --- a/examples/lock-app/esp32/README.md +++ b/examples/lock-app/esp32/README.md @@ -57,6 +57,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). $ source ./scripts/activate.sh +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - Target Set $ idf.py set-target esp32(or esp32c3) @@ -171,8 +179,8 @@ the ESP32 all-clusters-app to commission it onto a Wi-Fi network: Parameters: -1. Discriminator: 3840 (configurable through menuconfig) -2. Setup-pin-code: 20202021 (configurable through menuconfig) +1. Discriminator: 3840 +2. Setup-pin-code: 20202021 3. Node-id: 12344321 (you can assign any node id) ### Cluster control diff --git a/examples/lock-app/esp32/main/AppTask.cpp b/examples/lock-app/esp32/main/AppTask.cpp index bedaf75b6946e2..b78de7f2cd30a4 100644 --- a/examples/lock-app/esp32/main/AppTask.cpp +++ b/examples/lock-app/esp32/main/AppTask.cpp @@ -21,6 +21,7 @@ #include "Button.h" #include "LEDWidget.h" #include "esp_log.h" +#include #include #include #include @@ -56,6 +57,8 @@ QueueHandle_t sAppEventQueue; bool sHaveBLEConnections = false; StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; + +chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; } // namespace using namespace ::chip::DeviceLayer; @@ -103,6 +106,8 @@ CHIP_ERROR AppTask::Init() sLockLED.Set(!BoltLockMgr().IsUnlocked()); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + chip::DeviceLayer::SystemLayer().ScheduleWork(UpdateClusterState, nullptr); ConfigurationMgr().LogDeviceConfig(); diff --git a/examples/lock-app/esp32/main/CMakeLists.txt b/examples/lock-app/esp32/main/CMakeLists.txt index 24fa3cc6ed70c7..0c5816f69eb5fd 100644 --- a/examples/lock-app/esp32/main/CMakeLists.txt +++ b/examples/lock-app/esp32/main/CMakeLists.txt @@ -21,6 +21,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" @@ -30,9 +31,10 @@ idf_component_register(INCLUDE_DIRS "${IDF_PATH}/components/freertos/include/freertos" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" @@ -141,15 +143,17 @@ target_compile_options(${COMPONENT_LIB} PRIVATE else (CONFIG_ENABLE_PW_RPC) idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_CURRENT_LIST_DIR}/include" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/zap-generated" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index a8955e113138db..1b71ec1e293514 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -93,12 +93,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster OnOff = 6 { @@ -207,7 +207,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -215,7 +215,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -242,6 +242,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -582,7 +583,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -848,7 +849,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1170,7 +1171,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1196,7 +1196,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1262,8 +1262,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1329,10 +1329,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/lock-app/nxp/k32w/k32w0/BUILD.gn b/examples/lock-app/nxp/k32w/k32w0/BUILD.gn index 744bbeb839e402..57d4498ce98ad0 100644 --- a/examples/lock-app/nxp/k32w/k32w0/BUILD.gn +++ b/examples/lock-app/nxp/k32w/k32w0/BUILD.gn @@ -22,6 +22,12 @@ import("${k32w0_sdk_build_root}/k32w0_executable.gni") import("${k32w0_sdk_build_root}/k32w0_sdk.gni") import("${chip_root}/src/crypto/crypto.gni") +import("${chip_root}/src/lib/core/core.gni") + +if (chip_pw_tokenizer_logging) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_tokenizer/database.gni") +} assert(current_os == "freertos") @@ -59,7 +65,7 @@ k32w0_sdk("sdk") { } k32w0_executable("lock_app") { - output_name = "chip-k32w061-lock-example" + output_name = "chip-k32w0x-lock-example" sources = [ "${k32w0_platform_dir}/util/LEDWidget.cpp", @@ -100,15 +106,26 @@ k32w0_executable("lock_app") { output_dir = root_out_dir - ldscript = "${k32w0_platform_dir}/app/ldscripts/chip-k32w061-linker.ld" + ldscript = "${k32w0_platform_dir}/app/ldscripts/chip-k32w0x-linker.ld" inputs = [ ldscript ] ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] } +if (chip_pw_tokenizer_logging) { + pw_tokenizer_database("lock_app.database") { + database = "$root_build_dir/chip-k32w0x-lock-example-database.bin" + create = "binary" + deps = [ ":lock_app" ] + optional_paths = [ "$root_build_dir/chip-k32w0x-lock-example" ] + } +} group("k32w0") { deps = [ ":lock_app" ] + if (chip_pw_tokenizer_logging) { + deps += [ ":lock_app.database" ] + } } group("default") { diff --git a/examples/lock-app/nxp/k32w/k32w0/README.md b/examples/lock-app/nxp/k32w/k32w0/README.md index 68be3c11ae03b9..9c1ef8ef3170f2 100644 --- a/examples/lock-app/nxp/k32w/k32w0/README.md +++ b/examples/lock-app/nxp/k32w/k32w0/README.md @@ -25,8 +25,15 @@ network. - [Flashing and debugging](#flashdebug) - [Known Issues](#knownissues) - [Testing the example](#testing-the-example) +- [Pigweed Tokenizer](#tokenizer) + - [Detokenizer script](#detokenizer) + - [Notes](#detokenizer-notes) + - [Known issues](#detokenizer-known-issues) +- [Tinycrypt ECC operations](#tinycrypt) -
+ - [Building steps](#tinycrypt-building-steps) + + @@ -165,10 +172,10 @@ will be initiated. In order to build the Project CHIP example, we recommend using a Linux distribution (the demo-application was compiled on Ubuntu 20.04). -- Download [K32W061 SDK 2.6.4 for Project CHIP](https://mcuxpresso.nxp.com/). +- Download [K32W061 SDK 2.6.6 for Project CHIP](https://mcuxpresso.nxp.com/). Creating an nxp.com account is required before being able to download the SDK. Once the account is created, login and follow the steps for downloading - SDK_2_6_4_K32W061DK6. The SDK Builder UI selection should be similar with + SDK_2_6_6_K32W061DK6. The SDK Builder UI selection should be similar with the one from the image below. ![MCUXpresso SDK Download](../../../../platform/nxp/k32w/k32w0/doc/images/mcux-sdk-download.JPG) @@ -177,25 +184,16 @@ distribution (the demo-application was compiled on Ubuntu 20.04). - without Secure Element ``` -user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W061_SDK_ROOT=/home/user/Desktop/SDK_2_6_4_K32W061DK6/ -user@ubuntu:~/Desktop/git/connectedhomeip$ ./third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh +user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=/home/user/Desktop/SDK_2_6_6_K32W061DK6/ user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lock-app/nxp/k32w/k32w0/ -user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ gn gen out/debug --args="k32w0_sdk_root=\"${NXP_K32W061_SDK_ROOT}\" chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"mbedtls\" chip_with_se05x=0" +user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ gn gen out/debug --args="k32w0_sdk_root=\"${NXP_K32W0_SDK_ROOT}\" chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"tinycrypt\" chip_with_se05x=0 chip_pw_tokenizer_logging=true mbedtls_repo=\"//third_party/connectedhomeip/third_party/nxp/libs/mbedtls\"" user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ ninja -C out/debug -user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ $NXP_K32W061_SDK_ROOT/tools/imagetool/sign_images.sh out/debug/ +user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ $NXP_K32W0_SDK_ROOT/tools/imagetool/sign_images.sh out/debug/ ``` - with Secure element - Exactly the same steps as above but set chip_with_se05x=1 in the gn command - and add arguments chip_pw_tokenizer_logging=true chip_enable_ota_requestor=false - -Note that options chip_pw_tokenizer_logging=true and -chip_enable_ota_requestor=false are required for building with Secure Element. -These can be changed if building without Secure Element - -Note that "patch_k32w_sdk.sh" script must be run for patching the K32W061 SDK -2.6.4. + Exactly the same steps as above but set chip_with_se05x=1 in the gn command. Also, in case the OM15082 Expansion Board is not attached to the DK6 board, the build argument (chip_with_OM15082) inside the gn build instruction should be set @@ -218,7 +216,7 @@ pycrypto 2.6.1 pycryptodome 3.9.8 ``` -The resulting output file can be found in out/debug/chip-k32w061-lock-example. +The resulting output file can be found in out/debug/chip-k32w0x-lock-example. @@ -228,8 +226,8 @@ Program the firmware using the official [OpenThread Flash Instructions](https://github.com/openthread/ot-nxp/tree/main/src/k32w0/k32w061#flash-binaries). All you have to do is to replace the Openthread binaries from the above -documentation with _out/debug/chip-k32w061-lock-example.bin_ if DK6Programmer is -used or with _out/debug/chip-k32w061-lock-example_ if MCUXpresso is used. +documentation with _out/debug/chip-k32w0x-lock-example.bin_ if DK6Programmer is +used or with _out/debug/chip-k32w0x-lock-example_ if MCUXpresso is used. @@ -282,3 +280,97 @@ for step-by-step instructions. See [Unlocking the Future of Project CHIP Webinar](https://www.nxp.com/design/training/unlocking-the-future-of-project-chip:TIP-EEE-UNLOCKING-THE-FUTURE-OF-PROJECT-CHIP) for an in-depth analysis of NXP capabilities for Project CHIP. + + + +## Pigweed tokenizer + +The tokenizer is a pigweed module that allows hashing the strings. This greatly +reduces the flash needed for logs. The module can be enabled by building with +the gn argument _chip_pw_tokenizer_logging=true_. The detokenizer script is +needed for parsing the hashed scripts. + + + +### Detokenizer script + +The python3 script detokenizer.py is a script that decodes the tokenized logs +either from a file or from a serial port. It is located in the following path +`examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py`. + +The script can be used in the following ways: + +``` +usage: detokenizer.py serial [-h] -i INPUT -d DATABASE [-o OUTPUT] +usage: detokenizer.py file [-h] -i INPUT -d DATABASE -o OUTPUT +``` + +The first parameter is either _serial_ or _file_ and it selects between decoding +from a file or from a serial port. + +The second parameter is _-i INPUT_ and it must se set to the path of the file or +the serial to decode from. + +The third parameter is _-d DATABASE_ and represents the path to the token +database to be used for decoding. The default path is +_out/debug/chip-k32w0x-lock-example-database.bin_ after a successful build. + +The forth parameter is _-o OUTPUT_ and it represents the path to the output file +where the decoded logs will be stored. This parameter is required for file usage +and optional for serial usage. If not provided when used with serial port, it +will show the decoded log only at the stdout and not save it to file. + + + +### Notes + +The token database is created automatically after building the binary if the +argument _chip_pw_tokenizer_logging=true_ was used. + +The detokenizer script must be run inside the example's folder after a +successful run of the _scripts/activate.sh_ script. The pw_tokenizer module used +by the script is loaded by the environment. An example of running the +detokenizer script to see logs of a lock app: + +``` +python3 ../../../../../examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py serial -i /dev/ttyACM0 -d out/debug/chip-k32w0x-lock-example-database.bin -o device.txt +``` + + + +### Known issues + +The building process will not update the token database if it already exists. In +case that new strings are added and the database already exists in the output +folder, it must be deleted so that it will be recreated at the next build. + +Not all tokens will be decoded. This is due to a gcc/pw_tokenizer issue. The +pw_tokenizer creates special elf sections using attributes where the tokens and +strings will be stored. This sections will be used by the database creation +script. For template C++ functions, gcc ignores these attributes and places all +the strings by default in the .rodata section. As a result the database creation +script won't find them in the special-created sections. + +If run, closed and rerun with the serial option on the same serial port, the +detokenization script will get stuck and not show any logs. The solution is to +unplug and plug the board and then rerun the script. + + + +## Tinycrypt ECC operations + + + +### Building steps + +Note: This solution is temporary. + +In order to use the tinycrypt ecc operations, use the following build arguments: + +- Build without Secure element (_chip_with_se05x=0_), with tinycrypt enabled + (_chip_crypto=\"tinycrypt\"_) and with the `NXPmicro/mbedtls` library + (_mbedtls_repo=`\"//third_party/connectedhomeip/third_party/nxp/libs/mbedtls\"`_). + +To disable tinycrypt ecc operations, simply build with _chip_crypto=\"mbedtls\"_ +and with or without _mbedtls_repo_. If used with _mbedtls_repo_ the mbedtls +implementation from `NXPmicro/mbedtls` library will be used. diff --git a/examples/lock-app/nxp/k32w/k32w0/args.gni b/examples/lock-app/nxp/k32w/k32w0/args.gni index a1b757c6612439..2ace8356337891 100644 --- a/examples/lock-app/nxp/k32w/k32w0/args.gni +++ b/examples/lock-app/nxp/k32w/k32w0/args.gni @@ -20,5 +20,3 @@ k32w0_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_stack_lock_tracking = "fatal" chip_enable_ble = true - -chip_progress_logging = false diff --git a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp index 015784f6d6e8dd..3a78c9c7f632c4 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -166,12 +166,14 @@ CHIP_ERROR AppTask::Init() void LockOpenThreadTask(void) { + PWR_DisallowDeviceToSleep(); chip::DeviceLayer::ThreadStackMgr().LockThreadStack(); } void UnlockOpenThreadTask(void) { chip::DeviceLayer::ThreadStackMgr().UnlockThreadStack(); + PWR_AllowDeviceToSleep(); } void AppTask::InitServer(intptr_t arg) @@ -728,9 +730,10 @@ void AppTask::DispatchEvent(AppEvent * aEvent) { aEvent->Handler(aEvent->param); } + else #endif - if (aEvent->Handler) + if (aEvent->Handler) { aEvent->Handler(aEvent); } diff --git a/examples/lock-app/nxp/k32w/k32w0/main/main.cpp b/examples/lock-app/nxp/k32w/k32w0/main/main.cpp index 216f98328503ee..a792030a7c78b0 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/main.cpp +++ b/examples/lock-app/nxp/k32w/k32w0/main/main.cpp @@ -36,8 +36,11 @@ using namespace ::chip::Inet; using namespace ::chip::DeviceLayer; using namespace ::chip::Logging; +#define ENABLE_LOW_POWER_LOGS 0 + #if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) #include "Keyboard.h" +#include "OtaSupport.h" #include "PWR_Configuration.h" #include "PWR_Interface.h" #include "RNG_Interface.h" @@ -46,6 +49,8 @@ using namespace ::chip::Logging; #include "radio.h" #endif +#include "MacSched.h" + typedef void (*InitFunc)(void); extern InitFunc __init_array_start; extern InitFunc __init_array_end; @@ -55,6 +60,7 @@ extern InitFunc __init_array_end; extern "C" void vMMAC_IntHandlerBbc(); extern "C" void vMMAC_IntHandlerPhy(); extern "C" void BOARD_SetClockForPowerMode(void); +extern "C" void stopM2(); static void dm_switch_wakeupCallBack(void); static void dm_switch_preSleepCallBack(void); @@ -77,6 +83,8 @@ static sDualModeAppStates dualModeStates; #define THREAD_WARM_BOOT_INIT_DURATION_DEFAULT_VALUE 4000 #endif +extern "C" void sched_enable(); + /* needed for FreeRtos Heap 4 */ uint8_t __attribute__((section(".heap"))) ucHeap[HEAP_SIZE]; @@ -100,7 +108,9 @@ extern "C" void main_task(void const * argument) #if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) PWR_Init(); - PWR_vAddRamRetention((uint32_t) &ucHeap[0], sizeof(ucHeap)); + /* Internal - MATTER-303: keep in retention the entire RAM1 for the moment */ + PWR_vAddRamRetention((uint32_t) 0x4020000, 0x10000); + PWR_RegisterLowPowerExitCallback(dm_switch_wakeupCallBack); PWR_RegisterLowPowerEnterCallback(dm_switch_preSleepCallBack); @@ -132,6 +142,11 @@ extern "C" void main_task(void const * argument) goto exit; } + /* Enable the MAC scheduler after BLEManagerImpl::_Init() and V2MMAC_Enable(). + * This is needed to register properly the active protocols. + */ + sched_enable(); + #if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) dualModeStates.threadWarmBootInitTime = THREAD_WARM_BOOT_INIT_DURATION_DEFAULT_VALUE; dualModeStates.threadInitialized = TRUE; @@ -197,10 +212,15 @@ uint32_t dm_switch_get15_4InitWakeUpTime(void) extern "C" bleResult_t App_PostCallbackMessage(appCallbackHandler_t handler, appCallbackParam_t param) { AppEvent event; - event.Type = AppEvent::kEventType_Lp; + event.Type = AppEvent::kEventType_Lp; + event.Handler = handler; event.param = param; +#if ENABLE_LOW_POWER_LOGS + K32W_LOG("App_PostCallbackMessage %d", (uint32_t) param); +#endif + GetAppTask().PostEvent(&event); return gBleSuccess_c; @@ -210,6 +230,11 @@ static void dm_switch_wakeupCallBack(void) { BOARD_SetClockForWakeup(); +#if ENABLE_LOW_POWER_LOGS + K32W_LOG("dm_switch_wakeupCallBack"); + K32W_LOG("Warm up time actual value: %d", dualModeStates.threadWarmBootInitTime); +#endif + RNG_Init(); SecLib_Init(); @@ -218,25 +243,37 @@ static void dm_switch_wakeupCallBack(void) PWR_WakeupReason_t wakeReason = PWR_GetWakeupReason(); if (wakeReason.Bits.FromBLE_LLTimer == 1) { - SWITCH_DBG_LOG("woken up from LL"); +#if ENABLE_LOW_POWER_LOGS + K32W_LOG("woken up from LL"); +#endif } else if (wakeReason.Bits.FromKeyBoard == 1) { - SWITCH_DBG_LOG("woken up from FromKeyBoard"); +#if ENABLE_LOW_POWER_LOGS + K32W_LOG("woken up from FromKeyBoard"); +#endif } else if (wakeReason.Bits.FromTMR == 1) { - SWITCH_DBG_LOG("woken up from TMR"); +#if ENABLE_LOW_POWER_LOGS + K32W_LOG("woken up from TMR"); +#endif } dm_lp_wakeup(); } static void dm_switch_preSleepCallBack(void) { - SWITCH_DBG_LOG("sleeping"); +#if ENABLE_LOW_POWER_LOGS + K32W_LOG("dm_switch_preSleepCallBack"); +#endif if (dualModeStates.threadInitialized) { + /* stop the internal MAC Scheduler timer */ + stopM2(); + /* disable the MAC scheduler */ + sched_disable(); otPlatRadioDisable(NULL); dualModeStates.threadInitialized = FALSE; } @@ -251,6 +288,12 @@ static void dm_switch_preSleepCallBack(void) BOARD_SetClockForPowerMode(); } +extern "C" void vDynStopAll(void) +{ + vDynRequestState(E_DYN_SLAVE, E_DYN_STATE_OFF); + vDynRequestState(E_DYN_MASTER, E_DYN_STATE_OFF); +} + void dm_switch_init15_4AfterWakeUp(void) { uint32_t tick1 = 0; @@ -271,8 +314,13 @@ void dm_switch_init15_4AfterWakeUp(void) { tick2 = PWR_Get32kTimestamp(); dualModeStates.threadWarmBootInitTime = ((tick2 - tick1) * 15625u) >> 9; + /* Add a margin of 1 ms */ dualModeStates.threadWarmBootInitTime += 1000; + +#if ENABLE_LOW_POWER_LOGS + K32W_LOG("Calibration: %d", dualModeStates.threadWarmBootInitTime); +#endif } } @@ -287,6 +335,8 @@ static void ThreadExitSleep() /* Radio must be re-enabled after waking up from sleep. * The module is completely disabled in power down mode */ otPlatRadioEnable(NULL); + sched_enable(); + dualModeStates.threadInitialized = TRUE; /* wake up the Thread stack and check if any processing needs to be done */ diff --git a/examples/lock-app/p6/BUILD.gn b/examples/lock-app/p6/BUILD.gn index c37e453c3d8644..1468498c2e093b 100644 --- a/examples/lock-app/p6/BUILD.gn +++ b/examples/lock-app/p6/BUILD.gn @@ -139,8 +139,8 @@ p6_executable("lock_app") { "${examples_plat_dir}/init_p6Platform.cpp", "${p6_project_dir}/include/CHIPProjectConfig.h", "src/AppTask.cpp", - "src/BoltLockManager.cpp", "src/ButtonHandler.cpp", + "src/LockManager.cpp", "src/ZclCallbacks.cpp", "src/main.cpp", ] diff --git a/examples/lock-app/p6/include/AppTask.h b/examples/lock-app/p6/include/AppTask.h index 3e50921a76cff2..8974d83523baa9 100644 --- a/examples/lock-app/p6/include/AppTask.h +++ b/examples/lock-app/p6/include/AppTask.h @@ -23,7 +23,7 @@ #include #include "AppEvent.h" -#include "BoltLockManager.h" +#include "LockManager.h" #include "FreeRTOS.h" #include "timers.h" // provides FreeRTOS timer support @@ -37,6 +37,7 @@ #define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) #define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) #define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) +#define APP_ERROR_ALLOCATION_FAILED CHIP_APPLICATION_ERROR(0x07) class AppTask { @@ -45,7 +46,7 @@ class AppTask CHIP_ERROR StartAppTask(); static void AppTaskMain(void * pvParameter); - void PostLockActionRequest(int32_t actor, BoltLockManager::Action action); + void ActionRequest(int32_t aActor, LockManager::Action_t aAction); void PostEvent(const AppEvent * event); void ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction); @@ -57,8 +58,8 @@ class AppTask CHIP_ERROR Init(); - static void ActionInitiated(BoltLockManager::Action action, int32_t actor); - static void ActionCompleted(BoltLockManager::Action action); + static void ActionInitiated(LockManager::Action_t aAction, int32_t aActor); + static void ActionCompleted(LockManager::Action_t aAction); void CancelTimer(void); diff --git a/examples/lock-app/p6/include/BoltLockManager.h b/examples/lock-app/p6/include/BoltLockManager.h deleted file mode 100644 index 4c0093b3efd592..00000000000000 --- a/examples/lock-app/p6/include/BoltLockManager.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#include "AppEvent.h" - -#include "FreeRTOS.h" -#include "timers.h" // provides FreeRTOS timer support - -#include - -class BoltLockManager -{ -public: - enum class Action - { - kLock = 0, - kUnlock, - KInvalid - }; - - enum class State - { - kLockingInitiated = 0, - kLockingCompleted, - kUnlockingInitiated, - kUnlockingCompleted, - }; - - CHIP_ERROR Init(); - bool IsUnlocked(); - void EnableAutoRelock(bool aOn); - void SetAutoLockDuration(uint32_t aDurationInSecs); - bool IsActionInProgress(); - bool InitiateAction(int32_t aActor, Action aAction); - - typedef void (*Callback_fn_initiated)(Action, int32_t aActor); - typedef void (*Callback_fn_completed)(Action); - void SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB); - -private: - friend BoltLockManager & BoltLockMgr(void); - State mState = State::kUnlockingCompleted; - - Callback_fn_initiated mActionInitiated_CB; - Callback_fn_completed mActionCompleted_CB; - - bool mAutoRelock = false; - uint32_t mAutoLockDuration = 0; - bool mAutoLockTimerArmed = false; - - void CancelTimer(void); - void StartTimer(uint32_t aTimeoutMs); - - static void TimerEventHandler(TimerHandle_t xTimer); - static void AutoReLockTimerEventHandler(AppEvent * aEvent); - static void ActuatorMovementTimerEventHandler(AppEvent * aEvent); - - static BoltLockManager sLock; -}; - -inline BoltLockManager & BoltLockMgr(void) -{ - return BoltLockManager::sLock; -} diff --git a/examples/lock-app/p6/include/LockManager.h b/examples/lock-app/p6/include/LockManager.h new file mode 100644 index 00000000000000..9fab16ec1e1cd4 --- /dev/null +++ b/examples/lock-app/p6/include/LockManager.h @@ -0,0 +1,205 @@ +/* + * + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#include +#include + +#include "AppEvent.h" + +#include "FreeRTOS.h" +#include "timers.h" // provides FreeRTOS timer support + +#include + +namespace P6DoorLock { +namespace ResourceRanges { +// Used to size arrays +static constexpr uint16_t kMaxUsers = 10; +static constexpr uint8_t kMaxCredentialsPerUser = 10; +static constexpr uint8_t kMaxWeekdaySchedulesPerUser = 10; +static constexpr uint8_t kMaxYeardaySchedulesPerUser = 10; +static constexpr uint8_t kMaxHolidaySchedules = 10; +static constexpr uint8_t kMaxCredentialSize = 8; + +// Indices received for user/credential/schedules are 1-indexed +static constexpr uint8_t kStartIndexValue = 1; + +static constexpr uint8_t kMaxCredentials = kMaxUsers * kMaxCredentialsPerUser; +} // namespace ResourceRanges + +namespace LockInitParams { + +struct LockParam +{ + // Read from zap attributes + uint16_t numberOfUsers = 0; + uint8_t numberOfCredentialsPerUser = 0; + uint8_t numberOfWeekdaySchedulesPerUser = 0; + uint8_t numberOfYeardaySchedulesPerUser = 0; + uint8_t numberOfHolidaySchedules = 0; +}; + +class ParamBuilder +{ +public: + ParamBuilder & SetNumberOfUsers(uint16_t numberOfUsers) + { + lockParam_.numberOfUsers = numberOfUsers; + return *this; + } + ParamBuilder & SetNumberOfCredentialsPerUser(uint8_t numberOfCredentialsPerUser) + { + lockParam_.numberOfCredentialsPerUser = numberOfCredentialsPerUser; + return *this; + } + ParamBuilder & SetNumberOfWeekdaySchedulesPerUser(uint8_t numberOfWeekdaySchedulesPerUser) + { + lockParam_.numberOfWeekdaySchedulesPerUser = numberOfWeekdaySchedulesPerUser; + return *this; + } + ParamBuilder & SetNumberOfYeardaySchedulesPerUser(uint8_t numberOfYeardaySchedulesPerUser) + { + lockParam_.numberOfYeardaySchedulesPerUser = numberOfYeardaySchedulesPerUser; + return *this; + } + ParamBuilder & SetNumberOfHolidaySchedules(uint8_t numberOfHolidaySchedules) + { + lockParam_.numberOfHolidaySchedules = numberOfHolidaySchedules; + return *this; + } + LockParam GetLockParam() { return lockParam_; } + +private: + LockParam lockParam_; +}; + +} // namespace LockInitParams +} // namespace P6DoorLock + +using namespace ::chip; +using namespace P6DoorLock::ResourceRanges; + +class LockManager +{ +public: + enum Action_t + { + LOCK_ACTION = 0, + UNLOCK_ACTION, + + INVALID_ACTION + } Action; + + enum State_t + { + kState_LockInitiated = 0, + kState_LockCompleted, + kState_UnlockInitiated, + kState_UnlockCompleted, + } State; + + CHIP_ERROR Init(chip::app::DataModel::Nullable state, + P6DoorLock::LockInitParams::LockParam lockParam); + bool NextState(); + bool IsActionInProgress(); + bool InitiateAction(int32_t aActor, Action_t aAction); + + typedef void (*Callback_fn_initiated)(Action_t, int32_t aActor); + typedef void (*Callback_fn_completed)(Action_t); + void SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB); + + bool Lock(chip::EndpointId endpointId, const Optional & pin, DlOperationError & err); + bool Unlock(chip::EndpointId endpointId, const Optional & pin, DlOperationError & err); + + bool GetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user); + bool SetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator, chip::FabricIndex modifier, + const chip::CharSpan & userName, uint32_t uniqueId, DlUserStatus userStatus, DlUserType usertype, + DlCredentialRule credentialRule, const DlCredential * credentials, size_t totalCredentials); + + bool GetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, DlCredentialType credentialType, + EmberAfPluginDoorLockCredentialInfo & credential); + + bool SetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, chip::FabricIndex modifier, + DlCredentialStatus credentialStatus, DlCredentialType credentialType, const chip::ByteSpan & credentialData); + + DlStatus GetWeekdaySchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, + EmberAfPluginDoorLockWeekDaySchedule & schedule); + + DlStatus SetWeekdaySchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, DlScheduleStatus status, + DlDaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, uint8_t endHour, uint8_t endMinute); + + DlStatus GetYeardaySchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, + EmberAfPluginDoorLockYearDaySchedule & schedule); + + DlStatus SetYeardaySchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, DlScheduleStatus status, + uint32_t localStartTime, uint32_t localEndTime); + + DlStatus GetHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex, EmberAfPluginDoorLockHolidaySchedule & schedule); + + DlStatus SetHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, uint32_t localStartTime, + uint32_t localEndTime, DlOperatingMode operatingMode); + + bool IsValidUserIndex(uint16_t userIndex); + bool IsValidCredentialIndex(uint16_t credentialIndex, DlCredentialType type); + bool IsValidWeekdayScheduleIndex(uint8_t scheduleIndex); + bool IsValidYeardayScheduleIndex(uint8_t scheduleIndex); + bool IsValidHolidayScheduleIndex(uint8_t scheduleIndex); + + bool setLockState(chip::EndpointId endpointId, DlLockState lockState, const Optional & pin, + DlOperationError & err); + const char * lockStateToString(DlLockState lockState) const; + + bool ReadConfigValues(); + +private: + friend LockManager & LockMgr(); + chip::EndpointId mEndpointId; + State_t mState; + + Callback_fn_initiated mActionInitiated_CB; + Callback_fn_completed mActionCompleted_CB; + + void CancelTimer(void); + void StartTimer(uint32_t aTimeoutMs); + + static void TimerEventHandler(TimerHandle_t xTimer); + static void AutoLockTimerEventHandler(AppEvent * aEvent); + static void ActuatorMovementTimerEventHandler(AppEvent * aEvent); + + EmberAfPluginDoorLockUserInfo mLockUsers[kMaxUsers]; + EmberAfPluginDoorLockCredentialInfo mLockCredentials[kMaxCredentials]; + EmberAfPluginDoorLockWeekDaySchedule mWeekdaySchedule[kMaxUsers][kMaxWeekdaySchedulesPerUser]; + EmberAfPluginDoorLockYearDaySchedule mYeardaySchedule[kMaxUsers][kMaxYeardaySchedulesPerUser]; + EmberAfPluginDoorLockHolidaySchedule mHolidaySchedule[kMaxHolidaySchedules]; + + char mUserNames[ArraySize(mLockUsers)][DOOR_LOCK_MAX_USER_NAME_SIZE]; + uint8_t mCredentialData[kMaxCredentials][kMaxCredentialSize]; + DlCredential mCredentials[kMaxUsers][kMaxCredentialsPerUser]; + + static LockManager sLock; + P6DoorLock::LockInitParams::LockParam LockParams; +}; + +inline LockManager & LockMgr() +{ + return LockManager::sLock; +} diff --git a/examples/lock-app/p6/src/AppTask.cpp b/examples/lock-app/p6/src/AppTask.cpp index fdd6052c39de59..7c4dd3d10385a8 100644 --- a/examples/lock-app/p6/src/AppTask.cpp +++ b/examples/lock-app/p6/src/AppTask.cpp @@ -22,9 +22,15 @@ #include "ButtonHandler.h" #include "LEDWidget.h" #include "qrcodegen.h" +#include #include #include +#include #include +#include + +#include +#include #include #include #include @@ -40,6 +46,9 @@ #include #include +#include +#include + /* OTA related includes */ #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR #include @@ -57,7 +66,7 @@ using chip::FabricIndex; using chip::GetRequestorInstance; using chip::NodeId; using chip::OTADownloader; -using chip::OTAImageProcessorImpl; +using chip::DeviceLayer::OTAImageProcessorImpl; using chip::System::Layer; using namespace ::chip; @@ -67,12 +76,16 @@ using namespace ::chip::DeviceLayer; using namespace ::chip::System; #endif + #define FACTORY_RESET_TRIGGER_TIMEOUT 3000 #define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 #define APP_TASK_STACK_SIZE (4096) #define APP_TASK_PRIORITY 2 #define APP_EVENT_QUEUE_SIZE 10 +using chip::app::Clusters::DoorLock::DlLockState; +using chip::app::Clusters::DoorLock::DlOperationError; +using chip::app::Clusters::DoorLock::DlOperationSource; namespace { TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer. @@ -106,6 +119,7 @@ using namespace chip::TLV; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; using namespace ::chip::System; +using namespace P6DoorLock::LockInitParams; AppTask AppTask::sAppTask; @@ -192,19 +206,90 @@ CHIP_ERROR AppTask::Init() } NetWorkCommissioningInstInit(); P6_LOG("Current Software Version: %d", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); - err = BoltLockMgr().Init(); + // Initial lock state + chip::app::DataModel::Nullable state; + chip::EndpointId endpointId{ 1 }; + chip::DeviceLayer::PlatformMgr().LockChipStack(); + chip::app::Clusters::DoorLock::Attributes::LockState::Get(endpointId, state); + + uint8_t numberOfCredentialsPerUser = 0; + if (!DoorLockServer::Instance().GetNumberOfCredentialsSupportedPerUser(endpointId, numberOfCredentialsPerUser)) + { + ChipLogError(Zcl, + "Unable to get number of credentials supported per user when initializing lock endpoint, defaulting to 5 " + "[endpointId=%d]", + endpointId); + numberOfCredentialsPerUser = 5; + } + + uint16_t numberOfUsers = 0; + if (!DoorLockServer::Instance().GetNumberOfUserSupported(endpointId, numberOfUsers)) + { + ChipLogError(Zcl, + "Unable to get number of supported users when initializing lock endpoint, defaulting to 10 [endpointId=%d]", + endpointId); + numberOfUsers = 10; + } + + uint8_t numberOfWeekdaySchedulesPerUser = 0; + if (!DoorLockServer::Instance().GetNumberOfWeekDaySchedulesPerUserSupported(endpointId, numberOfWeekdaySchedulesPerUser)) + { + ChipLogError( + Zcl, + "Unable to get number of supported weekday schedules when initializing lock endpoint, defaulting to 10 [endpointId=%d]", + endpointId); + numberOfWeekdaySchedulesPerUser = 10; + } + + uint8_t numberOfYeardaySchedulesPerUser = 0; + if (!DoorLockServer::Instance().GetNumberOfYearDaySchedulesPerUserSupported(endpointId, numberOfYeardaySchedulesPerUser)) + { + ChipLogError( + Zcl, + "Unable to get number of supported yearday schedules when initializing lock endpoint, defaulting to 10 [endpointId=%d]", + endpointId); + numberOfYeardaySchedulesPerUser = 10; + } + + uint8_t numberOfHolidaySchedules = 0; + if (!DoorLockServer::Instance().GetNumberOfHolidaySchedulesSupported(endpointId, numberOfHolidaySchedules)) + { + ChipLogError( + Zcl, + "Unable to get number of supported holiday schedules when initializing lock endpoint, defaulting to 10 [endpointId=%d]", + endpointId); + numberOfHolidaySchedules = 10; + } + + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + + // err = LockMgr().Init(state, maxCredentialsPerUser, numberOfSupportedUsers); + err = LockMgr().Init(state, + ParamBuilder() + .SetNumberOfUsers(numberOfUsers) + .SetNumberOfCredentialsPerUser(numberOfCredentialsPerUser) + .SetNumberOfWeekdaySchedulesPerUser(numberOfWeekdaySchedulesPerUser) + .SetNumberOfYeardaySchedulesPerUser(numberOfYeardaySchedulesPerUser) + .SetNumberOfHolidaySchedules(numberOfHolidaySchedules) + .GetLockParam()); if (err != CHIP_NO_ERROR) { - P6_LOG("BoltLockMgr().Init() failed"); + P6_LOG("LockMgr().Init() failed"); appError(err); } - - BoltLockMgr().SetCallbacks(ActionInitiated, ActionCompleted); + LockMgr().SetCallbacks(ActionInitiated, ActionCompleted); // Initialize LEDs sStatusLED.Init(SYSTEM_STATE_LED); sLockLED.Init(LOCK_STATE_LED); - sLockLED.Set(!BoltLockMgr().IsUnlocked()); + if (state.Value() == DlLockState::kUnlocked) + { + sLockLED.Set(true); + } + else + { + sLockLED.Set(false); + } ConfigurationMgr().LogDeviceConfig(); @@ -282,25 +367,25 @@ void AppTask::AppTaskMain(void * pvParameter) void AppTask::LockActionEventHandler(AppEvent * event) { - bool initiated = false; - BoltLockManager::Action action = BoltLockManager::Action::KInvalid; - int32_t actor = 0; - CHIP_ERROR err = CHIP_NO_ERROR; + bool initiated = false; + LockManager::Action_t action; + int32_t actor; + CHIP_ERROR err = CHIP_NO_ERROR; if (event->Type == AppEvent::kEventType_Lock) { - action = static_cast(event->LockEvent.Action); + action = static_cast(event->LockEvent.Action); actor = event->LockEvent.Actor; } else if (event->Type == AppEvent::kEventType_Button) { - if (BoltLockMgr().IsUnlocked()) + if (LockMgr().NextState() == true) { - action = BoltLockManager::Action::kLock; + action = LockManager::LOCK_ACTION; } else { - action = BoltLockManager::Action::kUnlock; + action = LockManager::UNLOCK_ACTION; } actor = AppEvent::kEventType_Button; } @@ -311,7 +396,7 @@ void AppTask::LockActionEventHandler(AppEvent * event) if (err == CHIP_NO_ERROR) { - initiated = BoltLockMgr().InitiateAction(actor, action); + initiated = LockMgr().InitiateAction(actor, action); if (!initiated) { @@ -420,7 +505,7 @@ void AppTask::FunctionHandler(AppEvent * event) else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) { // Set lock status LED back to show state of lock. - sLockLED.Set(!BoltLockMgr().IsUnlocked()); + sLockLED.Set(!LockMgr().NextState()); sAppTask.CancelTimer(); @@ -464,20 +549,20 @@ void AppTask::StartTimer(uint32_t aTimeoutInMs) mFunctionTimerActive = true; } -void AppTask::ActionInitiated(BoltLockManager::Action action, int32_t actor) +void AppTask::ActionInitiated(LockManager::Action_t aAction, int32_t aActor) { - // If the action has been initiated by the lock, update the bolt lock trait + // If the action has been initiated by the lock, update the lock trait // and start flashing the LEDs rapidly to indicate action initiation. - if (action == BoltLockManager::Action::kLock) + if (aAction == LockManager::LOCK_ACTION) { P6_LOG("Lock Action has been initiated"); } - else if (action == BoltLockManager::Action::kUnlock) + else if (aAction == LockManager::UNLOCK_ACTION) { P6_LOG("Unlock Action has been initiated"); } - if (actor == AppEvent::kEventType_Button) + if (aActor == AppEvent::kEventType_Button) { sAppTask.mSyncClusterToButtonAction = true; } @@ -485,18 +570,18 @@ void AppTask::ActionInitiated(BoltLockManager::Action action, int32_t actor) sLockLED.Blink(50, 50); } -void AppTask::ActionCompleted(BoltLockManager::Action action) +void AppTask::ActionCompleted(LockManager::Action_t aAction) { - // if the action has been completed by the lock, update the bolt lock trait. + // if the action has been completed by the lock, update the lock trait. // Turn on the lock LED if in a LOCKED state OR // Turn off the lock LED if in an UNLOCKED state. - if (action == BoltLockManager::Action::kLock) + if (aAction == LockManager::LOCK_ACTION) { P6_LOG("Lock Action has been completed"); sLockLED.Set(true); } - else if (action == BoltLockManager::Action::kUnlock) + else if (aAction == LockManager::UNLOCK_ACTION) { P6_LOG("Unlock Action has been completed"); @@ -510,12 +595,12 @@ void AppTask::ActionCompleted(BoltLockManager::Action action) } } -void AppTask::PostLockActionRequest(int32_t actor, BoltLockManager::Action action) +void AppTask::ActionRequest(int32_t aActor, LockManager::Action_t aAction) { AppEvent event; event.Type = AppEvent::kEventType_Lock; - event.LockEvent.Actor = actor; - event.LockEvent.Action = static_cast(action); + event.LockEvent.Actor = aActor; + event.LockEvent.Action = aAction; event.Handler = LockActionEventHandler; PostEvent(&event); } @@ -545,14 +630,17 @@ void AppTask::DispatchEvent(AppEvent * event) void AppTask::UpdateCluster(intptr_t context) { - uint8_t newValue = !BoltLockMgr().IsUnlocked(); + bool unlocked = LockMgr().NextState(); + DlLockState newState = unlocked ? DlLockState::kUnlocked : DlLockState::kLocked; + + DlOperationSource source = DlOperationSource::kUnspecified; - // write the new on/off value + // write the new lock value EmberAfStatus status = - emberAfWriteAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, &newValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + DoorLockServer::Instance().SetLockState(1, newState, source) ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE; if (status != EMBER_ZCL_STATUS_SUCCESS) { - P6_LOG("ERR: updating on/off %x", status); + P6_LOG("ERR: updating lock state %x", status); } } @@ -574,34 +662,14 @@ void vApplicationStackOverflowHook(TaskHandle_t pxTask, char * pcTaskName) #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void AppTask::InitOTARequestor() { - CHIP_ERROR err = CHIP_NO_ERROR; SetRequestorInstance(&gRequestorCore); gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gImageProcessor.SetOTADownloader(&gDownloader); gDownloader.SetImageProcessorDelegate(&gImageProcessor); + ConfigurationMgr().StoreSoftwareVersion(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); - uint32_t savedSoftwareVersion; - err = ConfigurationMgr().GetSoftwareVersion(savedSoftwareVersion); - if (err != CHIP_NO_ERROR) - { - P6_LOG("Can't get saved software version"); - appError(err); - } - - if (savedSoftwareVersion != CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION) - { - ConfigurationMgr().StoreSoftwareVersion(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); - - P6_LOG("Confirming update to version: %u", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); - chip::OTARequestorInterface * requestor = chip::GetRequestorInstance(); - if (requestor != nullptr) - { - requestor->NotifyUpdateApplied(); - } - } - P6_LOG("Current Software Version: %u", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); P6_LOG("Current Software Version String: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); } diff --git a/examples/lock-app/p6/src/BoltLockManager.cpp b/examples/lock-app/p6/src/BoltLockManager.cpp deleted file mode 100644 index 8f7ee9dd5f1fdf..00000000000000 --- a/examples/lock-app/p6/src/BoltLockManager.cpp +++ /dev/null @@ -1,225 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "BoltLockManager.h" - -#include "AppConfig.h" -#include "AppTask.h" -#include - -BoltLockManager BoltLockManager::sLock; - -TimerHandle_t sLockTimer; - -CHIP_ERROR BoltLockManager::Init() -{ - // Create FreeRTOS sw timer for lock timer. - sLockTimer = xTimerCreate("lockTmr", // Just a text name, not used by the RTOS kernel - 1, // == default timer period (mS) - false, // no timer reload (==one-shot) - (void *) this, // init timer id = lock obj context - TimerEventHandler // timer callback handler - ); - - if (sLockTimer == NULL) - { - P6_LOG("sLockTimer timer create failed"); - appError(APP_ERROR_CREATE_TIMER_FAILED); - } - - mState = State::kUnlockingCompleted; - mAutoLockTimerArmed = false; - mAutoRelock = false; - mAutoLockDuration = 0; - - return CHIP_NO_ERROR; -} - -void BoltLockManager::SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB) -{ - mActionInitiated_CB = aActionInitiated_CB; - mActionCompleted_CB = aActionCompleted_CB; -} - -bool BoltLockManager::IsActionInProgress() -{ - return (mState == State::kLockingInitiated || mState == State::kUnlockingInitiated); -} - -bool BoltLockManager::IsUnlocked() -{ - return (mState == State::kUnlockingCompleted); -} - -void BoltLockManager::EnableAutoRelock(bool aOn) -{ - mAutoRelock = aOn; -} - -void BoltLockManager::SetAutoLockDuration(uint32_t aDurationInSecs) -{ - mAutoLockDuration = aDurationInSecs; -} - -bool BoltLockManager::InitiateAction(int32_t aActor, Action aAction) -{ - bool action_initiated = false; - State new_state; - - // Initiate Lock/Unlock Action only when the previous one is complete. - if (mState == State::kLockingCompleted && aAction == Action::kUnlock) - { - action_initiated = true; - - new_state = State::kUnlockingInitiated; - } - else if (mState == State::kUnlockingCompleted && aAction == Action::kLock) - { - action_initiated = true; - - new_state = State::kLockingInitiated; - } - - if (action_initiated) - { - if (mAutoLockTimerArmed && new_state == State::kLockingInitiated) - { - // If auto lock timer has been armed and someone initiates locking, - // cancel the timer and continue as normal. - mAutoLockTimerArmed = false; - - CancelTimer(); - } - - StartTimer(ACTUATOR_MOVEMENT_PERIOS_MS); - - // Since the timer started successfully, update the state and trigger callback - mState = new_state; - - if (mActionInitiated_CB) - { - mActionInitiated_CB(aAction, aActor); - } - } - - return action_initiated; -} - -void BoltLockManager::StartTimer(uint32_t aTimeoutMs) -{ - if (xTimerIsTimerActive(sLockTimer)) - { - P6_LOG("app timer already started!"); - CancelTimer(); - } - - // timer is not active, change its period to required value (== restart). - // FreeRTOS- Block for a maximum of 100 ticks if the change period command - // cannot immediately be sent to the timer command queue. - if (xTimerChangePeriod(sLockTimer, (aTimeoutMs / portTICK_PERIOD_MS), 100) != pdPASS) - { - P6_LOG("sLockTimer timer start() failed"); - appError(APP_ERROR_START_TIMER_FAILED); - } -} - -void BoltLockManager::CancelTimer(void) -{ - if (xTimerStop(sLockTimer, 0) == pdFAIL) - { - P6_LOG("Lock timer timer stop() failed"); - appError(APP_ERROR_STOP_TIMER_FAILED); - } -} - -void BoltLockManager::TimerEventHandler(TimerHandle_t xTimer) -{ - // Get lock obj context from timer id. - BoltLockManager * lock = static_cast(pvTimerGetTimerID(xTimer)); - - // The timer event handler will be called in the context of the timer task - // once sLockTimer expires. Post an event to apptask queue with the actual handler - // so that the event can be handled in the context of the apptask. - AppEvent event; - event.Type = AppEvent::kEventType_Timer; - event.TimerEvent.Context = lock; - if (lock->mAutoLockTimerArmed) - { - event.Handler = AutoReLockTimerEventHandler; - } - else - { - event.Handler = ActuatorMovementTimerEventHandler; - } - GetAppTask().PostEvent(&event); -} - -void BoltLockManager::AutoReLockTimerEventHandler(AppEvent * aEvent) -{ - BoltLockManager * lock = static_cast(aEvent->TimerEvent.Context); - int32_t actor = 0; - - // Make sure auto lock timer is still armed. - if (!lock->mAutoLockTimerArmed) - { - return; - } - - lock->mAutoLockTimerArmed = false; - - P6_LOG("Auto Re-Lock has been triggered!"); - - lock->InitiateAction(actor, Action::kLock); -} - -void BoltLockManager::ActuatorMovementTimerEventHandler(AppEvent * aEvent) -{ - Action actionCompleted = Action::KInvalid; - - BoltLockManager * lock = static_cast(aEvent->TimerEvent.Context); - - if (lock->mState == State::kLockingInitiated) - { - lock->mState = State::kLockingCompleted; - actionCompleted = Action::kLock; - } - else if (lock->mState == State::kUnlockingInitiated) - { - lock->mState = State::kUnlockingCompleted; - actionCompleted = Action::kUnlock; - } - - if (actionCompleted != Action::KInvalid) - { - if (lock->mActionCompleted_CB) - { - lock->mActionCompleted_CB(actionCompleted); - } - - if (lock->mAutoRelock && actionCompleted == Action::kUnlock) - { - // Start the timer for auto relock - lock->StartTimer(lock->mAutoLockDuration * 1000); - - lock->mAutoLockTimerArmed = true; - - P6_LOG("Auto Re-lock enabled. Will be triggered in %lu seconds", lock->mAutoLockDuration); - } - } -} diff --git a/examples/lock-app/p6/src/LockManager.cpp b/examples/lock-app/p6/src/LockManager.cpp new file mode 100644 index 00000000000000..d83b984b789779 --- /dev/null +++ b/examples/lock-app/p6/src/LockManager.cpp @@ -0,0 +1,709 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "LockManager.h" + +#include "AppConfig.h" +#include "AppTask.h" +#include +#include +#include +#include +#include + +LockManager LockManager::sLock; + +TimerHandle_t sLockTimer; + +using namespace ::chip::DeviceLayer::Internal; +using namespace P6DoorLock::LockInitParams; + +CHIP_ERROR LockManager::Init(chip::app::DataModel::Nullable state, LockParam lockParam) +{ + LockParams = lockParam; + + if (LockParams.numberOfUsers > kMaxUsers) + { + ChipLogError(Zcl, + "Max number of users is greater than %d, the maximum amount of users currently supported on this platform", + kMaxUsers); + return APP_ERROR_ALLOCATION_FAILED; + } + + if (LockParams.numberOfCredentialsPerUser > kMaxCredentialsPerUser) + { + ChipLogError( + Zcl, + "Max number of credentials per user is greater than %d, the maximum amount of users currently supported on this " + "platform", + kMaxCredentialsPerUser); + return APP_ERROR_ALLOCATION_FAILED; + } + + if (LockParams.numberOfWeekdaySchedulesPerUser > kMaxWeekdaySchedulesPerUser) + { + ChipLogError( + Zcl, "Max number of schedules is greater than %d, the maximum amount of schedules currently supported on this platform", + kMaxWeekdaySchedulesPerUser); + return APP_ERROR_ALLOCATION_FAILED; + } + + if (LockParams.numberOfYeardaySchedulesPerUser > kMaxYeardaySchedulesPerUser) + { + ChipLogError( + Zcl, "Max number of schedules is greater than %d, the maximum amount of schedules currently supported on this platform", + kMaxYeardaySchedulesPerUser); + return APP_ERROR_ALLOCATION_FAILED; + } + + if (LockParams.numberOfHolidaySchedules > kMaxHolidaySchedules) + { + ChipLogError( + Zcl, "Max number of schedules is greater than %d, the maximum amount of schedules currently supported on this platform", + kMaxHolidaySchedules); + return APP_ERROR_ALLOCATION_FAILED; + } + + // Create FreeRTOS sw timer for lock timer. + sLockTimer = xTimerCreate("lockTmr", // Just a text name, not used by the RTOS kernel + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = lock obj context + TimerEventHandler // timer callback handler + ); + + if (sLockTimer == NULL) + { + P6_LOG("sLockTimer timer create failed"); + return APP_ERROR_CREATE_TIMER_FAILED; + } + + if (state.Value() == DlLockState::kUnlocked) + mState = kState_UnlockCompleted; + else + mState = kState_LockCompleted; + + return CHIP_NO_ERROR; +} + +bool LockManager::IsValidUserIndex(uint16_t userIndex) +{ + return (userIndex < kMaxUsers); +} + +bool LockManager::IsValidCredentialIndex(uint16_t credentialIndex, DlCredentialType type) +{ + // appclusters, 5.2.6.3.1: 0 is allowed index for Programming PIN credential only + if (DlCredentialType::kProgrammingPIN == type) + { + return (0 == credentialIndex); + } + + return (credentialIndex < kMaxCredentialsPerUser); +} + +bool LockManager::IsValidWeekdayScheduleIndex(uint8_t scheduleIndex) +{ + return (scheduleIndex < kMaxWeekdaySchedulesPerUser); +} + +bool LockManager::IsValidYeardayScheduleIndex(uint8_t scheduleIndex) +{ + return (scheduleIndex < kMaxYeardaySchedulesPerUser); +} + +bool LockManager::IsValidHolidayScheduleIndex(uint8_t scheduleIndex) +{ + return (scheduleIndex < kMaxHolidaySchedules); +} + +bool LockManager::ReadConfigValues() +{ + size_t outLen; + P6Config::ReadConfigValueBin(P6Config::kConfigKey_LockUser, reinterpret_cast(&mLockUsers), + sizeof(EmberAfPluginDoorLockUserInfo) * ArraySize(mLockUsers), outLen); + + P6Config::ReadConfigValueBin(P6Config::kConfigKey_Credential, reinterpret_cast(&mLockCredentials), + sizeof(EmberAfPluginDoorLockCredentialInfo) * ArraySize(mLockCredentials), outLen); + + P6Config::ReadConfigValueBin(P6Config::kConfigKey_LockUserName, reinterpret_cast(mUserNames), sizeof(mUserNames), + outLen); + + P6Config::ReadConfigValueBin(P6Config::kConfigKey_CredentialData, reinterpret_cast(mCredentialData), + sizeof(mCredentialData), outLen); + + P6Config::ReadConfigValueBin(P6Config::kConfigKey_UserCredentials, reinterpret_cast(mCredentials), + sizeof(DlCredential) * LockParams.numberOfUsers * LockParams.numberOfCredentialsPerUser, outLen); + + P6Config::ReadConfigValueBin(P6Config::kConfigKey_WeekDaySchedules, reinterpret_cast(mWeekdaySchedule), + sizeof(EmberAfPluginDoorLockWeekDaySchedule) * LockParams.numberOfWeekdaySchedulesPerUser * + LockParams.numberOfUsers, + outLen); + + P6Config::ReadConfigValueBin(P6Config::kConfigKey_YearDaySchedules, reinterpret_cast(mYeardaySchedule), + sizeof(EmberAfPluginDoorLockYearDaySchedule) * LockParams.numberOfYeardaySchedulesPerUser * + LockParams.numberOfUsers, + outLen); + + P6Config::ReadConfigValueBin(P6Config::kConfigKey_HolidaySchedules, reinterpret_cast(&(mHolidaySchedule)), + sizeof(EmberAfPluginDoorLockHolidaySchedule) * LockParams.numberOfHolidaySchedules, outLen); + + return true; +} + +void LockManager::SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB) +{ + mActionInitiated_CB = aActionInitiated_CB; + mActionCompleted_CB = aActionCompleted_CB; +} + +bool LockManager::IsActionInProgress() +{ + return (mState == kState_LockInitiated || mState == kState_UnlockInitiated); +} + +bool LockManager::NextState() +{ + return (mState == kState_UnlockCompleted); +} + +bool LockManager::InitiateAction(int32_t aActor, Action_t aAction) +{ + bool action_initiated = false; + State_t new_state; + + // Initiate Lock/Unlock Action only when the previous one is complete. + if (mState == kState_LockCompleted && aAction == UNLOCK_ACTION) + { + action_initiated = true; + + new_state = kState_UnlockInitiated; + } + else if (mState == kState_UnlockCompleted && aAction == LOCK_ACTION) + { + action_initiated = true; + + new_state = kState_LockInitiated; + } + + if (action_initiated) + { + + StartTimer(ACTUATOR_MOVEMENT_PERIOS_MS); + + // Since the timer started successfully, update the state and trigger callback + mState = new_state; + + if (mActionInitiated_CB) + { + mActionInitiated_CB(aAction, aActor); + } + } + + return action_initiated; +} + +void LockManager::StartTimer(uint32_t aTimeoutMs) +{ + if (xTimerIsTimerActive(sLockTimer)) + { + P6_LOG("app timer already started!"); + CancelTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sLockTimer, (aTimeoutMs / portTICK_PERIOD_MS), 100) != pdPASS) + { + P6_LOG("sLockTimer timer start() failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } +} + +void LockManager::CancelTimer(void) +{ + if (xTimerStop(sLockTimer, 0) == pdFAIL) + { + P6_LOG("sLockTimer stop() failed"); + appError(APP_ERROR_STOP_TIMER_FAILED); + } +} + +void LockManager::TimerEventHandler(TimerHandle_t xTimer) +{ + // Get lock obj context from timer id. + LockManager * lock = static_cast(pvTimerGetTimerID(xTimer)); + + // The timer event handler will be called in the context of the timer task + // once sLockTimer expires. Post an event to apptask queue with the actual handler + // so that the event can be handled in the context of the apptask. + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = lock; + event.Handler = ActuatorMovementTimerEventHandler; + GetAppTask().PostEvent(&event); +} + +void LockManager::ActuatorMovementTimerEventHandler(AppEvent * aEvent) +{ + Action_t actionCompleted = INVALID_ACTION; + + LockManager * lock = static_cast(aEvent->TimerEvent.Context); + + if (lock->mState == kState_LockInitiated) + { + lock->mState = kState_LockCompleted; + actionCompleted = LOCK_ACTION; + } + else if (lock->mState == kState_UnlockInitiated) + { + lock->mState = kState_UnlockCompleted; + actionCompleted = UNLOCK_ACTION; + } + + if (actionCompleted != INVALID_ACTION) + { + if (lock->mActionCompleted_CB) + { + lock->mActionCompleted_CB(actionCompleted); + } + } +} + +bool LockManager::Lock(chip::EndpointId endpointId, const Optional & pin, DlOperationError & err) +{ + return setLockState(endpointId, DlLockState::kLocked, pin, err); +} + +bool LockManager::Unlock(chip::EndpointId endpointId, const Optional & pin, DlOperationError & err) +{ + return setLockState(endpointId, DlLockState::kUnlocked, pin, err); +} + +bool LockManager::GetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) +{ + VerifyOrReturnValue(userIndex > 0, false); // indices are one-indexed + + userIndex--; + + VerifyOrReturnValue(IsValidUserIndex(userIndex), false); + + ChipLogProgress(Zcl, "Door Lock App: LockManager::GetUser [endpoint=%d,userIndex=%hu]", endpointId, userIndex); + + const auto & userInDb = mLockUsers[userIndex]; + + user.userStatus = userInDb.userStatus; + if (DlUserStatus::kAvailable == user.userStatus) + { + ChipLogDetail(Zcl, "Found unoccupied user [endpoint=%d]", mEndpointId); + return true; + } + + user.userName = chip::CharSpan(userInDb.userName.data(), userInDb.userName.size()); + user.credentials = chip::Span(mCredentials[userIndex], userInDb.credentials.size()); + user.userUniqueId = userInDb.userUniqueId; + user.userType = userInDb.userType; + user.credentialRule = userInDb.credentialRule; + // So far there's no way to actually create the credential outside Matter, so here we always set the creation/modification + // source to Matter + user.creationSource = DlAssetSource::kMatterIM; + user.createdBy = userInDb.createdBy; + user.modificationSource = DlAssetSource::kMatterIM; + user.lastModifiedBy = userInDb.lastModifiedBy; + + ChipLogDetail(Zcl, + "Found occupied user " + "[endpoint=%d,name=\"%.*s\",credentialsCount=%u,uniqueId=%lx,type=%u,credentialRule=%u," + "createdBy=%d,lastModifiedBy=%d]", + endpointId, static_cast(user.userName.size()), user.userName.data(), user.credentials.size(), + user.userUniqueId, to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy, + user.lastModifiedBy); + + return true; +} + +bool LockManager::SetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator, chip::FabricIndex modifier, + const chip::CharSpan & userName, uint32_t uniqueId, DlUserStatus userStatus, DlUserType usertype, + DlCredentialRule credentialRule, const DlCredential * credentials, size_t totalCredentials) +{ + ChipLogProgress(Zcl, + "Door Lock App: LockManager::SetUser " + "[endpoint=%d,userIndex=%d,creator=%d,modifier=%d,userName=%s,uniqueId=%ld " + "userStatus=%u,userType=%u,credentialRule=%u,credentials=%p,totalCredentials=%u]", + mEndpointId, userIndex, creator, modifier, userName.data(), uniqueId, to_underlying(userStatus), + to_underlying(usertype), to_underlying(credentialRule), credentials, totalCredentials); + + VerifyOrReturnValue(userIndex > 0, false); // indices are one-indexed + + userIndex--; + + VerifyOrReturnValue(IsValidUserIndex(userIndex), false); + + auto & userInStorage = mLockUsers[userIndex]; + + if (userName.size() > DOOR_LOCK_MAX_USER_NAME_SIZE) + { + ChipLogError(Zcl, "Cannot set user - user name is too long [endpoint=%d,index=%d]", mEndpointId, userIndex); + return false; + } + + if (totalCredentials > LockParams.numberOfCredentialsPerUser) + { + ChipLogError(Zcl, "Cannot set user - total number of credentials is too big [endpoint=%d,index=%d,totalCredentials=%u]", + endpointId, userIndex, totalCredentials); + return false; + } + + chip::Platform::CopyString(mUserNames[userIndex], userName); + userInStorage.userName = chip::CharSpan(mUserNames[userIndex], userName.size()); + userInStorage.userUniqueId = uniqueId; + userInStorage.userStatus = userStatus; + userInStorage.userType = usertype; + userInStorage.credentialRule = credentialRule; + userInStorage.lastModifiedBy = modifier; + userInStorage.createdBy = creator; + + for (size_t i = 0; i < totalCredentials; ++i) + { + mCredentials[userIndex][i] = credentials[i]; + mCredentials[userIndex][i].CredentialType = 1; + mCredentials[userIndex][i].CredentialIndex = i + 1; + } + + userInStorage.credentials = chip::Span(mCredentials[userIndex], totalCredentials); + + // Save user information in NVM flash + P6Config::WriteConfigValueBin(P6Config::kConfigKey_LockUser, reinterpret_cast(&mLockUsers), + sizeof(EmberAfPluginDoorLockUserInfo) * LockParams.numberOfUsers); + + P6Config::WriteConfigValueBin(P6Config::kConfigKey_UserCredentials, reinterpret_cast(mCredentials), + sizeof(DlCredential) * LockParams.numberOfUsers * LockParams.numberOfCredentialsPerUser); + + P6Config::WriteConfigValueBin(P6Config::kConfigKey_LockUserName, reinterpret_cast(mUserNames), + sizeof(mUserNames)); + + ChipLogProgress(Zcl, "Successfully set the user [mEndpointId=%d,index=%d]", endpointId, userIndex); + + return true; +} + +bool LockManager::GetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, DlCredentialType credentialType, + EmberAfPluginDoorLockCredentialInfo & credential) +{ + + VerifyOrReturnValue(credentialIndex > 0, false); // indices are one-indexed + + credentialIndex--; + + VerifyOrReturnValue(IsValidCredentialIndex(credentialIndex, credentialType), false); + + ChipLogProgress(Zcl, "Lock App: LockManager::GetCredential [credentialType=%u], credentialIndex=%d", + to_underlying(credentialType), credentialIndex); + + if (credentialType == DlCredentialType::kProgrammingPIN) + { + ChipLogError(Zcl, "Programming user not supported [credentialType=%u], credentialIndex=%d", to_underlying(credentialType), + credentialIndex); + + return true; + } + + const auto & credentialInStorage = mLockCredentials[credentialIndex]; + + credential.status = credentialInStorage.status; + ChipLogDetail(Zcl, "CredentialStatus: %d, CredentialIndex: %d ", (int) credential.status, credentialIndex); + + if (DlCredentialStatus::kAvailable == credential.status) + { + ChipLogDetail(Zcl, "Found unoccupied credential "); + return true; + } + credential.credentialType = credentialInStorage.credentialType; + credential.credentialData = credentialInStorage.credentialData; + credential.createdBy = credentialInStorage.createdBy; + credential.lastModifiedBy = credentialInStorage.lastModifiedBy; + // So far there's no way to actually create the credential outside Matter, so here we always set the creation/modification + // source to Matter + credential.creationSource = DlAssetSource::kMatterIM; + credential.modificationSource = DlAssetSource::kMatterIM; + + ChipLogDetail(Zcl, "Found occupied credential [type=%u,dataSize=%u]", to_underlying(credential.credentialType), + credential.credentialData.size()); + + return true; +} + +bool LockManager::SetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, + chip::FabricIndex modifier, DlCredentialStatus credentialStatus, DlCredentialType credentialType, + const chip::ByteSpan & credentialData) +{ + + VerifyOrReturnValue(credentialIndex > 0, false); // indices are one-indexed + + credentialIndex--; + + VerifyOrReturnValue(IsValidCredentialIndex(credentialIndex, credentialType), false); + + ChipLogProgress(Zcl, + "Door Lock App: LockManager::SetCredential " + "[credentialStatus=%u,credentialType=%u,credentialDataSize=%u,creator=%d,modifier=%d]", + to_underlying(credentialStatus), to_underlying(credentialType), credentialData.size(), creator, modifier); + + auto & credentialInStorage = mLockCredentials[credentialIndex]; + + credentialInStorage.status = credentialStatus; + credentialInStorage.credentialType = credentialType; + credentialInStorage.createdBy = creator; + credentialInStorage.lastModifiedBy = modifier; + + memcpy(mCredentialData[credentialIndex], credentialData.data(), credentialData.size()); + credentialInStorage.credentialData = chip::ByteSpan{ mCredentialData[credentialIndex], credentialData.size() }; + + // Save credential information in NVM flash + P6Config::WriteConfigValueBin(P6Config::kConfigKey_Credential, reinterpret_cast(&mLockCredentials), + sizeof(EmberAfPluginDoorLockCredentialInfo) * LockParams.numberOfCredentialsPerUser); + + P6Config::WriteConfigValueBin(P6Config::kConfigKey_CredentialData, reinterpret_cast(&mCredentialData), + sizeof(mCredentialData)); + + ChipLogProgress(Zcl, "Successfully set the credential [credentialType=%u]", to_underlying(credentialType)); + + return true; +} + +DlStatus LockManager::GetWeekdaySchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, + EmberAfPluginDoorLockWeekDaySchedule & schedule) +{ + + VerifyOrReturnValue(weekdayIndex > 0, DlStatus::kFailure); // indices are one-indexed + VerifyOrReturnValue(userIndex > 0, DlStatus::kFailure); // indices are one-indexed + + weekdayIndex--; + userIndex--; + + VerifyOrReturnValue(IsValidWeekdayScheduleIndex(weekdayIndex), DlStatus::kFailure); + VerifyOrReturnValue(IsValidUserIndex(userIndex), DlStatus::kFailure); + + schedule = mWeekdaySchedule[userIndex][weekdayIndex]; + + return DlStatus::kSuccess; +} + +DlStatus LockManager::SetWeekdaySchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, + DlScheduleStatus status, DlDaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, + uint8_t endHour, uint8_t endMinute) +{ + + VerifyOrReturnValue(weekdayIndex > 0, DlStatus::kFailure); // indices are one-indexed + VerifyOrReturnValue(userIndex > 0, DlStatus::kFailure); // indices are one-indexed + + weekdayIndex--; + userIndex--; + + VerifyOrReturnValue(IsValidWeekdayScheduleIndex(weekdayIndex), DlStatus::kFailure); + VerifyOrReturnValue(IsValidUserIndex(userIndex), DlStatus::kFailure); + + auto & scheduleInStorage = mWeekdaySchedule[userIndex][weekdayIndex]; + + scheduleInStorage.daysMask = daysMask; + scheduleInStorage.startHour = startHour; + scheduleInStorage.startMinute = startMinute; + scheduleInStorage.endHour = endHour; + scheduleInStorage.endMinute = endMinute; + + // Save schedule information in NVM flash + P6Config::WriteConfigValueBin(P6Config::kConfigKey_WeekDaySchedules, reinterpret_cast(mWeekdaySchedule), + sizeof(EmberAfPluginDoorLockWeekDaySchedule) * LockParams.numberOfWeekdaySchedulesPerUser * + LockParams.numberOfUsers); + + return DlStatus::kSuccess; +} + +DlStatus LockManager::GetYeardaySchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, + EmberAfPluginDoorLockYearDaySchedule & schedule) +{ + VerifyOrReturnValue(yearDayIndex > 0, DlStatus::kFailure); // indices are one-indexed + VerifyOrReturnValue(userIndex > 0, DlStatus::kFailure); // indices are one-indexed + + yearDayIndex--; + userIndex--; + + VerifyOrReturnValue(IsValidYeardayScheduleIndex(yearDayIndex), DlStatus::kFailure); + VerifyOrReturnValue(IsValidUserIndex(userIndex), DlStatus::kFailure); + + auto & scheduleInStorage = mYeardaySchedule[userIndex][yearDayIndex]; + + schedule = scheduleInStorage; + + return DlStatus::kSuccess; +} + +DlStatus LockManager::SetYeardaySchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, + DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime) +{ + VerifyOrReturnValue(yearDayIndex > 0, DlStatus::kFailure); // indices are one-indexed + VerifyOrReturnValue(userIndex > 0, DlStatus::kFailure); // indices are one-indexed + + yearDayIndex--; + userIndex--; + + VerifyOrReturnValue(IsValidYeardayScheduleIndex(yearDayIndex), DlStatus::kFailure); + VerifyOrReturnValue(IsValidUserIndex(userIndex), DlStatus::kFailure); + + auto & scheduleInStorage = mYeardaySchedule[userIndex][yearDayIndex]; + + scheduleInStorage.localStartTime = localStartTime; + scheduleInStorage.localEndTime = localEndTime; + + // Save schedule information in NVM flash + P6Config::WriteConfigValueBin(P6Config::kConfigKey_YearDaySchedules, reinterpret_cast(mYeardaySchedule), + sizeof(EmberAfPluginDoorLockYearDaySchedule) * LockParams.numberOfYeardaySchedulesPerUser * + LockParams.numberOfUsers); + + return DlStatus::kSuccess; +} + +DlStatus LockManager::GetHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex, + EmberAfPluginDoorLockHolidaySchedule & schedule) +{ + VerifyOrReturnValue(holidayIndex > 0, DlStatus::kFailure); // indices are one-indexed + + holidayIndex--; + + VerifyOrReturnValue(IsValidHolidayScheduleIndex(holidayIndex), DlStatus::kFailure); + + auto & scheduleInStorage = mHolidaySchedule[holidayIndex]; + + schedule = scheduleInStorage; + + return DlStatus::kSuccess; +} + +DlStatus LockManager::SetHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, + uint32_t localStartTime, uint32_t localEndTime, DlOperatingMode operatingMode) +{ + VerifyOrReturnValue(holidayIndex > 0, DlStatus::kFailure); // indices are one-indexed + + holidayIndex--; + + VerifyOrReturnValue(IsValidHolidayScheduleIndex(holidayIndex), DlStatus::kFailure); + + auto & scheduleInStorage = mHolidaySchedule[holidayIndex]; + + scheduleInStorage.localStartTime = localStartTime; + scheduleInStorage.localEndTime = localEndTime; + scheduleInStorage.operatingMode = operatingMode; + + // Save schedule information in NVM flash + P6Config::WriteConfigValueBin(P6Config::kConfigKey_HolidaySchedules, reinterpret_cast(&(mHolidaySchedule)), + sizeof(EmberAfPluginDoorLockHolidaySchedule) * LockParams.numberOfHolidaySchedules); + + return DlStatus::kSuccess; +} + +const char * LockManager::lockStateToString(DlLockState lockState) const +{ + switch (lockState) + { + case DlLockState::kNotFullyLocked: + return "Not Fully Locked"; + case DlLockState::kLocked: + return "Locked"; + case DlLockState::kUnlocked: + return "Unlocked"; + case DlLockState::kUnknownEnumValue: + break; + } + + return "Unknown"; +} + +bool LockManager::setLockState(chip::EndpointId endpointId, DlLockState lockState, const Optional & pin, + DlOperationError & err) +{ + DlLockState curState = DlLockState::kLocked; + if (mState == kState_UnlockCompleted) + curState = DlLockState::kUnlocked; + + if ((curState == lockState) && (curState == DlLockState::kLocked)) + { + ChipLogDetail(Zcl, "Door Lock App: door is already locked, ignoring command to set lock state to \"%s\" [endpointId=%d]", + lockStateToString(lockState), endpointId); + return true; + } + else if ((curState == lockState) && (curState == DlLockState::kUnlocked)) + { + ChipLogDetail(Zcl, + "Door Lock App: door is already unlocked, ignoring command to set unlock state to \"%s\" [endpointId=%d]", + lockStateToString(lockState), endpointId); + return true; + } + + // Check the RequirePINforRemoteOperation attribute + bool requirePin = false; + // chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Get(endpointId, &requirePin); + + // If a pin code is not given + if (!pin.HasValue()) + { + ChipLogDetail(Zcl, "Door Lock App: PIN code is not specified, but it is required [endpointId=%d]", mEndpointId); + curState = lockState; + + // If a pin code is not required + if (!requirePin) + { + ChipLogDetail(Zcl, "Door Lock App: setting door lock state to \"%s\" [endpointId=%d]", lockStateToString(lockState), + endpointId); + curState = lockState; + return true; + } + + return false; + } + + // Check the PIN code + for (uint8_t i = 0; i < kMaxCredentials; i++) + { + if (mLockCredentials[i].credentialType != DlCredentialType::kPin || + mLockCredentials[i].status == DlCredentialStatus::kAvailable) + { + continue; + } + + if (mLockCredentials[i].credentialData.data_equal(pin.Value())) + { + ChipLogDetail(Zcl, + "Lock App: specified PIN code was found in the database, setting lock state to \"%s\" [endpointId=%d]", + lockStateToString(lockState), mEndpointId); + + curState = lockState; + + return true; + } + } + + ChipLogDetail(Zcl, + "Door Lock App: specified PIN code was not found in the database, ignoring command to set lock state to \"%s\" " + "[endpointId=%d]", + lockStateToString(lockState), mEndpointId); + + err = DlOperationError::kInvalidCredential; + return false; +} diff --git a/examples/lock-app/p6/src/ZclCallbacks.cpp b/examples/lock-app/p6/src/ZclCallbacks.cpp index dd90025ccfe234..cdfd3a8d27e883 100644 --- a/examples/lock-app/p6/src/ZclCallbacks.cpp +++ b/examples/lock-app/p6/src/ZclCallbacks.cpp @@ -22,7 +22,8 @@ #include "AppConfig.h" #include "AppTask.h" -#include "BoltLockManager.h" +#include "LockManager.h" +#include #include #include @@ -31,18 +32,22 @@ using namespace ::chip; using namespace ::chip::app::Clusters; +using namespace ::chip::DeviceLayer::Internal; void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) { - if (attributePath.mClusterId == OnOff::Id && attributePath.mAttributeId == OnOff::Attributes::OnOff::Id) + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); + + if (clusterId == DoorLock::Id && attributeId == DoorLock::Attributes::LockState::Id) { - BoltLockMgr().InitiateAction(AppEvent::kEventType_Lock, - *value ? BoltLockManager::Action::kLock : BoltLockManager::Action::kUnlock); + ChipLogProgress(Zcl, "Door lock cluster: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); } } -/** @brief OnOff Cluster Init +/** @brief DoorLock Cluster Init * * This function is called when a specific cluster is initialized. It gives the * application an opportunity to take care of cluster initialization procedures. @@ -50,14 +55,103 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & * * @param endpoint Ver.: always * - * TODO Issue #3841 - * emberAfOnOffClusterInitCallback happens before the stack initialize the cluster - * attributes to the default value. - * The logic here expects something similar to the deprecated Plugins callback - * emberAfPluginOnOffClusterServerPostInitCallback. - * */ -void emberAfOnOffClusterInitCallback(EndpointId endpoint) +void emberAfOnOffClusterInitCallback(EndpointId endpoint) {} + +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, DlOperationError & err) +{ + ChipLogProgress(Zcl, "Door Lock App: Lock Command endpoint=%d", endpointId); + bool status = LockMgr().Lock(endpointId, pinCode, err); + if (status == true) + { + LockMgr().InitiateAction(AppEvent::kEventType_Lock, LockManager::LOCK_ACTION); + } + return status; +} + +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, + DlOperationError & err) +{ + ChipLogProgress(Zcl, "Door Lock App: Unlock Command endpoint=%d", endpointId); + bool status = LockMgr().Unlock(endpointId, pinCode, err); + if (status == true) + { + LockMgr().InitiateAction(AppEvent::kEventType_Lock, LockManager::UNLOCK_ACTION); + } + + return status; +} + +bool emberAfPluginDoorLockGetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, DlCredentialType credentialType, + EmberAfPluginDoorLockCredentialInfo & credential) +{ + return LockMgr().GetCredential(endpointId, credentialIndex, credentialType, credential); +} + +bool emberAfPluginDoorLockSetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, + chip::FabricIndex modifier, DlCredentialStatus credentialStatus, + DlCredentialType credentialType, const chip::ByteSpan & credentialData) +{ + return LockMgr().SetCredential(endpointId, credentialIndex, creator, modifier, credentialStatus, credentialType, + credentialData); +} + +bool emberAfPluginDoorLockGetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) +{ + return LockMgr().GetUser(endpointId, userIndex, user); +} + +bool emberAfPluginDoorLockSetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator, + chip::FabricIndex modifier, const chip::CharSpan & userName, uint32_t uniqueId, + DlUserStatus userStatus, DlUserType usertype, DlCredentialRule credentialRule, + const DlCredential * credentials, size_t totalCredentials) +{ + + return LockMgr().SetUser(endpointId, userIndex, creator, modifier, userName, uniqueId, userStatus, usertype, credentialRule, + credentials, totalCredentials); +} + +// TODO: These functions will be supported by door-lock-server in the future. These are set to return failure until implemented. +DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, + EmberAfPluginDoorLockWeekDaySchedule & schedule) // +{ + return LockMgr().GetWeekdaySchedule(endpointId, weekdayIndex, userIndex, schedule); + // return DlStatus::kFailure; +} + +DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, + EmberAfPluginDoorLockYearDaySchedule & schedule) +{ + return LockMgr().GetYeardaySchedule(endpointId, yearDayIndex, userIndex, schedule); + // return DlStatus::kFailure; +} + +DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, + DlScheduleStatus status, DlDaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, + uint8_t endHour, uint8_t endMinute) +{ + return LockMgr().SetWeekdaySchedule(endpointId, weekdayIndex, userIndex, status, daysMask, startHour, startMinute, endHour, + endMinute); + // return DlStatus::kFailure; +} + +DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, + DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime) +{ + return LockMgr().SetYeardaySchedule(endpointId, yearDayIndex, userIndex, status, localStartTime, localEndTime); + // return DlStatus::kFailure; +} + +DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, + EmberAfPluginDoorLockHolidaySchedule & schedule) +{ + return LockMgr().GetHolidaySchedule(endpointId, holidayIndex, schedule); + // return DlStatus::kFailure; +} + +DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, + uint32_t localStartTime, uint32_t localEndTime, DlOperatingMode operatingMode) { - GetAppTask().UpdateClusterState(); + return LockMgr().SetHolidaySchedule(endpointId, holidayIndex, status, localStartTime, localEndTime, operatingMode); + // return DlStatus::kFailure; } diff --git a/examples/lock-app/qpg/include/AppTask.h b/examples/lock-app/qpg/include/AppTask.h index fd6c1d888a8b7e..005d0aeb9da6e0 100644 --- a/examples/lock-app/qpg/include/AppTask.h +++ b/examples/lock-app/qpg/include/AppTask.h @@ -52,6 +52,7 @@ class AppTask friend AppTask & GetAppTask(void); CHIP_ERROR Init(); + static void InitServer(intptr_t arg); static void ActionInitiated(BoltLockManager::Action_t aAction, int32_t aActor); static void ActionCompleted(BoltLockManager::Action_t aAction); diff --git a/examples/lock-app/qpg/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp index e418e1def9fc71..86a28d5e9bb863 100644 --- a/examples/lock-app/qpg/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -108,12 +108,38 @@ CHIP_ERROR AppTask::StartAppTask() return CHIP_NO_ERROR; } +void AppTask::InitServer(intptr_t arg) +{ + static chip::CommonCaseDeviceServerInitParams initParams; + (void) initParams.InitializeStaticResourcesBeforeServerInit(); + + gExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + + chip::Inet::EndPointStateOpenThread::OpenThreadEndpointInitParam nativeParams; + nativeParams.lockCb = LockOpenThreadTask; + nativeParams.unlockCb = UnlockOpenThreadTask; + nativeParams.openThreadInstancePtr = chip::DeviceLayer::ThreadStackMgrImpl().OTInstance(); + initParams.endpointNativeParams = static_cast(&nativeParams); + chip::Server::GetInstance().Init(initParams); + +#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY + chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); +#endif +} CHIP_ERROR AppTask::Init() { CHIP_ERROR err = CHIP_NO_ERROR; ChipLogProgress(NotSpecified, "Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + // Init ZCL Data Model and start server + PlatformMgr().ScheduleWork(InitServer, 0); + + // Initialize device attestation config + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + + // Setup Bolt err = BoltLockMgr().Init(); if (err != CHIP_NO_ERROR) { @@ -122,32 +148,11 @@ CHIP_ERROR AppTask::Init() } BoltLockMgr().SetCallbacks(ActionInitiated, ActionCompleted); - // Subscribe with our button callback to the qvCHIP button handler. + // Setup button handler qvIO_SetBtnCallback(ButtonEventHandler); qvIO_LedSet(LOCK_STATE_LED, !BoltLockMgr().IsUnlocked()); -#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY - chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); -#endif - - // Init ZCL Data Model - static chip::CommonCaseDeviceServerInitParams initParams; - (void) initParams.InitializeStaticResourcesBeforeServerInit(); - - gExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate); - chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); - - chip::Inet::EndPointStateOpenThread::OpenThreadEndpointInitParam nativeParams; - nativeParams.lockCb = LockOpenThreadTask; - nativeParams.unlockCb = UnlockOpenThreadTask; - nativeParams.openThreadInstancePtr = chip::DeviceLayer::ThreadStackMgrImpl().OTInstance(); - initParams.endpointNativeParams = static_cast(&nativeParams); - chip::Server::GetInstance().Init(initParams); - - // Initialize device attestation config - SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); - UpdateClusterState(); ConfigurationMgr().LogDeviceConfig(); @@ -164,7 +169,6 @@ void AppTask::AppTaskMain(void * pvParameter) if (err != CHIP_NO_ERROR) { ChipLogError(NotSpecified, "AppTask.Init() failed: %" CHIP_ERROR_FORMAT, err.Format()); - return; } ChipLogProgress(NotSpecified, "App Task started"); diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index d21e442b6b0065..0abcc87051b916 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -46,7 +46,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -54,7 +54,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -121,7 +121,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -317,7 +317,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -396,7 +395,7 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } 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 0d7c9f937d3d46..23aeb22bb00d91 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 @@ -51,7 +51,7 @@ client cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -59,7 +59,7 @@ client cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -117,7 +117,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -125,7 +125,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -152,6 +152,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -339,7 +340,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -573,7 +574,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster AdministratorCommissioning = 60 { @@ -621,7 +622,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -647,7 +647,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -713,8 +713,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -780,10 +780,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index 538a1c023f35bb..73be70beeef4f2 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -37,26 +37,35 @@ A prototype application that demonstrates OTA Requestor capabilities. ## Testing the Example Application -Launch the linux [ota-provider-app](../../ota-provider-app/linux) and provide -the SW_IMAGE_FILE +1. Commission Ameba (ota-requestor-app) using chip-tool - $ ./chip-ota-provider-app -f ${SW_IMAGE_FILE} + $ ./chip-tool pairing ble-wifi 1 20202021 3840 -Commission the ota-provider-app using -[chip-tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) +2. Launch the linux [ota-provider-app](../../ota-provider-app/linux) and + provide the SW_IMAGE_FILE - $ ./chip-tool pairing onnetwork 1 20202021 + $ ./chip-ota-provider-app -f ${SW_IMAGE_FILE} -Input `ATS$` command to start the CHIP ota-requestor task, then use chip-tool to -commission it +3. Commission the ota-provider-app using + [chip-tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) - $ ./chip-tool pairing ble-wifi 2 20202021 3840 + $ ./chip-tool pairing onnetwork 2 20202021 -After commissioning the ota-requestor, use the chip-tool to announce the -ota-provider-app to start the OTA process +4. Write the Default OTA providers into Ameba - $ ./chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 + $ ./chip-tool otasoftwareupdaterequestor write default-ota-providers '[{"fabricIndex": 1, "providerNodeID": 2, "endpoint": 0}]' 1 0 -The OTA process should include downloading the image, verification of image -header, erasing upgraded flash partition, writing to flash and checksum -verification +5. Configure the ACL of the ota-provider-app to allow access for Ameba + + $ ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": [{"cluster": 41, "endpoint": null, "deviceType": null}]}]' 1235 0 + +6. Use the chip-tool to announce the ota-provider-app to start the OTA process + + $ ./chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 + +7. The OTA process should include downloading the image, verification of image + header, erasing upgraded flash partition, writing to flash and checksum + verification. + +8) Once OTA signature is updated, Ameba will reboot into the new image after 10 + seconds countdown. diff --git a/examples/ota-requestor-app/ameba/chip_main.cmake b/examples/ota-requestor-app/ameba/chip_main.cmake index fc1091a86238ca..896288900cd4cc 100644 --- a/examples/ota-requestor-app/ameba/chip_main.cmake +++ b/examples/ota-requestor-app/ameba/chip_main.cmake @@ -77,7 +77,6 @@ list( -DUSE_ZAP_CONFIG -DCHIP_HAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE= - -DMATTER_OTA_REQUESTOR_APP=1 ) if (matter_enable_persistentstorage_audit) diff --git a/examples/ota-requestor-app/linux/main.cpp b/examples/ota-requestor-app/linux/main.cpp index 7507e201646da9..174b3d7cd9809b 100644 --- a/examples/ota-requestor-app/linux/main.cpp +++ b/examples/ota-requestor-app/linux/main.cpp @@ -347,7 +347,7 @@ int main(int argc, char * argv[]) argv[0] = kImageExecPath; execv(argv[0], argv); - // If successfully executing the new iamge, execv should not return + // If successfully executing the new image, execv should not return ChipLogError(SoftwareUpdate, "The OTA image is invalid"); } return 0; 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 09ffb5b4fad390..b5258a7d8f5dfb 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 @@ -6,6 +6,20 @@ struct LabelStruct { char_string<16> value = 1; } +server cluster Descriptor = 29 { + struct DeviceType { + devtype_id type = 0; + int16u revision = 1; + } + + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + server cluster AccessControl = 31 { enum AuthMode : ENUM8 { kPase = 1; @@ -51,7 +65,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -59,7 +73,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -86,6 +100,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -342,7 +357,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -576,7 +591,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster AdministratorCommissioning = 60 { @@ -624,7 +639,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -650,7 +664,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -716,8 +730,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -783,10 +797,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { @@ -805,6 +819,15 @@ endpoint 0 { device type rootdevice = 22; binding cluster OtaSoftwareUpdateProvider; + server cluster Descriptor { + callback attribute deviceList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap; + callback attribute clusterRevision default = 1; + } + server cluster AccessControl { callback attribute acl; callback attribute extension; @@ -945,6 +968,15 @@ endpoint 0 { endpoint 65534 { device type anonymousEndpointType = 61442; + server cluster Descriptor { + callback attribute deviceList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap; + callback attribute clusterRevision default = 1; + } + server cluster NetworkCommissioning { callback attribute maxNetworks; callback attribute networks; 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 0eb046b497c634..18fdc9c37ea411 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 71, + "featureLevel": 76, "creator": "zap", "keyValuePairs": [ { @@ -19,14 +19,16 @@ { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", - "version": "ZCL Test Data", - "type": "zcl-properties" + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/app-templates.json", - "version": "chip-v1", - "type": "gen-templates-json" + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -79,7 +81,6 @@ "define": "IDENTIFY_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "identify time", @@ -566,7 +567,6 @@ "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "OnOff", @@ -701,7 +701,6 @@ "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "current level", @@ -737,15 +736,209 @@ } ] }, + { + "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": "device list", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "server list", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "client list", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "parts list", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "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": "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Access Control", "code": 31, "mfgCode": null, "define": "ACCESS_CONTROL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Access Control", @@ -754,7 +947,6 @@ "define": "ACCESS_CONTROL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ACL", @@ -893,7 +1085,6 @@ "define": "BASIC_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -920,7 +1111,6 @@ "define": "BASIC_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "DataModelRevision", @@ -1415,7 +1605,6 @@ "define": "OTA_REQUESTOR_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "DefaultOtaProviders", @@ -1537,9 +1726,7 @@ "mfgCode": null, "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Localization Configuration", @@ -1548,7 +1735,6 @@ "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ActiveLocale", @@ -1622,9 +1808,7 @@ "mfgCode": null, "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Time Format Localization", @@ -1633,7 +1817,6 @@ "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "HourFormat", @@ -1723,9 +1906,7 @@ "mfgCode": null, "define": "UNIT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Unit Localization", @@ -1734,7 +1915,6 @@ "define": "UNIT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "TemperatureUnit", @@ -2042,8 +2222,7 @@ "incoming": 1, "outgoing": 0 } - ], - "attributes": [] + ] }, { "name": "Network Commissioning", @@ -2248,7 +2427,6 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -2496,8 +2674,7 @@ "incoming": 1, "outgoing": 0 } - ], - "attributes": [] + ] }, { "name": "AdministratorCommissioning", @@ -2506,7 +2683,6 @@ "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "WindowStatus", @@ -3044,9 +3220,7 @@ "mfgCode": null, "define": "FIXED_LABEL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Fixed Label", @@ -3055,7 +3229,6 @@ "define": "FIXED_LABEL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "label list", @@ -3113,9 +3286,7 @@ "mfgCode": null, "define": "USER_LABEL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "User Label", @@ -3124,7 +3295,6 @@ "define": "USER_LABEL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "label list", @@ -3307,7 +3477,6 @@ "define": "DOOR_LOCK_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "LockState", @@ -3666,7 +3835,6 @@ "define": "BARRIER_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "barrier moving state", @@ -3897,7 +4065,6 @@ "define": "COLOR_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "CurrentHue", @@ -4724,7 +4891,6 @@ "define": "TEMP_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -4751,7 +4917,6 @@ "define": "TEMP_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MeasuredValue", @@ -4818,25 +4983,39 @@ "reportableChange": 0 } ] - }, + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-secondary-network-commissioning", + "deviceTypeCode": 61442, + "deviceTypeProfileId": 259, + "clusters": [ { - "name": "IAS Zone", - "code": 1280, + "name": "Descriptor", + "code": 29, "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", + "define": "DESCRIPTOR_CLUSTER", "side": "client", "enabled": 0, - "commands": [ + "attributes": [ { - "name": "ZoneEnrollResponse", - "code": 0, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -4847,118 +5026,148 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "IAS Zone", - "code": 1280, + "name": "Descriptor", + "code": 29, "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", + "define": "DESCRIPTOR_CLUSTER", "side": "server", - "enabled": 0, - "commands": [ + "enabled": 1, + "attributes": [ { - "name": "ZoneStatusChangeNotification", + "name": "device list", "code": 0, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "ZoneEnrollRequest", + "name": "server list", "code": 1, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "zone state", - "code": 0, + "name": "client list", + "code": 2, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, "minInterval": 0, - "maxInterval": 65344, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "zone type", - "code": 1, + "name": "parts list", + "code": 3, "mfgCode": null, "side": "server", - "type": "enum16", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, "minInterval": 0, - "maxInterval": 65344, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "zone status", - "code": 2, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap16", - "included": 1, + "type": "array", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "IAS CIE address", - "code": 16, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "node_id", - "included": 1, + "type": "array", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Zone ID", - "code": 17, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", + "included": 0, + "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": "0xff", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -4968,25 +5177,17 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, "minInterval": 0, - "maxInterval": 65344, + "maxInterval": 65534, "reportableChange": 0 } ] - } - ] - }, - { - "name": "Anonymous Endpoint Type", - "deviceTypeName": "MA-secondary-network-commissioning", - "deviceTypeCode": 61442, - "deviceTypeProfileId": 259, - "clusters": [ + }, { "name": "Network Commissioning", "code": 49, diff --git a/examples/pigweed-app/ameba/chip_main.cmake b/examples/pigweed-app/ameba/chip_main.cmake index 3f3b13ca620dbd..77e63b672d5e35 100644 --- a/examples/pigweed-app/ameba/chip_main.cmake +++ b/examples/pigweed-app/ameba/chip_main.cmake @@ -81,7 +81,6 @@ list( -DCHIP_HAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE= -DCONFIG_ENABLE_PW_RPC=1 - -DMATTER_PIGWEED_APP=1 ) if (matter_enable_persistentstorage_audit) diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index d294fde5d4cddf..ca1a1ec46e847d 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -88,12 +88,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -195,13 +195,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } client cluster OnOff = 6 { @@ -350,44 +350,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -397,7 +408,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -508,6 +519,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -689,7 +701,7 @@ client cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster GeneralCommissioning = 48 { @@ -751,7 +763,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -985,7 +997,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1236,7 +1248,6 @@ client cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1255,7 +1266,7 @@ client cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1301,8 +1312,8 @@ client cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1316,7 +1327,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1335,7 +1345,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1401,8 +1411,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -2544,7 +2554,7 @@ client cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationBasicApplication application = 4; @@ -2572,7 +2582,7 @@ server cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationBasicApplication application = 4; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index d294fde5d4cddf..ca1a1ec46e847d 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -88,12 +88,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -195,13 +195,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } client cluster OnOff = 6 { @@ -350,44 +350,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -397,7 +408,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -508,6 +519,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -689,7 +701,7 @@ client cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster GeneralCommissioning = 48 { @@ -751,7 +763,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -985,7 +997,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1236,7 +1248,6 @@ client cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1255,7 +1266,7 @@ client cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1301,8 +1312,8 @@ client cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1316,7 +1327,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1335,7 +1345,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1401,8 +1411,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -2544,7 +2554,7 @@ client cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationBasicApplication application = 4; @@ -2572,7 +2582,7 @@ server cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationBasicApplication application = 4; diff --git a/examples/platform/ameba/shell/launch_shell.cpp b/examples/platform/ameba/shell/launch_shell.cpp new file mode 100644 index 00000000000000..dba80a25d8b950 --- /dev/null +++ b/examples/platform/ameba/shell/launch_shell.cpp @@ -0,0 +1,42 @@ +/* + * + * 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 "launch_shell.h" + +#include "FreeRTOS.h" +#include "task.h" + +#include + +namespace { + +void MatterShellTask(void * args) +{ + chip::Shell::Engine::Root().RunMainLoop(); +} + +} // namespace + +namespace chip { + +void LaunchShell() +{ + chip::Shell::Engine::Root().Init(); + xTaskCreate(&MatterShellTask, "matter_shell", 2048, NULL, tskIDLE_PRIORITY + 1, NULL); +} + +} // namespace chip diff --git a/examples/platform/ameba/shell/launch_shell.h b/examples/platform/ameba/shell/launch_shell.h new file mode 100644 index 00000000000000..604584b58982bd --- /dev/null +++ b/examples/platform/ameba/shell/launch_shell.h @@ -0,0 +1,24 @@ +/* + * + * 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 + +namespace chip { + +void LaunchShell(); + +} diff --git a/examples/platform/linux/CommissionableInit.cpp b/examples/platform/linux/CommissionableInit.cpp index 8bb9ed90f42924..24fc347153c053 100644 --- a/examples/platform/linux/CommissionableInit.cpp +++ b/examples/platform/linux/CommissionableInit.cpp @@ -59,7 +59,7 @@ CHIP_ERROR InitCommissionableDataProvider(LinuxCommissionableDataProvider & prov if (options.discriminator.HasValue()) { - options.payload.discriminator = options.discriminator.Value(); + options.payload.discriminator.SetLongValue(options.discriminator.Value()); } else { @@ -72,7 +72,7 @@ CHIP_ERROR InitCommissionableDataProvider(LinuxCommissionableDataProvider & prov "given on command line. This is temporary and will disappear. Please update your scripts " "to explicitly configure discriminator. ***", static_cast(defaultTestDiscriminator)); - options.payload.discriminator = defaultTestDiscriminator; + options.payload.discriminator.SetLongValue(defaultTestDiscriminator); } // Default to minimum PBKDF iterations @@ -84,7 +84,7 @@ CHIP_ERROR InitCommissionableDataProvider(LinuxCommissionableDataProvider & prov ChipLogError(Support, "PASE PBKDF iterations set to %u", static_cast(spake2pIterationCount)); return provider.Init(options.spake2pVerifier, options.spake2pSalt, spake2pIterationCount, setupPasscode, - options.payload.discriminator); + options.payload.discriminator.GetLongValue()); } CHIP_ERROR InitConfigurationManager(ConfigurationManagerImpl & configManager, LinuxDeviceOptions & options) diff --git a/examples/platform/linux/CommissionerMain.cpp b/examples/platform/linux/CommissionerMain.cpp index 18b86e1051fe99..d70ead1203cfdf 100644 --- a/examples/platform/linux/CommissionerMain.cpp +++ b/examples/platform/linux/CommissionerMain.cpp @@ -234,7 +234,7 @@ class PairingCommand : public Controller::DevicePairingDelegate private: #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); chip::Callback::Callback mOnDeviceConnectedCallback; chip::Callback::Callback mOnDeviceConnectionFailureCallback; @@ -333,7 +333,7 @@ void PairingCommand::OnDeviceConnectedFn(void * context, chip::OperationalDevice } } -void PairingCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR err) +void PairingCommand::OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR err) { ChipLogProgress(Controller, "OnDeviceConnectionFailureFn - attempt to get OperationalDeviceProxy failed"); CommissionerDiscoveryController * cdc = GetCommissionerDiscoveryController(); diff --git a/examples/platform/linux/NamedPipeCommands.cpp b/examples/platform/linux/NamedPipeCommands.cpp index 63bad2eb072ccd..4d78cd4c87aab6 100644 --- a/examples/platform/linux/NamedPipeCommands.cpp +++ b/examples/platform/linux/NamedPipeCommands.cpp @@ -24,7 +24,7 @@ #include #include -static constexpr const size_t kChipEventCmdBufSize = 80; +static constexpr const size_t kChipEventCmdBufSize = 256; CHIP_ERROR NamedPipeCommands::Start(std::string & path, NamedPipeCommandDelegate * delegate) { diff --git a/examples/platform/linux/NamedPipeCommands.h b/examples/platform/linux/NamedPipeCommands.h index 16b8cd4cd32c2a..4f908de28748d0 100644 --- a/examples/platform/linux/NamedPipeCommands.h +++ b/examples/platform/linux/NamedPipeCommands.h @@ -24,8 +24,8 @@ class NamedPipeCommandDelegate { public: - virtual ~NamedPipeCommandDelegate() = default; - virtual void OnEventCommandReceived(const char * payload) = 0; + virtual ~NamedPipeCommandDelegate() = default; + virtual void OnEventCommandReceived(const char * json) = 0; }; class NamedPipeCommands diff --git a/examples/platform/nxp/k32w/k32w0/app/ldscripts/chip-k32w061-linker.ld b/examples/platform/nxp/k32w/k32w0/app/ldscripts/chip-k32w0x-linker.ld similarity index 93% rename from examples/platform/nxp/k32w/k32w0/app/ldscripts/chip-k32w061-linker.ld rename to examples/platform/nxp/k32w/k32w0/app/ldscripts/chip-k32w0x-linker.ld index 3bb028d183d9dd..359a9ef790336d 100644 --- a/examples/platform/nxp/k32w/k32w0/app/ldscripts/chip-k32w061-linker.ld +++ b/examples/platform/nxp/k32w/k32w0/app/ldscripts/chip-k32w0x-linker.ld @@ -28,7 +28,7 @@ /** * @file - * GCC linker script for K32W061. + * GCC linker script for K32W061/K32W041. */ OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") @@ -58,13 +58,15 @@ m_app_start = DEFINED(__app_load_address__) ? __app_load_address__ : m_app_meta_data = 0x400; /* 640K (Total Flash size) - 16K (SSBL + SSBL update region) - 8.5K (PSECT) - m_app_meta_data */ -m_app_size = DEFINED(__app_stated_size__) ? __app_stated_size__ : 0x9FC00; +m_app_size = DEFINED(__app_stated_size__) ? __app_stated_size__ : 0x9DE00; MEMORY { - Flash640 (rx) : ORIGIN = m_app_start, LENGTH = m_app_size - RAM0 (rwx) : ORIGIN = 0x4000400, LENGTH = 0x0015c00 /* 87K bytes (alias RAM) */ - RAM1 (rwx) : ORIGIN = 0x4020000, LENGTH = 0x10000 /* 64K bytes (alias RAM2) */ + Flash640 (rx) : ORIGIN = m_app_start, LENGTH = m_app_size + + SCRATCH_RAM(rwx) : ORIGIN = 0x4000000, LENGTH = 0x400 /* 1K bytes (alias SCRATCH_RAM) */ + RAM0 (rwx) : ORIGIN = 0x4000400, LENGTH = 0x0015c00 /* 87K bytes (alias RAM) */ + RAM1 (rwx) : ORIGIN = 0x4020000, LENGTH = 0x10000 /* 64K bytes (alias RAM2) */ } /* Define a symbol for the top of each memory region */ @@ -234,6 +236,13 @@ SECTIONS . = ALIGN(4); __interrupts_ram_end__ = .; /* Define a global symbol at data end */ } > RAM0 + .scratch_area (NOLOAD): ALIGN(4) + { + __scratch_area_start__ = .; + . = ALIGN(4) ; + . += 0x400; + __scratch_area_top__ = .; + } > SCRATCH_RAM /* MAIN DATA SECTION */ .uninit_RESERVED : ALIGN(4) @@ -340,6 +349,8 @@ SECTIONS PROVIDE(Chip_LOWPOWER_ChipSoftwareReset = 0x03003fa1); PROVIDE(_pvHeapStart = _heap); PROVIDE(_pvHeapLimit = _pvHeapStart + (HEAP_SIZE)); + PROVIDE(_scratch_buf_start = __scratch_area_start__); + PROVIDE(_scratch_buf_end = __scratch_area_top__); __StackLimit = _vStackTop - STACK_SIZE; } diff --git a/examples/platform/nxp/k32w/k32w0/app/project_include/OpenThreadConfig.h b/examples/platform/nxp/k32w/k32w0/app/project_include/OpenThreadConfig.h index 667574786bb91e..ef95988da9ab24 100644 --- a/examples/platform/nxp/k32w/k32w0/app/project_include/OpenThreadConfig.h +++ b/examples/platform/nxp/k32w/k32w0/app/project_include/OpenThreadConfig.h @@ -96,6 +96,8 @@ #undef OPENTHREAD_CONFIG_PLATFORM_CSL_UNCERT +#define UART_USE_SERIAL_MGR 1 + //#define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG // Use the NXP-supplied default platform configuration for remainder diff --git a/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.c b/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.c index 5bdb70c6ee21fc..e6a445c1c086ff 100644 --- a/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.c +++ b/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.c @@ -236,7 +236,14 @@ extern void OTAIdleActivities(void); void vApplicationIdleHook(void) { + // Data queued by PDM will be written to external flash + // when PDM_vIdleTask is called. Interrupts are disabled + // to ensure there is no context switch during the actual + // writing, thus avoiding race conditions. + OSA_InterruptDisable(); PDM_vIdleTask(PDM_MAX_WRITES_INFINITE); + OSA_InterruptEnable(); + OTAIdleActivities(); BOARD_ActionOnIdle(); } diff --git a/examples/lighting-app/nxp/k32w/k32w0/detokenizer.py b/examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py similarity index 100% rename from examples/lighting-app/nxp/k32w/k32w0/detokenizer.py rename to examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py diff --git a/examples/platform/telink/project_include/OpenThreadConfig.h b/examples/platform/telink/project_include/OpenThreadConfig.h index d7826919cac308..cbd5e19f591da5 100644 --- a/examples/platform/telink/project_include/OpenThreadConfig.h +++ b/examples/platform/telink/project_include/OpenThreadConfig.h @@ -42,62 +42,14 @@ #define OPENTHREAD_CONFIG_ENABLE_DEBUG_UART 1 -#undef OPENTHREAD_CONFIG_LOG_API -#define OPENTHREAD_CONFIG_LOG_API 0 - -#undef OPENTHREAD_CONFIG_LOG_ARP -#define OPENTHREAD_CONFIG_LOG_ARP 0 - -#undef OPENTHREAD_CONFIG_LOG_BB -#define OPENTHREAD_CONFIG_LOG_BBR 0 - #undef OPENTHREAD_CONFIG_LOG_CLI #define OPENTHREAD_CONFIG_LOG_CLI 0 -#undef OPENTHREAD_CONFIG_LOG_COAP -#define OPENTHREAD_CONFIG_LOG_COAP 0 - -#undef OPENTHREAD_CONFIG_LOG_DUA -#define OPENTHREAD_CONFIG_LOG_DUA 0 - -#undef OPENTHREAD_CONFIG_LOG_ICMP -#define OPENTHREAD_CONFIG_LOG_ICMP 0 - -#undef OPENTHREAD_CONFIG_LOG_IP6 -#define OPENTHREAD_CONFIG_LOG_IP6 0 - -#undef OPENTHREAD_CONFIG_LOG_MAC -#define OPENTHREAD_CONFIG_LOG_MAC 0 - -#undef OPENTHREAD_CONFIG_LOG_MEM -#define OPENTHREAD_CONFIG_LOG_MEM 0 - -#undef OPENTHREAD_CONFIG_LOG_MESHCOP -#define OPENTHREAD_CONFIG_LOG_MESHCOP 0 - -#undef OPENTHREAD_CONFIG_LOG_MLE -#define OPENTHREAD_CONFIG_LOG_MLE 0 - -#undef OPENTHREAD_CONFIG_LOG_MLR -#define OPENTHREAD_CONFIG_LOG_MLR 0 - -#undef OPENTHREAD_CONFIG_LOG_NETDATA -#define OPENTHREAD_CONFIG_LOG_NETDATA 0 - -#undef OPENTHREAD_CONFIG_LOG_NETDIAG -#define OPENTHREAD_CONFIG_LOG_NETDIAG 0 - #undef OPENTHREAD_CONFIG_LOG_PKT_DUMP #define OPENTHREAD_CONFIG_LOG_PKT_DUMP 0 -#undef OPENTHREAD_CONFIG_LOG_SRP -#define OPENTHREAD_CONFIG_LOG_SRP 0 - #undef OPENTHREAD_CONFIG_LOG_PLATFORM #define OPENTHREAD_CONFIG_LOG_PLATFORM 0 #undef OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL #define OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL 0 - -#undef OPENTHREAD_CONFIG_LOG_PREPEND_REGION -#define OPENTHREAD_CONFIG_LOG_PREPEND_REGION 0 diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 6df0cd5539965f..0ee873ccb5a72c 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -116,44 +116,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -163,7 +174,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -245,7 +256,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -253,7 +264,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -282,6 +293,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -508,7 +520,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -735,7 +747,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster ThreadNetworkDiagnostics = 53 { @@ -896,7 +908,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -922,7 +933,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; @@ -991,8 +1002,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1061,10 +1072,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster PumpConfigurationAndControl = 512 { diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 20890f9d4fa567..7ea1db01b01dd7 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -160,7 +160,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -168,7 +168,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -197,6 +197,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -423,7 +424,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -650,7 +651,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster ThreadNetworkDiagnostics = 53 { @@ -811,7 +812,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -837,7 +837,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; @@ -906,8 +906,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -976,10 +976,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } client cluster PumpConfigurationAndControl = 512 { diff --git a/examples/shell/nxp/k32w/k32w0/BUILD.gn b/examples/shell/nxp/k32w/k32w0/BUILD.gn index 505373a42bf860..f6c4039783a5dd 100644 --- a/examples/shell/nxp/k32w/k32w0/BUILD.gn +++ b/examples/shell/nxp/k32w/k32w0/BUILD.gn @@ -57,7 +57,7 @@ k32w0_sdk("sdk") { } k32w0_executable("shell_app") { - output_name = "chip-k32w061-shell-example" + output_name = "chip-k32w0x-shell-example" sources = [ "${k32w0_platform_dir}/util/LEDWidget.cpp", @@ -79,7 +79,7 @@ k32w0_executable("shell_app") { output_dir = root_out_dir - ldscript = "${k32w0_platform_dir}/app/ldscripts/chip-k32w061-linker.ld" + ldscript = "${k32w0_platform_dir}/app/ldscripts/chip-k32w0x-linker.ld" inputs = [ ldscript ] diff --git a/examples/temperature-measurement-app/esp32/README.md b/examples/temperature-measurement-app/esp32/README.md index 6cf02bedbfd4d2..132a754a4a9ae8 100644 --- a/examples/temperature-measurement-app/esp32/README.md +++ b/examples/temperature-measurement-app/esp32/README.md @@ -57,6 +57,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). $ source ./scripts/activate.sh +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - Target Select $ idf.py set-target esp32(or esp32c3) @@ -171,8 +179,8 @@ the ESP32 all-clusters-app to commission it onto a Wi-Fi network: Parameters: -1. Discriminator: 3840 (configurable through menuconfig) -2. Setup-pin-code: 20202021 (configurable through menuconfig) +1. Discriminator: 3840 +2. Setup-pin-code: 20202021 3. Node-id: 12344321 (you can assign any node id) ### Cluster control diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index cf3ab81c21d6b2..1dd938ce8febaa 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -65,7 +65,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -73,7 +73,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -100,6 +100,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -237,7 +238,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -497,7 +498,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -651,7 +652,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -677,7 +677,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -743,8 +743,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -810,10 +810,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/examples/thermostat/efr32/.gn b/examples/thermostat/efr32/.gn new file mode 100644 index 00000000000000..0ff42d50e06ef0 --- /dev/null +++ b/examples/thermostat/efr32/.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + import("//args.gni") +} diff --git a/examples/thermostat/efr32/BUILD.gn b/examples/thermostat/efr32/BUILD.gn new file mode 100644 index 00000000000000..435bf123f75764 --- /dev/null +++ b/examples/thermostat/efr32/BUILD.gn @@ -0,0 +1,338 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/efr32_sdk.gni") +import("//build_overrides/pigweed.gni") + +import("${build_root}/config/defaults.gni") +import("${efr32_sdk_build_root}/efr32_executable.gni") +import("${efr32_sdk_build_root}/efr32_sdk.gni") + +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") +import("${chip_root}/src/platform/device.gni") + +if (chip_enable_pw_rpc) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_build/target_types.gni") +} + +assert(current_os == "freertos") + +efr32_project_dir = "${chip_root}/examples/thermostat/efr32" +examples_plat_dir = "${chip_root}/examples/platform/efr32" + +declare_args() { + # Dump memory usage at link time. + chip_print_memory_usage = false + + # PIN code for PASE session establishment. + setupPinCode = 20202021 + setupDiscriminator = 3840 + + # Monitor & log memory usage at runtime. + enable_heap_monitoring = false + + # Enable Sleepy end device + enable_sleepy_device = false + + # OTA timeout in seconds + OTA_periodic_query_timeout = 86400 + + # Wifi related stuff - they are overridden by gn -args="use_wf200=true" + use_wf200 = false + use_rs911x = false + use_rs911x_sockets = false + sl_wfx_config_softap = false + sl_wfx_config_scan = true + + # Disable LCD on supported devices + disable_lcd = false + + # Argument to Disable IPv4 for wifi(rs911) + chip_enable_wifi_ipv4 = false +} + +declare_args() { + # Enables LCD Qr Code on supported devices + show_qr_code = !disable_lcd +} + +# qr code cannot be true if lcd is disabled +assert(!(disable_lcd && show_qr_code)) + +# Sanity check +assert(!(chip_enable_wifi && chip_enable_openthread)) +assert(!(use_rs911x && chip_enable_openthread)) +assert(!(use_wf200 && chip_enable_openthread)) +if (chip_enable_wifi) { + assert(use_rs911x || use_wf200) +} + +# BRD4166A --> ThunderBoard Sense 2 (No LCD) +if (efr32_board == "BRD4166A" || efr32_board == "BRD4180A") { + show_qr_code = false + disable_lcd = true +} + +# WiFi settings +if (chip_enable_wifi) { + wifi_sdk_dir = "${chip_root}/third_party/silabs/matter_support/matter/wifi" + efr32_lwip_defs = [ "LWIP_NETIF_API=1" ] + efr32_lwip_defs += [ + "LWIP_IPV4=1", + "LWIP_ARP=1", + "LWIP_ICMP=1", + "LWIP_DHCP=1", + "LWIP_IPV6_ND=1", + "LWIP_IGMP=1", + ] + + if (use_rs911x) { + wiseconnect_sdk_root = + "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk" + import("${wifi_sdk_dir}/rs911x/rs911x.gni") + } else { + import("${wifi_sdk_dir}/wf200/wf200.gni") + } +} + +efr32_sdk("sdk") { + sources = [ + "${efr32_project_dir}/include/CHIPProjectConfig.h", + "${examples_plat_dir}/FreeRTOSConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/EFR32", + "${efr32_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + ] + + defines = [ + "BOARD_ID=${efr32_board}", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}", + "OTA_PERIODIC_TIMEOUT=${OTA_periodic_query_timeout}", + ] + + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + + # WiFi Settings + if (chip_enable_wifi) { + if (use_rs911x) { + defines += rs911x_defs + include_dirs += rs911x_plat_incs + } else if (use_wf200) { + defines += wf200_defs + include_dirs += wf200_plat_incs + } + + if (use_rs911x_sockets) { + include_dirs += [ "${examples_plat_dir}/wifi/rsi-sockets" ] + defines += rs911x_sock_defs + } else { + # Using LWIP instead of the native TCP/IP stack + defines += efr32_lwip_defs + } + + if (sl_wfx_config_softap) { + defines += [ "SL_WFX_CONFIG_SOFTAP" ] + } + if (sl_wfx_config_scan) { + defines += [ "SL_WFX_CONFIG_SCAN" ] + } + } +} + +efr32_executable("thermostat_app") { + output_name = "chip-efr32-thermostat-example.out" + include_dirs = [ "include" ] + defines = [] + + sources = [ + "${examples_plat_dir}/LEDWidget.cpp", + "${examples_plat_dir}/efr32_utils.cpp", + "${examples_plat_dir}/heap_4_silabs.c", + "${examples_plat_dir}/init_efrPlatform.cpp", + "${examples_plat_dir}/matter_config.cpp", + "src/AppTask.cpp", + "src/ZclCallbacks.cpp", + "src/main.cpp", + ] + + if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli) { + sources += [ "${examples_plat_dir}/uart.cpp" ] + } + + deps = [ + ":sdk", + "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/examples/thermostat/thermostat-common", + "${chip_root}/src/lib", + "${chip_root}/src/setup_payload", + ] + + # OpenThread Settings + if (chip_enable_openthread) { + deps += [ + "${chip_root}/third_party/openthread/platforms:libopenthread-platform", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${examples_plat_dir}:efr-matter-shell", + ] + if (chip_openthread_ftd) { + deps += [ + "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", + "${chip_root}/third_party/openthread/repo:libopenthread-ftd", + ] + } else { + deps += [ + "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", + "${chip_root}/third_party/openthread/repo:libopenthread-mtd", + ] + } + } + + # Attestation Credentials + if (chip_build_platform_attestation_credentials_provider) { + deps += [ "${examples_plat_dir}:efr32-attestation-credentials" ] + } + + if (chip_enable_ota_requestor) { + defines += [ "EFR32_OTA_ENABLED" ] + sources += [ "${examples_plat_dir}/OTAConfig.cpp" ] + } + + if (chip_enable_wifi_ipv4) { + defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ] + } + + # WiFi Settings + if (chip_enable_wifi) { + if (use_rs911x) { + sources += rs911x_src_plat + + # All the stuff from wiseconnect + sources += rs911x_src_sapi + + # Apparently - the rsi library needs this (though we may not use use it) + sources += rs911x_src_sock + include_dirs += rs911x_inc_plat + + if (use_rs911x_sockets) { + # + # Using native sockets inside RS911x + # + include_dirs += rs911x_sock_inc + } else { + # + # We use LWIP - not built-in sockets + # + sources += rs911x_src_lwip + } + } else if (use_wf200) { + sources += wf200_plat_src + include_dirs += wf200_plat_incs + } + } + + if (!disable_lcd) { + sources += [ "${examples_plat_dir}/display/lcd.c" ] + defines += [ "DISPLAY_ENABLED" ] + if (show_qr_code) { + defines += [ "QR_CODE_ENABLED" ] + deps += [ "${chip_root}/examples/common/QRCode" ] + } + } + + if (chip_enable_pw_rpc) { + defines += [ + "PW_RPC_ENABLED", + "PW_RPC_ATTRIBUTE_SERVICE=1", + "PW_RPC_BUTTON_SERVICE=1", + "PW_RPC_DESCRIPTOR_SERVICE=1", + "PW_RPC_DEVICE_SERVICE=1", + "PW_RPC_LIGHTING_SERVICE=1", + ] + + sources += [ + "${chip_root}/examples/common/pigweed/RpcService.cpp", + "${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp", + "${examples_plat_dir}/PigweedLogger.cpp", + "${examples_plat_dir}/Rpc.cpp", + ] + + deps += [ + "$dir_pw_hdlc:rpc_channel_output", + "$dir_pw_stream:sys_io_stream", + "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", + "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", + "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32", + ] + + deps += pw_build_LINK_DEPS + + include_dirs += [ + "${chip_root}/examples/common", + "${chip_root}/examples/common/pigweed/efr32", + ] + } + + if (enable_heap_monitoring) { + sources += [ "${examples_plat_dir}/MemMonitoring.cpp" ] + defines += [ "HEAP_MONITORING" ] + } + + ldscript = "${examples_plat_dir}/ldscripts/${efr32_family}.ld" + + inputs = [ ldscript ] + + ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] + + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + # WiFi Settings + if (chip_enable_wifi) { + ldflags += [ + "-Wl,--defsym", + "-Wl,SILABS_WIFI=1", + ] + } + + output_dir = root_out_dir +} + +group("efr32") { + deps = [ ":thermostat_app" ] +} + +group("default") { + deps = [ ":efr32" ] +} diff --git a/examples/thermostat/efr32/README.md b/examples/thermostat/efr32/README.md new file mode 100644 index 00000000000000..35cbeefad50b4a --- /dev/null +++ b/examples/thermostat/efr32/README.md @@ -0,0 +1,360 @@ +# CHIP EFR32 Light Switch Example + +An example showing the use of CHIP on the Silicon Labs EFR32 MG12. + +
+ +- [CHIP EFR32 Light Switch Example](#chip-efr32-light-switch-example) + - [Introduction](#introduction) + - [Building](#building) + - [Note](#note) + - [Flashing the Application](#flashing-the-application) + - [Viewing Logging Output](#viewing-logging-output) + - [Running the Complete Example](#running-the-complete-example) + - [Notes](#notes) + - [Running RPC console](#running-rpc-console) + - [Memory settings](#memory-settings) + - [OTA Software Update](#ota-software-update) + +
+ + + +## Introduction + +The EFR32 light switch example provides a baseline demonstration of a on-off +light switch device, built using CHIP and the Silicon Labs gecko SDK. It can be +controlled by a Chip controller over Openthread network. + +The EFR32 device can be commissioned over Bluetooth Low Energy where the device +and the Chip controller will exchange security information with the Rendez-vous +procedure. Thread Network credentials are then provided to the EFR32 device +which will then join the network. + +The LCD on the Silabs WSTK shows a QR Code containing the needed commissioning +information for the BLE connection and starting the Rendez-vous procedure. + +The light switch example is intended to serve both as a means to explore the +workings of CHIP as well as a template for creating real products based on the +Silicon Labs platform. + + + +## Building + +- Download the + [Simplicity Commander](https://www.silabs.com/mcu/programming-options) + command line tool, and ensure that `commander` is your shell search path. + (For Mac OS X, `commander` is located inside + `Commander.app/Contents/MacOS/`.) + +- Download and install a suitable ARM gcc tool chain: + [GNU Arm Embedded Toolchain 9-2019-q4-major](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads) + +- Install some additional tools(likely already present for CHIP developers): + +#### Linux + + $ sudo apt-get install git libwebkitgtk-1.0-0 ninja-build``` + +#### Mac OS X + + $ brew install ninja + +- Supported hardware: + + MG12 boards: + + - BRD4161A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm + - BRD4164A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm + - BRD4166A / SLTB004A / Thunderboard Sense 2 / 2.4GHz@10dBm + - BRD4170A / SLWSTK6000B / Multiband Wireless Starter Kit / 2.4GHz@19dBm, + 915MHz@19dBm + - BRD4304A / SLWSTK6000B / MGM12P Module / 2.4GHz@19dBm + + MG21 boards: Currently not supported due to RAM limitation. + + - BRD4180A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + + MG24 boards : + + - BRD4186A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4187A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + +* Build the example application: + + cd ~/connectedhomeip + ./scripts/examples/gn_efr32_example.sh ./examples/thermostat/efr32/ ./out/thermostat-app BRD4161A + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip + $ rm -rf ./out/ + + OR use GN/Ninja directly + + $ cd ~/connectedhomeip/examples/thermostat/efr32 + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export EFR32_BOARD=BRD4161A + $ gn gen out/debug + $ ninja -C out/debug + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip/examples/thermostat/efr32 + $ rm -rf out/ + +* Build the example with Matter shell + + ./scripts/examples/gn_efr32_example.sh examples/thermostat/efr32/ out/thermostat-app BRD4161A chip_build_libshell=true + +* Build the example as Sleepy End Device (SED) + + $ ./scripts/examples/gn_efr32_example.sh ./examples/thermostat/efr32/ ./out/thermostat-app_SED BRD4161A --sed + + or use gn as previously mentioned but adding the following arguments: + + $ gn gen out/debug '--args=efr32_board="BRD4161A" enable_sleepy_device=true chip_openthread_ftd=false chip_build_libshell=true' + +* Build the example with pigweed RCP + + $ ./scripts/examples/gn_efr32_example.sh examples/thermostat/efr32/ out/thermostat-app_rpc BRD4161A 'import("//with_pw_rpc.gni")' + + or use GN/Ninja Directly + + $ cd ~/connectedhomeip/examples/thermostat/efr32 + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export EFR32_BOARD=BRD4161A + $ gn gen out/debug --args='import("//with_pw_rpc.gni")' + $ ninja -C out/debug + + [Running Pigweed RPC console](#running-pigweed-rpc-console) + +For more build options, help is provided when running the build script without +arguments + + ./scripts/examples/gn_efr32_example.sh + + + +## Flashing the Application + +- On the command line: + + $ cd ~/connectedhomeip/examples/thermostat/efr32 + $ python3 out/debug/chip-efr32-thermostat-switch-example.flash.py + +- Or with the Ozone debugger, just load the .out file. + + + +## Viewing Logging Output + +The example application is built to use the SEGGER Real Time Transfer (RTT) +facility for log output. RTT is a feature built-in to the J-Link Interface MCU +on the WSTK development board. It allows bi-directional communication with an +embedded application without the need for a dedicated UART. + +Using the RTT facility requires downloading and installing the _SEGGER J-Link +Software and Documentation Pack_ +([web site](https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack)). + +Alternatively, SEGGER Ozone J-Link debugger can be used to view RTT logs too +after flashing the .out file. + +- Download the J-Link installer by navigating to the appropriate URL and + agreeing to the license agreement. + +- [JLink_Linux_x86_64.deb](https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.deb) +- [JLink_MacOSX.pkg](https://www.segger.com/downloads/jlink/JLink_MacOSX.pkg) + +* Install the J-Link software + + $ cd ~/Downloads + $ sudo dpkg -i JLink_Linux_V*_x86_64.deb + +* In Linux, grant the logged in user the ability to talk to the development + hardware via the linux tty device (/dev/ttyACMx) by adding them to the + dialout group. + + $ sudo usermod -a -G dialout ${USER} + +Once the above is complete, log output can be viewed using the JLinkExe tool in +combination with JLinkRTTClient as follows: + +- Run the JLinkExe tool with arguments to autoconnect to the WSTK board: + + For MG12 use: + + $ JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1 + + For MG21 use: + + $ JLinkExe -device EFR32MG21AXXXF1024 -if SWD -speed 4000 -autoconnect 1 + +- In a second terminal, run the JLinkRTTClient to view logs: + + $ JLinkRTTClient + + + +## Running the Complete Example + +- It is assumed here that you already have an OpenThread border router + configured and running. If not see the following guide + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + for more information on how to setup a border router on a raspberryPi. + + Take note that the RCP code is available directly through + [Simplicity Studio 5](https://www.silabs.com/products/development-tools/software/simplicity-studio/simplicity-studio-5) + under File->New->Project Wizard->Examples->Thread : ot-rcp + +- For this example to work, it is necessary to have a second efr32 device + running the + [thermostat app example](https://github.com/project-chip/connectedhomeip/blob/master/examples/thermostat/efr32/README.md) + commissioned on the same openthread network + +- User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR + Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over + BLE + + * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, + a URL can be found in the RTT logs. + + [SVR] Copy/paste the below URL in a browser to see the QR Code: + [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 + + **LED 0** shows the overall state of the device and its connectivity. The + following states are possible: + + - Short Flash On (50 ms on/950 ms off): The device is in the + unprovisioned (unpaired) state and is waiting for a commissioning + application to connect. + + - Rapid Even Flashing (100 ms on/100 ms off): The device is in the + unprovisioned state and a commissioning application is connected through + Bluetooth LE. + + - Short Flash Off (950ms on/50ms off): The device is fully + provisioned, but does not yet have full Thread network or service + connectivity. + + - Solid On: The device is fully provisioned and has full Thread + network and service connectivity. + + **Push Button 0** + + - _Press and Release_ : Start, or restart, BLE advertisement in fast mode. It will advertise in this mode + for 30 seconds. The device will then switch to a slower interval advertisement. + After 15 minutes, the advertisement stops. + + - _Pressed and hold for 6 s_ : Initiates the factory reset of the device. + Releasing the button within the 6-second window cancels the factory reset + procedure. **LEDs** blink in unison when the factory reset procedure is + initiated. + +* You can provision and control the Chip device using the python controller, + [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + standalone, Android or iOS app + + Here is an example with the CHIPTool: + + ``` + chip-tool pairing ble-thread 1 hex: 20202021 3840 + ``` + +### Notes + +- Depending on your network settings your router might not provide native ipv6 + addresses to your devices (Border router / PC). If this is the case, you + need to add a static ipv6 addresses on both device and then an ipv6 route to + the border router on your PC + +#### On Border Router: + +`$ sudo ip addr add dev 2002::2/64` + +#### On PC(Linux): + +`$ sudo ip addr add dev 2002::1/64` + +#Add Ipv6 route on PC(Linux) \$ sudo ip route add /64 +via 2002::2 + + + +## Running RPC console + +- As part of building the example with RPCs enabled the chip_rpc python + interactive console is installed into your venv. The python wheel files are + also created in the output folder: out/debug/chip_rpc_console_wheels. To + install the wheel files without rebuilding: + + `pip3 install out/debug/chip_rpc_console_wheels/*.whl` + +- To use the chip-rpc console after it has been installed run: + + `chip-console --device /dev/tty. -b 115200 -o //pw_log.out` + +- Then you can simulate a button press or release using the following command + where : idx = 0 or 1 for Button PB0 or PB1 action = 0 for PRESSED, 1 for + RELEASE Test toggling the LED with + + `rpcs.chip.rpc.Button.Event(idx=1, pushed=True)` + +## Memory settings + +While most of the RAM usage in CHIP is static, allowing easier debugging and +optimization with symbols analysis, we still need some HEAP for the crypto and +OpenThread. Size of the HEAP can be modified by changing the value of the +`configTOTAL_HEAP_SIZE` define inside of the FreeRTOSConfig.h file of this +example. Please take note that a HEAP size smaller than 13k can and will cause a +Mbedtls failure during the BLE rendez-vous or CASE session + +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/efr32/MemMonitoring.cpp` to add your own memory +tracking code inside the `trackAlloc` and `trackFree` function + +## OTA Software Update + +For the description of Software Update process with EFR32 example applications +see +[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) + +## Building options + +All of Silabs's examples within the Matter repo have all the features enabled by +default, as to provide the best end user experience. However some of those +features can easily be toggled on or off. Here is a short list of options : + +### Disabling logging + +chip_progress_logging, chip_detail_logging, chip_automation_logging + + $ ./scripts/examples/gn_efr32_example.sh ./examples/thermostat/efr32 ./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_efr32_example.sh ./examples/thermostat/efr32 ./out/thermostat-app BRD4164A "is_debug=false" + +### Disabling LCD + +show_qr_code + + $ ./scripts/examples/gn_efr32_example.sh ./examples/thermostat/efr32 ./out/thermostat-app BRD4164A "show_qr_code=false" + +### KVS maximum entry count + +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_efr32_example.sh ./examples/thermostat/efr32 ./out/thermostat-app BRD4164A kvs_max_entries=50 diff --git a/examples/thermostat/efr32/args.gni b/examples/thermostat/efr32/args.gni new file mode 100644 index 00000000000000..7df1c5e400f56f --- /dev/null +++ b/examples/thermostat/efr32/args.gni @@ -0,0 +1,26 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") +import("${chip_root}/src/platform/EFR32/args.gni") + +efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +chip_enable_ota_requestor = true + +pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" +pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +chip_enable_openthread = true +pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" diff --git a/examples/thermostat/efr32/build_for_wifi_args.gni b/examples/thermostat/efr32/build_for_wifi_args.gni new file mode 100644 index 00000000000000..4a3bdfd804ae19 --- /dev/null +++ b/examples/thermostat/efr32/build_for_wifi_args.gni @@ -0,0 +1,24 @@ +# 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/pigweed.gni") + +efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +chip_enable_openthread = false +import("${chip_root}/src/platform/EFR32/wifi_args.gni") + +chip_enable_ota_requestor = true + +pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" +pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" diff --git a/examples/thermostat/efr32/build_for_wifi_gnfile.gn b/examples/thermostat/efr32/build_for_wifi_gnfile.gn new file mode 100644 index 00000000000000..d391814190d09f --- /dev/null +++ b/examples/thermostat/efr32/build_for_wifi_gnfile.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_enable_wifi = true + import("//build_for_wifi_args.gni") +} diff --git a/examples/thermostat/efr32/build_overrides b/examples/thermostat/efr32/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/thermostat/efr32/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/thermostat/efr32/include/AppConfig.h b/examples/thermostat/efr32/include/AppConfig.h new file mode 100644 index 00000000000000..91501d889a6234 --- /dev/null +++ b/examples/thermostat/efr32/include/AppConfig.h @@ -0,0 +1,46 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +// ---- Lighting Example App Config ---- + +#define APP_TASK_NAME "Lit" + +// Time it takes in ms for the simulated actuator to move from one +// state to another. +#define ACTUATOR_MOVEMENT_PERIOS_MS 10 + +// EFR Logging +#ifdef __cplusplus +extern "C" { +#endif + +void efr32LogInit(void); + +void efr32Log(const char * aFormat, ...); +#define EFR32_LOG(...) efr32Log(__VA_ARGS__); +void appError(int err); + +#ifdef __cplusplus +} + +#include +void appError(CHIP_ERROR error); +#endif diff --git a/examples/thermostat/efr32/include/AppEvent.h b/examples/thermostat/efr32/include/AppEvent.h new file mode 100644 index 00000000000000..7a19b719edad25 --- /dev/null +++ b/examples/thermostat/efr32/include/AppEvent.h @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2018 Nest Labs, Inc. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +struct AppEvent; +typedef void (*EventHandler)(AppEvent *); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Button = 0, + kEventType_Timer, + kEventType_Light, + kEventType_Install, + }; + + uint16_t Type; + + union + { + struct + { + uint8_t Action; + } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + struct + { + uint8_t Action; + int32_t Actor; + } LightEvent; + }; + + EventHandler Handler; +}; diff --git a/examples/thermostat/efr32/include/AppTask.h b/examples/thermostat/efr32/include/AppTask.h new file mode 100644 index 00000000000000..357d2d97c4584a --- /dev/null +++ b/examples/thermostat/efr32/include/AppTask.h @@ -0,0 +1,222 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +/********************************************************** + * Includes + *********************************************************/ + +#include +#include + +#include "AppEvent.h" +#include "FreeRTOS.h" +#include "sl_simple_button_instances.h" +#include "timers.h" // provides FreeRTOS timer support +#include +#include +#include +#include + +/********************************************************** + * Defines + *********************************************************/ + +// Application-defined error codes in the CHIP_ERROR space. +#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01) +#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02) +#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) +#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) +#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) +#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) + +/********************************************************** + * AppTask Declaration + *********************************************************/ + +class AppTask +{ + +public: + /********************************************************** + * Public Function Declaration + *********************************************************/ + + /** + * @brief Create AppTask task and Event Queue + * If an error occurs during creation, application will hang after printing out error code + * + * @return CHIP_ERROR CHIP_NO_ERROR if no errors + */ + CHIP_ERROR StartAppTask(); + + /** + * @brief AppTask task main loop function + * + * @param pvParameter FreeRTOS task parameter + */ + static void AppTaskMain(void * pvParameter); + + /** + * @brief PostEvent function that add event to AppTask queue for processing + * + * @param event AppEvent to post + */ + void PostEvent(const AppEvent * event); + + /** + * @brief Event handler when a button is pressed + * Function posts an event for button processing + * + * @param buttonHandle APP_LIGHT_SWITCH or APP_FUNCTION_BUTTON + * @param btnAction button action - SL_SIMPLE_BUTTON_PRESSED, + * SL_SIMPLE_BUTTON_RELEASED or SL_SIMPLE_BUTTON_DISABLED + */ + void ButtonEventHandler(const sl_button_t * buttonHandle, uint8_t btnAction); + + /** + * @brief Callback called by the identify-server when an identify command is received + * + * @param identify identify structure the command applies on + */ + static void OnIdentifyStart(Identify * identify); + + /** + * @brief Callback called by the identify-server when an identify command is stopped or finished + * + * @param identify identify structure the command applies on + */ + static void OnIdentifyStop(Identify * identify); + + /** + * @brief Function called to start the LED light timer + */ + void StartLightTimer(void); + + /** + * @brief Function to stop LED light timer + * Turns off Status LED before stopping timer + */ + void CancelLightTimer(void); + +private: + /********************************************************** + * Private Function Declaration + *********************************************************/ + + friend AppTask & GetAppTask(void); + + /** + * @brief AppTask initialisation function + * + * @return CHIP_ERROR + */ + CHIP_ERROR Init(); + + /** + * @brief Function called to start the function timer + * + * @param aTimeoutMs timer duration in ms + */ + void StartFunctionTimer(uint32_t aTimeoutMs); + + /** + * @brief Function to stop function timer + */ + void CancelFunctionTimer(void); + + /** + * @brief Function call event callback function for processing + * + * @param event triggered event to be processed + */ + void DispatchEvent(AppEvent * event); + + /** + * @brief Function Timer finished callback function + * Post an FunctionEventHandler event + * + * @param xTimer timer that finished + */ + static void FunctionTimerEventHandler(TimerHandle_t xTimer); + + /** + * @brief Timer Event processing function + * Trigger factory if Press and Hold duration is respected + * + * @param aEvent post event being processed + */ + static void FunctionEventHandler(AppEvent * aEvent); + + /** + * @brief PB0 Button event processing function + * Press and hold will trigger a factory reset timer start + * Press and release will restart BLEAdvertising if not commisionned + * + * @param aEvent button event being processed + */ + static void ButtonHandler(AppEvent * aEvent); + + /** + * @brief PB1 Button event processing function + * Function triggers a thermostat action sent to the CHIP task + * + * @param aEvent button event being processed + */ + static void ThermostatActionEventHandler(AppEvent * aEvent); + + /** + * @brief Light Timer finished callback function + * Calls LED processing function + * + * @param xTimer timer that finished + */ + static void LightTimerEventHandler(TimerHandle_t xTimer); + + /** + * @brief Updates device LEDs + */ + static void LightEventHandler(); + + /********************************************************** + * Private Attributes declaration + *********************************************************/ + + enum Function_t + { + kFunction_NoneSelected = 0, + kFunction_SoftwareUpdate = 0, + kFunction_StartBleAdv = 1, + kFunction_FactoryReset = 2, + + kFunction_Invalid + } Function; + + Function_t mFunction; + bool mFunctionTimerActive; + bool mSyncClusterToButtonAction; + + static AppTask sAppTask; +}; + +inline AppTask & GetAppTask(void) +{ + return AppTask::sAppTask; +} diff --git a/examples/thermostat/efr32/include/CHIPProjectConfig.h b/examples/thermostat/efr32/include/CHIPProjectConfig.h new file mode 100644 index 00000000000000..5904b776cd601d --- /dev/null +++ b/examples/thermostat/efr32/include/CHIPProjectConfig.h @@ -0,0 +1,143 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @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. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + * 0x8005: example lighting app + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8004 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP service currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "0.1ALPHA" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION + * + * A uint32_t identifying the software version running on the device. + */ +/* The SoftwareVersion attribute of the Basic cluster. */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0001 +#endif + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote Chip Time service + * using the Chip Time Sync protocol. + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in Chip NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * @def CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL + * + * @brief + * Active retransmit interval, or time to wait before retransmission after + * subsequent failures in milliseconds. + * + * This is the default value, that might be adjusted by end device depending on its + * needs (e.g. sleeping period) using Service Discovery TXT record CRA key. + * + */ +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) + +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 diff --git a/examples/thermostat/efr32/src/AppTask.cpp b/examples/thermostat/efr32/src/AppTask.cpp new file mode 100644 index 00000000000000..e972594d078d2d --- /dev/null +++ b/examples/thermostat/efr32/src/AppTask.cpp @@ -0,0 +1,643 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/********************************************************** + * Includes + *********************************************************/ + +#include "AppTask.h" +#include "AppConfig.h" +#include "AppEvent.h" +#include "LEDWidget.h" +#include "sl_simple_led_instances.h" + +#ifdef DISPLAY_ENABLED +#include "lcd.h" +#ifdef QR_CODE_ENABLED +#include "qrcodegen.h" +#endif // QR_CODE_ENABLED +#endif // DISPLAY_ENABLED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if CHIP_ENABLE_OPENTHREAD +#include +#include +#include +#endif // CHIP_ENABLE_OPENTHREAD + +#ifdef SL_WIFI +#include "wfx_host_events.h" +#include +#include +#endif // SL_WIFI + +/********************************************************** + * Defines and Constants + *********************************************************/ + +#define FACTORY_RESET_TRIGGER_TIMEOUT 3000 +#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 +#define APP_TASK_STACK_SIZE (4096) +#define APP_TASK_PRIORITY 2 +#define APP_EVENT_QUEUE_SIZE 10 +#define EXAMPLE_VENDOR_ID 0xcafe + +#define SYSTEM_STATE_LED &sl_led_led0 + +#define APP_FUNCTION_BUTTON &sl_button_btn0 +#define APP_THERMOSTAT &sl_button_btn1 + +using namespace chip; +using namespace ::chip::DeviceLayer; + +namespace { + +/********************************************************** + * Variable declarations + *********************************************************/ + +TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer. +TimerHandle_t sLightTimer; + +TaskHandle_t sAppTaskHandle; +QueueHandle_t sAppEventQueue; + +LEDWidget sStatusLED; + +#ifdef SL_WIFI +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::SlWiFiDriver::GetInstance())); +#endif /* SL_WIFI */ + +#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) + +bool sIsProvisioned = false; +bool sIsEnabled = false; +bool sIsAttached = false; +bool sHaveBLEConnections = false; + +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED + +EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + +uint8_t sAppEventQueueBuffer[APP_EVENT_QUEUE_SIZE * sizeof(AppEvent)]; +StaticQueue_t sAppEventQueueStruct; + +StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; +StaticTask_t appTaskStruct; + +/********************************************************** + * Identify Callbacks + *********************************************************/ + +namespace { +void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) +{ + ChipLogProgress(Zcl, "Trigger Identify Complete"); + sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + GetAppTask().CancelLightTimer(); +#endif +} +} // namespace + +void OnTriggerIdentifyEffect(Identify * identify) +{ + ChipLogProgress(Zcl, "Trigger Identify Effect"); + sIdentifyEffect = identify->mCurrentEffectIdentifier; + + if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) + { + ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect varriant %d", + identify->mEffectVariant); + sIdentifyEffect = static_cast(identify->mEffectVariant); + } + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + GetAppTask().StartLightTimer(); +#endif + + switch (sIdentifyEffect) + { + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, + identify); + break; + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); + (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, + identify); + break; + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); + sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + break; + default: + ChipLogProgress(Zcl, "No identifier effect"); + } +} + +Identify gIdentify = { + chip::EndpointId{ 1 }, GetAppTask().OnIdentifyStart, + GetAppTask().OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + OnTriggerIdentifyEffect, +}; + +} // namespace + +using namespace chip::TLV; +using namespace ::chip::DeviceLayer; + +/********************************************************** + * AppTask Definitions + *********************************************************/ + +AppTask AppTask::sAppTask; + +CHIP_ERROR AppTask::StartAppTask() +{ + sAppEventQueue = xQueueCreateStatic(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent), sAppEventQueueBuffer, &sAppEventQueueStruct); + if (sAppEventQueue == NULL) + { + EFR32_LOG("Failed to allocate app event queue"); + appError(APP_ERROR_EVENT_QUEUE_FAILED); + } + + // Start App task. + sAppTaskHandle = xTaskCreateStatic(AppTaskMain, APP_TASK_NAME, ArraySize(appStack), NULL, 1, appStack, &appTaskStruct); + if (sAppTaskHandle == nullptr) + { + EFR32_LOG("Failed to create app task"); + appError(APP_ERROR_CREATE_TASK_FAILED); + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + +#ifdef SL_WIFI + /* + * Wait for the WiFi to be initialized + */ + EFR32_LOG("APP: Wait WiFi Init"); + while (!wfx_hw_ready()) + { + vTaskDelay(10); + } + EFR32_LOG("APP: Done WiFi Init"); + /* We will init server when we get IP */ + + sWiFiNetworkCommissioningInstance.Init(); +#endif + + // Create FreeRTOS sw timer for Function Selection. + sFunctionTimer = xTimerCreate("FnTmr", // Just a text name, not used by the RTOS kernel + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = app task obj context + FunctionTimerEventHandler // timer callback handler + ); + if (sFunctionTimer == NULL) + { + EFR32_LOG("funct timer create failed"); + appError(APP_ERROR_CREATE_TIMER_FAILED); + } + + // Create FreeRTOS sw timer for LED Management. + sLightTimer = xTimerCreate("LightTmr", // Text Name + 10, // Default timer period (mS) + true, // reload timer + (void *) this, // Timer Id + LightTimerEventHandler // Timer callback handler + ); + if (sLightTimer == NULL) + { + EFR32_LOG("Light Timer create failed"); + appError(APP_ERROR_CREATE_TIMER_FAILED); + } + + EFR32_LOG("Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + + LEDWidget::InitGpio(); + sStatusLED.Init(SYSTEM_STATE_LED); + + ConfigurationMgr().LogDeviceConfig(); + +// Print setup info on LCD if available +#ifdef QR_CODE_ENABLED + // Create buffer for QR code that can fit max size and null terminator. + char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; + chip::MutableCharSpan QRCode(qrCodeBuffer); + + if (GetQRCode(QRCode, chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)) == CHIP_NO_ERROR) + { + LCDWriteQRCode((uint8_t *) QRCode.data()); + } + else + { + EFR32_LOG("Getting QR code failed!"); + } +#else + PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE)); +#endif // QR_CODE_ENABLED + + return err; +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + AppEvent event; + + CHIP_ERROR err = sAppTask.Init(); + if (err != CHIP_NO_ERROR) + { + EFR32_LOG("AppTask.Init() failed"); + appError(err); + } + +#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) + sAppTask.StartLightTimer(); +#endif + + EFR32_LOG("App Task started"); + while (true) + { + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); + while (eventReceived == pdTRUE) + { + sAppTask.DispatchEvent(&event); + eventReceived = xQueueReceive(sAppEventQueue, &event, 0); + } + } +} + +void AppTask::OnIdentifyStart(Identify * identify) +{ + ChipLogProgress(Zcl, "onIdentifyStart"); + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + sAppTask.StartLightTimer(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED +} + +void AppTask::OnIdentifyStop(Identify * identify) +{ + ChipLogProgress(Zcl, "onIdentifyStop"); + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + sAppTask.CancelLightTimer(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED +} + +void AppTask::ThermostatActionEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type == AppEvent::kEventType_Button) + { + EFR32_LOG("App Button was pressed!"); + // TODO: Implement button functionnality + } +} + +void AppTask::ButtonEventHandler(const sl_button_t * buttonHandle, uint8_t btnAction) +{ + if (buttonHandle == NULL) + { + return; + } + + AppEvent button_event = {}; + button_event.Type = AppEvent::kEventType_Button; + button_event.ButtonEvent.Action = btnAction; + + if (buttonHandle == APP_THERMOSTAT && btnAction == SL_SIMPLE_BUTTON_PRESSED) + { + button_event.Handler = ThermostatActionEventHandler; + sAppTask.PostEvent(&button_event); + } + else if (buttonHandle == APP_FUNCTION_BUTTON) + { + button_event.Handler = ButtonHandler; + sAppTask.PostEvent(&button_event); + } +} + +void AppTask::FunctionTimerEventHandler(TimerHandle_t xTimer) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = (void *) xTimer; + event.Handler = FunctionEventHandler; + sAppTask.PostEvent(&event); +} + +void AppTask::LightTimerEventHandler(TimerHandle_t xTimer) +{ + sAppTask.LightEventHandler(); +} + +void AppTask::FunctionEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type != AppEvent::kEventType_Timer) + { + return; + } + + // If we reached here, the button was held past FACTORY_RESET_TRIGGER_TIMEOUT, + // initiate factory reset + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_StartBleAdv) + { + EFR32_LOG("Factory Reset Triggered. Release button within %ums to cancel.", FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + + // Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to + // cancel, if required. + sAppTask.StartFunctionTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + sAppTask.StartLightTimer(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED + + sAppTask.mFunction = kFunction_FactoryReset; + + // Turn off all LEDs before starting blink to make sure blink is + // co-ordinated. + sStatusLED.Set(false); + sStatusLED.Blink(500); + } + else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) + { + // Actually trigger Factory Reset + sAppTask.mFunction = kFunction_NoneSelected; + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + sAppTask.CancelLightTimer(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED + + chip::Server::GetInstance().ScheduleFactoryReset(); + } +} + +void AppTask::LightEventHandler() +{ + // Collect connectivity and configuration state from the CHIP stack. Because + // the CHIP event loop is being run in a separate task, the stack must be + // locked while these values are queried. However we use a non-blocking + // lock request (TryLockCHIPStack()) to avoid blocking other UI activities + // when the CHIP task is busy (e.g. with a long crypto operation). +#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) + if (PlatformMgr().TryLockChipStack()) + { +#ifdef SL_WIFI + sIsProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); + sIsEnabled = ConnectivityMgr().IsWiFiStationEnabled(); + sIsAttached = ConnectivityMgr().IsWiFiStationConnected(); +#endif /* SL_WIFI */ +#if CHIP_ENABLE_OPENTHREAD + sIsProvisioned = ConnectivityMgr().IsThreadProvisioned(); + sIsEnabled = ConnectivityMgr().IsThreadEnabled(); + sIsAttached = ConnectivityMgr().IsThreadAttached(); +#endif /* CHIP_ENABLE_OPENTHREAD */ + sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); + PlatformMgr().UnlockChipStack(); + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED + + // Update the status LED if factory reset has not been initiated. + // + // If system has "full connectivity", keep the LED On constantly. + // + // If thread and service provisioned, but not attached to the thread network + // yet OR no connectivity to the service OR subscriptions are not fully + // established THEN blink the LED Off for a short period of time. + // + // If the system has ble connection(s) uptill the stage above, THEN blink + // the LEDs at an even rate of 100ms. + // + // Otherwise, blink the LED ON for a very short time. + if (sAppTask.mFunction != kFunction_FactoryReset) + { + if (gIdentify.mActive) + { + sStatusLED.Blink(250, 250); + } + else if (sIdentifyEffect != EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) + { + if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) + { + sStatusLED.Blink(50, 50); + } + if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) + { + sStatusLED.Blink(1000, 1000); + } + if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) + { + sStatusLED.Blink(300, 700); + } + } +#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) + else if (sIsProvisioned && sIsEnabled) + { + if (sIsAttached) + { + sStatusLED.Set(true); + } + else + { + sStatusLED.Blink(950, 50); + } + } + else if (sHaveBLEConnections) + { + sStatusLED.Blink(100, 100); + } + else + { + sStatusLED.Blink(50, 950); + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED + } + + sStatusLED.Animate(); +} + +void AppTask::ButtonHandler(AppEvent * aEvent) +{ + // To trigger software update: press the APP_FUNCTION_BUTTON button briefly (< + // FACTORY_RESET_TRIGGER_TIMEOUT) To initiate factory reset: press the + // APP_FUNCTION_BUTTON for FACTORY_RESET_TRIGGER_TIMEOUT + + // FACTORY_RESET_CANCEL_WINDOW_TIMEOUT All LEDs start blinking after + // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. + // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs + // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT + if (aEvent->ButtonEvent.Action == SL_SIMPLE_BUTTON_PRESSED) + { + if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_NoneSelected) + { + sAppTask.StartFunctionTimer(FACTORY_RESET_TRIGGER_TIMEOUT); + sAppTask.mFunction = kFunction_StartBleAdv; + } + } + else + { + // If the button was released before factory reset got initiated, start BLE advertissement in fast mode + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_StartBleAdv) + { + sAppTask.CancelFunctionTimer(); + sAppTask.mFunction = kFunction_NoneSelected; + +#ifdef SL_WIFI + if (!ConnectivityMgr().IsWiFiStationProvisioned()) +#else + if (!ConnectivityMgr().IsThreadProvisioned()) +#endif /* !SL_WIFI */ + { + // Enable BLE advertisements + ConnectivityMgr().SetBLEAdvertisingEnabled(true); + ConnectivityMgr().SetBLEAdvertisingMode(ConnectivityMgr().kFastAdvertising); + } + else { EFR32_LOG("Network is already provisioned, Ble advertissement not enabled"); } + } + else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) + { + sAppTask.CancelFunctionTimer(); + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + sAppTask.CancelLightTimer(); +#endif + + // Change the function to none selected since factory reset has been + // canceled. + sAppTask.mFunction = kFunction_NoneSelected; + EFR32_LOG("Factory Reset has been Canceled"); + } + } +} + +void AppTask::CancelFunctionTimer() +{ + if (xTimerStop(sFunctionTimer, 0) == pdFAIL) + { + EFR32_LOG("app timer stop() failed"); + appError(APP_ERROR_STOP_TIMER_FAILED); + } + + mFunctionTimerActive = false; +} + +void AppTask::CancelLightTimer() +{ + sStatusLED.Set(false); + if (xTimerStop(sLightTimer, 100) != pdPASS) + { + EFR32_LOG("Light Time start failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } +} + +void AppTask::StartFunctionTimer(uint32_t aTimeoutInMs) +{ + if (xTimerIsTimerActive(sFunctionTimer)) + { + EFR32_LOG("app timer already started!"); + CancelFunctionTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sFunctionTimer, aTimeoutInMs / portTICK_PERIOD_MS, 100) != pdPASS) + { + EFR32_LOG("app timer start() failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } + + mFunctionTimerActive = true; +} + +void AppTask::StartLightTimer() +{ + if (pdPASS != xTimerStart(sLightTimer, 0)) + { + EFR32_LOG("Light Time start failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } +} + +void AppTask::PostEvent(const AppEvent * aEvent) +{ + if (sAppEventQueue != NULL) + { + BaseType_t status; + if (xPortIsInsideInterrupt()) + { + BaseType_t higherPrioTaskWoken = pdFALSE; + status = xQueueSendFromISR(sAppEventQueue, aEvent, &higherPrioTaskWoken); + +#ifdef portYIELD_FROM_ISR + portYIELD_FROM_ISR(higherPrioTaskWoken); +#elif portEND_SWITCHING_ISR // portYIELD_FROM_ISR or portEND_SWITCHING_ISR + portEND_SWITCHING_ISR(higherPrioTaskWoken); +#else // portYIELD_FROM_ISR or portEND_SWITCHING_ISR +#error "Must have portYIELD_FROM_ISR or portEND_SWITCHING_ISR" +#endif // portYIELD_FROM_ISR or portEND_SWITCHING_ISR + } + else + { + status = xQueueSend(sAppEventQueue, aEvent, 1); + } + + if (!status) + { + EFR32_LOG("Failed to post event to app task event queue"); + } + } + else + { + EFR32_LOG("Event Queue is NULL should never happen"); + } +} + +void AppTask::DispatchEvent(AppEvent * aEvent) +{ + if (aEvent->Handler) + { + aEvent->Handler(aEvent); + } + else + { + EFR32_LOG("Event received with no handler. Dropping event."); + } +} diff --git a/examples/thermostat/efr32/src/ZclCallbacks.cpp b/examples/thermostat/efr32/src/ZclCallbacks.cpp new file mode 100644 index 00000000000000..f89d4aaa8cd581 --- /dev/null +++ b/examples/thermostat/efr32/src/ZclCallbacks.cpp @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file implements the handler for data model messages. + */ + +#include "AppConfig.h" + +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::app::Clusters; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, + uint8_t * value) +{ + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); + + if (clusterId == Identify::Id) + { + ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); + } +} + +/** @brief OnOff Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + * TODO Issue #3841 + * emberAfOnOffClusterInitCallback happens before the stack initialize the cluster + * attributes to the default value. + * The logic here expects something similar to the deprecated Plugins callback + * emberAfPluginOnOffClusterServerPostInitCallback. + * + */ +void emberAfOnOffClusterInitCallback(EndpointId endpoint) +{ + // TODO: implement any additional Cluster Server init actions +} diff --git a/examples/thermostat/efr32/src/main.cpp b/examples/thermostat/efr32/src/main.cpp new file mode 100644 index 00000000000000..e06d3c4a520416 --- /dev/null +++ b/examples/thermostat/efr32/src/main.cpp @@ -0,0 +1,84 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "AppConfig.h" +#include "init_efrPlatform.h" +#include "sl_simple_button_instances.h" +#include "sl_system_kernel.h" +#include +#include +#include +#include +#ifdef EFR32_ATTESTATION_CREDENTIALS +#include +#else +#include +#endif + +#define BLE_DEV_NAME "SiLabs-Thermostat" +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::DeviceLayer; +using namespace ::chip::Credentials; + +#define UNUSED_PARAMETER(a) (a = a) + +volatile int apperror_cnt; +static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; + +// ================================================================================ +// Main Code +// ================================================================================ +int main(void) +{ + init_efrPlatform(); + if (EFR32MatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR) + appError(CHIP_ERROR_INTERNAL); + + gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage()); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + + chip::DeviceLayer::PlatformMgr().LockChipStack(); + // Initialize device attestation config +#ifdef EFR32_ATTESTATION_CREDENTIALS + SetDeviceAttestationCredentialsProvider(EFR32::GetEFR32DacProvider()); +#else + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); +#endif + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + + EFR32_LOG("Starting App Task"); + if (GetAppTask().StartAppTask() != CHIP_NO_ERROR) + appError(CHIP_ERROR_INTERNAL); + + EFR32_LOG("Starting FreeRTOS scheduler"); + sl_system_kernel_start(); + + // Should never get here. + chip::Platform::MemoryShutdown(); + EFR32_LOG("vTaskStartScheduler() failed"); + appError(CHIP_ERROR_INTERNAL); +} + +void sl_button_on_change(const sl_button_t * handle) +{ + GetAppTask().ButtonEventHandler(handle, sl_button_get_state(handle)); +} diff --git a/examples/thermostat/efr32/third_party/connectedhomeip b/examples/thermostat/efr32/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/thermostat/efr32/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index da69099d90f4d1..c672a742dfdd51 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -128,12 +128,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -235,13 +235,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } server cluster Descriptor = 29 { @@ -317,7 +317,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -325,7 +325,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -352,6 +352,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -382,7 +383,7 @@ server cluster Basic = 40 { readonly attribute int16u clusterRevision = 65533; } -server cluster OtaSoftwareUpdateProvider = 41 { +client cluster OtaSoftwareUpdateProvider = 41 { enum OTAApplyUpdateAction : ENUM8 { kProceed = 0; kAwaitNextAction = 1; @@ -448,6 +449,76 @@ server cluster OtaSoftwareUpdateProvider = 41 { command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; } +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + nullable INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute ProviderLocation defaultOtaProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute OTAUpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AnnounceOtaProviderRequest { + node_id providerNodeId = 0; + vendor_id vendorId = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; +} + server cluster LocalizationConfiguration = 43 { attribute char_string<35> activeLocale = 0; readonly attribute CHAR_STRING supportedLocales[] = 1; @@ -555,7 +626,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -821,7 +892,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1135,7 +1206,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1161,7 +1231,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1227,8 +1297,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1385,6 +1455,7 @@ server cluster Thermostat = 513 { endpoint 0 { device type rootdevice = 22; + binding cluster OtaSoftwareUpdateProvider; server cluster Identify { ram attribute identifyTime; @@ -1443,7 +1514,11 @@ endpoint 0 { ram attribute clusterRevision default = 1; } - server cluster OtaSoftwareUpdateProvider { + server cluster OtaSoftwareUpdateRequestor { + callback attribute defaultOtaProviders; + ram attribute updatePossible default = 1; + ram attribute updateState; + ram attribute updateStateProgress; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 9edc45595ef358..fb63b21736f0c1 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1,5 +1,5 @@ { - "featureLevel": 71, + "featureLevel": 76, "creator": "zap", "keyValuePairs": [ { @@ -19,14 +19,16 @@ { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", - "version": "ZCL Test Data", - "type": "zcl-properties" + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/app-templates.json", - "version": "chip-v1", - "type": "gen-templates-json" + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -79,7 +81,6 @@ "define": "IDENTIFY_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "identify time", @@ -582,7 +583,6 @@ "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "OnOff", @@ -717,7 +717,6 @@ "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "current level", @@ -760,7 +759,6 @@ "define": "DESCRIPTOR_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -787,7 +785,6 @@ "define": "DESCRIPTOR_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "device list", @@ -894,7 +891,6 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -921,7 +917,6 @@ "define": "BINDING_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "Binding", @@ -979,9 +974,7 @@ "mfgCode": null, "define": "ACCESS_CONTROL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Access Control", @@ -990,7 +983,6 @@ "define": "ACCESS_CONTROL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ACL", @@ -1129,7 +1121,6 @@ "define": "BASIC_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -1156,7 +1147,6 @@ "define": "BASIC_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "DataModelRevision", @@ -1518,7 +1508,7 @@ "mfgCode": null, "define": "OTA_PROVIDER_CLUSTER", "side": "client", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "QueryImage", @@ -1542,7 +1532,7 @@ "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 } ], "attributes": [ @@ -1570,14 +1560,14 @@ "mfgCode": null, "define": "OTA_PROVIDER_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "QueryImageResponse", "code": 1, "mfgCode": null, "source": "server", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -1624,15 +1614,219 @@ } ] }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOtaProvider", + "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": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 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": "Localization Configuration", "code": 43, "mfgCode": null, "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Localization Configuration", @@ -1641,7 +1835,6 @@ "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ActiveLocale", @@ -1715,9 +1908,7 @@ "mfgCode": null, "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Time Format Localization", @@ -1726,7 +1917,6 @@ "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "HourFormat", @@ -1816,9 +2006,7 @@ "mfgCode": null, "define": "UNIT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Unit Localization", @@ -1827,7 +2015,6 @@ "define": "UNIT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "TemperatureUnit", @@ -2410,7 +2597,6 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -2669,7 +2855,6 @@ "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ThreadMetrics", @@ -2776,7 +2961,6 @@ "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "channel", @@ -3827,7 +4011,6 @@ "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -3854,7 +4037,6 @@ "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "bssid", @@ -4141,7 +4323,6 @@ "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "PHYRate", @@ -4328,7 +4509,6 @@ "define": "SWITCH_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -4355,7 +4535,6 @@ "define": "SWITCH_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "number of positions", @@ -4482,7 +4661,6 @@ "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "WindowStatus", @@ -4837,7 +5015,6 @@ "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -4864,7 +5041,6 @@ "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "GroupKeyMap", @@ -4938,9 +5114,7 @@ "mfgCode": null, "define": "FIXED_LABEL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Fixed Label", @@ -4949,7 +5123,6 @@ "define": "FIXED_LABEL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "label list", @@ -5007,9 +5180,7 @@ "mfgCode": null, "define": "USER_LABEL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "User Label", @@ -5018,7 +5189,6 @@ "define": "USER_LABEL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "label list", @@ -5201,7 +5371,6 @@ "define": "DOOR_LOCK_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "LockState", @@ -5560,7 +5729,6 @@ "define": "BARRIER_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "barrier moving state", @@ -5791,7 +5959,6 @@ "define": "COLOR_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "CurrentHue", @@ -6618,7 +6785,6 @@ "define": "TEMP_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -6645,7 +6811,6 @@ "define": "TEMP_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MeasuredValue", @@ -6736,7 +6901,6 @@ "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -6763,7 +6927,6 @@ "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "measured value", @@ -6847,166 +7010,6 @@ } ] }, - { - "name": "IAS Zone", - "code": 1280, - "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ZoneEnrollResponse", - "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": "IAS Zone", - "code": 1280, - "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "ZoneStatusChangeNotification", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ZoneEnrollRequest", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "zone state", - "code": 0, - "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": "zone type", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "enum16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "zone status", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "bitmap16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IAS CIE address", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "node_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Zone ID", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xff", - "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": "Test Cluster", "code": 4294048773, @@ -7450,7 +7453,6 @@ "define": "IDENTIFY_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "identify time", @@ -8001,7 +8003,6 @@ "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "OnOff", @@ -8216,7 +8217,6 @@ "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "current level", @@ -8467,7 +8467,6 @@ "define": "BINARY_INPUT_BASIC_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -8494,7 +8493,6 @@ "define": "BINARY_INPUT_BASIC_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "out of service", @@ -8569,7 +8567,6 @@ "define": "DESCRIPTOR_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -8596,7 +8593,6 @@ "define": "DESCRIPTOR_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "device list", @@ -8687,7 +8683,6 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -8714,7 +8709,6 @@ "define": "BINDING_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "Binding", @@ -8757,7 +8751,6 @@ "define": "BASIC_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -8784,7 +8777,6 @@ "define": "BASIC_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "DataModelRevision", @@ -9227,7 +9219,6 @@ "define": "OTA_REQUESTOR_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -9254,7 +9245,6 @@ "define": "OTA_REQUESTOR_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -9537,7 +9527,6 @@ "define": "SWITCH_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -9564,7 +9553,6 @@ "define": "SWITCH_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "number of positions", @@ -9639,7 +9627,6 @@ "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -9666,7 +9653,6 @@ "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "GroupKeyMap", @@ -9725,7 +9711,6 @@ "define": "FIXED_LABEL_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -9752,7 +9737,6 @@ "define": "FIXED_LABEL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "label list", @@ -9919,7 +9903,6 @@ "define": "DOOR_LOCK_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "LockState", @@ -10318,7 +10301,6 @@ "define": "WINDOW_COVERING_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "Type", @@ -10421,7 +10403,7 @@ "code": 10, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OperationalStatus", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10597,7 +10579,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "bitmap16", + "type": "SafetyStatus", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10677,7 +10659,6 @@ "define": "BARRIER_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "barrier moving state", @@ -10768,7 +10749,6 @@ "define": "PUMP_CONFIG_CONTROL_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -10795,7 +10775,6 @@ "define": "PUMP_CONFIG_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MaxPressure", @@ -11506,7 +11485,6 @@ "define": "COLOR_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "CurrentHue", @@ -12333,7 +12311,6 @@ "define": "TEMP_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -12360,7 +12337,6 @@ "define": "TEMP_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MeasuredValue", @@ -12451,7 +12427,6 @@ "define": "PRESSURE_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -12478,7 +12453,6 @@ "define": "PRESSURE_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MeasuredValue", @@ -12601,7 +12575,6 @@ "define": "FLOW_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -12628,7 +12601,6 @@ "define": "FLOW_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MeasuredValue", @@ -12703,7 +12675,6 @@ "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -12730,7 +12701,6 @@ "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "measured value", @@ -12814,166 +12784,6 @@ } ] }, - { - "name": "IAS Zone", - "code": 1280, - "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ZoneEnrollResponse", - "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": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "IAS Zone", - "code": 1280, - "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "ZoneStatusChangeNotification", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ZoneEnrollRequest", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "zone state", - "code": 0, - "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": "zone type", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "enum16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "zone status", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "bitmap16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IAS CIE address", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "node_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Zone ID", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xff", - "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": "Wake on LAN", "code": 1283, @@ -12981,7 +12791,6 @@ "define": "WAKE_ON_LAN_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13008,7 +12817,6 @@ "define": "WAKE_ON_LAN_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MACAddress", @@ -13095,7 +12903,6 @@ "define": "CHANNEL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "ChannelList", @@ -13206,7 +13013,6 @@ "define": "TARGET_NAVIGATOR_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "TargetList", @@ -13357,7 +13163,6 @@ "define": "MEDIA_PLAYBACK_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13444,7 +13249,6 @@ "define": "MEDIA_INPUT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "InputList", @@ -13523,7 +13327,6 @@ "define": "LOW_POWER_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13586,7 +13389,6 @@ "define": "KEYPAD_INPUT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13657,7 +13459,6 @@ "define": "CONTENT_LAUNCH_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "AcceptHeader", @@ -13760,7 +13561,6 @@ "define": "AUDIO_OUTPUT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "OutputList", @@ -13839,7 +13639,6 @@ "define": "APPLICATION_LAUNCHER_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "CatalogList", @@ -13882,7 +13681,6 @@ "define": "APPLICATION_BASIC_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13909,7 +13707,6 @@ "define": "APPLICATION_BASIC_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "VendorName", @@ -14068,7 +13865,6 @@ "define": "ACCOUNT_LOGIN_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -14510,5 +14306,6 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ] -} + ], + "log": [] +} \ No newline at end of file diff --git a/examples/tv-app/android/java/AppImpl.cpp b/examples/tv-app/android/java/AppImpl.cpp index 90e88c86f3cd09..731a8d8fb50107 100644 --- a/examples/tv-app/android/java/AppImpl.cpp +++ b/examples/tv-app/android/java/AppImpl.cpp @@ -93,6 +93,11 @@ class MyPostCommissioningListener : public PostCommissioningListener MyPostCommissioningListener gMyPostCommissioningListener; ContentAppFactoryImpl gFactory; +ContentAppFactoryImpl * GetContentAppFactoryImpl() +{ + return &gFactory; +} + namespace chip { namespace AppPlatform { @@ -412,6 +417,24 @@ void ContentAppFactoryImpl::SendTestMessage(EndpointId epId, const char * messag } } +void ContentAppFactoryImpl::AddAdminVendorId(uint16_t vendorId) +{ + mAdminVendorIds.push_back(vendorId); +} + +Access::Privilege ContentAppFactoryImpl::GetVendorPrivilege(uint16_t vendorId) +{ + for (size_t i = 0; i < mAdminVendorIds.size(); ++i) + { + auto & vendor = mAdminVendorIds.at(i); + if (vendorId == vendor) + { + return Access::Privilege::kAdminister; + } + } + return Access::Privilege::kOperate; +} + } // namespace AppPlatform } // namespace chip @@ -448,6 +471,12 @@ CHIP_ERROR InitVideoPlayerPlatform(JNIMyUserPrompter * userPrompter, jobject con ChipLogProgress(AppServer, "Started commissioner"); #endif // CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE + + // Disable last fixed endpoint, which is used as a placeholder for all of the + // supported clusters so that ZAP will generated the requisite code. + ChipLogDetail(DeviceLayer, "TV App: Disabling Fixed Content App Endpoints"); + emberAfEndpointEnableDisable(3, false); + return CHIP_NO_ERROR; } diff --git a/examples/tv-app/android/java/AppImpl.h b/examples/tv-app/android/java/AppImpl.h index 6a5f919224ef0d..de3bbd6b5267af 100644 --- a/examples/tv-app/android/java/AppImpl.h +++ b/examples/tv-app/android/java/AppImpl.h @@ -142,6 +142,14 @@ class DLL_EXPORT ContentAppFactoryImpl : public ContentAppFactory // and then writes it to destinationApp CHIP_ERROR ConvertToPlatformCatalogVendorApp(const CatalogVendorApp & sourceApp, CatalogVendorApp * destinationApp) override; + // Get the privilege this vendorId should have on endpoints 1, 2, and content app endpoints + // In the case of casting video clients, this should usually be Access::Privilege::kOperate + // and for voice agents, this may be Access::Privilege::kAdminister + // When a vendor has admin privileges, it will get access to all clusters on ep1 + Access::Privilege GetVendorPrivilege(uint16_t vendorId) override; + + void AddAdminVendorId(uint16_t vendorId); + protected: std::vector mContentApps{ new ContentAppImpl("Vendor1", 1, "exampleid", 11, "Version1", "20202021", nullptr), @@ -149,9 +157,13 @@ class DLL_EXPORT ContentAppFactoryImpl : public ContentAppFactory new ContentAppImpl("Vendor3", 9050, "App3", 22, "Version3", "20202021", nullptr), new ContentAppImpl("TestSuiteVendor", 1111, "applicationId", 22, "v2", "20202021", nullptr) }; + + std::vector mAdminVendorIds{}; }; } // namespace AppPlatform } // namespace chip +chip::AppPlatform::ContentAppFactoryImpl * GetContentAppFactoryImpl(); + #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED diff --git a/examples/tv-app/android/java/MediaPlaybackManager.cpp b/examples/tv-app/android/java/MediaPlaybackManager.cpp index 0bc9244b7b3d50..1c5fac5c2522ba 100644 --- a/examples/tv-app/android/java/MediaPlaybackManager.cpp +++ b/examples/tv-app/android/java/MediaPlaybackManager.cpp @@ -173,7 +173,7 @@ void MediaPlaybackManager::InitializeWithObjects(jobject managerObject) } mGetPositionMethod = - env->GetMethodID(mMediaPlaybackManagerClass, "getPosition", "()[Lcom/matter/tv/server/tvapp/MediaPlaybackPosition;"); + env->GetMethodID(mMediaPlaybackManagerClass, "getPosition", "()Lcom/matter/tv/server/tvapp/MediaPlaybackPosition;"); if (mGetPositionMethod == nullptr) { ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'getPosition' method"); diff --git a/examples/tv-app/linux/AppImpl.cpp b/examples/tv-app/linux/AppImpl.cpp index 06c98290e8a5a9..101b4d03821883 100644 --- a/examples/tv-app/linux/AppImpl.cpp +++ b/examples/tv-app/linux/AppImpl.cpp @@ -119,6 +119,11 @@ class MyPostCommissioningListener : public PostCommissioningListener MyPostCommissioningListener gMyPostCommissioningListener; ContentAppFactoryImpl gFactory; +ContentAppFactoryImpl * GetContentAppFactoryImpl() +{ + return &gFactory; +} + namespace chip { namespace AppPlatform { @@ -383,6 +388,24 @@ ContentApp * ContentAppFactoryImpl::LoadContentApp(const CatalogVendorApp & vend return nullptr; } +void ContentAppFactoryImpl::AddAdminVendorId(uint16_t vendorId) +{ + mAdminVendorIds.push_back(vendorId); +} + +Access::Privilege ContentAppFactoryImpl::GetVendorPrivilege(uint16_t vendorId) +{ + for (size_t i = 0; i < mAdminVendorIds.size(); ++i) + { + auto & vendor = mAdminVendorIds.at(i); + if (vendorId == vendor) + { + return Access::Privilege::kAdminister; + } + } + return Access::Privilege::kOperate; +} + } // namespace AppPlatform } // namespace chip diff --git a/examples/tv-app/linux/AppImpl.h b/examples/tv-app/linux/AppImpl.h index a461ceac3e7c05..68c96d135e0630 100644 --- a/examples/tv-app/linux/AppImpl.h +++ b/examples/tv-app/linux/AppImpl.h @@ -125,6 +125,14 @@ class DLL_EXPORT ContentAppFactoryImpl : public ContentAppFactory // and then writes it to destinationApp CHIP_ERROR ConvertToPlatformCatalogVendorApp(const CatalogVendorApp & sourceApp, CatalogVendorApp * destinationApp) override; + // Get the privilege this vendorId should have on endpoints 1, 2, and content app endpoints + // In the case of casting video clients, this should usually be Access::Privilege::kOperate + // and for voice agents, this may be Access::Privilege::kAdminister + // When a vendor has admin privileges, it will get access to all clusters on ep1 + Access::Privilege GetVendorPrivilege(uint16_t vendorId) override; + + void AddAdminVendorId(uint16_t vendorId); + protected: ContentAppImpl mContentApps[APP_LIBRARY_SIZE] = { ContentAppImpl("Vendor1", 1, "exampleid", 11, "Version1", "34567890"), @@ -132,9 +140,13 @@ class DLL_EXPORT ContentAppFactoryImpl : public ContentAppFactory ContentAppImpl("Vendor3", 9050, "App3", 22, "Version3", "20202021"), ContentAppImpl("TestSuiteVendor", 1111, "applicationId", 22, "v2", "20202021") }; + + std::vector mAdminVendorIds{}; }; } // namespace AppPlatform } // namespace chip +chip::AppPlatform::ContentAppFactoryImpl * GetContentAppFactoryImpl(); + #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED diff --git a/examples/tv-app/linux/AppPlatformShellCommands.cpp b/examples/tv-app/linux/AppPlatformShellCommands.cpp index 50cbc823d74e7d..b70c7b6f0d36b0 100644 --- a/examples/tv-app/linux/AppPlatformShellCommands.cpp +++ b/examples/tv-app/linux/AppPlatformShellCommands.cpp @@ -20,8 +20,10 @@ */ #include "AppPlatformShellCommands.h" +#include "AppImpl.h" #include "ControllerShellCommands.h" #include +#include #include #include #include @@ -39,6 +41,7 @@ using namespace ::chip::Controller; #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED using namespace chip::AppPlatform; +using namespace chip::Access; #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED using namespace chip::app::Clusters; @@ -103,6 +106,82 @@ static CHIP_ERROR pairApp(bool printHeader, size_t index) return CHIP_NO_ERROR; } +static CHIP_ERROR DumpAccessControlEntry(const Access::AccessControl::Entry & entry) +{ + CHIP_ERROR err; + + ChipLogDetail(DeviceLayer, "----- BEGIN ENTRY -----"); + + { + FabricIndex fabricIndex; + SuccessOrExit(err = entry.GetFabricIndex(fabricIndex)); + ChipLogDetail(DeviceLayer, "fabricIndex: %u", fabricIndex); + } + + { + Privilege privilege; + SuccessOrExit(err = entry.GetPrivilege(privilege)); + ChipLogDetail(DeviceLayer, "privilege: %d", to_underlying(privilege)); + } + + { + AuthMode authMode; + SuccessOrExit(err = entry.GetAuthMode(authMode)); + ChipLogDetail(DeviceLayer, "authMode: %d", to_underlying(authMode)); + } + + { + size_t count; + SuccessOrExit(err = entry.GetSubjectCount(count)); + if (count) + { + ChipLogDetail(DeviceLayer, "subjects: %u", static_cast(count)); + for (size_t i = 0; i < count; ++i) + { + NodeId subject; + SuccessOrExit(err = entry.GetSubject(i, subject)); + ChipLogDetail(DeviceLayer, " %u: 0x" ChipLogFormatX64, static_cast(i), ChipLogValueX64(subject)); + } + } + } + + { + size_t count; + SuccessOrExit(err = entry.GetTargetCount(count)); + if (count) + { + ChipLogDetail(DeviceLayer, "targets: %u", static_cast(count)); + for (size_t i = 0; i < count; ++i) + { + Access::AccessControl::Entry::Target target; + SuccessOrExit(err = entry.GetTarget(i, target)); + if (target.flags & Access::AccessControl::Entry::Target::kCluster) + { + ChipLogDetail(DeviceLayer, " %u: cluster: 0x" ChipLogFormatMEI, static_cast(i), + ChipLogValueMEI(target.cluster)); + } + if (target.flags & Access::AccessControl::Entry::Target::kEndpoint) + { + ChipLogDetail(DeviceLayer, " %u: endpoint: %u", static_cast(i), target.endpoint); + } + if (target.flags & Access::AccessControl::Entry::Target::kDeviceType) + { + ChipLogDetail(DeviceLayer, " %u: deviceType: 0x" ChipLogFormatMEI, static_cast(i), + ChipLogValueMEI(target.deviceType)); + } + } + } + } + + ChipLogDetail(DeviceLayer, "----- END ENTRY -----"); + + return CHIP_NO_ERROR; + +exit: + ChipLogError(DeviceLayer, "DumpAccessControlEntry: dump failed %" CHIP_ERROR_FORMAT, err.Format()); + return err; +} + static CHIP_ERROR PrintAllCommands() { streamer_t * sout = streamer_get(); @@ -114,6 +193,11 @@ static CHIP_ERROR PrintAllCommands() streamer_printf(sout, " commission Commission given udc-entry using given pincode from corresponding app. Usage: " "app commission 0\r\n"); + streamer_printf(sout, + " add-admin-vendor Add vendor ID to list which will receive admin privileges. Usage: app " + "add-admin-vendor 65521\r\n"); + streamer_printf(sout, " print-app-access Print all ACLs for app platform fabric. Usage: app print-app-access\r\n"); + streamer_printf(sout, " remove-app-access Remove all ACLs for app platform fabric. Usage: app remove-app-access\r\n"); streamer_printf(sout, "\r\n"); return CHIP_NO_ERROR; @@ -127,6 +211,22 @@ static CHIP_ERROR AppPlatformHandler(int argc, char ** argv) { return PrintAllCommands(); } + else if (strcmp(argv[0], "add-admin-vendor") == 0) + { + if (argc < 2) + { + return PrintAllCommands(); + } + char * eptr; + + uint16_t vid = (uint16_t) strtol(argv[1], &eptr, 10); + ContentAppFactoryImpl * factory = GetContentAppFactoryImpl(); + factory->AddAdminVendorId(vid); + + ChipLogProgress(DeviceLayer, "added admin-vendor"); + + return CHIP_NO_ERROR; + } else if (strcmp(argv[0], "add") == 0) { if (argc < 2) @@ -205,6 +305,23 @@ static CHIP_ERROR AppPlatformHandler(int argc, char ** argv) size_t index = (size_t) strtol(argv[1], &eptr, 10); return error = pairApp(true, index); } + else if (strcmp(argv[0], "print-app-access") == 0) + { + Access::AccessControl::EntryIterator iterator; + ReturnErrorOnFailure(Access::GetAccessControl().Entries(GetDeviceCommissioner()->GetFabricIndex(), iterator)); + + Access::AccessControl::Entry entry; + while (iterator.Next(entry) == CHIP_NO_ERROR) + { + DumpAccessControlEntry(entry); + } + return CHIP_NO_ERROR; + } + else if (strcmp(argv[0], "remove-app-access") == 0) + { + Access::GetAccessControl().DeleteAllEntriesForFabric(GetDeviceCommissioner()->GetFabricIndex()); + return CHIP_NO_ERROR; + } else { return CHIP_ERROR_INVALID_ARGUMENT; diff --git a/examples/tv-app/linux/main.cpp b/examples/tv-app/linux/main.cpp index 2236e7bee2d192..eec6a8054887b8 100644 --- a/examples/tv-app/linux/main.cpp +++ b/examples/tv-app/linux/main.cpp @@ -75,7 +75,16 @@ static TargetNavigatorManager targetNavigatorManager; static WakeOnLanManager wakeOnLanManager; } // namespace -void ApplicationInit() {} +void ApplicationInit() +{ + ChipLogProgress(Zcl, "TV Linux App: ApplicationInit()"); + + // Disable last fixed endpoint, which is used as a placeholder for all of the + // supported clusters so that ZAP will generated the requisite code. + ChipLogDetail(DeviceLayer, "TV Linux App: Warning - Fixed Content App Endpoint Not Disabled"); + // Can't disable this without breaking CI unit tests that act upon account login cluster (only available on ep3) + // emberAfEndpointEnableDisable(3, false); +} int main(int argc, char * argv[]) { diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 414058c5e9e277..a509109ec75045 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -86,44 +86,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -133,7 +144,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -223,7 +234,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -231,7 +242,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -258,6 +269,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -461,7 +473,7 @@ client cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster GeneralCommissioning = 48 { @@ -520,7 +532,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } client cluster NetworkCommissioning = 49 { @@ -920,7 +932,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1236,7 +1248,6 @@ client cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1262,7 +1273,7 @@ client cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1323,7 +1334,7 @@ client cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1337,7 +1348,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1363,7 +1373,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1429,8 +1439,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1496,10 +1506,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { @@ -2069,7 +2079,7 @@ server cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationBasicApplication application = 4; diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h index 522478444789b0..0bde8e593b2dfb 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h @@ -24,9 +24,23 @@ @interface CastingServerBridge : NSObject -@property void (^_Nullable commissioningCompleteCallback)(bool); - -@property void (^_Nullable launchUrlResponseCallback)(bool); +@property void (^_Nonnull commissioningCompleteCallback)(bool); + +@property void (^_Nonnull contentLauncher_launchUrlResponseCallback)(bool); +@property void (^_Nonnull levelControl_stepResponseCallback)(bool); +@property void (^_Nonnull levelControl_moveToLevelResponseCallback)(bool); +@property void (^_Nonnull mediaPlayback_playResponseCallback)(bool); +@property void (^_Nonnull mediaPlayback_pauseResponseCallback)(bool); +@property void (^_Nonnull mediaPlayback_stopPlaybackResponseCallback)(bool); +@property void (^_Nonnull mediaPlayback_nextResponseCallback)(bool); +@property void (^_Nonnull mediaPlayback_seekResponseCallback)(bool); +@property void (^_Nonnull mediaPlayback_skipForwardResponseCallback)(bool); +@property void (^_Nonnull mediaPlayback_skipBackwardResponseCallback)(bool); +@property void (^_Nonnull applicationLauncher_launchAppResponseCallback)(bool); +@property void (^_Nonnull applicationLauncher_stopAppResponseCallback)(bool); +@property void (^_Nonnull applicationLauncher_hideAppResponseCallback)(bool); +@property void (^_Nonnull targetNavigator_navigateTargetResponseCallback)(bool); +@property void (^_Nonnull keypadInput_sendKeyResponseCallback)(bool); @property OnboardingPayload * _Nonnull onboardingPayload; @@ -91,9 +105,9 @@ @param commissioningWindowRequestedHandler Handler to call on requesting the opening of a commissioning window */ -- (void)openBasicCommissioningWindow:(nullable void (^)(bool))commissioningCompleteCallback +- (void)openBasicCommissioningWindow:(void (^_Nonnull)(bool))commissioningCompleteCallback clientQueue:(dispatch_queue_t _Nonnull)clientQueue - commissioningWindowRequestedHandler:(nullable void (^)(bool))commissioningWindowRequestedHandler; + commissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler; /*! @brief Send a Content Launcher:LaunchURL request to a TV @@ -102,17 +116,269 @@ @param contentDisplayStr Display string value corresponding to the content - @param launchUrlResponseCallback Callback for when the Launch URL response has been received + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)contentLauncher_launchUrl:(NSString * _Nonnull)contentUrl + contentDisplayStr:(NSString * _Nonnull)contentDisplayStr + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a LevelControl:Step request to a TV + + @param stepMode Increase (0x00) or Decrease (0x01) the device’s level + + @param stepSize Number of units to step the device's level by + + @param transitionTime Time that SHALL be taken to perform the step, in tenths of a second + + @param optionMask Used to create a temporary Options bitmap to construct the Options attribute + + @param optionOverride Used to create a temporary Options bitmap to construct the Options attribute + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on - @param clientQueue Queue to dispatch the call to the launchUrlRequestSentHandler on + @param requestSentHandler Handler to call on sending the request + */ +- (void)levelControl_step:(uint8_t)stepMode + stepSize:(uint8_t)stepSize + transitionTime:(uint16_t)transitionTime + optionMask:(uint8_t)optionMask + optionOverride:(uint8_t)optionOverride + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a LevelControl:MoveToLevel request to a TV + + @param level the level to which the device should move + + @param transitionTime Time that SHALL be taken to perform the step, in tenths of a second + + @param optionMask Used to create a temporary Options bitmap to construct the Options attribute + + @param optionOverride Used to create a temporary Options bitmap to construct the Options attribute - @param launchUrlRequestSentHandler Handler to call on sending the Launch URL request + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request */ -- (void)contentLauncherLaunchUrl:(NSString * _Nonnull)contentUrl - contentDisplayStr:(NSString * _Nonnull)contentDisplayStr - launchUrlResponseCallback:(nullable void (^)(bool))launchUrlResponseCallback +- (void)levelControl_moveToLevel:(uint8_t)level + transitionTime:(uint16_t)transitionTime + optionMask:(uint8_t)optionMask + optionOverride:(uint8_t)optionOverride + responseCallback:(void (^_Nonnull)(bool))responseCallback clientQueue:(dispatch_queue_t _Nonnull)clientQueue - launchUrlRequestSentHandler:(nullable void (^)(bool))launchUrlRequestSentHandler; + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a MediaPlayback:Play request to a TV + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)mediaPlayback_play:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a MediaPlayback:Pause request to a TV + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)mediaPlayback_pause:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a MediaPlayback:StopPlayback request to a TV + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)mediaPlayback_stopPlayback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a MediaPlayback:Next request to a TV + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)mediaPlayback_next:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a MediaPlayback:Seek request to a TV + + @param position the position (in milliseconds) in the media to seek to + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)mediaPlayback_seek:(uint8_t)position + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a MediaPlayback:SkipForward request to a TV + + @param deltaPositionMilliseconds the duration of the time span to skip forward in the media, in milliseconds + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)mediaPlayback_skipForward:(uint64_t)deltaPositionMilliseconds + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a MediaPlayback:SkipBackward request to a TV + + @param deltaPositionMilliseconds the duration of the time span to skip backward in the media, in milliseconds + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)mediaPlayback_skipBackward:(uint64_t)deltaPositionMilliseconds + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a ApplicationLauncher:LaunchApp request to a TV + + @param catalogVendorId CSA-issued vendor ID for the catalog + + @param applicationId application identifier, unique within a catalog, expressed as a string, such as "PruneVideo" or "Company X" + + @param data optional app-specific data to be sent to the app + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)applicationLauncher_launchApp:(uint16_t)catalogVendorId + applicationId:(NSString * _Nonnull)applicationId + data:(NSData * _Nullable)data + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a ApplicationLauncher:StopApp request to a TV + + @param catalogVendorId CSA-issued vendor ID for the catalog + + @param applicationId application identifier, unique within a catalog, expressed as a string, such as "PruneVideo" or "Company X" + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)applicationLauncher_stopApp:(uint16_t)catalogVendorId + applicationId:(NSString * _Nonnull)applicationId + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a ApplicationLauncher:HideApp request to a TV + + @param catalogVendorId CSA-issued vendor ID for the catalog + + @param applicationId application identifier, unique within a catalog, expressed as a string, such as "PruneVideo" or "Company X" + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)applicationLauncher_hideApp:(uint16_t)catalogVendorId + applicationId:(NSString * _Nonnull)applicationId + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a TargetNavigator:NavigateTarget request to a TV + + @param target Identifier for the target for UX navigation, contained within one of the TargetInfo objects in the TargetList + attribute list. + + @param data Optional app-specific data + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)targetNavigator_navigateTarget:(uint8_t)target + data:(NSString * _Nullable)data + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + +/*! + @brief Send a KeypadInput:SendKey request to a TV + + @param keyCode Key Code to process. If a second SendKey request with the same KeyCode value is received within 200ms, then the + endpoint will consider the first key press to be a press and hold. When such a repeat KeyCode value is not received within 200ms, + then the endpoint will consider the last key press to be a release. + + @param responseCallback Callback for when the response has been received + + @param clientQueue Queue to dispatch the call to the requestSentHandler on + + @param requestSentHandler Handler to call on sending the request + */ +- (void)keypadInput_sendKey:(uint8_t)keyCode + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler; + @end #endif /* CastingServerBridge_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm index de72fd816071ff..e854db7092e9eb 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm @@ -184,9 +184,9 @@ - (OnboardingPayload *)getOnboardingPaylod return _onboardingPayload; } -- (void)openBasicCommissioningWindow:(nullable void (^)(bool))commissioningCompleteCallback +- (void)openBasicCommissioningWindow:(void (^_Nonnull)(bool))commissioningCompleteCallback clientQueue:(dispatch_queue_t _Nonnull)clientQueue - commissioningWindowRequestedHandler:(nullable void (^)(bool))commissioningWindowRequestedHandler + commissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler { ChipLogProgress(AppServer, "CastingServerBridge().openBasicCommissioningWindow() called"); @@ -201,21 +201,305 @@ - (void)openBasicCommissioningWindow:(nullable void (^)(bool))commissioningCompl }); } -- (void)contentLauncherLaunchUrl:(NSString * _Nonnull)contentUrl - contentDisplayStr:(NSString * _Nonnull)contentDisplayStr - launchUrlResponseCallback:(nullable void (^)(bool))launchUrlResponseCallback - clientQueue:(dispatch_queue_t _Nonnull)clientQueue - launchUrlRequestSentHandler:(nullable void (^)(bool))launchUrlRequestSentHandler +- (void)contentLauncher_launchUrl:(NSString * _Nonnull)contentUrl + contentDisplayStr:(NSString * _Nonnull)contentDisplayStr + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler { - ChipLogProgress(AppServer, "CastingServerBridge().contentLauncherLaunchUrl() called"); + ChipLogProgress(AppServer, "CastingServerBridge().contentLauncher_launchUrl() called"); - _launchUrlResponseCallback = launchUrlResponseCallback; + _contentLauncher_launchUrlResponseCallback = responseCallback; + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->ContentLauncherLaunchURL( + [contentUrl UTF8String], [contentDisplayStr UTF8String], [](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].contentLauncher_launchUrlResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)levelControl_step:(uint8_t)stepMode + stepSize:(uint8_t)stepSize + transitionTime:(uint16_t)transitionTime + optionMask:(uint8_t)optionMask + optionOverride:(uint8_t)optionOverride + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().levelControl_step() called"); + + _levelControl_stepResponseCallback = responseCallback; dispatch_async(_chipWorkQueue, ^{ CHIP_ERROR err - = CastingServer::GetInstance()->ContentLauncherLaunchURL([contentUrl UTF8String], [contentDisplayStr UTF8String], - [](CHIP_ERROR err) { [CastingServerBridge getSharedInstance].launchUrlResponseCallback(CHIP_NO_ERROR == err); }); + = CastingServer::GetInstance()->LevelControl_Step(static_cast(stepMode), + stepSize, transitionTime, optionMask, optionOverride, [](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].levelControl_stepResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)levelControl_moveToLevel:(uint8_t)level + transitionTime:(uint16_t)transitionTime + optionMask:(uint8_t)optionMask + optionOverride:(uint8_t)optionOverride + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().levelControl_moveToLevel() called"); + + _levelControl_moveToLevelResponseCallback = responseCallback; + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->LevelControl_MoveToLevel( + level, transitionTime, optionMask, optionOverride, [](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].levelControl_moveToLevelResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)mediaPlayback_play:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().mediaPlayback_play() called"); + + _mediaPlayback_playResponseCallback = responseCallback; + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->MediaPlayback_Play([](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].mediaPlayback_playResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)mediaPlayback_pause:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().mediaPlayback_pause() called"); + + _mediaPlayback_pauseResponseCallback = responseCallback; + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->MediaPlayback_Pause([](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].mediaPlayback_pauseResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)mediaPlayback_stopPlayback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().mediaPlayback_stopPlayback() called"); + + _mediaPlayback_pauseResponseCallback = responseCallback; + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->MediaPlayback_Pause([](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].mediaPlayback_stopPlaybackResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)mediaPlayback_next:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().mediaPlayback_next() called"); + + _mediaPlayback_nextResponseCallback = responseCallback; + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->MediaPlayback_Next([](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].mediaPlayback_nextResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)mediaPlayback_seek:(uint8_t)position + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().mediaPlayback_seek() called"); + + _mediaPlayback_seekResponseCallback = responseCallback; + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->MediaPlayback_Seek(position, [](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].mediaPlayback_seekResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)mediaPlayback_skipForward:(uint64_t)deltaPositionMilliseconds + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().mediaPlayback_skipForward() called"); + + _mediaPlayback_skipForwardResponseCallback = responseCallback; + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->MediaPlayback_SkipForward(deltaPositionMilliseconds, [](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].mediaPlayback_skipForwardResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)mediaPlayback_skipBackward:(uint64_t)deltaPositionMilliseconds + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().mediaPlayback_skipBackward() called"); + + _mediaPlayback_skipBackwardResponseCallback = responseCallback; + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->MediaPlayback_SkipBackward(deltaPositionMilliseconds, [](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].mediaPlayback_skipBackwardResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)applicationLauncher_launchApp:(uint16_t)catalogVendorId + applicationId:(NSString * _Nonnull)applicationId + data:(NSData * _Nullable)data + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().applicationLauncher_launchApp() called"); + + _applicationLauncher_launchAppResponseCallback = responseCallback; + + chip::app::Clusters::ApplicationLauncher::Structs::Application::Type application; + application.catalogVendorId = catalogVendorId; + application.applicationId = chip::CharSpan::fromCharString([applicationId UTF8String]); + + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->ApplicationLauncher_LaunchApp(application, + chip::MakeOptional(chip::ByteSpan(static_cast(data.bytes), data.length)), [](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].applicationLauncher_launchAppResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)applicationLauncher_stopApp:(uint16_t)catalogVendorId + applicationId:(NSString * _Nonnull)applicationId + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().applicationLauncher_stopApp() called"); + + _applicationLauncher_stopAppResponseCallback = responseCallback; + + chip::app::Clusters::ApplicationLauncher::Structs::Application::Type application; + application.catalogVendorId = catalogVendorId; + application.applicationId = chip::CharSpan::fromCharString([applicationId UTF8String]); + + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->ApplicationLauncher_StopApp(application, [](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].applicationLauncher_stopAppResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)applicationLauncher_hideApp:(uint16_t)catalogVendorId + applicationId:(NSString * _Nonnull)applicationId + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().applicationLauncher_hideApp() called"); + + _applicationLauncher_hideAppResponseCallback = responseCallback; + + chip::app::Clusters::ApplicationLauncher::Structs::Application::Type application; + application.catalogVendorId = catalogVendorId; + application.applicationId = chip::CharSpan::fromCharString([applicationId UTF8String]); + + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->ApplicationLauncher_HideApp(application, [](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].applicationLauncher_hideAppResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)targetNavigator_navigateTarget:(uint8_t)target + data:(NSString * _Nullable)data + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().targetNavigator_navigateTarget() called"); + + _targetNavigator_navigateTargetResponseCallback = responseCallback; + + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->TargetNavigator_NavigateTarget( + target, chip::MakeOptional(chip::CharSpan::fromCharString([data UTF8String])), [](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].targetNavigator_navigateTargetResponseCallback(CHIP_NO_ERROR == err); + }); + dispatch_async(clientQueue, ^{ + requestSentHandler(CHIP_NO_ERROR == err); + }); + }); +} + +- (void)keypadInput_sendKey:(uint8_t)keyCode + responseCallback:(void (^_Nonnull)(bool))responseCallback + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + requestSentHandler:(void (^_Nonnull)(bool))requestSentHandler +{ + ChipLogProgress(AppServer, "CastingServerBridge().keypadInput_sendKey() called"); + + _keypadInput_sendKeyResponseCallback = responseCallback; + + dispatch_async(_chipWorkQueue, ^{ + CHIP_ERROR err = CastingServer::GetInstance()->KeypadInput_SendKey( + static_cast(keyCode), [](CHIP_ERROR err) { + [CastingServerBridge getSharedInstance].keypadInput_sendKeyResponseCallback(CHIP_NO_ERROR == err); + }); dispatch_async(clientQueue, ^{ - launchUrlRequestSentHandler(CHIP_NO_ERROR == err); + requestSentHandler(CHIP_NO_ERROR == err); }); }); } diff --git a/examples/tv-casting-app/darwin/TvCasting/TvCasting/ContentLauncherViewModel.swift b/examples/tv-casting-app/darwin/TvCasting/TvCasting/ContentLauncherViewModel.swift index c3506bfd068aec..ee741f8bcae8f0 100644 --- a/examples/tv-casting-app/darwin/TvCasting/TvCasting/ContentLauncherViewModel.swift +++ b/examples/tv-casting-app/darwin/TvCasting/TvCasting/ContentLauncherViewModel.swift @@ -32,9 +32,9 @@ class ContentLauncherViewModel: ObservableObject { if let castingServerBridge = CastingServerBridge.getSharedInstance() { castingServerBridge - .contentLauncherLaunchUrl(contentUrl!, + .contentLauncher_launchUrl(contentUrl!, contentDisplayStr: contentDisplayStr!, - launchUrlResponseCallback: + responseCallback: { (result: Bool) -> () in self.Log.info("ContentLauncherViewModel.launchUrl.launchUrlResponseCallback result \(result)") DispatchQueue.main.async { @@ -42,7 +42,7 @@ class ContentLauncherViewModel: ObservableObject { } }, clientQueue: DispatchQueue.main, - launchUrlRequestSentHandler: + requestSentHandler: { (result: Bool) -> () in self.Log.info("ContentLauncherViewModel.launchUrl.launcUrlRequestSentHandler result \(result)") self.status = result ? "Sent Launch URL request" : "Failed to send Launch URL request!" diff --git a/examples/tv-casting-app/linux/main.cpp b/examples/tv-casting-app/linux/main.cpp index 2c50050e11bc71..75222fed066ae5 100644 --- a/examples/tv-casting-app/linux/main.cpp +++ b/examples/tv-casting-app/linux/main.cpp @@ -85,7 +85,7 @@ CHIP_ERROR InitCommissionableDataProvider(LinuxCommissionableDataProvider & prov ChipLogError(Support, "PASE PBKDF iterations set to %u", static_cast(spake2pIterationCount)); return provider.Init(options.spake2pVerifier, options.spake2pSalt, spake2pIterationCount, setupPasscode, - options.payload.discriminator); + options.payload.discriminator.GetLongValue()); } // To hold SPAKE2+ verifier, discriminator, passcode diff --git a/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.cpp b/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.cpp index 2953c4ba2a91f1..5982c67f8e41ae 100644 --- a/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.cpp +++ b/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.cpp @@ -47,16 +47,8 @@ CHIP_ERROR ModelCommand::RunCommand() return SendGroupCommand(GroupIdFromNodeId(mDestinationId), fabricIndex); } - Server * server = &(chip::Server::GetInstance()); - const FabricInfo * fabric = server->GetFabricTable().FindFabricWithIndex(fabricIndex); - if (fabric == nullptr) - { - ChipLogError(AppServer, "Did not find fabric for index %d", fabricIndex); - return CHIP_ERROR_INVALID_FABRIC_INDEX; - } - - PeerId peerID = fabric->GetPeerIdForNode(mDestinationId); - server->GetCASESessionManager()->FindOrEstablishSession(peerID, &mOnDeviceConnectedCallback, + Server * server = &(chip::Server::GetInstance()); + server->GetCASESessionManager()->FindOrEstablishSession(ScopedNodeId(mDestinationId, fabricIndex), &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); return CHIP_NO_ERROR; } @@ -71,7 +63,7 @@ void ModelCommand::OnDeviceConnectedFn(void * context, OperationalDeviceProxy * VerifyOrReturn(CHIP_NO_ERROR == err, command->SetCommandExitStatus(err)); } -void ModelCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR err) +void ModelCommand::OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR err) { ChipLogProgress(chipTool, "ModelCommand::OnDeviceConnectionFailureFn"); LogErrorOnFailure(err); diff --git a/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h b/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h index 1db14a7bfc4e9e..1e2265d20dd8b3 100644 --- a/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h +++ b/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h @@ -49,7 +49,7 @@ class TargetVideoPlayerInfo ChipLogProgress(AppServer, "HandleDeviceConnected created an instance of OperationalDeviceProxy"); } - static void HandleDeviceConnectionFailure(void * context, chip::PeerId peerId, CHIP_ERROR error) + static void HandleDeviceConnectionFailure(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error) { TargetVideoPlayerInfo * _this = static_cast(context); _this->mOperationalDeviceProxy = nullptr; diff --git a/examples/tv-casting-app/tv-casting-common/src/LevelControl.cpp b/examples/tv-casting-app/tv-casting-common/src/LevelControl.cpp index 63f3777e64356d..d55ae63db19ccf 100644 --- a/examples/tv-casting-app/tv-casting-common/src/LevelControl.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/LevelControl.cpp @@ -25,11 +25,11 @@ CHIP_ERROR StepCommand::Invoke(LevelControl::StepMode stepMode, uint8_t stepSize uint8_t optionOverride, std::function responseCallback) { LevelControl::Commands::Step::Type request; - request.stepMode = stepMode; - request.stepSize = stepSize; - request.transitionTime = transitionTime; - request.optionMask = optionMask; - request.optionOverride = optionOverride; + request.stepMode = stepMode; + request.stepSize = stepSize; + request.transitionTime = transitionTime; + request.optionsMask = optionMask; + request.optionsOverride = optionOverride; return MediaCommandBase::Invoke(request, responseCallback); } @@ -37,9 +37,9 @@ CHIP_ERROR MoveToLevelCommand::Invoke(uint8_t level, uint16_t transitionTime, ui std::function responseCallback) { LevelControl::Commands::MoveToLevel::Type request; - request.level = level; - request.transitionTime = transitionTime; - request.optionMask = optionMask; - request.optionOverride = optionOverride; + request.level = level; + request.transitionTime = transitionTime; + request.optionsMask = optionMask; + request.optionsOverride = optionOverride; return MediaCommandBase::Invoke(request, responseCallback); } diff --git a/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp b/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp index 9a08e65a13fabe..546c68681b9fb3 100644 --- a/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp @@ -32,17 +32,9 @@ CHIP_ERROR TargetVideoPlayerInfo::Initialize(NodeId nodeId, FabricIndex fabricIn endpointInfo.Reset(); } - Server * server = &(chip::Server::GetInstance()); - const FabricInfo * fabric = server->GetFabricTable().FindFabricWithIndex(fabricIndex); - if (fabric == nullptr) - { - ChipLogError(AppServer, "Did not find fabric for index %d", fabricIndex); - return CHIP_ERROR_INVALID_FABRIC_INDEX; - } - - PeerId peerID = fabric->GetPeerIdForNode(nodeId); - - server->GetCASESessionManager()->FindOrEstablishSession(peerID, &mOnConnectedCallback, &mOnConnectionFailureCallback); + Server * server = &(chip::Server::GetInstance()); + server->GetCASESessionManager()->FindOrEstablishSession(ScopedNodeId(nodeId, fabricIndex), &mOnConnectedCallback, + &mOnConnectionFailureCallback); if (mOperationalDeviceProxy == nullptr) { 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 ebf643296e65f0..24841d02cad66a 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 @@ -93,12 +93,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -200,13 +200,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } client cluster OnOff = 6 { @@ -340,44 +340,55 @@ client cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -387,7 +398,7 @@ client cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster LevelControl = 8 { @@ -427,44 +438,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -474,7 +496,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster BinaryInputBasic = 15 { @@ -572,7 +594,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -580,7 +602,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -607,6 +629,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -810,7 +833,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -1076,7 +1099,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1429,7 +1452,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1455,7 +1477,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1521,8 +1543,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1580,10 +1602,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { @@ -2073,7 +2095,7 @@ client cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationStatusEnum status = 5; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index c899c4af42fba7..23d2eb55874595 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -105,12 +105,12 @@ server cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } server cluster Scenes = 5 { @@ -215,13 +215,13 @@ server cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } server cluster Descriptor = 29 { @@ -286,7 +286,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -294,7 +294,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -323,6 +323,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -688,7 +689,7 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster NetworkCommissioning = 49 { @@ -928,7 +929,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1249,7 +1250,6 @@ server cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1275,7 +1275,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; @@ -1344,8 +1344,8 @@ server cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1414,10 +1414,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster FixedLabel = 64 { diff --git a/gn_build.sh b/gn_build.sh index 86e2ff6889c6d3..0615a1833ef40d 100755 --- a/gn_build.sh +++ b/gn_build.sh @@ -154,14 +154,14 @@ fi # K32W SDK setup k32w_sdk_args="" -if [[ -d "$NXP_K32W061_SDK_ROOT" ]]; then - k32w_sdk_args+="k32w0_sdk_root=\"$NXP_K32W061_SDK_ROOT\"" +if [[ -d "$NXP_K32W0_SDK_ROOT" ]]; then + k32w_sdk_args+="k32w0_sdk_root=\"$NXP_K32W0_SDK_ROOT\"" extra_args+=" $k32w0_sdk_args enable_k32w_builds=true" fi echo -if [[ ! -d "$NXP_K32W061_SDK_ROOT" ]]; then - echo "Hint: Set \$NXP_K32W061_SDK_ROOT to enable building for K32W061" +if [[ ! -d "$NXP_K32W0_SDK_ROOT" ]]; then + echo "Hint: Set \$NXP_K32W0_SDK_ROOT to enable building for K32W061" else echo 'To build the K32W lock sample as a standalone project': echo "(cd $CHIP_ROOT/examples/lock-app/nxp/k32w/k32w0; gn gen out/debug --args='$k32w_sdk_args'; ninja -C out/debug)" diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index 6ceb9183df321c..db9d3aa79cbb4c 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.5.84" + - name: "connectedhomeip/chip-build-vscode:0.5.89" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.5.84" + - name: "connectedhomeip/chip-build-vscode:0.5.89" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 6c14fc1cec831c..9747ccdef4d5bc 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.5.84" + - name: "connectedhomeip/chip-build-vscode:0.5.89" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,14 +12,12 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.5.84" + - name: "connectedhomeip/chip-build-vscode:0.5.89" env: - PW_ENVIRONMENT_ROOT=/pwenv args: - ./examples/chef/chef.py --build_all --keep_going --build_exclude noip - - ./examples/chef/chef.py --build_all --keep_going --build_include - linux_arm64_ipv6only.*noip id: CompileAll waitFor: - Bootstrap @@ -28,6 +26,20 @@ steps: - name: pwenv path: /pwenv + - name: "connectedhomeip/chip-build-vscode:0.5.89" + env: + - PW_ENVIRONMENT_ROOT=/pwenv + args: + - ./examples/chef/chef.py --build_all --keep_going --build_include + linux_arm64_ipv6only.*noip + id: CompileNoip + waitFor: + - CompileAll + entrypoint: ./scripts/run_in_build_env.sh + volumes: + - name: pwenv + path: /pwenv + logsBucket: matter-build-automation-build-logs # Global timeout for all steps @@ -42,4 +54,4 @@ artifacts: # slow. options: machineType: "E2_HIGHCPU_32" - diskSizeGb: 200 + diskSizeGb: 500 diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 1ef4c8e4210016..4eb95b7d8def21 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.5.84" + - name: "connectedhomeip/chip-build-vscode:0.5.89" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.5.84" + - name: "connectedhomeip/chip-build-vscode:0.5.89" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -28,7 +28,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.84" + - name: "connectedhomeip/chip-build-vscode:0.5.89" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -45,7 +45,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.84" + - name: "connectedhomeip/chip-build-vscode:0.5.89" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -62,7 +62,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.84" + - name: "connectedhomeip/chip-build-vscode:0.5.89" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -79,7 +79,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.84" + - name: "connectedhomeip/chip-build-vscode:0.5.89" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/integrations/docker/build.sh b/integrations/docker/build.sh index 6c4a1a2dc26f98..cb52fe60746e89 100755 --- a/integrations/docker/build.sh +++ b/integrations/docker/build.sh @@ -33,6 +33,12 @@ IMAGE=${DOCKER_BUILD_IMAGE:-$(basename "$(pwd)")} # version VERSION=${DOCKER_BUILD_VERSION:-$(sed 's/ .*//' version)} +if [[ $OSTYPE == 'darwin'* ]]; then + DOCKER_VOLUME_PATH=~/Library/Containers/com.docker.docker/Data/vms/0/ +else + DOCKER_VOLUME_PATH=/var/lib/docker/ +fi + [[ ${*/--help//} != "${*}" ]] && { set +x echo "Usage: $me @@ -59,7 +65,7 @@ set -ex [[ -n $VERSION ]] || die "version cannot be empty" -mb_space_before=$(df -m /var/lib/docker/ | awk 'FNR==2{print $3}') +mb_space_before=$(df -m "$DOCKER_VOLUME_PATH" | awk 'FNR==2{print $3}') # go find and build any CHIP images this image is "FROM" awk -F/ '/^FROM connectedhomeip/ {print $2}' Dockerfile | while read -r dep; do @@ -92,8 +98,9 @@ docker image prune --force } docker images --filter=reference="$ORG/*" -df -h /var/lib/docker/ -mb_space_after=$(df -m /var/lib/docker/ | awk 'FNR==2{print $3}') +df -h "$DOCKER_VOLUME_PATH" +mb_space_after=$(df -m "$DOCKER_VOLUME_PATH" | awk 'FNR==2{print $3}') + printf "%'.f MB total used\n" "$((mb_space_before - mb_space_after))" exit 0 diff --git a/integrations/docker/images/build-all.sh b/integrations/docker/images/build-all.sh index 2ff590b111d011..4aff2747ed571a 100755 --- a/integrations/docker/images/build-all.sh +++ b/integrations/docker/images/build-all.sh @@ -21,7 +21,7 @@ # https://github.com/project-chip/connectedhomeip/issues/710 # set -e -find "$(git rev-parse --show-toplevel)"/integrations/docker/images/ -name Dockerfile | while read -r dockerfile; do +find "$(git rev-parse --show-toplevel)"/integrations/docker/images/ -name Dockerfile ! -path "*chip-cert-bins/*" | while read -r dockerfile; do pushd "$(dirname "$dockerfile")" >/dev/null ./build.sh "$@" popd >/dev/null diff --git a/integrations/docker/images/chip-build-ameba/Dockerfile b/integrations/docker/images/chip-build-ameba/Dockerfile index 0504e3c8645ceb..c8307ae64986f8 100644 --- a/integrations/docker/images/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/chip-build-ameba/Dockerfile @@ -3,7 +3,7 @@ FROM connectedhomeip/chip-build:${VERSION} # Setup Ameba ARG AMEBA_DIR=/opt/ameba -ARG TAG_NAME=ameba_update_2022_07_15 +ARG TAG_NAME=ameba_update_2022_07_25 RUN set -x \ && apt-get update \ && mkdir ${AMEBA_DIR} \ diff --git a/integrations/docker/images/chip-build-bouffalolab/Dockerfile b/integrations/docker/images/chip-build-bouffalolab/Dockerfile new file mode 100644 index 00000000000000..e00fbcfb8c99ca --- /dev/null +++ b/integrations/docker/images/chip-build-bouffalolab/Dockerfile @@ -0,0 +1,9 @@ +ARG VERSION=latest +FROM connectedhomeip/chip-build:${VERSION} + +RUN set -x \ + && pip install bflb-iot-tool \ + && apt-get update \ + && apt-get install -fy \ + vim \ + && : # last line diff --git a/integrations/docker/images/chip-build-bouffalolab/build.sh b/integrations/docker/images/chip-build-bouffalolab/build.sh new file mode 120000 index 00000000000000..fcb4d4ee75d531 --- /dev/null +++ b/integrations/docker/images/chip-build-bouffalolab/build.sh @@ -0,0 +1 @@ +../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-bouffalolab/run.sh b/integrations/docker/images/chip-build-bouffalolab/run.sh new file mode 120000 index 00000000000000..ccbd3501b330d9 --- /dev/null +++ b/integrations/docker/images/chip-build-bouffalolab/run.sh @@ -0,0 +1 @@ +../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-bouffalolab/version b/integrations/docker/images/chip-build-bouffalolab/version new file mode 120000 index 00000000000000..a4280acd348e7f --- /dev/null +++ b/integrations/docker/images/chip-build-bouffalolab/version @@ -0,0 +1 @@ +../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-crosscompile/Dockerfile b/integrations/docker/images/chip-build-crosscompile/Dockerfile index 7bed01556f202b..59e023ea16f688 100644 --- a/integrations/docker/images/chip-build-crosscompile/Dockerfile +++ b/integrations/docker/images/chip-build-crosscompile/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - git=1:2.25.1-1ubuntu3.4 \ + git \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-doxygen/Dockerfile b/integrations/docker/images/chip-build-doxygen/Dockerfile index 81fa1a7255364f..f9bff774d696b5 100644 --- a/integrations/docker/images/chip-build-doxygen/Dockerfile +++ b/integrations/docker/images/chip-build-doxygen/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.15 RUN apk --no-cache add \ - doxygen=1.9.2-r1 \ - graphviz=2.49.3-r0 \ - bash=5.1.16-r0 \ - git=2.34.2-r0 + doxygen=1.9.2-r1 \ + graphviz=2.49.3-r0 \ + bash \ + git diff --git a/integrations/docker/images/chip-build-esp32-qemu/Dockerfile b/integrations/docker/images/chip-build-esp32-qemu/Dockerfile index ea4ad647a8651c..6e69acf7f72478 100644 --- a/integrations/docker/images/chip-build-esp32-qemu/Dockerfile +++ b/integrations/docker/images/chip-build-esp32-qemu/Dockerfile @@ -4,9 +4,7 @@ FROM connectedhomeip/chip-build-esp32:${VERSION} RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - ninja-build=1.10.0-1build1 \ - git=1:2.25.1-1ubuntu3.4 \ - libgcrypt20-dev=1.8.5-5ubuntu1.1 \ + ninja-build git libgcrypt20-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-esp32/Dockerfile b/integrations/docker/images/chip-build-esp32/Dockerfile index 9837ededf21b55..925fa68b03936b 100644 --- a/integrations/docker/images/chip-build-esp32/Dockerfile +++ b/integrations/docker/images/chip-build-esp32/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - git=1:2.25.1-1ubuntu3.4 \ + git \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-imx/Dockerfile b/integrations/docker/images/chip-build-imx/Dockerfile index 8acc03833f9fec..815d3512d907e9 100644 --- a/integrations/docker/images/chip-build-imx/Dockerfile +++ b/integrations/docker/images/chip-build-imx/Dockerfile @@ -3,7 +3,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu2 \ + wget \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-k32w/Dockerfile b/integrations/docker/images/chip-build-k32w/Dockerfile index 51b6a5c4ca56cb..ba925821566384 100644 --- a/integrations/docker/images/chip-build-k32w/Dockerfile +++ b/integrations/docker/images/chip-build-k32w/Dockerfile @@ -4,8 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu2 \ - unzip=6.0-25ubuntu1 \ + wget unzip \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line @@ -13,14 +12,13 @@ RUN set -x \ WORKDIR /opt/sdk # Setup the K32W SDK RUN set -x \ - && wget -O /tmp/sdk.jar https://mcuxpresso.nxp.com/eclipse/sdk/2.6.4/plugins/com.nxp.mcuxpresso.sdk.sdk_2.x_k32w061dk6_2.6.4.201911251446.jar \ - && unzip /tmp/sdk.jar \ - && unzip sdks/1190028246d9243d9a9e27ca783413a8.zip -d sdks \ - && rm -rf sdks/1190028246d9243d9a9e27ca783413a8.zip \ + && wget https://cache.nxp.com/lgfiles/bsps/SDK_2_6_6_K32W061DK6.zip \ + && unzip SDK_2_6_6_K32W061DK6.zip \ + && rm -rf SDK_2_6_6_K32W061DK6.zip \ && : # last line FROM connectedhomeip/chip-build:${VERSION} -COPY --from=build /opt/sdk/sdks/ /opt/sdk/sdks/ +COPY --from=build /opt/sdk/ /opt/sdk/ -ENV NXP_K32W061_SDK_ROOT=/opt/sdk/sdks +ENV NXP_K32W0_SDK_ROOT=/opt/sdk diff --git a/integrations/docker/images/chip-build-mbed-os/Dockerfile b/integrations/docker/images/chip-build-mbed-os/Dockerfile index ee47fc681eeb89..459bca5d6bdf38 100644 --- a/integrations/docker/images/chip-build-mbed-os/Dockerfile +++ b/integrations/docker/images/chip-build-mbed-os/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu2 \ + wget \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-nrf-platform/Dockerfile b/integrations/docker/images/chip-build-nrf-platform/Dockerfile index 4c8009bbb11cc1..f27f0813c748b3 100644 --- a/integrations/docker/images/chip-build-nrf-platform/Dockerfile +++ b/integrations/docker/images/chip-build-nrf-platform/Dockerfile @@ -2,12 +2,12 @@ ARG VERSION=latest FROM connectedhomeip/chip-build:${VERSION} as build # Compatible Nordic Connect SDK revision. -ARG NCS_REVISION=fd5905aa6b04febd99d00dba6c482ac25eb15222 +ARG NCS_REVISION=v2.0.2 RUN set -x \ && apt-get update \ && apt-get install --no-install-recommends -fy \ - curl=7.68.0-1ubuntu2.11 \ + curl \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line @@ -28,7 +28,7 @@ RUN set -x \ WORKDIR /opt/NordicSemiconductor/nrfconnect RUN set -x \ && python3 -m pip install -U --no-cache-dir \ - west==0.12.0 \ + west==0.13.1 \ && west init -m https://github.com/nrfconnect/sdk-nrf \ && git -C nrf fetch origin "$NCS_REVISION" \ && git -C nrf checkout FETCH_HEAD \ @@ -59,7 +59,7 @@ COPY --from=build /opt/NordicSemiconductor/nrfconnect/ /opt/NordicSemiconductor/ RUN set -x \ # python3-yaml package conflicts with nRF Python requirements && (apt-get remove -fy python3-yaml && apt-get autoremove || exit 0) \ - && python3 -m pip install -U --no-cache-dir cmake==3.22.2 \ + && python3 -m pip install -U --no-cache-dir cmake==3.22.5 \ && python3 -m pip install --no-cache-dir -r /opt/NordicSemiconductor/nrfconnect/zephyr/scripts/requirements.txt \ && python3 -m pip install --no-cache-dir -r /opt/NordicSemiconductor/nrfconnect/nrf/scripts/requirements.txt \ && python3 -m pip install --no-cache-dir -r /opt/NordicSemiconductor/nrfconnect/bootloader/mcuboot/scripts/requirements.txt \ diff --git a/integrations/docker/images/chip-build-telink/Dockerfile b/integrations/docker/images/chip-build-telink/Dockerfile index 508226089c0401..ba3604f82e47f0 100644 --- a/integrations/docker/images/chip-build-telink/Dockerfile +++ b/integrations/docker/images/chip-build-telink/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu2 \ + wget \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line @@ -17,21 +17,17 @@ RUN set -x \ && : # last line # Setup Zephyr -ARG ZEPHYR_REVISION=95b54c90b1b7fb2626a9af3a5b7bd16459f35b45 +ARG ZEPHYR_REVISION=8cf9cc52e4de98d0303d8fed6a57ae956954986d WORKDIR /opt/telink/zephyrproject RUN set -x \ && python3 -m pip install -U --no-cache-dir \ west==0.12.0 \ - && git clone https://github.com/rikorsev/zephyr \ + && git clone https://github.com/telink-semi/zephyr \ && cd zephyr \ && git reset ${ZEPHYR_REVISION} --hard \ && west init -l \ && cd .. \ && west update -o=--depth=1 -n -f smart \ - && cd modules/hal/telink \ - && git remote add telink https://github.com/rikorsev/hal_telink \ - && git fetch telink telink_crypto \ - && git checkout telink_crypto \ && west zephyr-export \ && : # last line diff --git a/integrations/docker/images/chip-build-ti/Dockerfile b/integrations/docker/images/chip-build-ti/Dockerfile index 593b434c5a6df9..5e99fb9f44fc5a 100644 --- a/integrations/docker/images/chip-build-ti/Dockerfile +++ b/integrations/docker/images/chip-build-ti/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu2 \ + wget \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-tizen/Dockerfile b/integrations/docker/images/chip-build-tizen/Dockerfile index 3ae8192ec138c9..13fb66e234f1db 100644 --- a/integrations/docker/images/chip-build-tizen/Dockerfile +++ b/integrations/docker/images/chip-build-tizen/Dockerfile @@ -18,8 +18,8 @@ RUN set -x \ RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - cpio=2.13+dfsg-2 \ - obs-build=20180831-3ubuntu1 \ + cpio \ + obs-build \ openjdk-8-jre-headless \ zip \ # Cleanup diff --git a/integrations/docker/images/chip-build-vscode/Dockerfile b/integrations/docker/images/chip-build-vscode/Dockerfile index 5bbad09fa8a521..394adea2e19aa3 100644 --- a/integrations/docker/images/chip-build-vscode/Dockerfile +++ b/integrations/docker/images/chip-build-vscode/Dockerfile @@ -41,7 +41,7 @@ COPY --from=crosscompile /opt/ubuntu-21.04-aarch64-sysroot /opt/ubuntu-21.04-aar COPY --from=ameba /opt/ameba /opt/ameba -COPY --from=k32w /opt/sdk/sdks /opt/sdk/sdks +COPY --from=k32w /opt/sdk /opt/k32w_sdk COPY --from=imx /opt/fsl-imx-xwayland /opt/fsl-imx-xwayland @@ -75,7 +75,7 @@ ENV IDF_PATH=/opt/espressif/esp-idf/ ENV IDF_TOOLS_PATH=/opt/espressif/tools ENV IMX_SDK_ROOT=/opt/fsl-imx-xwayland/5.10-hardknott/ ENV NRF5_TOOLS_ROOT=/opt/NordicSemiconductor/nRF5_tools -ENV NXP_K32W061_SDK_ROOT=/opt/sdk/sdks +ENV NXP_K32W0_SDK_ROOT=/opt/k32w_sdk ENV OPENOCD_PATH=/opt/openocd/ ENV PW_ENVIRONMENT_ROOT=/home/vscode/pigweed/env ENV QEMU_ESP32=/opt/espressif/qemu/xtensa-softmmu/qemu-system-xtensa diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 4c819180ae4884..89a140eb53a3ca 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.86 Version bump reason: [Ameba] Set matter_enable_persistentstorage_audit as disabled by default +0.5.91 Version bump reason: [nRF Connect] Update nRF Connect SDK version diff --git a/integrations/docker/images/chip-cert-bins/Dockerfile b/integrations/docker/images/chip-cert-bins/Dockerfile new file mode 100644 index 00000000000000..7cb52537acbcff --- /dev/null +++ b/integrations/docker/images/chip-cert-bins/Dockerfile @@ -0,0 +1,278 @@ +# Stage 1: Setup dependencies (based on chip-build). +FROM ubuntu:22.04 as chip-build-cert +ARG TARGETPLATFORM +# COMMITHASH defines the target commit to build from. May be passed in using --build-arg. +ARG COMMITHASH=e556daac2e1ed3a141034a6dcc7e410e4cd1f8f6 + +# Ensure TARGETPLATFORM is set +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") \ + echo "Building for linux/amd64" \ + ;; \ + "linux/arm64") \ + echo "Building for linux/arm64" \ + ;; \ + *) \ + if [ -z "$TARGETPLATFORM" ] ;\ + then \ + echo "TARGETPLATFORM not defined! Please run from buildkit (buildx)." \ + && return 1 ;\ + else \ + echo "Unsupported platform ${TARGETPLATFORM}." \ + && return 1 ;\ + fi \ + ;; \ + esac + +# Below should be the same as chip-build except arm64 logic for cmake and node. + +# base build and check tools and libraries layer +RUN set -x \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ + autoconf \ + automake \ + bison \ + bridge-utils \ + clang \ + clang-format \ + clang-tidy \ + curl \ + flex \ + g++ \ + git \ + gperf \ + iproute2 \ + jq \ + lcov \ + libavahi-client-dev \ + libavahi-common-dev \ + libcairo2-dev \ + libdbus-1-dev \ + libdbus-glib-1-dev \ + libgif-dev \ + libglib2.0-dev \ + libical-dev \ + libjpeg-dev \ + libdmalloc-dev \ + libmbedtls-dev \ + libncurses5-dev \ + libncursesw5-dev \ + libnspr4-dev \ + libpango1.0-dev \ + libpixman-1-dev \ + libreadline-dev \ + libssl-dev \ + libtool \ + libudev-dev \ + libusb-1.0-0 \ + libusb-dev \ + libxml2-dev \ + make \ + net-tools \ + ninja-build \ + openjdk-8-jdk \ + pkg-config \ + python3 \ + python3-dev \ + python3-venv \ + rsync \ + shellcheck \ + strace \ + systemd \ + udev \ + unzip \ + wget \ + git-lfs \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/ \ + && git lfs install \ + && : # last line + +# Cmake (Mbed OS requires >=3.19.0-rc3 version which is not available in Ubuntu 20.04 repository) +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") \ + set -x \ + && (cd /tmp \ + && wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh \ + && sh cmake-3.19.3-Linux-x86_64.sh --exclude-subdir --prefix=/usr/local \ + && rm -rf cmake-3.19.3-Linux-x86_64.sh) \ + && exec bash \ + ;; \ + "linux/arm64") \ + set -x \ + && (cd /tmp \ + && wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-aarch64.sh \ + && sh cmake-3.19.3-Linux-aarch64.sh --exclude-subdir --prefix=/usr/local \ + && rm -rf cmake-3.19.3-Linux-aarch64.sh) \ + && exec bash \ + ;; \ + *) \ + test -n "$TARGETPLATFORM" \ + echo "Unsupported platform ${TARGETPLATFORM}" \ + ;; \ + esac + +# Python 3 and PIP +RUN set -x \ + && DEBIAN_FRONTEND=noninteractive apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y libgirepository1.0-dev \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common \ + && add-apt-repository universe \ + && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ + && python3 get-pip.py \ + && rm -rf /var/lib/apt/lists/ \ + && : # last line + +RUN set -x \ + && pip3 install attrs coloredlogs PyGithub pygit future portpicker mobly click cxxfilt ghapi pandas tabulate \ + && : # last line + +# build and install gn +RUN set -x \ + && git clone https://gn.googlesource.com/gn \ + && cd gn \ + && python3 build/gen.py \ + && ninja -C out \ + && cp out/gn /usr/local/bin \ + && cd .. \ + && rm -rf gn \ + && : # last line + +# Install bloat comparison tools +RUN set -x \ + && git clone https://github.com/google/bloaty.git \ + && mkdir -p bloaty/build \ + && cd bloaty/build \ + && cmake ../ \ + && make -j8 \ + && make install \ + && cd ../.. \ + && rm -rf bloaty \ + && : # last line + +# NodeJS: install a newer version than what apt-get would read +# This installs the latest LTS version of nodejs +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") \ + set -x \ + && mkdir node_js \ + && cd node_js \ + && wget https://nodejs.org/dist/v12.19.0/node-v12.19.0-linux-x64.tar.xz \ + && tar xfvJ node-v12.19.0-linux-x64.tar.xz \ + && mv node-v12.19.0-linux-x64 /opt/ \ + && ln -s /opt/node-v12.19.0-linux-x64 /opt/node \ + && ln -s /opt/node/bin/* /usr/bin \ + && cd .. \ + && rm -rf node_js \ + ;; \ + "linux/arm64")\ + set -x \ + && mkdir node_js \ + && cd node_js \ + && wget https://nodejs.org/dist/v12.19.0/node-v12.19.0-linux-arm64.tar.xz \ + && tar xfvJ node-v12.19.0-linux-arm64.tar.xz \ + && mv node-v12.19.0-linux-arm64 /opt/ \ + && ln -s /opt/node-v12.19.0-linux-arm64 /opt/node \ + && ln -s /opt/node/bin/* /usr/bin \ + && cd .. \ + && rm -rf node_js \ + ;; \ + *) ;; \ + esac + +# Stage 1.5: Bootstrap Matter. +RUN mkdir /root/connectedhomeip +RUN git clone https://github.com/project-chip/connectedhomeip.git /root/connectedhomeip +WORKDIR /root/connectedhomeip/ +RUN git checkout ${COMMITHASH} +RUN scripts/build/gn_bootstrap.sh +RUN gn gen out/debug --args='chip_mdns="platform" chip_inet_config_enable_ipv4=false' +RUN ninja -C out/debug + +# Stage 2: Build. +from chip-build-cert as chip-build-cert-bins +SHELL ["/bin/bash", "-c"] +# Records Matter SDK commit hash to include in the image. +RUN git rev-parse HEAD > /root/.sdk-sha-version +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") \ + set -x \ + && source scripts/activate.sh \ + && scripts/build/build_examples.py \ + --target linux-x64-all-clusters-ipv6only \ + --target linux-x64-all-clusters-minimal-ipv6only \ + --target linux-x64-bridge-ipv6only \ + --target linux-x64-tv-app-ipv6only \ + --target linux-x64-tv-casting-app-ipv6only \ + --target linux-x64-light-ipv6only \ + --target linux-x64-thermostat-ipv6only \ + --target linux-x64-ota-provider-ipv6only \ + --target linux-x64-ota-requestor-ipv6only \ + --target linux-x64-lock-ipv6only \ + build \ + && mv out/linux-x64-all-clusters-ipv6only/chip-all-clusters-app out/chip-all-clusters-app \ + && mv out/linux-x64-all-clusters-minimal-ipv6only/chip-all-clusters-minimal-app out/chip-all-clusters-minimal-app \ + && mv out/linux-x64-bridge-ipv6only/chip-bridge-app out/chip-bridge-app \ + && mv out/linux-x64-tv-app-ipv6only/chip-tv-app out/chip-tv-app \ + && mv out/linux-x64-tv-casting-app-ipv6only/chip-tv-casting-app out/chip-tv-casting-app \ + && mv out/linux-x64-light-ipv6only/chip-lighting-app out/chip-lighting-app \ + && mv out/linux-x64-thermostat-ipv6only/thermostat-app out/thermostat-app \ + && mv out/linux-x64-ota-provider-ipv6only/chip-ota-provider-app out/chip-ota-provider-app \ + && mv out/linux-x64-ota-requestor-ipv6only/chip-ota-requestor-app out/chip-ota-requestor-app \ + && mv out/linux-x64-lock-ipv6only/chip-lock-app out/chip-lock-app \ + ;; \ + "linux/arm64")\ + set -x \ + && source scripts/activate.sh \ + && scripts/build/build_examples.py \ + --target linux-arm64-all-clusters-ipv6only \ + --target linux-arm64-all-clusters-minimal-ipv6only \ + --target linux-arm64-bridge-ipv6only \ + --target linux-arm64-tv-app-ipv6only \ + --target linux-arm64-tv-casting-app-ipv6only \ + --target linux-arm64-light-ipv6only \ + --target linux-arm64-thermostat-ipv6only \ + --target linux-arm64-ota-provider-ipv6only \ + --target linux-arm64-ota-requestor-ipv6only \ + --target linux-arm64-lock-ipv6only \ + build \ + && mv out/linux-arm64-all-clusters-ipv6only/chip-all-clusters-app out/chip-all-clusters-app \ + && mv out/linux-arm64-all-clusters-minimal-ipv6only/chip-all-clusters-minimal-app out/chip-all-clusters-minimal-app \ + && mv out/linux-arm64-bridge-ipv6only/chip-bridge-app out/chip-bridge-app \ + && mv out/linux-arm64-tv-app-ipv6only/chip-tv-app out/chip-tv-app \ + && mv out/linux-arm64-tv-casting-app-ipv6only/chip-tv-casting-app out/chip-tv-casting-app \ + && mv out/linux-arm64-light-ipv6only/chip-lighting-app out/chip-lighting-app \ + && mv out/linux-arm64-thermostat-ipv6only/thermostat-app out/thermostat-app \ + && mv out/linux-arm64-ota-provider-ipv6only/chip-ota-provider-app out/chip-ota-provider-app \ + && mv out/linux-arm64-ota-requestor-ipv6only/chip-ota-requestor-app out/chip-ota-requestor-app \ + && mv out/linux-arm64-lock-ipv6only/chip-lock-app out/chip-lock-app \ + ;; \ + *) ;; \ + esac + +RUN npm --prefix third_party/zap/repo/ ci +RUN scripts/examples/gn_build_test_example.sh app1 + +# Stage 3: Copy relevant cert bins to a minimal image to reduce size. +FROM ubuntu:22.04 +ENV TZ=Etc/UTC +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +RUN apt-get update -y +RUN apt-get install -y libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev avahi-utils iproute2 +WORKDIR /root/ +COPY --from=chip-build-cert-bins /root/.sdk-sha-version .sdk-sha-version +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/debug/chip-tool chip-tool +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/debug/chip-shell chip-shell +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/debug/chip-cert chip-cert +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-all-clusters-app chip-all-clusters-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-all-clusters-minimal-app chip-all-clusters-minimal-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-lighting-app chip-lighting-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-tv-casting-app chip-tv-casting-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-tv-app chip-tv-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-bridge-app chip-bridge-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/thermostat-app thermostat-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-ota-provider-app chip-ota-provider-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-ota-requestor-app chip-ota-requestor-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-lock-app chip-lock-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/app1/chip-app1 chip-app1 diff --git a/integrations/docker/images/chip-cert-bins/README.md b/integrations/docker/images/chip-cert-bins/README.md new file mode 100644 index 00000000000000..2a6261a79c1dee --- /dev/null +++ b/integrations/docker/images/chip-cert-bins/README.md @@ -0,0 +1,68 @@ +# Docker image for Matter Certification Test Harness + +The Dockerfile here helps build multi-platform Docker images containing the +executable binaries necessary for the Matter Test Harness. It utilizes the +BuildKit toolkit and Buildx, included within Docker since version 18.06. + +## Running + +In order to properly run the binaries, avahi must be properly set up and passed +to the container. + +Prerequisites: + +- Host must support and enable IPv6 and be on a network that has IPv6. +- IPv6 must be enabled within avahi config on the host. `use-ipv6=yes` in + avahi-daemon.conf +- Sometimes there are stale avahi entries, so restarting avahi-daemon between + runs may be necessary. + +The host network and dbus must be exposed to the container for avahi to work +properly. So for an interactive prompt, use: + +``` +docker run -it --network host -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket chip-cert-bins +``` + +## Building + +The Dockerfile requires building using the Buildx plugin, included within +docker. It is used to build for both the amd64 and arm64 architectures, so the +image may be cross-built and ran directly on a Raspberry Pi or other arm64 based +environment. If your docker installation does not have the Buildx plugin, please +update docker or install Buildx manually. + +Prerequisites: + +- A recent docker installation. +- Create a Buildx builder: `docker buildx create --use --name mybuild` +- Install the Binfmt cross-platform Docker emulators: + `docker run --privileged --rm tonistiigi/binfmt --install all` + +### Example: Building for the host platform and loading into Docker + +``` +docker buildx build --load . +``` + +The above command will build the image and load them into your local Docker +instance. + +### Example: Building for another platform and exporting to a tar + +``` +docker buildx build --platform linux/arm64 --output "dest=/full/path/to/dest/chipcertbins.tar,type=docker" . +``` + +The above command will build the image and export it to a tar file. You may copy +the tar file to a RaspberryPi and import the image by using: + +``` +docker load --input chipcertbins.tar +``` + +### Example: Creating a multi-platform image and pushing to the Docker registry + +``` +docker buildx build --platform linux/amd64,linux/arm64 --tag chip-cert-bins:tag1 --push . +``` diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 5da906e0953545..09836d01db1b9b 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -22,7 +22,7 @@ from builders.cyw30739 import Cyw30739App, Cyw30739Board, Cyw30739Builder from builders.efr32 import Efr32App, Efr32Board, Efr32Builder from builders.esp32 import Esp32App, Esp32Board, Esp32Builder -from builders.host import HostApp, HostBoard, HostBuilder +from builders.host import HostApp, HostBoard, HostBuilder, HostCryptoLibrary from builders.infineon import InfineonApp, InfineonBoard, InfineonBuilder from builders.k32w import K32WApp, K32WBuilder from builders.mbed import MbedApp, MbedBoard, MbedBuilder, MbedProfile @@ -116,6 +116,17 @@ def Accept(self, name: str): return False +class RejectNameWithSubstrings: + def __init__(self, substr: List[str]): + self.substr = substr + + def Accept(self, name: str): + for s in self.substr: + if s in name: + return False + return True + + class BuildVariant: def __init__(self, name: str, validator=AcceptAnyName(), conflicts: List[str] = [], requires: List[str] = [], @@ -226,7 +237,7 @@ def HostTargets(): # x64 linux supports cross compile cross_compile = (HostBoard.NATIVE.PlatformName() == 'linux') and (HostBoard.NATIVE.BoardName() != HostBoard.ARM64.BoardName()) if cross_compile: - targets.append(target.Extend('arm64', board=HostBoard.ARM64)) + targets.append(target.Extend('arm64-clang', board=HostBoard.ARM64, use_clang=True)) app_targets = [] @@ -260,9 +271,12 @@ def HostTargets(): app_targets.append(target.Extend('tv-casting-app', app=HostApp.TV_CASTING)) app_targets.append(target.Extend('bridge', app=HostApp.BRIDGE)) - nodeps_args = dict(enable_ble=False, enable_wifi=False, enable_thread=False, use_clang=True) + nodeps_args = dict(enable_ble=False, enable_wifi=False, enable_thread=False, + crypto_library=HostCryptoLibrary.MBEDTLS, use_clang=True) app_targets.append(target.Extend('chip-tool-nodeps', app=HostApp.CHIP_TOOL, **nodeps_args)) app_targets.append(target.Extend('all-clusters-app-nodeps', app=HostApp.ALL_CLUSTERS, **nodeps_args)) + app_targets.append(target.Extend('ota-provider-nodeps', app=HostApp.OTA_PROVIDER, **nodeps_args)) + app_targets.append(target.Extend('ota-requestor-nodeps', app=HostApp.OTA_REQUESTOR, **nodeps_args)) builder = VariantBuilder() @@ -276,11 +290,19 @@ def HostTargets(): builder.AppendVariant(name="no-ble", enable_ble=False), builder.AppendVariant(name="no-wifi", enable_wifi=False), builder.AppendVariant(name="no-thread", enable_thread=False), + builder.AppendVariant(name="mbedtls", conflicts=['boringssl'], crypto_library=HostCryptoLibrary.MBEDTLS), + builder.AppendVariant(name="boringssl", conflicts=['mbedtls'], crypto_library=HostCryptoLibrary.BORINGSSL), builder.AppendVariant(name="tsan", conflicts=['asan'], use_tsan=True), builder.AppendVariant(name="asan", conflicts=['tsan'], use_asan=True), builder.AppendVariant(name="libfuzzer", requires=[ "clang"], use_libfuzzer=True), - builder.AppendVariant(name="clang", use_clang=True), + if cross_compile: + builder.AppendVariant(name="clang", use_clang=True, validator=RejectNameWithSubstrings( + ['arm64'] + )), + else: + builder.AppendVariant(name="clang", use_clang=True) + builder.AppendVariant(name="test", extra_tests=True), builder.WhitelistVariantNameForGlob('ipv6only') @@ -310,8 +332,10 @@ def HostTargets(): use_platform_mdns=True, enable_ipv4=False).GlobBlacklist("Reduce default build variants") yield target_native.Extend('tests', app=HostApp.TESTS) - yield target_native.Extend('tests-coverage', app=HostApp.TESTS, use_coverage=True) - yield target_native.Extend('tests-clang', app=HostApp.TESTS, use_clang=True) + yield target_native.Extend('tests-mbedtls', app=HostApp.TESTS, crypto_library=HostCryptoLibrary.MBEDTLS).GlobBlacklist("Non-default test") + yield target_native.Extend('tests-boringssl', app=HostApp.TESTS, crypto_library=HostCryptoLibrary.BORINGSSL).GlobBlacklist("Non-default test") + yield target_native.Extend('tests-coverage', app=HostApp.TESTS, use_coverage=True).GlobBlacklist("Non-default test") + yield target_native.Extend('tests-clang', app=HostApp.TESTS, use_clang=True).GlobBlacklist("Non-default test") test_target = Target(HostBoard.NATIVE.PlatformName(), HostBuilder) yield test_target.Extend(HostBoard.FAKE.BoardName() + '-tests', board=HostBoard.FAKE, app=HostApp.TESTS) @@ -513,7 +537,7 @@ def K32WTargets(): target = Target('k32w', K32WBuilder) yield target.Extend('light-ota-se', app=K32WApp.LIGHT, release=True, disable_ble=True, se05x=True).GlobBlacklist("Only on demand build") - yield target.Extend('light-release-no-ota', app=K32WApp.LIGHT, tokenizer=True, disable_ota=True, release=True) + yield target.Extend('light-release-no-ota', app=K32WApp.LIGHT, tokenizer=True, disable_ota=True, release=True, tinycrypt=True) yield target.Extend('shell-release', app=K32WApp.SHELL, release=True) yield target.Extend('lock-release', app=K32WApp.LOCK, release=True) yield target.Extend('lock-low-power-release', app=K32WApp.LOCK, diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 1569b0564c4530..54df761d3dd3ca 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -19,6 +19,22 @@ from .gn import GnBuilder +class HostCryptoLibrary(Enum): + """Defines what cryptographic backend applications should use.""" + OPENSSL = auto() + MBEDTLS = auto() + BORINGSSL = auto() + + @property + def gn_argument(self): + if self == HostCryptoLibrary.OPENSSL: + return 'chip_crypto="openssl"' + elif self == HostCryptoLibrary.MBEDTLS: + return 'chip_crypto="mbedtls"' + elif self == HostCryptoLibrary.BORINGSSL: + return 'chip_crypto="boringssl"' + + class HostApp(Enum): ALL_CLUSTERS = auto() ALL_CLUSTERS_MINIMAL = auto() @@ -198,7 +214,7 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, separate_event_loop=True, use_libfuzzer=False, use_clang=False, interactive_mode=True, extra_tests=False, use_platform_mdns=False, enable_rpcs=False, - use_coverage=False): + use_coverage=False, crypto_library: HostCryptoLibrary = None): super(HostBuilder, self).__init__( root=os.path.join(root, 'examples', app.ExamplePath()), runner=runner) @@ -264,14 +280,19 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, if app == HostApp.NL_TEST_RUNNER: self.build_command = 'runner' + # Crypto library has per-platform defaults (like openssl for linux/mac + # and mbedtls for android/freertos/zephyr/mbed/...) + if crypto_library: + self.extra_gn_options.append(crypto_library.gn_argument) + + if self.board == HostBoard.ARM64: + if not use_clang: + raise Exception("Cross compile only supported using clang") + if app == HostApp.CERT_TOOL: # Certification only built for openssl - if self.board == HostBoard.ARM64: - # OpenSSL and mbedTLS conflicts. - # We only cross compile with mbedTLS. - raise Exception( - "Cannot cross compile CERT TOOL: ssl library conflict") - self.extra_gn_options.append('chip_crypto="openssl"') + if self.board == HostBoard.ARM64 and crypto_library == HostCryptoLibrary.MBEDTLS: + raise Exception("MbedTLS not supported for cross compiling cert tool") self.build_command = 'src/tools/chip-cert' elif app == HostApp.ADDRESS_RESOLVE: self.build_command = 'src/lib/address_resolve:address-resolve-tool' @@ -287,8 +308,6 @@ def GnBuildArgs(self): self.extra_gn_options.extend( [ 'target_cpu="arm64"', - 'is_clang=true', - 'chip_crypto="mbedtls"', 'sysroot="%s"' % self.SysRootPath('SYSROOT_AARCH64') ] ) diff --git a/scripts/build/builders/k32w.py b/scripts/build/builders/k32w.py index ea446ec8a40e88..39828157e934eb 100644 --- a/scripts/build/builders/k32w.py +++ b/scripts/build/builders/k32w.py @@ -35,11 +35,13 @@ def ExampleName(self): def AppNamePrefix(self): if self == K32WApp.LIGHT: - return 'chip-k32w061-light-example' + return 'chip-k32w0x-light-example' elif self == K32WApp.LOCK: - return 'chip-k32w061-lock-example' + return 'chip-k32w0x-lock-example' elif self == K32WApp.SHELL: - return 'chip-k32w061-shell-example' + return 'chip-k32w0x-shell-example' + elif self == K32WApp.CONTACT: + return 'chip-k32w0x-contact-example' else: raise Exception('Unknown app type: %r' % self) @@ -58,7 +60,8 @@ def __init__(self, tokenizer: bool = False, disable_ble: bool = False, disable_ota: bool = False, - se05x: bool = False): + se05x: bool = False, + tinycrypt: bool = False): super(K32WBuilder, self).__init__( root=app.BuildRoot(root), runner=runner) @@ -70,10 +73,11 @@ def __init__(self, self.disable_ble = disable_ble self.disable_ota = disable_ota self.se05x = se05x + self.tinycrypt = tinycrypt def GnBuildArgs(self): args = [ - 'k32w0_sdk_root="%s"' % os.environ['NXP_K32W061_SDK_ROOT'], + 'k32w0_sdk_root="%s"' % os.environ['NXP_K32W0_SDK_ROOT'], ] if self.low_power: @@ -96,6 +100,9 @@ def GnBuildArgs(self): if self.se05x: args.append('chip_with_se05x=true') + if self.tinycrypt: + args.append('chip_crypto=\"tinycrypt\" mbedtls_repo=\"//third_party/connectedhomeip/third_party/nxp/libs/mbedtls\"') + return args def generate(self): diff --git a/scripts/build/test.py b/scripts/build/test.py index 5559847adf50d9..056d34166a40ef 100644 --- a/scripts/build/test.py +++ b/scripts/build/test.py @@ -44,7 +44,7 @@ def build_actual_output(root: str, out: str, args: List[str]) -> List[str]: 'TIZEN_SDK_SYSROOT': 'TEST_TIZEN_SDK_SYSROOT', 'TELINK_ZEPHYR_SDK_DIR': 'TELINK_ZEPHYR_SDK_DIR', 'SYSROOT_AARCH64': 'SYSROOT_AARCH64', - 'NXP_K32W061_SDK_ROOT': 'TEST_NXP_K32W061_SDK_ROOT', + 'NXP_K32W0_SDK_ROOT': 'TEST_NXP_K32W0_SDK_ROOT', 'IMX_SDK_ROOT': 'IMX_SDK_ROOT', 'TI_SYSCONFIG_ROOT': 'TEST_TI_SYSCONFIG_ROOT', }) diff --git a/scripts/build/testdata/build_all_except_host.txt b/scripts/build/testdata/build_all_except_host.txt index fa887aca49fb73..e365f295f08c20 100644 --- a/scripts/build/testdata/build_all_except_host.txt +++ b/scripts/build/testdata/build_all_except_host.txt @@ -858,27 +858,27 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa {root}/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh # Generating k32w-light-ota-se -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/nxp/k32w/k32w0 '--args=k32w0_sdk_root="TEST_NXP_K32W061_SDK_ROOT" chip_with_low_power=0 is_debug=false chip_enable_ble=false chip_with_se05x=true' {out}/k32w-light-ota-se +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/nxp/k32w/k32w0 '--args=k32w0_sdk_root="TEST_NXP_K32W0_SDK_ROOT" chip_with_low_power=0 is_debug=false chip_enable_ble=false chip_with_se05x=true' {out}/k32w-light-ota-se {root}/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh # Generating k32w-light-release-no-ota -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/nxp/k32w/k32w0 '--args=k32w0_sdk_root="TEST_NXP_K32W061_SDK_ROOT" chip_with_low_power=0 chip_pw_tokenizer_logging=true is_debug=false chip_enable_ota_requestor=false' {out}/k32w-light-release-no-ota +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/nxp/k32w/k32w0 '--args=k32w0_sdk_root="TEST_NXP_K32W0_SDK_ROOT" chip_with_low_power=0 chip_pw_tokenizer_logging=true is_debug=false chip_enable_ota_requestor=false chip_crypto="tinycrypt" mbedtls_repo="//third_party/connectedhomeip/third_party/nxp/libs/mbedtls"' {out}/k32w-light-release-no-ota {root}/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh # Generating k32w-lock-low-power-release -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/nxp/k32w/k32w0 '--args=k32w0_sdk_root="TEST_NXP_K32W061_SDK_ROOT" chip_with_low_power=1 is_debug=false' {out}/k32w-lock-low-power-release +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/nxp/k32w/k32w0 '--args=k32w0_sdk_root="TEST_NXP_K32W0_SDK_ROOT" chip_with_low_power=1 is_debug=false' {out}/k32w-lock-low-power-release {root}/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh # Generating k32w-lock-release -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/nxp/k32w/k32w0 '--args=k32w0_sdk_root="TEST_NXP_K32W061_SDK_ROOT" chip_with_low_power=0 is_debug=false' {out}/k32w-lock-release +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/nxp/k32w/k32w0 '--args=k32w0_sdk_root="TEST_NXP_K32W0_SDK_ROOT" chip_with_low_power=0 is_debug=false' {out}/k32w-lock-release {root}/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh # Generating k32w-shell-release -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/nxp/k32w/k32w0 '--args=k32w0_sdk_root="TEST_NXP_K32W061_SDK_ROOT" chip_with_low_power=0 is_debug=false' {out}/k32w-shell-release +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/nxp/k32w/k32w0 '--args=k32w0_sdk_root="TEST_NXP_K32W0_SDK_ROOT" chip_with_low_power=0 is_debug=false' {out}/k32w-shell-release # Generating config mbed-CY8CPROTO_062_4343W-all-clusters-debug mbed-tools configure -t GCC_ARM -m CY8CPROTO_062_4343W -p {root}/examples/all-clusters-app/mbed -o {out}/mbed-CY8CPROTO_062_4343W-all-clusters-debug --mbed-os-path {root}/third_party/mbed-os/repo diff --git a/scripts/build/testdata/build_linux_on_x64.txt b/scripts/build/testdata/build_linux_on_x64.txt index 8e28a1abd6e909..9a926ebce07b96 100644 --- a/scripts/build/testdata/build_linux_on_x64.txt +++ b/scripts/build/testdata/build_linux_on_x64.txt @@ -1,170 +1,190 @@ # Commands will be run in CHIP project root. cd "{root}" -# Generating linux-arm64-all-clusters +# Generating linux-arm64-clang-all-clusters bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-all-clusters' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-all-clusters' -# Generating linux-arm64-all-clusters-app-nodeps +# Generating linux-arm64-clang-all-clusters-app-nodeps bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-all-clusters-app-nodeps' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-all-clusters-app-nodeps' -# Generating linux-arm64-all-clusters-app-nodeps-ipv6only +# Generating linux-arm64-clang-all-clusters-app-nodeps-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-all-clusters-app-nodeps-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-all-clusters-app-nodeps-ipv6only' -# Generating linux-arm64-all-clusters-ipv6only +# Generating linux-arm64-clang-all-clusters-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-all-clusters-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-all-clusters-ipv6only' -# Generating linux-arm64-all-clusters-minimal +# Generating linux-arm64-clang-all-clusters-minimal bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-minimal-app/linux '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-all-clusters-minimal' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-minimal-app/linux '"'"'--args=is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-all-clusters-minimal' -# Generating linux-arm64-all-clusters-minimal-ipv6only +# Generating linux-arm64-clang-all-clusters-minimal-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-minimal-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-all-clusters-minimal-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-minimal-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-all-clusters-minimal-ipv6only' -# Generating linux-arm64-bridge +# Generating linux-arm64-clang-bridge bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/bridge-app/linux '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-bridge' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/bridge-app/linux '"'"'--args=is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-bridge' -# Generating linux-arm64-bridge-ipv6only +# Generating linux-arm64-clang-bridge-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/bridge-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-bridge-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/bridge-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-bridge-ipv6only' -# Generating linux-arm64-chip-tool +# Generating linux-arm64-clang-chip-tool bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-chip-tool' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-chip-tool' -# Generating linux-arm64-chip-tool-ipv6only +# Generating linux-arm64-clang-chip-tool-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-chip-tool-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-chip-tool-ipv6only' -# Generating linux-arm64-chip-tool-nodeps +# Generating linux-arm64-clang-chip-tool-nodeps bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-chip-tool-nodeps' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-chip-tool-nodeps' -# Generating linux-arm64-chip-tool-nodeps-ipv6only +# Generating linux-arm64-clang-chip-tool-nodeps-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-chip-tool-nodeps-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-chip-tool-nodeps-ipv6only' -# Generating linux-arm64-light +# Generating linux-arm64-clang-light bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-light' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '"'"'--args=is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-light' -# Generating linux-arm64-light-ipv6only +# Generating linux-arm64-clang-light-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-light-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-light-ipv6only' -# Generating linux-arm64-light-rpc +# Generating linux-arm64-clang-light-rpc bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '"'"'--args=import("//with_pw_rpc.gni") target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-light-rpc' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '"'"'--args=import("//with_pw_rpc.gni") is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-light-rpc' -# Generating linux-arm64-light-rpc-ipv6only +# Generating linux-arm64-clang-light-rpc-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '"'"'--args=import("//with_pw_rpc.gni") chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-light-rpc-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '"'"'--args=import("//with_pw_rpc.gni") chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-light-rpc-ipv6only' -# Generating linux-arm64-lock +# Generating linux-arm64-clang-lock bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/linux '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-lock' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/linux '"'"'--args=is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-lock' -# Generating linux-arm64-lock-ipv6only +# Generating linux-arm64-clang-lock-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-lock-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-lock-ipv6only' -# Generating linux-arm64-minmdns +# Generating linux-arm64-clang-minmdns bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/minimal-mdns '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-minmdns' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/minimal-mdns '"'"'--args=is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-minmdns' -# Generating linux-arm64-minmdns-ipv6only +# Generating linux-arm64-clang-minmdns-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/minimal-mdns '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-minmdns-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/minimal-mdns '"'"'--args=chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-minmdns-ipv6only' -# Generating linux-arm64-ota-provider +# Generating linux-arm64-clang-ota-provider bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '"'"'--args=chip_config_network_layer_ble=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-ota-provider' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '"'"'--args=chip_config_network_layer_ble=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-provider' -# Generating linux-arm64-ota-provider-ipv6only +# Generating linux-arm64-clang-ota-provider-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-ota-provider-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-provider-ipv6only' -# Generating linux-arm64-ota-requestor +# Generating linux-arm64-clang-ota-provider-nodeps bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '"'"'--args=chip_config_network_layer_ble=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-ota-requestor' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-provider-nodeps' -# Generating linux-arm64-ota-requestor-ipv6only +# Generating linux-arm64-clang-ota-provider-nodeps-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-ota-requestor-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-provider-nodeps-ipv6only' -# Generating linux-arm64-python-bindings +# Generating linux-arm64-clang-ota-requestor bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root} '"'"'--args=enable_rtti=false chip_project_config_include_dirs=["//config/python"] target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-python-bindings' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '"'"'--args=chip_config_network_layer_ble=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-requestor' -# Generating linux-arm64-shell +# Generating linux-arm64-clang-ota-requestor-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/standalone '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-shell' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-requestor-ipv6only' -# Generating linux-arm64-shell-ipv6only +# Generating linux-arm64-clang-ota-requestor-nodeps bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/standalone '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-shell-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-requestor-nodeps' -# Generating linux-arm64-thermostat +# Generating linux-arm64-clang-ota-requestor-nodeps-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/thermostat/linux '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-thermostat' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-requestor-nodeps-ipv6only' -# Generating linux-arm64-thermostat-ipv6only +# Generating linux-arm64-clang-python-bindings bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/thermostat/linux '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-thermostat-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root} '"'"'--args=is_clang=true enable_rtti=false chip_project_config_include_dirs=["//config/python"] target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-python-bindings' -# Generating linux-arm64-tv-app +# Generating linux-arm64-clang-shell bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/tv-app/linux '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-tv-app' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/standalone '"'"'--args=is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-shell' -# Generating linux-arm64-tv-app-ipv6only +# Generating linux-arm64-clang-shell-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/tv-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-tv-app-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/standalone '"'"'--args=chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-shell-ipv6only' -# Generating linux-arm64-tv-casting-app +# Generating linux-arm64-clang-thermostat bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/tv-casting-app/linux '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-tv-casting-app' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/thermostat/linux '"'"'--args=is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-thermostat' -# Generating linux-arm64-tv-casting-app-ipv6only +# Generating linux-arm64-clang-thermostat-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/tv-casting-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-tv-casting-app-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/thermostat/linux '"'"'--args=chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-thermostat-ipv6only' + +# Generating linux-arm64-clang-tv-app +bash -c ' +PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/tv-app/linux '"'"'--args=is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-tv-app' + +# Generating linux-arm64-clang-tv-app-ipv6only +bash -c ' +PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/tv-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-tv-app-ipv6only' + +# Generating linux-arm64-clang-tv-casting-app +bash -c ' +PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/tv-casting-app/linux '"'"'--args=is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-tv-casting-app' + +# Generating linux-arm64-clang-tv-casting-app-ipv6only +bash -c ' +PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/tv-casting-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-tv-casting-app-ipv6only' # Generating linux-fake-tests gn gen --check --fail-on-unused-args --export-compile-commands --root={root} '--args=chip_build_tests=true custom_toolchain="//build/toolchain/fake:fake_x64_gcc" chip_link_tests=true chip_device_platform="fake" chip_fake_platform=true' {out}/linux-fake-tests @@ -176,10 +196,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root} {ou gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux {out}/linux-x64-all-clusters # Generating linux-x64-all-clusters-app-nodeps -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true' {out}/linux-x64-all-clusters-app-nodeps +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-all-clusters-app-nodeps # Generating linux-x64-all-clusters-app-nodeps-ipv6only -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true' {out}/linux-x64-all-clusters-app-nodeps-ipv6only +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-all-clusters-app-nodeps-ipv6only # Generating linux-x64-all-clusters-coverage gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux --args=use_coverage=true {out}/linux-x64-all-clusters-coverage @@ -200,7 +220,7 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/bridge-app/linux --args=chip_inet_config_enable_ipv4=false {out}/linux-x64-bridge-ipv6only # Generating linux-x64-chip-cert -gn gen --check --fail-on-unused-args --export-compile-commands --root={root} '--args=chip_crypto="openssl"' {out}/linux-x64-chip-cert +gn gen --check --fail-on-unused-args --export-compile-commands --root={root} {out}/linux-x64-chip-cert # Generating linux-x64-chip-tool gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool {out}/linux-x64-chip-tool @@ -212,10 +232,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool --args=chip_inet_config_enable_ipv4=false {out}/linux-x64-chip-tool-ipv6only # Generating linux-x64-chip-tool-nodeps -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true' {out}/linux-x64-chip-tool-nodeps +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-chip-tool-nodeps # Generating linux-x64-chip-tool-nodeps-ipv6only -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true' {out}/linux-x64-chip-tool-nodeps-ipv6only +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-chip-tool-nodeps-ipv6only # Generating linux-x64-light gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux {out}/linux-x64-light @@ -250,12 +270,24 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa # Generating linux-x64-ota-provider-ipv6only gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false' {out}/linux-x64-ota-provider-ipv6only +# Generating linux-x64-ota-provider-nodeps +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-ota-provider-nodeps + +# Generating linux-x64-ota-provider-nodeps-ipv6only +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-ota-provider-nodeps-ipv6only + # Generating linux-x64-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux --args=chip_config_network_layer_ble=false {out}/linux-x64-ota-requestor # Generating linux-x64-ota-requestor-ipv6only gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false' {out}/linux-x64-ota-requestor-ipv6only +# Generating linux-x64-ota-requestor-nodeps +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-ota-requestor-nodeps + +# Generating linux-x64-ota-requestor-nodeps-ipv6only +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-ota-requestor-nodeps-ipv6only + # Generating linux-x64-python-bindings gn gen --check --fail-on-unused-args --export-compile-commands --root={root} '--args=enable_rtti=false chip_project_config_include_dirs=["//config/python"]' {out}/linux-x64-python-bindings @@ -271,18 +303,6 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa # Generating linux-x64-tests gn gen --check --fail-on-unused-args --export-compile-commands --root={root} --args=chip_build_tests=true {out}/linux-x64-tests -# Generating linux-x64-tests-clang -gn gen --check --fail-on-unused-args --export-compile-commands --root={root} '--args=is_clang=true chip_build_tests=true' {out}/linux-x64-tests-clang - -# Generating linux-x64-tests-coverage -gn gen --check --fail-on-unused-args --export-compile-commands --root={root} '--args=use_coverage=true chip_build_tests=true' {out}/linux-x64-tests-coverage - -# Create coverage output location -mkdir -p {out}/linux-x64-tests-coverage/coverage - -# Initial coverage baseline -lcov --initial --capture --directory {out}/linux-x64-tests-coverage/obj --output-file {out}/linux-x64-tests-coverage/coverage/lcov_base.info - # Generating linux-x64-thermostat gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/thermostat/linux {out}/linux-x64-thermostat @@ -301,104 +321,116 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa # Generating linux-x64-tv-casting-app-ipv6only gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/tv-casting-app/linux --args=chip_inet_config_enable_ipv4=false {out}/linux-x64-tv-casting-app-ipv6only -# Building linux-arm64-all-clusters -ninja -C {out}/linux-arm64-all-clusters +# Building linux-arm64-clang-all-clusters +ninja -C {out}/linux-arm64-clang-all-clusters + +# Building linux-arm64-clang-all-clusters-app-nodeps +ninja -C {out}/linux-arm64-clang-all-clusters-app-nodeps + +# Building linux-arm64-clang-all-clusters-app-nodeps-ipv6only +ninja -C {out}/linux-arm64-clang-all-clusters-app-nodeps-ipv6only + +# Building linux-arm64-clang-all-clusters-ipv6only +ninja -C {out}/linux-arm64-clang-all-clusters-ipv6only -# Building linux-arm64-all-clusters-app-nodeps -ninja -C {out}/linux-arm64-all-clusters-app-nodeps +# Building linux-arm64-clang-all-clusters-minimal +ninja -C {out}/linux-arm64-clang-all-clusters-minimal -# Building linux-arm64-all-clusters-app-nodeps-ipv6only -ninja -C {out}/linux-arm64-all-clusters-app-nodeps-ipv6only +# Building linux-arm64-clang-all-clusters-minimal-ipv6only +ninja -C {out}/linux-arm64-clang-all-clusters-minimal-ipv6only -# Building linux-arm64-all-clusters-ipv6only -ninja -C {out}/linux-arm64-all-clusters-ipv6only +# Building linux-arm64-clang-bridge +ninja -C {out}/linux-arm64-clang-bridge -# Building linux-arm64-all-clusters-minimal -ninja -C {out}/linux-arm64-all-clusters-minimal +# Building linux-arm64-clang-bridge-ipv6only +ninja -C {out}/linux-arm64-clang-bridge-ipv6only -# Building linux-arm64-all-clusters-minimal-ipv6only -ninja -C {out}/linux-arm64-all-clusters-minimal-ipv6only +# Building linux-arm64-clang-chip-tool +ninja -C {out}/linux-arm64-clang-chip-tool -# Building linux-arm64-bridge -ninja -C {out}/linux-arm64-bridge +# Building linux-arm64-clang-chip-tool-ipv6only +ninja -C {out}/linux-arm64-clang-chip-tool-ipv6only -# Building linux-arm64-bridge-ipv6only -ninja -C {out}/linux-arm64-bridge-ipv6only +# Building linux-arm64-clang-chip-tool-nodeps +ninja -C {out}/linux-arm64-clang-chip-tool-nodeps -# Building linux-arm64-chip-tool -ninja -C {out}/linux-arm64-chip-tool +# Building linux-arm64-clang-chip-tool-nodeps-ipv6only +ninja -C {out}/linux-arm64-clang-chip-tool-nodeps-ipv6only -# Building linux-arm64-chip-tool-ipv6only -ninja -C {out}/linux-arm64-chip-tool-ipv6only +# Building linux-arm64-clang-light +ninja -C {out}/linux-arm64-clang-light -# Building linux-arm64-chip-tool-nodeps -ninja -C {out}/linux-arm64-chip-tool-nodeps +# Building linux-arm64-clang-light-ipv6only +ninja -C {out}/linux-arm64-clang-light-ipv6only -# Building linux-arm64-chip-tool-nodeps-ipv6only -ninja -C {out}/linux-arm64-chip-tool-nodeps-ipv6only +# Building linux-arm64-clang-light-rpc +ninja -C {out}/linux-arm64-clang-light-rpc -# Building linux-arm64-light -ninja -C {out}/linux-arm64-light +# Building linux-arm64-clang-light-rpc-ipv6only +ninja -C {out}/linux-arm64-clang-light-rpc-ipv6only -# Building linux-arm64-light-ipv6only -ninja -C {out}/linux-arm64-light-ipv6only +# Building linux-arm64-clang-lock +ninja -C {out}/linux-arm64-clang-lock -# Building linux-arm64-light-rpc -ninja -C {out}/linux-arm64-light-rpc +# Building linux-arm64-clang-lock-ipv6only +ninja -C {out}/linux-arm64-clang-lock-ipv6only -# Building linux-arm64-light-rpc-ipv6only -ninja -C {out}/linux-arm64-light-rpc-ipv6only +# Building linux-arm64-clang-minmdns +ninja -C {out}/linux-arm64-clang-minmdns -# Building linux-arm64-lock -ninja -C {out}/linux-arm64-lock +# Building linux-arm64-clang-minmdns-ipv6only +ninja -C {out}/linux-arm64-clang-minmdns-ipv6only -# Building linux-arm64-lock-ipv6only -ninja -C {out}/linux-arm64-lock-ipv6only +# Building linux-arm64-clang-ota-provider +ninja -C {out}/linux-arm64-clang-ota-provider -# Building linux-arm64-minmdns -ninja -C {out}/linux-arm64-minmdns +# Building linux-arm64-clang-ota-provider-ipv6only +ninja -C {out}/linux-arm64-clang-ota-provider-ipv6only -# Building linux-arm64-minmdns-ipv6only -ninja -C {out}/linux-arm64-minmdns-ipv6only +# Building linux-arm64-clang-ota-provider-nodeps +ninja -C {out}/linux-arm64-clang-ota-provider-nodeps -# Building linux-arm64-ota-provider -ninja -C {out}/linux-arm64-ota-provider +# Building linux-arm64-clang-ota-provider-nodeps-ipv6only +ninja -C {out}/linux-arm64-clang-ota-provider-nodeps-ipv6only -# Building linux-arm64-ota-provider-ipv6only -ninja -C {out}/linux-arm64-ota-provider-ipv6only +# Building linux-arm64-clang-ota-requestor +ninja -C {out}/linux-arm64-clang-ota-requestor -# Building linux-arm64-ota-requestor -ninja -C {out}/linux-arm64-ota-requestor +# Building linux-arm64-clang-ota-requestor-ipv6only +ninja -C {out}/linux-arm64-clang-ota-requestor-ipv6only -# Building linux-arm64-ota-requestor-ipv6only -ninja -C {out}/linux-arm64-ota-requestor-ipv6only +# Building linux-arm64-clang-ota-requestor-nodeps +ninja -C {out}/linux-arm64-clang-ota-requestor-nodeps -# Building linux-arm64-python-bindings -ninja -C {out}/linux-arm64-python-bindings chip-repl +# Building linux-arm64-clang-ota-requestor-nodeps-ipv6only +ninja -C {out}/linux-arm64-clang-ota-requestor-nodeps-ipv6only -# Building linux-arm64-shell -ninja -C {out}/linux-arm64-shell +# Building linux-arm64-clang-python-bindings +ninja -C {out}/linux-arm64-clang-python-bindings chip-repl -# Building linux-arm64-shell-ipv6only -ninja -C {out}/linux-arm64-shell-ipv6only +# Building linux-arm64-clang-shell +ninja -C {out}/linux-arm64-clang-shell -# Building linux-arm64-thermostat -ninja -C {out}/linux-arm64-thermostat +# Building linux-arm64-clang-shell-ipv6only +ninja -C {out}/linux-arm64-clang-shell-ipv6only -# Building linux-arm64-thermostat-ipv6only -ninja -C {out}/linux-arm64-thermostat-ipv6only +# Building linux-arm64-clang-thermostat +ninja -C {out}/linux-arm64-clang-thermostat -# Building linux-arm64-tv-app -ninja -C {out}/linux-arm64-tv-app +# Building linux-arm64-clang-thermostat-ipv6only +ninja -C {out}/linux-arm64-clang-thermostat-ipv6only -# Building linux-arm64-tv-app-ipv6only -ninja -C {out}/linux-arm64-tv-app-ipv6only +# Building linux-arm64-clang-tv-app +ninja -C {out}/linux-arm64-clang-tv-app -# Building linux-arm64-tv-casting-app -ninja -C {out}/linux-arm64-tv-casting-app +# Building linux-arm64-clang-tv-app-ipv6only +ninja -C {out}/linux-arm64-clang-tv-app-ipv6only -# Building linux-arm64-tv-casting-app-ipv6only -ninja -C {out}/linux-arm64-tv-casting-app-ipv6only +# Building linux-arm64-clang-tv-casting-app +ninja -C {out}/linux-arm64-clang-tv-casting-app + +# Building linux-arm64-clang-tv-casting-app-ipv6only +ninja -C {out}/linux-arm64-clang-tv-casting-app-ipv6only # Building linux-fake-tests ninja -C {out}/linux-fake-tests check @@ -484,12 +516,24 @@ ninja -C {out}/linux-x64-ota-provider # Building linux-x64-ota-provider-ipv6only ninja -C {out}/linux-x64-ota-provider-ipv6only +# Building linux-x64-ota-provider-nodeps +ninja -C {out}/linux-x64-ota-provider-nodeps + +# Building linux-x64-ota-provider-nodeps-ipv6only +ninja -C {out}/linux-x64-ota-provider-nodeps-ipv6only + # Building linux-x64-ota-requestor ninja -C {out}/linux-x64-ota-requestor # Building linux-x64-ota-requestor-ipv6only ninja -C {out}/linux-x64-ota-requestor-ipv6only +# Building linux-x64-ota-requestor-nodeps +ninja -C {out}/linux-x64-ota-requestor-nodeps + +# Building linux-x64-ota-requestor-nodeps-ipv6only +ninja -C {out}/linux-x64-ota-requestor-nodeps-ipv6only + # Building linux-x64-python-bindings ninja -C {out}/linux-x64-python-bindings chip-repl @@ -505,27 +549,6 @@ ninja -C {out}/linux-x64-shell-ipv6only # Building linux-x64-tests ninja -C {out}/linux-x64-tests check -# Building linux-x64-tests-clang -ninja -C {out}/linux-x64-tests-clang check - -# Build-only -ninja -C {out}/linux-x64-tests-coverage default - -# Initial coverage baseline -lcov --initial --capture --directory {out}/linux-x64-tests-coverage/obj --output-file {out}/linux-x64-tests-coverage/coverage/lcov_base.info - -# Building linux-x64-tests-coverage -ninja -C {out}/linux-x64-tests-coverage check - -# Update coverage -lcov --capture --directory {out}/linux-x64-tests-coverage/obj --output-file {out}/linux-x64-tests-coverage/coverage/lcov_test.info - -# Final coverage info -lcov --add-tracefile {out}/linux-x64-tests-coverage/coverage/lcov_base.info --add-tracefile {out}/linux-x64-tests-coverage/coverage/lcov_test.info --output-file {out}/linux-x64-tests-coverage/coverage/lcov_final.info - -# HTML coverage -genhtml {out}/linux-x64-tests-coverage/coverage/lcov_final.info --output-directory {out}/linux-x64-tests-coverage/coverage/html - # Building linux-x64-thermostat ninja -C {out}/linux-x64-thermostat diff --git a/scripts/examples/k32w_se_example.sh b/scripts/examples/k32w_se_example.sh index 27c0b5a29fe48c..9815dc9f49a06c 100755 --- a/scripts/examples/k32w_se_example.sh +++ b/scripts/examples/k32w_se_example.sh @@ -27,5 +27,5 @@ env "$(dirname "$0")"/../../third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh -gn gen --check --fail-on-unused-args --root="$1" "$2" --args="k32w0_sdk_root=\"$NXP_K32W061_SDK_ROOT\" is_debug=false chip_crypto=\"mbedtls\" chip_with_se05x=1" +gn gen --check --fail-on-unused-args --root="$1" "$2" --args="k32w0_sdk_root=\"$NXP_K32W0_SDK_ROOT\" is_debug=false chip_crypto=\"mbedtls\" chip_with_se05x=1" ninja -C "$2" diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 06f9980ae069b5..16a0eeae322bd8 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -209,7 +209,7 @@ class TestDefinition: target: TestTarget is_manual: bool - def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, timeout_seconds: typing.Optional[int]): + def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, timeout_seconds: typing.Optional[int], dry_run=False): """ Executes the given test case using the provided runner for execution. """ @@ -264,14 +264,20 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, ti app = apps_register.get('default') app.start() pairing_cmd = tool_cmd + ['pairing', 'code', TEST_NODE_ID, app.setupCode] - runner.RunSubprocess(pairing_cmd, - name='PAIR', dependencies=[apps_register]) - test_cmd = tool_cmd + ['tests', self.run_name] + ['--PICS', pics_file] - runner.RunSubprocess( - test_cmd, - name='TEST', dependencies=[apps_register], - timeout_seconds=timeout_seconds) + + if dry_run: + logging.info(" ".join(pairing_cmd)) + logging.info(" ".join(test_cmd)) + + else: + runner.RunSubprocess(pairing_cmd, + name='PAIR', dependencies=[apps_register]) + + runner.RunSubprocess( + test_cmd, + name='TEST', dependencies=[apps_register], + timeout_seconds=timeout_seconds) except Exception: logging.error("!!!!!!!!!!!!!!!!!!!! ERROR !!!!!!!!!!!!!!!!!!!!!!") diff --git a/scripts/tests/run_test_suite.py b/scripts/tests/run_test_suite.py index 3052e8befbe6df..1a9cfd7c58f37f 100755 --- a/scripts/tests/run_test_suite.py +++ b/scripts/tests/run_test_suite.py @@ -62,6 +62,7 @@ class RunContext: tests: typing.List[chiptest.TestDefinition] in_unshare: bool chip_tool: str + dry_run: bool @click.group(chain=True) @@ -70,6 +71,11 @@ class RunContext: default='info', type=click.Choice(__LOG_LEVELS__.keys(), case_sensitive=False), help='Determines the verbosity of script output.') +@click.option( + '--dry-run', + default=False, + is_flag=True, + help='Only print out shell commands that would be executed') @click.option( '--target', default=['all'], @@ -106,7 +112,7 @@ class RunContext: '--chip-tool', help='Binary path of chip tool app to use to run the test') @click.pass_context -def main(context, log_level, target, target_glob, target_skip_glob, +def main(context, dry_run, log_level, target, target_glob, target_skip_glob, no_log_timestamps, root, internal_inside_unshare, chip_tool): # Ensures somewhat pretty logging of what is going on log_fmt = '%(asctime)s.%(msecs)03d %(levelname)-7s %(message)s' @@ -151,7 +157,7 @@ def main(context, log_level, target, target_glob, target_skip_glob, context.obj = RunContext(root=root, tests=tests, in_unshare=internal_inside_unshare, - chip_tool=chip_tool) + chip_tool=chip_tool, dry_run=dry_run) @main.command( @@ -245,7 +251,10 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o for test in context.obj.tests: test_start = time.monotonic() try: - test.Run(runner, apps_register, paths, pics_file, test_timeout_seconds) + if context.obj.dry_run: + logging.info("Would run test %s:" % test.name) + + test.Run(runner, apps_register, paths, pics_file, test_timeout_seconds, context.obj.dry_run) test_end = time.monotonic() logging.info('%-20s - Completed in %0.2f seconds' % (test.name, (test_end - test_start))) diff --git a/src/BUILD.gn b/src/BUILD.gn index bdc11442fc672e..c495ca83d1d908 100644 --- a/src/BUILD.gn +++ b/src/BUILD.gn @@ -128,4 +128,12 @@ if (chip_build_tests) { chip_test_group("fake_platform_tests") { deps = [ "${chip_root}/src/lib/dnssd/platform/tests" ] } + + # Tests to run with each Crypto PAL + chip_test_group("crypto_tests") { + deps = [ + "${chip_root}/src/credentials/tests", + "${chip_root}/src/crypto/tests", + ] + } } diff --git a/src/access/AccessControl.cpp b/src/access/AccessControl.cpp index 4a4691b81bd593..c84c1fc313d58a 100644 --- a/src/access/AccessControl.cpp +++ b/src/access/AccessControl.cpp @@ -19,7 +19,7 @@ // Included for the default AccessControlDelegate logging enables/disables. // See `chip_access_control_policy_logging_verbosity` in `src/app/BUILD.gn` for // the levels available. -#include +#include #include "AccessControl.h" diff --git a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/GenericChipDeviceListener.kt b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/GenericChipDeviceListener.kt index 1d38c9c5c9c244..4ccf1ba6e6a836 100644 --- a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/GenericChipDeviceListener.kt +++ b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/GenericChipDeviceListener.kt @@ -23,6 +23,14 @@ open class GenericChipDeviceListener : ChipDeviceController.CompletionListener { // No op } + override fun onReadCommissioningInfo(vendorId: Int,productId: Int, wifiEndpointId: Int, threadEndpointId: Int) { + // No op + } + + override fun onCommissioningStatusUpdate(nodeId: Long, stage: String, errorCode: Int) { + // No op + } + override fun onNotifyChipConnectionClosed() { // No op } diff --git a/src/app/AppConfig.h b/src/app/AppConfig.h new file mode 100644 index 00000000000000..3303a319742735 --- /dev/null +++ b/src/app/AppConfig.h @@ -0,0 +1,22 @@ +/* + * + * Copyright (c) 2020-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 + +#if CHIP_HAVE_CONFIG_H +#include +#endif diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 0a3a865a678e7d..9f82625bf8a7eb 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -53,6 +53,12 @@ buildconfig_header("app_buildconfig") { ] } +source_set("app_config") { + sources = [ "AppConfig.h" ] + + public_deps = [ ":app_buildconfig" ] +} + static_library("app") { output_name = "libCHIPDataModel" @@ -179,7 +185,7 @@ static_library("app") { ] public_deps = [ - ":app_buildconfig", + ":app_config", "${chip_root}/src/access", "${chip_root}/src/lib/address_resolve", "${chip_root}/src/lib/support", diff --git a/src/app/BufferedReadCallback.h b/src/app/BufferedReadCallback.h index ea7dd28c4dbe5a..6b2d31d2b19a1e 100644 --- a/src/app/BufferedReadCallback.h +++ b/src/app/BufferedReadCallback.h @@ -86,9 +86,9 @@ class BufferedReadCallback : public ReadClient::Callback mCallback.OnSubscriptionEstablished(aSubscriptionId); } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override + CHIP_ERROR OnResubscriptionNeeded(ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override { - mCallback.OnResubscriptionAttempt(aTerminationCause, aNextResubscribeIntervalMsec); + return mCallback.OnResubscriptionNeeded(apReadClient, aTerminationCause); } void OnDeallocatePaths(chip::app::ReadPrepareParams && aReadPrepareParams) override diff --git a/src/app/CASEClient.cpp b/src/app/CASEClient.cpp index 31564a43d904d4..f514b3aa4c089c 100644 --- a/src/app/CASEClient.cpp +++ b/src/app/CASEClient.cpp @@ -26,7 +26,7 @@ void CASEClient::SetRemoteMRPIntervals(const ReliableMessageProtocolConfig & rem mCASESession.SetRemoteMRPConfig(remoteMRPConfig); } -CHIP_ERROR CASEClient::EstablishSession(PeerId peer, const Transport::PeerAddress & peerAddress, +CHIP_ERROR CASEClient::EstablishSession(const ScopedNodeId & peer, const Transport::PeerAddress & peerAddress, const ReliableMessageProtocolConfig & remoteMRPConfig, SessionEstablishmentDelegate * delegate) { @@ -46,9 +46,9 @@ CHIP_ERROR CASEClient::EstablishSession(PeerId peer, const Transport::PeerAddres VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_INTERNAL); mCASESession.SetGroupDataProvider(mInitParams.groupDataProvider); - ReturnErrorOnFailure(mCASESession.EstablishSession( - *mInitParams.sessionManager, mInitParams.fabricTable, ScopedNodeId{ peer.GetNodeId(), mInitParams.fabricIndex }, exchange, - mInitParams.sessionResumptionStorage, mInitParams.certificateValidityPolicy, delegate, mInitParams.mrpLocalConfig)); + ReturnErrorOnFailure(mCASESession.EstablishSession(*mInitParams.sessionManager, mInitParams.fabricTable, peer, exchange, + mInitParams.sessionResumptionStorage, mInitParams.certificateValidityPolicy, + delegate, mInitParams.mrpLocalConfig)); return CHIP_NO_ERROR; } diff --git a/src/app/CASEClient.h b/src/app/CASEClient.h index 42fd3192343e5e..33dfad16bab0cf 100644 --- a/src/app/CASEClient.h +++ b/src/app/CASEClient.h @@ -33,7 +33,6 @@ struct CASEClientInitParams Credentials::CertificateValidityPolicy * certificateValidityPolicy = nullptr; Messaging::ExchangeManager * exchangeMgr = nullptr; FabricTable * fabricTable = nullptr; - FabricIndex fabricIndex = kUndefinedFabricIndex; Credentials::GroupDataProvider * groupDataProvider = nullptr; Optional mrpLocalConfig = Optional::Missing(); @@ -46,7 +45,7 @@ class DLL_EXPORT CASEClient void SetRemoteMRPIntervals(const ReliableMessageProtocolConfig & remoteMRPConfig); - CHIP_ERROR EstablishSession(PeerId peer, const Transport::PeerAddress & peerAddress, + CHIP_ERROR EstablishSession(const ScopedNodeId & peer, const Transport::PeerAddress & peerAddress, const ReliableMessageProtocolConfig & remoteMRPConfig, SessionEstablishmentDelegate * delegate); private: diff --git a/src/app/CASESessionManager.cpp b/src/app/CASESessionManager.cpp index 24fd9edc46617b..0f1d08fa46aeca 100644 --- a/src/app/CASESessionManager.cpp +++ b/src/app/CASESessionManager.cpp @@ -28,11 +28,11 @@ CHIP_ERROR CASESessionManager::Init(chip::System::Layer * systemLayer, const CAS return AddressResolve::Resolver::Instance().Init(systemLayer); } -void CASESessionManager::FindOrEstablishSession(PeerId peerId, Callback::Callback * onConnection, +void CASESessionManager::FindOrEstablishSession(const ScopedNodeId & peerId, Callback::Callback * onConnection, Callback::Callback * onFailure) { - ChipLogDetail(CASESessionManager, "FindOrEstablishSession: PeerId = " ChipLogFormatX64 ":" ChipLogFormatX64, - ChipLogValueX64(peerId.GetCompressedFabricId()), ChipLogValueX64(peerId.GetNodeId())); + ChipLogDetail(CASESessionManager, "FindOrEstablishSession: PeerId = [%d:" ChipLogFormatX64 "]", peerId.GetFabricIndex(), + ChipLogValueX64(peerId.GetNodeId())); OperationalDeviceProxy * session = FindExistingSession(peerId); if (session == nullptr) @@ -64,7 +64,7 @@ void CASESessionManager::FindOrEstablishSession(PeerId peerId, Callback::Callbac } } -void CASESessionManager::ReleaseSession(PeerId peerId) +void CASESessionManager::ReleaseSession(const ScopedNodeId & peerId) { ReleaseSession(FindExistingSession(peerId)); } @@ -79,7 +79,7 @@ void CASESessionManager::ReleaseAllSessions() mConfig.devicePool->ReleaseAllDevices(); } -CHIP_ERROR CASESessionManager::GetPeerAddress(PeerId peerId, Transport::PeerAddress & addr) +CHIP_ERROR CASESessionManager::GetPeerAddress(const ScopedNodeId & peerId, Transport::PeerAddress & addr) { OperationalDeviceProxy * session = FindExistingSession(peerId); VerifyOrReturnError(session != nullptr, CHIP_ERROR_NOT_CONNECTED); @@ -87,7 +87,7 @@ CHIP_ERROR CASESessionManager::GetPeerAddress(PeerId peerId, Transport::PeerAddr return CHIP_NO_ERROR; } -OperationalDeviceProxy * CASESessionManager::FindExistingSession(PeerId peerId) const +OperationalDeviceProxy * CASESessionManager::FindExistingSession(const ScopedNodeId & peerId) const { return mConfig.devicePool->FindDevice(peerId); } diff --git a/src/app/CASESessionManager.h b/src/app/CASESessionManager.h index a464a40e37ce59..c74cb47748f874 100644 --- a/src/app/CASESessionManager.h +++ b/src/app/CASESessionManager.h @@ -68,12 +68,12 @@ class CASESessionManager * The `onFailure` callback may be called before the FindOrEstablishSession * call returns, for error cases that are detected synchronously. */ - void FindOrEstablishSession(PeerId peerId, Callback::Callback * onConnection, + void FindOrEstablishSession(const ScopedNodeId & peerId, Callback::Callback * onConnection, Callback::Callback * onFailure); - OperationalDeviceProxy * FindExistingSession(PeerId peerId) const; + OperationalDeviceProxy * FindExistingSession(const ScopedNodeId & peerId) const; - void ReleaseSession(PeerId peerId); + void ReleaseSession(const ScopedNodeId & peerId); void ReleaseSessionsForFabric(FabricIndex fabricIndex); @@ -87,7 +87,7 @@ class CASESessionManager * an ongoing session with the peer node. If the session doesn't exist, the API will return * `CHIP_ERROR_NOT_CONNECTED` error. */ - CHIP_ERROR GetPeerAddress(PeerId peerId, Transport::PeerAddress & addr); + CHIP_ERROR GetPeerAddress(const ScopedNodeId & peerId, Transport::PeerAddress & addr); private: void ReleaseSession(OperationalDeviceProxy * device) const; diff --git a/src/app/ClusterStateCache.h b/src/app/ClusterStateCache.h index b16fd58b1ee012..8ba58f1d923798 100644 --- a/src/app/ClusterStateCache.h +++ b/src/app/ClusterStateCache.h @@ -576,9 +576,9 @@ class ClusterStateCache : protected ReadClient::Callback mCallback.OnSubscriptionEstablished(aSubscriptionId); } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override + CHIP_ERROR OnResubscriptionNeeded(ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override { - mCallback.OnResubscriptionAttempt(aTerminationCause, aNextResubscribeIntervalMsec); + return mCallback.OnResubscriptionNeeded(apReadClient, aTerminationCause); } void OnDeallocatePaths(chip::app::ReadPrepareParams && aReadPrepareParams) override diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index 2fc2dc55c4d850..d17c4f36cd33e1 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -40,7 +40,7 @@ namespace chip { namespace app { -CommandHandler::CommandHandler(Callback * apCallback) : mpCallback(apCallback), mSuppressResponse(false) {} +CommandHandler::CommandHandler(Callback * apCallback) : mExchangeCtx(*this), mpCallback(apCallback), mSuppressResponse(false) {} CHIP_ERROR CommandHandler::AllocateBuffer() { @@ -73,7 +73,7 @@ CHIP_ERROR CommandHandler::OnInvokeCommandRequest(Messaging::ExchangeContext * e // NOTE: we already know this is an InvokeCommand Request message because we explicitly registered with the // Exchange Manager for unsolicited InvokeCommand Requests. - mpExchangeCtx = ec; + mExchangeCtx.Grab(ec); // Use the RAII feature, if this is the only Handle when this function returns, DecrementHoldOff will trigger sending response. // TODO: This is broken! If something under here returns error, we will try @@ -81,7 +81,7 @@ CHIP_ERROR CommandHandler::OnInvokeCommandRequest(Messaging::ExchangeContext * e // response too. Figure out at what point it's our responsibility to // handler errors vs our caller's. Handle workHandle(this); - mpExchangeCtx->WillSendMessage(); + mExchangeCtx->WillSendMessage(); ReturnErrorOnFailure(ProcessInvokeRequest(std::move(payload), isTimedInvoke)); return CHIP_NO_ERROR; @@ -103,26 +103,19 @@ CHIP_ERROR CommandHandler::ProcessInvokeRequest(System::PacketBufferHandle && pa ReturnErrorOnFailure(invokeRequestMessage.GetTimedRequest(&mTimedRequest)); ReturnErrorOnFailure(invokeRequestMessage.GetInvokeRequests(&invokeRequests)); - VerifyOrReturnError(mpExchangeCtx != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); if (mTimedRequest != isTimedInvoke) { // The message thinks it should be part of a timed interaction but it's // not, or vice versa. Spec says to Respond with UNSUPPORTED_ACCESS. - err = StatusResponse::Send(Protocols::InteractionModel::Status::UnsupportedAccess, mpExchangeCtx, + err = StatusResponse::Send(Protocols::InteractionModel::Status::UnsupportedAccess, mExchangeCtx.Get(), /* aExpectResponse = */ false); - - if (err != CHIP_NO_ERROR) + if (err == CHIP_NO_ERROR) { - // We have to manually close the exchange, because we called - // WillSendMessage already. - mpExchangeCtx->Close(); + mSentStatusResponse = true; } - // Null out the (now-closed) exchange, so that when we try to - // SendCommandResponse() later (when our holdoff count drops to 0) it - // just fails and we don't double-respond. - mpExchangeCtx = nullptr; return err; } @@ -142,7 +135,7 @@ CHIP_ERROR CommandHandler::ProcessInvokeRequest(System::PacketBufferHandle && pa CommandDataIB::Parser commandData; ReturnErrorOnFailure(commandData.Init(invokeRequestsReader)); - if (mpExchangeCtx->IsGroupExchangeContext()) + if (mExchangeCtx->IsGroupExchangeContext()) { ReturnErrorOnFailure(ProcessGroupCommandDataIB(commandData)); } @@ -172,18 +165,6 @@ void CommandHandler::Close() VerifyOrDieWithMsg(mPendingWork == 0, DataManagement, "CommandHandler::Close() called with %u unfinished async work items", static_cast(mPendingWork)); - // OnDone below can destroy us before we unwind all the way back into the - // exchange code and it tries to close itself. Make sure that it doesn't - // try to notify us that it's closing, since we will be dead. - // - // For more details, see #10344. - if (mpExchangeCtx != nullptr) - { - mpExchangeCtx->SetDelegate(nullptr); - } - - mpExchangeCtx = nullptr; - if (mpCallback) { mpCallback->OnDone(*this); @@ -205,21 +186,12 @@ void CommandHandler::DecrementHoldOff() return; } - if (mpExchangeCtx->IsGroupExchangeContext()) - { - mpExchangeCtx->Close(); - } - else + if (!mExchangeCtx->IsGroupExchangeContext() && !mSentStatusResponse) { CHIP_ERROR err = SendCommandResponse(); if (err != CHIP_NO_ERROR) { ChipLogError(DataManagement, "Failed to send command response: %" CHIP_ERROR_FORMAT, err.Format()); - // We marked the exchange as "WillSendMessage", need to shutdown the exchange manually to avoid leaking exchanges. - if (mpExchangeCtx != nullptr) - { - mpExchangeCtx->Close(); - } } } @@ -232,11 +204,11 @@ CHIP_ERROR CommandHandler::SendCommandResponse() VerifyOrReturnError(mPendingWork == 0, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mState == State::AddedCommand, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(mpExchangeCtx != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(Finalize(commandPacket)); ReturnErrorOnFailure( - mpExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::InvokeCommandResponse, std::move(commandPacket))); + mExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::InvokeCommandResponse, std::move(commandPacket))); // The ExchangeContext is automatically freed here, and it makes mpExchangeCtx be temporarily dangling, but in // all cases, we are going to call Close immediately after this function, which nulls out mpExchangeCtx. @@ -290,7 +262,7 @@ CHIP_ERROR CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommand } } - VerifyOrExit(mpExchangeCtx != nullptr && mpExchangeCtx->HasSessionHandle(), err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mExchangeCtx && mExchangeCtx->HasSessionHandle(), err = CHIP_ERROR_INCORRECT_STATE); { Access::SubjectDescriptor subjectDescriptor = GetSubjectDescriptor(); @@ -379,7 +351,7 @@ CHIP_ERROR CommandHandler::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCo err = commandPath.GetCommandId(&commandId); SuccessOrExit(err); - groupId = mpExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); + groupId = mExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); fabric = GetAccessingFabricIndex(); ChipLogDetail(DataManagement, "Received group command for Group=%u Cluster=" ChipLogFormatMEI " Command=" ChipLogFormatMEI, @@ -596,7 +568,7 @@ TLV::TLVWriter * CommandHandler::GetCommandDataIBTLVWriter() FabricIndex CommandHandler::GetAccessingFabricIndex() const { - return mpExchangeCtx->GetSessionHandle()->GetFabricIndex(); + return mExchangeCtx->GetSessionHandle()->GetFabricIndex(); } CommandHandler * CommandHandler::Handle::Get() @@ -666,27 +638,6 @@ void CommandHandler::MoveToState(const State aTargetState) ChipLogDetail(DataManagement, "ICR moving to [%10.10s]", GetStateStr()); } -void CommandHandler::Abort() -{ - // - // If the exchange context hasn't already been gracefully closed - // (signaled by setting it to null), then we need to forcibly - // tear it down. - // - if (mpExchangeCtx != nullptr) - { - // We might be a delegate for this exchange, and we don't want the - // OnExchangeClosing notification in that case. Null out the delegate - // to avoid that. - // - // TODO: This makes all sorts of assumptions about what the delegate is - // (notice the "might" above!) that might not hold in practice. We - // really need a better solution here.... - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx->Abort(); - mpExchangeCtx = nullptr; - } -} } // namespace app } // namespace chip diff --git a/src/app/CommandHandler.h b/src/app/CommandHandler.h index 200feee67a1347..da198cad0af6ef 100644 --- a/src/app/CommandHandler.h +++ b/src/app/CommandHandler.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -46,16 +46,9 @@ namespace chip { namespace app { -class CommandHandler +class CommandHandler : public Messaging::ExchangeDelegate { public: - /* - * Destructor - as part of destruction, it will abort the exchange context - * if a valid one still exists. - * - * See Abort() for details on when that might occur. - */ - virtual ~CommandHandler() { Abort(); } class Callback { public: @@ -221,11 +214,15 @@ class CommandHandler /** * Gets the inner exchange context object, without ownership. * + * WARNING: This is dangerous, since it is directly interacting with the + * exchange being managed automatically by mExchangeCtx and + * if not done carefully, may end up with use-after-free errors. + * * @return The inner exchange context, might be nullptr if no * exchange context has been assigned or the context * has been released. */ - Messaging::ExchangeContext * GetExchangeContext() const { return mpExchangeCtx; } + Messaging::ExchangeContext * GetExchangeContext() const { return mExchangeCtx.Get(); } /** * @brief Flush acks right away for a slow command @@ -240,18 +237,35 @@ class CommandHandler */ void FlushAcksRightAwayOnSlowCommand() { - VerifyOrReturn(mpExchangeCtx != nullptr); - auto * msgContext = mpExchangeCtx->GetReliableMessageContext(); + VerifyOrReturn(mExchangeCtx); + auto * msgContext = mExchangeCtx->GetReliableMessageContext(); VerifyOrReturn(msgContext != nullptr); msgContext->FlushAcks(); } - Access::SubjectDescriptor GetSubjectDescriptor() const { return mpExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); } + Access::SubjectDescriptor GetSubjectDescriptor() const { return mExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); } private: friend class TestCommandInteraction; friend class CommandHandler::Handle; + CHIP_ERROR OnMessageReceived(Messaging::ExchangeContext * ec, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && payload) override + { + // + // We shouldn't be receiving any further messages on this exchange. + // + return CHIP_ERROR_INCORRECT_STATE; + } + + void OnResponseTimeout(Messaging::ExchangeContext * ec) override + { + // + // We're not expecting responses to any messages we send out on this EC. + // + VerifyOrDie(false); + } + enum class State { Idle, ///< Default state that the object starts out in, where no work has commenced @@ -343,14 +357,16 @@ class CommandHandler return FinishCommand(/* aEndDataStruct = */ false); } - Messaging::ExchangeContext * mpExchangeCtx = nullptr; - Callback * mpCallback = nullptr; + Messaging::ExchangeHolder mExchangeCtx; + Callback * mpCallback = nullptr; InvokeResponseMessage::Builder mInvokeResponseBuilder; TLV::TLVType mDataElementContainerType = TLV::kTLVType_NotSpecified; size_t mPendingWork = 0; bool mSuppressResponse = false; bool mTimedRequest = false; + bool mSentStatusResponse = false; + State mState = State::Idle; chip::System::PacketBufferTLVWriter mCommandMessageWriter; TLV::TLVWriter mBackupWriter; diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index 63053751240eb7..7e074df054ea6a 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -33,7 +33,8 @@ namespace chip { namespace app { CommandSender::CommandSender(Callback * apCallback, Messaging::ExchangeManager * apExchangeMgr, bool aIsTimedRequest) : - mpCallback(apCallback), mpExchangeMgr(apExchangeMgr), mSuppressResponse(false), mTimedRequest(aIsTimedRequest) + mExchangeCtx(*this), mpCallback(apCallback), mpExchangeMgr(apExchangeMgr), mSuppressResponse(false), + mTimedRequest(aIsTimedRequest) {} CHIP_ERROR CommandSender::AllocateBuffer() @@ -67,15 +68,17 @@ CHIP_ERROR CommandSender::SendCommandRequest(const SessionHandle & session, Opti ReturnErrorOnFailure(Finalize(mPendingInvokeData)); // Create a new exchange context. - mpExchangeCtx = mpExchangeMgr->NewContext(session, this); - VerifyOrReturnError(mpExchangeCtx != nullptr, CHIP_ERROR_NO_MEMORY); - VerifyOrReturnError(!mpExchangeCtx->IsGroupExchangeContext(), CHIP_ERROR_INVALID_MESSAGE_TYPE); + auto exchange = mpExchangeMgr->NewContext(session, this); + VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_NO_MEMORY); - mpExchangeCtx->SetResponseTimeout(timeout.ValueOr(session->ComputeRoundTripTimeout(app::kExpectedIMProcessingTime))); + mExchangeCtx.Grab(exchange); + VerifyOrReturnError(!mExchangeCtx->IsGroupExchangeContext(), CHIP_ERROR_INVALID_MESSAGE_TYPE); + + mExchangeCtx->SetResponseTimeout(timeout.ValueOr(session->ComputeRoundTripTimeout(app::kExpectedIMProcessingTime))); if (mTimedInvokeTimeoutMs.HasValue()) { - ReturnErrorOnFailure(TimedRequest::Send(mpExchangeCtx, mTimedInvokeTimeoutMs.Value())); + ReturnErrorOnFailure(TimedRequest::Send(mExchangeCtx.Get(), mTimedInvokeTimeoutMs.Value())); MoveToState(State::AwaitingTimedStatus); return CHIP_NO_ERROR; } @@ -90,14 +93,13 @@ CHIP_ERROR CommandSender::SendGroupCommandRequest(const SessionHandle & session) ReturnErrorOnFailure(Finalize(mPendingInvokeData)); // Create a new exchange context. - mpExchangeCtx = mpExchangeMgr->NewContext(session, this); - VerifyOrReturnError(mpExchangeCtx != nullptr, CHIP_ERROR_NO_MEMORY); - VerifyOrReturnError(mpExchangeCtx->IsGroupExchangeContext(), CHIP_ERROR_INVALID_MESSAGE_TYPE); + auto exchange = mpExchangeMgr->NewContext(session, this); + VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_NO_MEMORY); - ReturnErrorOnFailure(SendInvokeRequest()); + mExchangeCtx.Grab(exchange); + VerifyOrReturnError(mExchangeCtx->IsGroupExchangeContext(), CHIP_ERROR_INVALID_MESSAGE_TYPE); - // Exchange is gone now, since it closed itself on successful send. - mpExchangeCtx = nullptr; + ReturnErrorOnFailure(SendInvokeRequest()); Close(); return CHIP_NO_ERROR; @@ -108,8 +110,8 @@ CHIP_ERROR CommandSender::SendInvokeRequest() using namespace Protocols::InteractionModel; using namespace Messaging; - ReturnErrorOnFailure(mpExchangeCtx->SendMessage(MsgType::InvokeCommandRequest, std::move(mPendingInvokeData), - SendMessageFlags::kExpectResponse)); + ReturnErrorOnFailure( + mExchangeCtx->SendMessage(MsgType::InvokeCommandRequest, std::move(mPendingInvokeData), SendMessageFlags::kExpectResponse)); MoveToState(State::CommandSent); return CHIP_NO_ERROR; @@ -118,31 +120,39 @@ CHIP_ERROR CommandSender::SendInvokeRequest() CHIP_ERROR CommandSender::OnMessageReceived(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) { + using namespace Protocols::InteractionModel; + if (mState == State::CommandSent) { MoveToState(State::ResponseReceived); } CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrExit(apExchangeContext == mpExchangeCtx, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(apExchangeContext == mExchangeCtx.Get(), err = CHIP_ERROR_INCORRECT_STATE); if (mState == State::AwaitingTimedStatus) { - err = HandleTimedStatus(aPayloadHeader, std::move(aPayload)); + VerifyOrExit(aPayloadHeader.HasMessageType(MsgType::StatusResponse), err = CHIP_ERROR_INVALID_MESSAGE_TYPE); + CHIP_ERROR statusError = CHIP_NO_ERROR; + SuccessOrExit(err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError)); + SuccessOrExit(err = statusError); + err = SendInvokeRequest(); // Skip all other processing here (which is for the response to the // invoke request), no matter whether err is success or not. goto exit; } - if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::InvokeCommandResponse)) + if (aPayloadHeader.HasMessageType(MsgType::InvokeCommandResponse)) { err = ProcessInvokeResponse(std::move(aPayload)); SuccessOrExit(err); } - else if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::StatusResponse)) + else if (aPayloadHeader.HasMessageType(MsgType::StatusResponse)) { - err = StatusResponse::ProcessStatusResponse(std::move(aPayload)); - SuccessOrExit(err); + CHIP_ERROR statusError = CHIP_NO_ERROR; + SuccessOrExit(err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError)); + SuccessOrExit(err = statusError); + err = CHIP_ERROR_INVALID_MESSAGE_TYPE; } else { @@ -223,18 +233,6 @@ void CommandSender::Close() mTimedRequest = false; MoveToState(State::AwaitingDestruction); - // OnDone below can destroy us before we unwind all the way back into the - // exchange code and it tries to close itself. Make sure that it doesn't - // try to notify us that it's closing, since we will be dead. - // - // For more details, see #10344. - if (mpExchangeCtx != nullptr) - { - mpExchangeCtx->SetDelegate(nullptr); - } - - mpExchangeCtx = nullptr; - if (mpCallback) { mpCallback->OnDone(this); @@ -379,13 +377,6 @@ TLV::TLVWriter * CommandSender::GetCommandDataIBTLVWriter() return mInvokeRequestBuilder.GetInvokeRequests().GetCommandData().GetWriter(); } -CHIP_ERROR CommandSender::HandleTimedStatus(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) -{ - ReturnErrorOnFailure(TimedRequest::HandleResponse(aPayloadHeader, std::move(aPayload))); - - return SendInvokeRequest(); -} - CHIP_ERROR CommandSender::FinishCommand(const Optional & aTimedInvokeTimeoutMs) { ReturnErrorOnFailure(FinishCommand(/* aEndDataStruct = */ false)); @@ -443,27 +434,5 @@ void CommandSender::MoveToState(const State aTargetState) ChipLogDetail(DataManagement, "ICR moving to [%10.10s]", GetStateStr()); } -void CommandSender::Abort() -{ - // - // If the exchange context hasn't already been gracefully closed - // (signaled by setting it to null), then we need to forcibly - // tear it down. - // - if (mpExchangeCtx != nullptr) - { - // We might be a delegate for this exchange, and we don't want the - // OnExchangeClosing notification in that case. Null out the delegate - // to avoid that. - // - // TODO: This makes all sorts of assumptions about what the delegate is - // (notice the "might" above!) that might not hold in practice. We - // really need a better solution here.... - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx->Abort(); - mpExchangeCtx = nullptr; - } -} - } // namespace app } // namespace chip diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index f0f0f945c7f8a4..ab02fe9529517c 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include @@ -53,23 +53,6 @@ namespace app { class CommandSender final : public Messaging::ExchangeDelegate { public: - /* - * Destructor - as part of destruction, it will abort the exchange context - * if a valid one still exists. - * - * See Abort() for details on when that might occur. - */ - ~CommandSender() override { Abort(); } - - /** - * Gets the inner exchange context object, without ownership. - * - * @return The inner exchange context, might be nullptr if no - * exchange context has been assigned or the context - * has been released. - */ - Messaging::ExchangeContext * GetExchangeContext() const { return mpExchangeCtx; } - class Callback { public: @@ -276,21 +259,13 @@ class CommandSender final : public Messaging::ExchangeDelegate CHIP_ERROR ProcessInvokeResponse(System::PacketBufferHandle && payload); CHIP_ERROR ProcessInvokeResponseIB(InvokeResponseIB::Parser & aInvokeResponse); - // Handle a message received when we are expecting a status response to a - // Timed Request. The caller is assumed to have already checked that our - // exchange context member is the one the message came in on. - // - // If the server returned an error status, that will be returned as an error - // value of CHIP_ERROR. - CHIP_ERROR HandleTimedStatus(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload); - // Send our queued-up Invoke Request message. Assumes the exchange is ready // and mPendingInvokeData is populated. CHIP_ERROR SendInvokeRequest(); CHIP_ERROR Finalize(System::PacketBufferHandle & commandPacket); - Messaging::ExchangeContext * mpExchangeCtx = nullptr; + Messaging::ExchangeHolder mExchangeCtx; Callback * mpCallback = nullptr; Messaging::ExchangeManager * mpExchangeMgr = nullptr; InvokeRequestMessage::Builder mInvokeRequestBuilder; diff --git a/src/app/DeviceProxy.h b/src/app/DeviceProxy.h index ce9a3909561ebc..3315576065b6ed 100644 --- a/src/app/DeviceProxy.h +++ b/src/app/DeviceProxy.h @@ -27,7 +27,6 @@ #pragma once #include -#include #include #include #include diff --git a/src/app/EventManagement.cpp b/src/app/EventManagement.cpp index 6aa5c79a442c09..f7ca6fa6a2a929 100644 --- a/src/app/EventManagement.cpp +++ b/src/app/EventManagement.cpp @@ -518,30 +518,6 @@ CHIP_ERROR EventManagement::CopyEvent(const TLVReader & aReader, TLVWriter & aWr return CHIP_NO_ERROR; } -CHIP_ERROR EventManagement::WriteEventStatusIB(TLVWriter & aWriter, const ConcreteEventPath & aEvent, StatusIB aStatus) -{ - TLVType containerType; - ReturnErrorOnFailure(aWriter.StartContainer(AnonymousTag(), kTLVType_Structure, containerType)); - - EventStatusIB::Builder builder; - builder.Init(&aWriter, to_underlying(EventReportIB::Tag::kEventStatus)); - - ReturnErrorOnFailure(builder.CreatePath() - .Endpoint(aEvent.mEndpointId) - .Cluster(aEvent.mClusterId) - .Event(aEvent.mEventId) - .EndOfEventPathIB() - .GetError()); - - ReturnErrorOnFailure(builder.CreateErrorStatus().EncodeStatusIB(aStatus).GetError()); - - ReturnErrorOnFailure(builder.EndOfEventStatusIB().GetError()); - - ReturnErrorOnFailure(aWriter.EndContainer(containerType)); - ReturnErrorOnFailure(aWriter.Finalize()); - return CHIP_NO_ERROR; -} - CHIP_ERROR EventManagement::CheckEventContext(EventLoadOutContext * eventLoadOutContext, const EventManagement::EventEnvelopeContext & event) { @@ -560,19 +536,13 @@ CHIP_ERROR EventManagement::CheckEventContext(EventLoadOutContext * eventLoadOut ConcreteEventPath path(event.mEndpointId, event.mClusterId, event.mEventId); CHIP_ERROR ret = CHIP_ERROR_UNEXPECTED_EVENT; - bool eventReadViaConcretePath = false; - for (auto * interestedPath = eventLoadOutContext->mpInterestedEventPaths; interestedPath != nullptr; interestedPath = interestedPath->mpNext) { if (interestedPath->mValue.IsEventPathSupersetOf(path)) { ret = CHIP_NO_ERROR; - if (!interestedPath->mValue.HasEventWildcard()) - { - eventReadViaConcretePath = true; - break; - } + break; } } @@ -582,18 +552,10 @@ CHIP_ERROR EventManagement::CheckEventContext(EventLoadOutContext * eventLoadOut Access::Privilege requestPrivilege = RequiredPrivilege::ForReadEvent(path); CHIP_ERROR accessControlError = Access::GetAccessControl().Check(eventLoadOutContext->mSubjectDescriptor, requestPath, requestPrivilege); - if (accessControlError != CHIP_NO_ERROR) { ReturnErrorCodeIf(accessControlError != CHIP_ERROR_ACCESS_DENIED, accessControlError); - if (eventReadViaConcretePath) - { - ret = CHIP_ERROR_ACCESS_DENIED; - } - else - { - ret = CHIP_ERROR_UNEXPECTED_EVENT; - } + ret = CHIP_ERROR_UNEXPECTED_EVENT; } return ret; @@ -668,24 +630,6 @@ CHIP_ERROR EventManagement::CopyEventsSince(const TLVReader & aReader, size_t aD loadOutContext->mFirst = false; loadOutContext->mEventCount++; } - else if (err == CHIP_ERROR_ACCESS_DENIED) - { - // checkpoint the writer - TLV::TLVWriter checkpoint = loadOutContext->mWriter; - - err = WriteEventStatusIB(loadOutContext->mWriter, ConcreteEventPath(event.mEndpointId, event.mClusterId, event.mEventId), - StatusIB(Protocols::InteractionModel::Status::UnsupportedAccess)); - - if (err != CHIP_NO_ERROR) - { - loadOutContext->mWriter = checkpoint; - return err; - } - - loadOutContext->mPreviousTime.mValue = loadOutContext->mCurrentTime.mValue; - loadOutContext->mFirst = false; - loadOutContext->mEventCount++; - } return err; } diff --git a/src/app/EventManagement.h b/src/app/EventManagement.h index 580435ea9f770c..a59959465d7e1a 100644 --- a/src/app/EventManagement.h +++ b/src/app/EventManagement.h @@ -490,11 +490,6 @@ class EventManagement */ static CHIP_ERROR CopyEvent(const TLV::TLVReader & aReader, TLV::TLVWriter & aWriter, EventLoadOutContext * apContext); - /** - * @brief construct EventStatusIB to target buffer for report - */ - static CHIP_ERROR WriteEventStatusIB(TLV::TLVWriter & aWriter, const ConcreteEventPath & aEvent, StatusIB aStatus); - /** * @brief * A function to get the circular buffer for particular priority diff --git a/src/app/FailSafeContext.cpp b/src/app/FailSafeContext.cpp index f85e538d2e5543..ceadf923c59624 100644 --- a/src/app/FailSafeContext.cpp +++ b/src/app/FailSafeContext.cpp @@ -86,6 +86,8 @@ void FailSafeContext::ScheduleFailSafeCleanup(FabricIndex fabricIndex, bool addN CHIP_ERROR FailSafeContext::ArmFailSafe(FabricIndex accessingFabricIndex, System::Clock::Seconds16 expiryLengthSeconds) { + VerifyOrReturnError(!IsFailSafeBusy(), CHIP_ERROR_INCORRECT_STATE); + CHIP_ERROR err = CHIP_NO_ERROR; bool cancelTimersIfError = false; if (!mFailSafeArmed) diff --git a/src/app/FailSafeContext.h b/src/app/FailSafeContext.h index e2759d85e71f06..370b21981582e1 100644 --- a/src/app/FailSafeContext.h +++ b/src/app/FailSafeContext.h @@ -75,6 +75,11 @@ class FailSafeContext bool IsFailSafeArmed() const { return mFailSafeArmed; } + // True if it is possible to do an initial arming of the failsafe if needed. + // To be used in places where some action should take place only if the + // fail-safe could be armed after that action. + bool IsFailSafeFullyDisarmed() const { return !IsFailSafeArmed() && !IsFailSafeBusy(); } + bool MatchesFabricIndex(FabricIndex accessingFabricIndex) const { VerifyOrDie(mFailSafeArmed); diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 44aad058f9ee7f..e4f76d46d113b5 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -43,13 +43,17 @@ InteractionModelEngine * InteractionModelEngine::GetInstance() return &sInteractionModelEngine; } -CHIP_ERROR InteractionModelEngine::Init(Messaging::ExchangeManager * apExchangeMgr, FabricTable * apFabricTable) +CHIP_ERROR InteractionModelEngine::Init(Messaging::ExchangeManager * apExchangeMgr, FabricTable * apFabricTable, + CASESessionManager * apCASESessionMgr) { - mpExchangeMgr = apExchangeMgr; - mpFabricTable = apFabricTable; + VerifyOrReturnError(apFabricTable != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(apExchangeMgr != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + mpExchangeMgr = apExchangeMgr; + mpFabricTable = apFabricTable; + mpCASESessionMgr = apCASESessionMgr; ReturnErrorOnFailure(mpExchangeMgr->RegisterUnsolicitedMessageHandlerForProtocol(Protocols::InteractionModel::Id, this)); - VerifyOrReturnError(mpFabricTable != nullptr, CHIP_ERROR_INVALID_ARGUMENT); mReportingEngine.Init(); mMagic++; @@ -122,6 +126,16 @@ void InteractionModelEngine::Shutdown() mEventPathPool.ReleaseAll(); mDataVersionFilterPool.ReleaseAll(); mpExchangeMgr->UnregisterUnsolicitedMessageHandlerForProtocol(Protocols::InteractionModel::Id); + + mpCASESessionMgr = nullptr; + + // + // We _should_ be clearing these out, but doing so invites a world + // of trouble. #21233 tracks fixing the underlying assumptions to make + // this possible. + // + // mpFabricTable = nullptr; + // mpExchangeMgr = nullptr; } uint32_t InteractionModelEngine::GetNumActiveReadHandlers() const @@ -664,7 +678,7 @@ bool InteractionModelEngine::TrimFabricForSubscriptions(FabricIndex aFabricIndex eventPathsSubscribedByCurrentFabric > perFabricPathCapacity || subscriptionsEstablishedByCurrentFabric > perFabricSubscriptionCapacity)) { - candidate->Abort(); + candidate->Close(); return true; } return false; @@ -847,7 +861,7 @@ bool InteractionModelEngine::TrimFabricForRead(FabricIndex aFabricIndex) // Always evict the transactions on PASE sessions if the fabric table is full. (aFabricIndex == kUndefinedFabricIndex && mpFabricTable->FabricCount() == GetConfigMaxFabrics()))) { - candidate->Abort(); + candidate->Close(); return true; } return false; diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index e5e414bc746a9f..208b88d29bfa60 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -59,6 +59,8 @@ #include #include +#include + namespace chip { namespace app { @@ -102,17 +104,26 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, * Initialize the InteractionModel Engine. * * @param[in] apExchangeMgr A pointer to the ExchangeManager object. + * @param[in] apFabricTable A pointer to the FabricTable object. + * @param[in] apCASESessionMgr An optional pointer to a CASESessionManager (used for re-subscriptions). * * @retval #CHIP_ERROR_INCORRECT_STATE If the state is not equal to * kState_NotInitialized. * @retval #CHIP_NO_ERROR On success. * */ - CHIP_ERROR Init(Messaging::ExchangeManager * apExchangeMgr, FabricTable * apFabricTable); + CHIP_ERROR Init(Messaging::ExchangeManager * apExchangeMgr, FabricTable * apFabricTable, + CASESessionManager * apCASESessionMgr = nullptr); void Shutdown(); - Messaging::ExchangeManager * GetExchangeManager(void) const { return mpExchangeMgr; }; + Messaging::ExchangeManager * GetExchangeManager(void) const { return mpExchangeMgr; } + + /** + * Returns a pointer to the CASESessionManager. This can return nullptr if one wasn't + * provided in the call to Init(). + */ + CASESessionManager * GetCASESessionManager() const { return mpCASESessionMgr; } /** * Tears down an active subscription. @@ -551,6 +562,8 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, FabricTable * mpFabricTable; + CASESessionManager * mpCASESessionMgr = nullptr; + // A magic number for tracking values between stack Shutdown()-s and Init()-s. // An ObjectHandle is valid iff. its magic equals to this one. uint32_t mMagic = 0; diff --git a/src/app/MessageDef/AttributeDataIB.cpp b/src/app/MessageDef/AttributeDataIB.cpp index 35d6003ef44a89..61f6bb88f0eb7e 100644 --- a/src/app/MessageDef/AttributeDataIB.cpp +++ b/src/app/MessageDef/AttributeDataIB.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/AttributeDataIBs.cpp b/src/app/MessageDef/AttributeDataIBs.cpp index fdb9f57f6b948b..f0068a8838420c 100644 --- a/src/app/MessageDef/AttributeDataIBs.cpp +++ b/src/app/MessageDef/AttributeDataIBs.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include using namespace chip; using namespace chip::TLV; diff --git a/src/app/MessageDef/AttributePathIB.cpp b/src/app/MessageDef/AttributePathIB.cpp index 6750471d849a0e..c8d0fa51d29f4c 100644 --- a/src/app/MessageDef/AttributePathIB.cpp +++ b/src/app/MessageDef/AttributePathIB.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/src/app/MessageDef/AttributePathIBs.cpp b/src/app/MessageDef/AttributePathIBs.cpp index 4a04dc0e47be0e..8b88e7e9e3361d 100644 --- a/src/app/MessageDef/AttributePathIBs.cpp +++ b/src/app/MessageDef/AttributePathIBs.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/AttributeReportIB.cpp b/src/app/MessageDef/AttributeReportIB.cpp index cf8671bc19c07e..e08eb37ac77ce3 100644 --- a/src/app/MessageDef/AttributeReportIB.cpp +++ b/src/app/MessageDef/AttributeReportIB.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/AttributeReportIBs.cpp b/src/app/MessageDef/AttributeReportIBs.cpp index 83b7b634416b50..001fbff077acc9 100644 --- a/src/app/MessageDef/AttributeReportIBs.cpp +++ b/src/app/MessageDef/AttributeReportIBs.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/AttributeStatusIB.cpp b/src/app/MessageDef/AttributeStatusIB.cpp index 8b8fa5d87b45b2..5c0e92b7020b03 100644 --- a/src/app/MessageDef/AttributeStatusIB.cpp +++ b/src/app/MessageDef/AttributeStatusIB.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/AttributeStatusIBs.cpp b/src/app/MessageDef/AttributeStatusIBs.cpp index e07e277f899c36..a10106aad28c34 100644 --- a/src/app/MessageDef/AttributeStatusIBs.cpp +++ b/src/app/MessageDef/AttributeStatusIBs.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/ClusterPathIB.cpp b/src/app/MessageDef/ClusterPathIB.cpp index d92efbb7decce6..8223d63507a1cd 100644 --- a/src/app/MessageDef/ClusterPathIB.cpp +++ b/src/app/MessageDef/ClusterPathIB.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/CommandDataIB.cpp b/src/app/MessageDef/CommandDataIB.cpp index c6c995420fb0f0..61978f2e564b52 100644 --- a/src/app/MessageDef/CommandDataIB.cpp +++ b/src/app/MessageDef/CommandDataIB.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/CommandPathIB.cpp b/src/app/MessageDef/CommandPathIB.cpp index c944b7fcb78cd4..be9117d3679613 100644 --- a/src/app/MessageDef/CommandPathIB.cpp +++ b/src/app/MessageDef/CommandPathIB.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include using namespace chip; using namespace chip::TLV; diff --git a/src/app/MessageDef/CommandStatusIB.cpp b/src/app/MessageDef/CommandStatusIB.cpp index f7ccce23bc774b..797ec655e3eef4 100644 --- a/src/app/MessageDef/CommandStatusIB.cpp +++ b/src/app/MessageDef/CommandStatusIB.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/DataVersionFilterIB.cpp b/src/app/MessageDef/DataVersionFilterIB.cpp index 9416fb0b6d04d6..00d1d28b0ff927 100644 --- a/src/app/MessageDef/DataVersionFilterIB.cpp +++ b/src/app/MessageDef/DataVersionFilterIB.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/DataVersionFilterIBs.cpp b/src/app/MessageDef/DataVersionFilterIBs.cpp index ee646584d95f14..eb6a18951ef6db 100644 --- a/src/app/MessageDef/DataVersionFilterIBs.cpp +++ b/src/app/MessageDef/DataVersionFilterIBs.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventDataIB.cpp b/src/app/MessageDef/EventDataIB.cpp index e5f228f52a7090..cd70cb4f38bda4 100644 --- a/src/app/MessageDef/EventDataIB.cpp +++ b/src/app/MessageDef/EventDataIB.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventFilterIB.cpp b/src/app/MessageDef/EventFilterIB.cpp index 86aebf3c64c575..9264c1d87d6f31 100644 --- a/src/app/MessageDef/EventFilterIB.cpp +++ b/src/app/MessageDef/EventFilterIB.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventFilterIBs.cpp b/src/app/MessageDef/EventFilterIBs.cpp index 4c97fc1c5ff743..66023c856fa126 100644 --- a/src/app/MessageDef/EventFilterIBs.cpp +++ b/src/app/MessageDef/EventFilterIBs.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventPathIB.cpp b/src/app/MessageDef/EventPathIB.cpp index ff1478b12a7bcb..35c5b098b94c55 100644 --- a/src/app/MessageDef/EventPathIB.cpp +++ b/src/app/MessageDef/EventPathIB.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventPathIBs.cpp b/src/app/MessageDef/EventPathIBs.cpp index b3fd026d41e4f9..673141fcd8e1a1 100644 --- a/src/app/MessageDef/EventPathIBs.cpp +++ b/src/app/MessageDef/EventPathIBs.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventReportIB.cpp b/src/app/MessageDef/EventReportIB.cpp index 6c3311f9a54397..c9eaec4d98f85d 100644 --- a/src/app/MessageDef/EventReportIB.cpp +++ b/src/app/MessageDef/EventReportIB.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace chip { namespace app { @@ -149,5 +149,27 @@ EventReportIB::Builder & EventReportIB::Builder::EndOfEventReportIB() EndOfContainer(); return *this; } + +CHIP_ERROR EventReportIB::ConstructEventStatusIB(TLV::TLVWriter & aWriter, const ConcreteEventPath & aEvent, StatusIB aStatus) +{ + Builder eventReportIBBuilder; + ReturnErrorOnFailure(eventReportIBBuilder.Init(&aWriter)); + EventStatusIB::Builder & eventStatusIBBuilder = eventReportIBBuilder.CreateEventStatus(); + ReturnErrorOnFailure(eventReportIBBuilder.GetError()); + EventPathIB::Builder & eventPathIBBuilder = eventStatusIBBuilder.CreatePath(); + ReturnErrorOnFailure(eventStatusIBBuilder.GetError()); + ReturnErrorOnFailure(eventPathIBBuilder.Endpoint(aEvent.mEndpointId) + .Cluster(aEvent.mClusterId) + .Event(aEvent.mEventId) + .EndOfEventPathIB() + .GetError()); + + ReturnErrorOnFailure(eventStatusIBBuilder.CreateErrorStatus().EncodeStatusIB(aStatus).GetError()); + + ReturnErrorOnFailure(eventStatusIBBuilder.EndOfEventStatusIB().GetError()); + ReturnErrorOnFailure(eventReportIBBuilder.EndOfEventReportIB().GetError()); + ReturnErrorOnFailure(aWriter.Finalize()); + return CHIP_NO_ERROR; +} } // namespace app } // namespace chip diff --git a/src/app/MessageDef/EventReportIB.h b/src/app/MessageDef/EventReportIB.h index 69f02af6241910..ee2a49d6c38e63 100644 --- a/src/app/MessageDef/EventReportIB.h +++ b/src/app/MessageDef/EventReportIB.h @@ -109,6 +109,11 @@ class Builder : public StructBuilder EventStatusIB::Builder mEventStatus; EventDataIB::Builder mEventData; }; + +/** + * @brief construct EventStatusIB to target buffer for report + */ +CHIP_ERROR ConstructEventStatusIB(TLV::TLVWriter & aWriter, const ConcreteEventPath & aEvent, StatusIB aStatus); } // namespace EventReportIB } // namespace app } // namespace chip diff --git a/src/app/MessageDef/EventReportIBs.cpp b/src/app/MessageDef/EventReportIBs.cpp index 6229be6b664d83..2a4099a0e09a62 100644 --- a/src/app/MessageDef/EventReportIBs.cpp +++ b/src/app/MessageDef/EventReportIBs.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventStatusIB.cpp b/src/app/MessageDef/EventStatusIB.cpp index 449fe7103c6828..dd8c5f4b9f671b 100644 --- a/src/app/MessageDef/EventStatusIB.cpp +++ b/src/app/MessageDef/EventStatusIB.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/InvokeRequestMessage.cpp b/src/app/MessageDef/InvokeRequestMessage.cpp index 3d0a28f9fc500a..13d54fc6fdabc9 100644 --- a/src/app/MessageDef/InvokeRequestMessage.cpp +++ b/src/app/MessageDef/InvokeRequestMessage.cpp @@ -21,7 +21,7 @@ #include "InvokeRequestMessage.h" #include "MessageDefHelper.h" -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/InvokeRequests.cpp b/src/app/MessageDef/InvokeRequests.cpp index 89c50e65e26e23..5d140a6589c2ec 100644 --- a/src/app/MessageDef/InvokeRequests.cpp +++ b/src/app/MessageDef/InvokeRequests.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/InvokeResponseIB.cpp b/src/app/MessageDef/InvokeResponseIB.cpp index e140072918dd0b..1fbae7a7139c15 100644 --- a/src/app/MessageDef/InvokeResponseIB.cpp +++ b/src/app/MessageDef/InvokeResponseIB.cpp @@ -21,7 +21,7 @@ #include "InvokeResponseIB.h" #include "MessageDefHelper.h" -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/InvokeResponseIBs.cpp b/src/app/MessageDef/InvokeResponseIBs.cpp index 3404599c9bbdf2..6ea80a27fd4b00 100644 --- a/src/app/MessageDef/InvokeResponseIBs.cpp +++ b/src/app/MessageDef/InvokeResponseIBs.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/InvokeResponseMessage.cpp b/src/app/MessageDef/InvokeResponseMessage.cpp index 1aec93b611907f..50de3efa4959d6 100644 --- a/src/app/MessageDef/InvokeResponseMessage.cpp +++ b/src/app/MessageDef/InvokeResponseMessage.cpp @@ -21,7 +21,7 @@ #include "InvokeResponseMessage.h" #include "MessageDefHelper.h" -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/MessageDefHelper.cpp b/src/app/MessageDef/MessageDefHelper.cpp index 5e65ad5a1c258e..0ff06438baca57 100644 --- a/src/app/MessageDef/MessageDefHelper.cpp +++ b/src/app/MessageDef/MessageDefHelper.cpp @@ -23,7 +23,7 @@ #include "MessageDefHelper.h" #include -#include +#include #include #include #include diff --git a/src/app/MessageDef/ReadRequestMessage.cpp b/src/app/MessageDef/ReadRequestMessage.cpp index d5837db6684f58..dda2dbf62c7c84 100644 --- a/src/app/MessageDef/ReadRequestMessage.cpp +++ b/src/app/MessageDef/ReadRequestMessage.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/ReportDataMessage.cpp b/src/app/MessageDef/ReportDataMessage.cpp index ee32ec1a024c60..de95a7532b7461 100644 --- a/src/app/MessageDef/ReportDataMessage.cpp +++ b/src/app/MessageDef/ReportDataMessage.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include using namespace chip; diff --git a/src/app/MessageDef/StatusIB.cpp b/src/app/MessageDef/StatusIB.cpp index 19957a312183a7..d82c7da859b72d 100644 --- a/src/app/MessageDef/StatusIB.cpp +++ b/src/app/MessageDef/StatusIB.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include using namespace chip; diff --git a/src/app/MessageDef/WriteRequestMessage.cpp b/src/app/MessageDef/WriteRequestMessage.cpp index c315231c661fcb..4b19a66dfba22f 100644 --- a/src/app/MessageDef/WriteRequestMessage.cpp +++ b/src/app/MessageDef/WriteRequestMessage.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/WriteResponseMessage.cpp b/src/app/MessageDef/WriteResponseMessage.cpp index ea7b7bbc5d15c8..f0bab4d3abc2a1 100644 --- a/src/app/MessageDef/WriteResponseMessage.cpp +++ b/src/app/MessageDef/WriteResponseMessage.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/OperationalDeviceProxy.cpp b/src/app/OperationalDeviceProxy.cpp index 33373f79996a88..45386ca6626995 100644 --- a/src/app/OperationalDeviceProxy.cpp +++ b/src/app/OperationalDeviceProxy.cpp @@ -24,12 +24,11 @@ * messages to and from the corresponding CHIP devices. */ -#include "OperationalDeviceProxy.h" +#include -#include "CASEClient.h" -#include "CommandSender.h" -#include "ReadPrepareParams.h" -#include "transport/SecureSession.h" +#include +#include +#include #include #include @@ -50,8 +49,8 @@ void OperationalDeviceProxy::MoveToState(State aTargetState) { if (mState != aTargetState) { - ChipLogDetail(Controller, "OperationalDeviceProxy[" ChipLogFormatX64 ":" ChipLogFormatX64 "]: State change %d --> %d", - ChipLogValueX64(mPeerId.GetCompressedFabricId()), ChipLogValueX64(mPeerId.GetNodeId()), to_underlying(mState), + ChipLogDetail(Controller, "OperationalDeviceProxy[%u:" ChipLogFormatX64 "]: State change %d --> %d", + mPeerId.GetFabricIndex(), ChipLogValueX64(mPeerId.GetNodeId()), to_underlying(mState), to_underlying(aTargetState)); mState = aTargetState; @@ -66,14 +65,14 @@ bool OperationalDeviceProxy::AttachToExistingSecureSession() { VerifyOrReturnError(mState == State::NeedsAddress || mState == State::ResolvingAddress || mState == State::HasAddress, false); - ScopedNodeId peerNodeId(mPeerId.GetNodeId(), mFabricIndex); auto sessionHandle = - mInitParams.sessionManager->FindSecureSessionForNode(peerNodeId, MakeOptional(Transport::SecureSession::Type::kCASE)); + mInitParams.sessionManager->FindSecureSessionForNode(mPeerId, MakeOptional(Transport::SecureSession::Type::kCASE)); if (!sessionHandle.HasValue()) return false; - ChipLogProgress(Controller, "Found an existing secure session to [" ChipLogFormatX64 "-" ChipLogFormatX64 "]!", - ChipLogValueX64(mPeerId.GetCompressedFabricId()), ChipLogValueX64(mPeerId.GetNodeId())); + ChipLogProgress(Controller, "Found an existing secure session to [%u:" ChipLogFormatX64 "]!", mPeerId.GetFabricIndex(), + ChipLogValueX64(mPeerId.GetNodeId())); + mDeviceAddress = sessionHandle.Value()->AsSecureSession()->GetPeerAddress(); if (!mSecureSession.Grab(sessionHandle.Value())) return false; @@ -169,7 +168,8 @@ void OperationalDeviceProxy::UpdateDeviceData(const Transport::PeerAddress & add char peerAddrBuff[Transport::PeerAddress::kMaxToStringSize]; addr.ToString(peerAddrBuff); - ChipLogDetail(Controller, "Updating device address to %s while in state %d", peerAddrBuff, static_cast(mState)); + ChipLogDetail(Discovery, "OperationalDeviceProxy[%u:" ChipLogFormatX64 "]: Updating device address to %s while in state %d", + mPeerId.GetFabricIndex(), ChipLogValueX64(mPeerId.GetNodeId()), peerAddrBuff, static_cast(mState)); #endif CHIP_ERROR err = CHIP_NO_ERROR; @@ -212,7 +212,7 @@ CHIP_ERROR OperationalDeviceProxy::EstablishConnection() { mCASEClient = mInitParams.clientPool->Allocate(CASEClientInitParams{ mInitParams.sessionManager, mInitParams.sessionResumptionStorage, mInitParams.certificateValidityPolicy, - mInitParams.exchangeMgr, mFabricTable, mFabricIndex, mInitParams.groupDataProvider, mInitParams.mrpLocalConfig }); + mInitParams.exchangeMgr, mFabricTable, mInitParams.groupDataProvider, mInitParams.mrpLocalConfig }); ReturnErrorCodeIf(mCASEClient == nullptr, CHIP_ERROR_NO_MEMORY); CHIP_ERROR err = mCASEClient->EstablishSession(mPeerId, mDeviceAddress, mRemoteMRPConfig, this); @@ -359,14 +359,17 @@ void OperationalDeviceProxy::OnSessionHang() void OperationalDeviceProxy::ShutdownSubscriptions() { - app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(mFabricIndex, GetDeviceId()); + app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(mPeerId.GetFabricIndex(), GetDeviceId()); } OperationalDeviceProxy::~OperationalDeviceProxy() { if (mAddressLookupHandle.IsActive()) { - ChipLogProgress(Discovery, "Cancelling incomplete address resolution as device is being deleted."); + ChipLogDetail(Discovery, + "OperationalDeviceProxy[%u:" ChipLogFormatX64 + "]: Cancelling incomplete address resolution as device is being deleted.", + mPeerId.GetFabricIndex(), ChipLogValueX64(mPeerId.GetNodeId())); // Skip cancel callback since the destructor is being called, so we assume that this object is // obviously not used anymore @@ -391,11 +394,19 @@ CHIP_ERROR OperationalDeviceProxy::LookupPeerAddress() // MoveToState calls in this method. if (mAddressLookupHandle.IsActive()) { - ChipLogProgress(Discovery, "Operational node lookup already in progress. Will NOT start a new one."); + ChipLogProgress(Discovery, + "OperationalDeviceProxy[%u:" ChipLogFormatX64 + "]: Operational node lookup already in progress. Will NOT start a new one.", + mPeerId.GetFabricIndex(), ChipLogValueX64(mPeerId.GetNodeId())); return CHIP_NO_ERROR; } - NodeLookupRequest request(mPeerId); + auto const * fabricInfo = mFabricTable->FindFabricWithIndex(mPeerId.GetFabricIndex()); + VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_INVALID_FABRIC_INDEX); + + PeerId peerId(fabricInfo->GetCompressedFabricId(), mPeerId.GetNodeId()); + + NodeLookupRequest request(peerId); return Resolver::Instance().LookupNode(request, mAddressLookupHandle); } @@ -407,8 +418,8 @@ void OperationalDeviceProxy::OnNodeAddressResolved(const PeerId & peerId, const void OperationalDeviceProxy::OnNodeAddressResolutionFailed(const PeerId & peerId, CHIP_ERROR reason) { - ChipLogError(Discovery, "Operational discovery failed for 0x" ChipLogFormatX64 ": %" CHIP_ERROR_FORMAT, - ChipLogValueX64(peerId.GetNodeId()), reason.Format()); + ChipLogError(Discovery, "OperationalDeviceProxy[%u:" ChipLogFormatX64 "]: operational discovery failed: %" CHIP_ERROR_FORMAT, + mPeerId.GetFabricIndex(), ChipLogValueX64(mPeerId.GetNodeId()), reason.Format()); if (IsResolvingAddress()) { diff --git a/src/app/OperationalDeviceProxy.h b/src/app/OperationalDeviceProxy.h index 3adf96b39af08a..f83bb7a2ab9613 100644 --- a/src/app/OperationalDeviceProxy.h +++ b/src/app/OperationalDeviceProxy.h @@ -73,7 +73,7 @@ struct DeviceProxyInitParams class OperationalDeviceProxy; typedef void (*OnDeviceConnected)(void * context, OperationalDeviceProxy * device); -typedef void (*OnDeviceConnectionFailure)(void * context, PeerId peerId, CHIP_ERROR error); +typedef void (*OnDeviceConnectionFailure)(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); /** * Represents a connection path to a device that is in an operational state. @@ -92,10 +92,7 @@ class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, public: ~OperationalDeviceProxy() override; - // - // TODO: Should not be PeerId, but rather, ScopedNodeId - // - OperationalDeviceProxy(DeviceProxyInitParams & params, PeerId peerId) : mSecureSession(*this) + OperationalDeviceProxy(DeviceProxyInitParams & params, ScopedNodeId peerId) : mSecureSession(*this) { mInitParams = params; if (params.Validate() != CHIP_NO_ERROR) @@ -107,15 +104,7 @@ class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, mSystemLayer = params.exchangeMgr->GetSessionManager()->SystemLayer(); mPeerId = peerId; mFabricTable = params.fabricTable; - if (mFabricTable != nullptr) - { - auto fabricInfo = params.fabricTable->FindFabricWithCompressedId(peerId.GetCompressedFabricId()); - if (fabricInfo != nullptr) - { - mFabricIndex = fabricInfo->GetFabricIndex(); - } - } - mState = State::NeedsAddress; + mState = State::NeedsAddress; mAddressLookupHandle.SetListener(this); } @@ -171,7 +160,7 @@ class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, NodeId GetDeviceId() const override { return mPeerId.GetNodeId(); } - PeerId GetPeerId() const { return mPeerId; } + ScopedNodeId GetPeerId() const { return mPeerId; } void ShutdownSubscriptions() override; @@ -201,7 +190,7 @@ class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, /** * @brief Get the fabricIndex */ - FabricIndex GetFabricIndex() const { return mFabricIndex; } + FabricIndex GetFabricIndex() const { return mPeerId.GetFabricIndex(); } /** * Triggers a DNSSD lookup to find a usable peer address for this operational device. @@ -225,14 +214,13 @@ class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, DeviceProxyInitParams mInitParams; FabricTable * mFabricTable = nullptr; - FabricIndex mFabricIndex = kUndefinedFabricIndex; System::Layer * mSystemLayer; // mCASEClient is only non-null if we are in State::Connecting or just // allocated it as part of an attempt to enter State::Connecting. CASEClient * mCASEClient = nullptr; - PeerId mPeerId; + ScopedNodeId mPeerId; Transport::PeerAddress mDeviceAddress = Transport::PeerAddress::UDP(Inet::IPAddress::Any); diff --git a/src/app/OperationalDeviceProxyPool.h b/src/app/OperationalDeviceProxyPool.h index c6f3d7e136f152..5413624c4d9016 100644 --- a/src/app/OperationalDeviceProxyPool.h +++ b/src/app/OperationalDeviceProxyPool.h @@ -26,11 +26,11 @@ namespace chip { class OperationalDeviceProxyPoolDelegate { public: - virtual OperationalDeviceProxy * Allocate(DeviceProxyInitParams & params, PeerId peerId) = 0; + virtual OperationalDeviceProxy * Allocate(DeviceProxyInitParams & params, ScopedNodeId peerId) = 0; virtual void Release(OperationalDeviceProxy * device) = 0; - virtual OperationalDeviceProxy * FindDevice(PeerId peerId) = 0; + virtual OperationalDeviceProxy * FindDevice(ScopedNodeId peerId) = 0; virtual void ReleaseDevicesForFabric(FabricIndex fabricIndex) = 0; @@ -45,14 +45,14 @@ class OperationalDeviceProxyPool : public OperationalDeviceProxyPoolDelegate public: ~OperationalDeviceProxyPool() override { mDevicePool.ReleaseAll(); } - OperationalDeviceProxy * Allocate(DeviceProxyInitParams & params, PeerId peerId) override + OperationalDeviceProxy * Allocate(DeviceProxyInitParams & params, ScopedNodeId peerId) override { return mDevicePool.CreateObject(params, peerId); } void Release(OperationalDeviceProxy * device) override { mDevicePool.ReleaseObject(device); } - OperationalDeviceProxy * FindDevice(PeerId peerId) override + OperationalDeviceProxy * FindDevice(ScopedNodeId peerId) override { OperationalDeviceProxy * foundDevice = nullptr; mDevicePool.ForEachActiveObject([&](auto * activeDevice) { diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 5c60e94986cd62..9c6df9be9dcbb2 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -22,7 +22,7 @@ * */ -#include +#include #include #include #include @@ -34,47 +34,11 @@ namespace chip { namespace app { -/** - * @brief The default resubscribe policy will pick a random timeslot - * with millisecond resolution over an ever increasing window, - * following a fibonacci sequence up to CHIP_RESUBSCRIBE_MAX_FIBONACCI_STEP_INDEX, - * Average of the randomized wait time past the CHIP_RESUBSCRIBE_MAX_FIBONACCI_STEP_INDEX - * will be around one hour. - * When the retry count resets to 0, the sequence starts from the beginning again. - */ -static void DefaultResubscribePolicy(uint32_t aNumCumulativeRetries, uint32_t & aNextSubscriptionIntervalMsec, - bool & aShouldResubscribe) -{ - uint32_t maxWaitTimeInMsec = 0; - uint32_t waitTimeInMsec = 0; - uint32_t minWaitTimeInMsec = 0; - - if (aNumCumulativeRetries <= CHIP_RESUBSCRIBE_MAX_FIBONACCI_STEP_INDEX) - { - maxWaitTimeInMsec = GetFibonacciForIndex(aNumCumulativeRetries) * CHIP_RESUBSCRIBE_WAIT_TIME_MULTIPLIER_MS; - } - else - { - maxWaitTimeInMsec = CHIP_RESUBSCRIBE_MAX_RETRY_WAIT_INTERVAL_MS; - } - - if (maxWaitTimeInMsec != 0) - { - minWaitTimeInMsec = (CHIP_RESUBSCRIBE_MIN_WAIT_TIME_INTERVAL_PERCENT_PER_STEP * maxWaitTimeInMsec) / 100; - waitTimeInMsec = minWaitTimeInMsec + (Crypto::GetRandU32() % (maxWaitTimeInMsec - minWaitTimeInMsec)); - } - - aNextSubscriptionIntervalMsec = waitTimeInMsec; - aShouldResubscribe = true; - ChipLogProgress(DataManagement, - "Computing Resubscribe policy: attempts %" PRIu32 ", max wait time %" PRIu32 " ms, selected wait time %" PRIu32 - " ms", - aNumCumulativeRetries, maxWaitTimeInMsec, waitTimeInMsec); -} - ReadClient::ReadClient(InteractionModelEngine * apImEngine, Messaging::ExchangeManager * apExchangeMgr, Callback & apCallback, InteractionType aInteractionType) : - mpCallback(apCallback) + mExchange(*this), + mpCallback(apCallback), mOnConnectedCallback(HandleDeviceConnected, this), + mOnConnectionFailureCallback(HandleDeviceConnectionFailure, this) { // Error if already initialized. mpExchangeMgr = apExchangeMgr; @@ -102,7 +66,7 @@ void ReadClient::ClearActiveSubscriptionState() void ReadClient::StopResubscription() { - ClearActiveSubscriptionState(); + CancelLivenessCheckTimer(); CancelResubscribeTimer(); mpCallback.OnDeallocatePaths(std::move(mReadPrepareParams)); @@ -110,11 +74,11 @@ void ReadClient::StopResubscription() ReadClient::~ReadClient() { - Abort(); - if (IsSubscriptionType()) { CancelLivenessCheckTimer(); + CancelResubscribeTimer(); + // // Only remove ourselves from the engine's tracker list if we still continue to have a valid pointer to it. // This won't be the case if the engine shut down before this destructor was called (in which case, mpImEngine @@ -127,20 +91,56 @@ ReadClient::~ReadClient() } } -void ReadClient::Close(CHIP_ERROR aError) +uint32_t ReadClient::ComputeTimeTillNextSubscription() +{ + uint32_t maxWaitTimeInMsec = 0; + uint32_t waitTimeInMsec = 0; + uint32_t minWaitTimeInMsec = 0; + + if (mNumRetries <= CHIP_RESUBSCRIBE_MAX_FIBONACCI_STEP_INDEX) + { + maxWaitTimeInMsec = GetFibonacciForIndex(mNumRetries) * CHIP_RESUBSCRIBE_WAIT_TIME_MULTIPLIER_MS; + } + else + { + maxWaitTimeInMsec = CHIP_RESUBSCRIBE_MAX_RETRY_WAIT_INTERVAL_MS; + } + + if (maxWaitTimeInMsec != 0) + { + minWaitTimeInMsec = (CHIP_RESUBSCRIBE_MIN_WAIT_TIME_INTERVAL_PERCENT_PER_STEP * maxWaitTimeInMsec) / 100; + waitTimeInMsec = minWaitTimeInMsec + (Crypto::GetRandU32() % (maxWaitTimeInMsec - minWaitTimeInMsec)); + } + + return waitTimeInMsec; +} + +CHIP_ERROR ReadClient::ScheduleResubscription(uint32_t aTimeTillNextResubscriptionMs, Optional aNewSessionHandle, + bool aReestablishCASE) { - // OnDone below can destroy us before we unwind all the way back into the - // exchange code and it tries to close itself. Make sure that it doesn't - // try to notify us that it's closing, since we will be dead. + VerifyOrReturnError(IsIdle(), CHIP_ERROR_INCORRECT_STATE); + // - // For more details, see #10344. - if (mpExchangeCtx != nullptr) + // If we're establishing CASE, make sure we are not provided a new SessionHandle as well. + // + VerifyOrReturnError(!aReestablishCASE || !aNewSessionHandle.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + + if (aNewSessionHandle.HasValue()) { - mpExchangeCtx->SetDelegate(nullptr); + mReadPrepareParams.mSessionHolder.Grab(aNewSessionHandle.Value()); } - mpExchangeCtx = nullptr; + mDoCaseOnNextResub = aReestablishCASE; + + ReturnErrorOnFailure( + InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( + System::Clock::Milliseconds32(aTimeTillNextResubscriptionMs), OnResubscribeTimerCallback, this)); + return CHIP_NO_ERROR; +} + +void ReadClient::Close(CHIP_ERROR aError, bool allowResubscription) +{ if (IsReadType()) { if (aError != CHIP_NO_ERROR) @@ -152,20 +152,31 @@ void ReadClient::Close(CHIP_ERROR aError) { if (aError != CHIP_NO_ERROR) { - uint32_t nextResubscribeMsec = 0; - - if (ResubscribeIfNeeded(nextResubscribeMsec)) + ClearActiveSubscriptionState(); + + // + // We infer that re-subscription was requested by virtue of having a non-zero list of event OR attribute paths present + // in mReadPrepareParams. This would only be the case if an application called SendAutoResubscribeRequest which + // populates mReadPrepareParams with the values provided by the application. + // + if (allowResubscription && + (mReadPrepareParams.mEventPathParamsListSize != 0 || mReadPrepareParams.mAttributePathParamsListSize != 0)) { - ChipLogProgress(DataManagement, - "Will try to resubscribe to %02x:" ChipLogFormatX64 " at retry index %" PRIu32 " after %" PRIu32 - "ms due to error %" CHIP_ERROR_FORMAT, - mFabricIndex, ChipLogValueX64(mPeerNodeId), mNumRetries, nextResubscribeMsec, aError.Format()); - mpCallback.OnResubscriptionAttempt(aError, nextResubscribeMsec); - ClearActiveSubscriptionState(); - return; + aError = mpCallback.OnResubscriptionNeeded(this, aError); + if (aError == CHIP_NO_ERROR) + { + return; + } } + + // + // Either something bad happened when requesting resubscription or the application has decided to not + // continue by returning an error. Let's convey the error back up to the application + // and shut everything down. + // mpCallback.OnError(aError); } + StopResubscription(); } @@ -284,24 +295,24 @@ CHIP_ERROR ReadClient::SendReadRequest(ReadPrepareParams & aReadPrepareParams) VerifyOrReturnError(aReadPrepareParams.mSessionHolder, CHIP_ERROR_MISSING_SECURE_SESSION); - mpExchangeCtx = mpExchangeMgr->NewContext(aReadPrepareParams.mSessionHolder.Get().Value(), this); - VerifyOrReturnError(mpExchangeCtx != nullptr, err = CHIP_ERROR_NO_MEMORY); + auto exchange = mpExchangeMgr->NewContext(aReadPrepareParams.mSessionHolder.Get().Value(), this); + VerifyOrReturnError(exchange != nullptr, err = CHIP_ERROR_NO_MEMORY); + + mExchange.Grab(exchange); if (aReadPrepareParams.mTimeout == System::Clock::kZero) { - mpExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); + mExchange->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); } else { - mpExchangeCtx->SetResponseTimeout(aReadPrepareParams.mTimeout); + mExchange->SetResponseTimeout(aReadPrepareParams.mTimeout); } - ReturnErrorOnFailure(mpExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::ReadRequest, std::move(msgBuf), - Messaging::SendFlags(Messaging::SendMessageFlags::kExpectResponse))); - - mPeerNodeId = aReadPrepareParams.mSessionHolder->AsSecureSession()->GetPeerNodeId(); - mFabricIndex = aReadPrepareParams.mSessionHolder->GetFabricIndex(); + ReturnErrorOnFailure(mExchange->SendMessage(Protocols::InteractionModel::MsgType::ReadRequest, std::move(msgBuf), + Messaging::SendFlags(Messaging::SendMessageFlags::kExpectResponse))); + mPeer = aReadPrepareParams.mSessionHolder->AsSecureSession()->GetPeer(); MoveToState(ClientState::AwaitingInitialReport); return CHIP_NO_ERROR; @@ -355,6 +366,7 @@ CHIP_ERROR ReadClient::BuildDataVersionFilterList(DataVersionFilterIBs::Builder break; } } + if (!intersected) { continue; @@ -405,22 +417,17 @@ CHIP_ERROR ReadClient::OnMessageReceived(Messaging::ExchangeContext * apExchange } else if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::SubscribeResponse)) { - VerifyOrExit(apExchangeContext == mpExchangeCtx, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(apExchangeContext == mExchange.Get(), err = CHIP_ERROR_INCORRECT_STATE); err = ProcessSubscribeResponse(std::move(aPayload)); SuccessOrExit(err); - - // - // Null out the delegate and context as SubscribeResponse is the last message the Subscribe transaction and - // the exchange layer will automatically close the exchange. - // - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx = nullptr; } else if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::StatusResponse)) { - VerifyOrExit(apExchangeContext == mpExchangeCtx, err = CHIP_ERROR_INCORRECT_STATE); - err = StatusResponse::ProcessStatusResponse(std::move(aPayload)); - SuccessOrExit(err); + VerifyOrExit(apExchangeContext == mExchange.Get(), err = CHIP_ERROR_INCORRECT_STATE); + CHIP_ERROR statusError = CHIP_NO_ERROR; + SuccessOrExit(err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError)); + SuccessOrExit(err = statusError); + err = CHIP_ERROR_INVALID_MESSAGE_TYPE; } else { @@ -436,38 +443,10 @@ CHIP_ERROR ReadClient::OnMessageReceived(Messaging::ExchangeContext * apExchange return err; } -void ReadClient::Abort() -{ - // - // If the exchange context hasn't already been gracefully closed - // (signaled by setting it to null), then we need to forcibly - // tear it down. - // - if (mpExchangeCtx != nullptr) - { - // We might be a delegate for this exchange, and we don't want the - // OnExchangeClosing notification in that case. Null out the delegate - // to avoid that. - // - // TODO: This makes all sorts of assumptions about what the delegate is - // (notice the "might" above!) that might not hold in practice. We - // really need a better solution here.... - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx->Abort(); - mpExchangeCtx = nullptr; - } -} - CHIP_ERROR ReadClient::OnUnsolicitedReportData(Messaging::ExchangeContext * apExchangeContext, System::PacketBufferHandle && aPayload) { - mpExchangeCtx = apExchangeContext; - - // - // Let's take over further message processing on this exchange from the IM. - // This is only relevant for reports during post-subscription. - // - mpExchangeCtx->SetDelegate(this); + mExchange.Grab(apExchangeContext); CHIP_ERROR err = ProcessReportData(std::move(aPayload)); if (err != CHIP_NO_ERROR) @@ -580,8 +559,13 @@ CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload) { MoveToState(ClientState::AwaitingSubscribeResponse); } - else + else if (IsSubscriptionActive()) { + // + // Only refresh the liveness check timer if we've successfully established + // a subscription and have a valid value for mMaxInterval which the function + // relies on. + // RefreshLivenessCheckTimer(); } } @@ -591,12 +575,7 @@ CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload) bool noResponseExpected = IsSubscriptionActive() && !mPendingMoreChunks; err = StatusResponse::Send(err == CHIP_NO_ERROR ? Protocols::InteractionModel::Status::Success : Protocols::InteractionModel::Status::InvalidSubscription, - mpExchangeCtx, !noResponseExpected); - - if (noResponseExpected || (err != CHIP_NO_ERROR)) - { - mpExchangeCtx = nullptr; - } + mExchange.Get(), !noResponseExpected); } mIsPrimingReports = false; @@ -670,7 +649,8 @@ CHIP_ERROR ReadClient::ProcessAttributeReportIBs(TLV::TLVReader & aAttributeRepo DataVersion version = 0; ReturnErrorOnFailure(data.GetDataVersion(&version)); attributePath.mDataVersion.SetValue(version); - if (mReadPrepareParams.mResubscribePolicy != nullptr) + + if (mReadPrepareParams.mpDataVersionFilterList != nullptr) { UpdateDataVersionFilters(attributePath); } @@ -721,10 +701,12 @@ CHIP_ERROR ReadClient::ProcessEventReportIBs(TLV::TLVReader & aEventReportIBsRea ReturnErrorOnFailure(data.GetData(&dataReader)); - if (mReadPrepareParams.mResubscribePolicy != nullptr) - { - mReadPrepareParams.mEventNumber.SetValue(header.mEventNumber + 1); - } + // + // Update the event number being tracked in mReadPrepareParams in case + // we want to send it in the next SubscribeRequest message to convey + // the event number for which we have already received an event. + // + mReadPrepareParams.mEventNumber.SetValue(header.mEventNumber + 1); NoteReportingData(); mpCallback.OnEventData(header, &dataReader, nullptr); @@ -753,19 +735,37 @@ CHIP_ERROR ReadClient::ProcessEventReportIBs(TLV::TLVReader & aEventReportIBsRea return err; } +void ReadClient::OverrideLivenessTimeout(System::Clock::Timeout aLivenessTimeout) +{ + mLivenessTimeoutOverride = aLivenessTimeout; + RefreshLivenessCheckTimer(); +} + CHIP_ERROR ReadClient::RefreshLivenessCheckTimer() { CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrReturnError(mState == ClientState::SubscriptionActive, CHIP_ERROR_INCORRECT_STATE); + CancelLivenessCheckTimer(); - VerifyOrReturnError(mpExchangeCtx != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(mpExchangeCtx->HasSessionHandle(), err = CHIP_ERROR_INCORRECT_STATE); - System::Clock::Timeout timeout = System::Clock::Seconds16(mMaxInterval) + mpExchangeCtx->GetSessionHandle()->GetAckTimeout(); + System::Clock::Timeout timeout; + + if (mLivenessTimeoutOverride != System::Clock::kZero) + { + timeout = mLivenessTimeoutOverride; + } + else + { + VerifyOrReturnError(mReadPrepareParams.mSessionHolder, CHIP_ERROR_INCORRECT_STATE); + timeout = System::Clock::Seconds16(mMaxInterval) + mReadPrepareParams.mSessionHolder->GetAckTimeout(); + } + // EFR32/MBED/INFINION/K32W's chrono count return long unsinged, but other platform returns unsigned - ChipLogProgress(DataManagement, - "Refresh LivenessCheckTime for %lu milliseconds with SubscriptionId = 0x%08" PRIx32 - " Peer = %02x:" ChipLogFormatX64, - static_cast(timeout.count()), mSubscriptionId, mFabricIndex, ChipLogValueX64(mPeerNodeId)); + ChipLogProgress( + DataManagement, + "Refresh LivenessCheckTime for %lu milliseconds with SubscriptionId = 0x%08" PRIx32 " Peer = %02x:" ChipLogFormatX64, + static_cast(timeout.count()), mSubscriptionId, GetFabricIndex(), ChipLogValueX64(GetPeerNodeId())); err = InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( timeout, OnLivenessTimeoutCallback, this); @@ -802,7 +802,7 @@ void ReadClient::OnLivenessTimeoutCallback(System::Layer * apSystemLayer, void * ChipLogError(DataManagement, "Subscription Liveness timeout with SubscriptionID = 0x%08" PRIx32 ", Peer = %02x:" ChipLogFormatX64, - _this->mSubscriptionId, _this->mFabricIndex, ChipLogValueX64(_this->mPeerNodeId)); + _this->mSubscriptionId, _this->GetFabricIndex(), ChipLogValueX64(_this->GetPeerNodeId())); // TODO: add a more specific error here for liveness timeout failure to distinguish between other classes of timeouts (i.e // response timeouts). @@ -829,7 +829,7 @@ CHIP_ERROR ReadClient::ProcessSubscribeResponse(System::PacketBufferHandle && aP ChipLogProgress(DataManagement, "Subscription established with SubscriptionID = 0x%08" PRIx32 " MinInterval = %u" "s MaxInterval = %us Peer = %02x:" ChipLogFormatX64, - mSubscriptionId, mMinIntervalFloorSeconds, mMaxInterval, mFabricIndex, ChipLogValueX64(mPeerNodeId)); + mSubscriptionId, mMinIntervalFloorSeconds, mMaxInterval, GetFabricIndex(), ChipLogValueX64(GetPeerNodeId())); ReturnErrorOnFailure(subscribeResponse.ExitContainer()); @@ -837,10 +837,7 @@ CHIP_ERROR ReadClient::ProcessSubscribeResponse(System::PacketBufferHandle && aP mpCallback.OnSubscriptionEstablished(subscriptionId); - if (mReadPrepareParams.mResubscribePolicy != nullptr) - { - mNumRetries = 0; - } + mNumRetries = 0; RefreshLivenessCheckTimer(); @@ -850,12 +847,7 @@ CHIP_ERROR ReadClient::ProcessSubscribeResponse(System::PacketBufferHandle && aP CHIP_ERROR ReadClient::SendAutoResubscribeRequest(ReadPrepareParams && aReadPrepareParams) { mReadPrepareParams = std::move(aReadPrepareParams); - if (mReadPrepareParams.mResubscribePolicy == nullptr) - { - mReadPrepareParams.mResubscribePolicy = DefaultResubscribePolicy; - } - - CHIP_ERROR err = SendSubscribeRequest(mReadPrepareParams); + CHIP_ERROR err = SendSubscribeRequest(mReadPrepareParams); if (err != CHIP_NO_ERROR) { StopResubscription(); @@ -883,6 +875,9 @@ CHIP_ERROR ReadClient::SendSubscribeRequestImpl(const ReadPrepareParams & aReadP Span dataVersionFilters(aReadPrepareParams.mpDataVersionFilterList, aReadPrepareParams.mDataVersionFilterListSize); + VerifyOrReturnError(aReadPrepareParams.mAttributePathParamsListSize != 0 || aReadPrepareParams.mEventPathParamsListSize != 0, + CHIP_ERROR_INVALID_ARGUMENT); + System::PacketBufferHandle msgBuf; System::PacketBufferTLVWriter writer; SubscribeRequestMessage::Builder request; @@ -944,63 +939,125 @@ CHIP_ERROR ReadClient::SendSubscribeRequestImpl(const ReadPrepareParams & aReadP VerifyOrReturnError(aReadPrepareParams.mSessionHolder, CHIP_ERROR_MISSING_SECURE_SESSION); - mpExchangeCtx = mpExchangeMgr->NewContext(aReadPrepareParams.mSessionHolder.Get().Value(), this); - VerifyOrReturnError(mpExchangeCtx != nullptr, CHIP_ERROR_NO_MEMORY); + auto exchange = mpExchangeMgr->NewContext(aReadPrepareParams.mSessionHolder.Get().Value(), this); + VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_NO_MEMORY); + + mExchange.Grab(exchange); if (aReadPrepareParams.mTimeout == System::Clock::kZero) { - mpExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); + mExchange->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); } else { - mpExchangeCtx->SetResponseTimeout(aReadPrepareParams.mTimeout); + mExchange->SetResponseTimeout(aReadPrepareParams.mTimeout); } - ReturnErrorOnFailure(mpExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::SubscribeRequest, std::move(msgBuf), - Messaging::SendFlags(Messaging::SendMessageFlags::kExpectResponse))); - - mPeerNodeId = aReadPrepareParams.mSessionHolder->AsSecureSession()->GetPeerNodeId(); - mFabricIndex = aReadPrepareParams.mSessionHolder->GetFabricIndex(); + ReturnErrorOnFailure(mExchange->SendMessage(Protocols::InteractionModel::MsgType::SubscribeRequest, std::move(msgBuf), + Messaging::SendFlags(Messaging::SendMessageFlags::kExpectResponse))); + mPeer = aReadPrepareParams.mSessionHolder->AsSecureSession()->GetPeer(); MoveToState(ClientState::AwaitingInitialReport); return CHIP_NO_ERROR; } -void ReadClient::OnResubscribeTimerCallback(System::Layer * apSystemLayer, void * apAppState) +CHIP_ERROR ReadClient::DefaultResubscribePolicy(CHIP_ERROR aTerminationCause) { - ReadClient * const _this = reinterpret_cast(apAppState); - assert(_this != nullptr); - _this->SendSubscribeRequest(_this->mReadPrepareParams); - _this->mNumRetries++; + VerifyOrReturnError(IsIdle(), CHIP_ERROR_INCORRECT_STATE); + + auto timeTillNextResubscription = ComputeTimeTillNextSubscription(); + ChipLogProgress(DataManagement, + "Will try to resubscribe to %02x:" ChipLogFormatX64 " at retry index %" PRIu32 " after %" PRIu32 + "ms due to error %" CHIP_ERROR_FORMAT, + GetFabricIndex(), ChipLogValueX64(GetPeerNodeId()), mNumRetries, timeTillNextResubscription, + aTerminationCause.Format()); + ReturnErrorOnFailure(ScheduleResubscription(timeTillNextResubscription, NullOptional, aTerminationCause == CHIP_ERROR_TIMEOUT)); + return CHIP_NO_ERROR; } -bool ReadClient::ResubscribeIfNeeded(uint32_t & aNextResubscribeIntervalMsec) +void ReadClient::HandleDeviceConnected(void * context, OperationalDeviceProxy * device) { - bool shouldResubscribe = true; - uint32_t intervalMsec = 0; - aNextResubscribeIntervalMsec = 0; - if (mReadPrepareParams.mResubscribePolicy == nullptr) + ReadClient * const _this = static_cast(context); + VerifyOrDie(_this != nullptr); + + ChipLogProgress(DataManagement, "HandleDeviceConnected %d\n", device->GetSecureSession().HasValue()); + _this->mReadPrepareParams.mSessionHolder.Grab(device->GetSecureSession().Value()); + + auto err = _this->SendSubscribeRequest(_this->mReadPrepareParams); + if (err != CHIP_NO_ERROR) { - ChipLogDetail(DataManagement, "mResubscribePolicy is null"); - return false; + _this->Close(err); } - mReadPrepareParams.mResubscribePolicy(mNumRetries, intervalMsec, shouldResubscribe); - if (!shouldResubscribe) +} + +void ReadClient::HandleDeviceConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR err) +{ + ReadClient * const _this = static_cast(context); + VerifyOrDie(_this != nullptr); + + ChipLogError(DataManagement, "Failed to establish CASE for re-subscription with error '%" CHIP_ERROR_FORMAT "'", err.Format()); + + _this->Close(err); +} + +void ReadClient::OnResubscribeTimerCallback(System::Layer * apSystemLayer, void * apAppState) +{ + ReadClient * const _this = static_cast(apAppState); + VerifyOrDie(_this != nullptr); + + CHIP_ERROR err; + + ChipLogProgress(DataManagement, "OnResubscribeTimerCallback: DoCASE = %d", _this->mDoCaseOnNextResub); + _this->mNumRetries++; + + if (_this->mDoCaseOnNextResub) { - ChipLogProgress(DataManagement, "Resubscribe has been stopped"); - return false; + auto * caseSessionManager = InteractionModelEngine::GetInstance()->GetCASESessionManager(); + VerifyOrExit(caseSessionManager != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + // + // We need to mark our session as defunct explicitly since the assessment of a liveness failure + // is usually triggered by the absence of any exchange activity that would have otherwise + // automatically marked the session as defunct on a response timeout. + // + // Doing so will ensure that the subsequent call to FindOrEstablishSession will not bind to + // an existing established session but rather trigger establishing a new one. + // + if (_this->mReadPrepareParams.mSessionHolder) + { + _this->mReadPrepareParams.mSessionHolder->AsSecureSession()->MarkAsDefunct(); + } + + // + // TODO: Until #19259 is merged, we cannot actually just get by with the above logic since marking sessions + // defunct has no effect on resident OperationalDeviceProxy instances that are already bound + // to a now-defunct CASE session. + // + auto proxy = caseSessionManager->FindExistingSession(_this->mPeer); + if (proxy != nullptr) + { + proxy->Disconnect(); + } + + caseSessionManager->FindOrEstablishSession(_this->mPeer, &_this->mOnConnectedCallback, + &_this->mOnConnectionFailureCallback); + return; } - CHIP_ERROR err = InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( - System::Clock::Milliseconds32(intervalMsec), OnResubscribeTimerCallback, this); + + err = _this->SendSubscribeRequest(_this->mReadPrepareParams); + +exit: if (err != CHIP_NO_ERROR) { - ChipLogError(DataManagement, "Fail to resubscribe with error %" CHIP_ERROR_FORMAT, err.Format()); - return false; + // + // Call Close (which should trigger re-subscription again) EXCEPT if we got here because we didn't have a valid + // CASESessionManager pointer when mDoCaseOnNextResub was true. + // + // In that case, don't permit re-subscription to occur. + // + _this->Close(err, err != CHIP_ERROR_INCORRECT_STATE); } - - aNextResubscribeIntervalMsec = intervalMsec; - return true; } void ReadClient::UpdateDataVersionFilters(const ConcreteDataAttributePath & aPath) diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index a4514e943f33f4..78291fa5fddc7a 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -23,6 +23,7 @@ */ #pragma once +#include "system/SystemClock.h" #include #include #include @@ -32,14 +33,17 @@ #include #include #include +#include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -53,8 +57,12 @@ class InteractionModelEngine; /** * @class ReadClient * - * @brief The read client represents the initiator side of a Read Interaction, and is responsible - * for generating one Read Request for a particular set of attributes and/or events, and handling the Report Data response. + * @brief The read client represents the initiator side of a Read Or Subscribe Interaction (depending on the APIs invoked). + * + * When used to manage subscriptions, the client provides functionality to automatically re-subscribe as needed, + * including re-establishing CASE under certain conditions (see Callback::OnResubscriptionNeeded for more info). + * This is the default behavior. A consumer can completely opt-out of this behavior by over-riding + * Callback::OnResubscriptionNeeded and providing an alternative implementation. * */ class ReadClient : public Messaging::ExchangeDelegate @@ -130,14 +138,30 @@ class ReadClient : public Messaging::ExchangeDelegate virtual void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) {} /** - * OnResubscriptionAttempt will be called when a re-subscription has been scheduled as a result of the termination of an - * in-progress or previously active subscription. This object MUST continue to exist after this call is completed. The + * OnResubscriptionNeeded will be called when a subscription that was started with SendAutoResubscribeRequest has terminated + * and re-subscription is needed. The termination cause is provided to help inform subsequent re-subscription logic. + * + * The base implementation automatically re-subscribes at appropriate intervals taking the termination cause into account + * (see ReadClient::DefaultResubscribePolicy for more details). If the default implementation doesn't suffice, the logic of + * ReadClient::DefaultResubscribePolicy is broken down into its constituent methods that are publicly available for + * applications to call and sequence. + * + * If the method is over-ridden, it's the application's responsibility to take the appropriate steps needed to eventually + * call-back into the ReadClient object to schedule a re-subscription (by invoking ReadClient::ScheduleResubscription). + * + * If the application DOES NOT want re-subscription to happen on a particular invocation of this method, returning anything + * other than CHIP_NO_ERROR will terminate the interaction and result in OnError, OnDeallocatePaths and OnDone being called + * in that sequence. + * + * This object MUST continue to exist after this call is completed. The * application shall wait until it receives an OnDone call to destroy the object. * * @param[in] aTerminationCause The cause of failure of the subscription that just terminated. - * @param[in] aNextResubscribeIntervalMsec How long we will wait before trying to auto-resubscribe. */ - virtual void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) {} + virtual CHIP_ERROR OnResubscriptionNeeded(ReadClient * apReadClient, CHIP_ERROR aTerminationCause) + { + return apReadClient->DefaultResubscribePolicy(aTerminationCause); + } /** * OnError will be called when an error occurs *after* a successful call to SendRequest(). The following @@ -277,8 +301,8 @@ class ReadClient : public Messaging::ExchangeDelegate return mInteractionType == InteractionType::Subscribe ? returnType(mSubscriptionId) : returnType::Missing(); } - FabricIndex GetFabricIndex() const { return mFabricIndex; } - NodeId GetPeerNodeId() const { return mPeerNodeId; } + FabricIndex GetFabricIndex() const { return mPeer.GetFabricIndex(); } + NodeId GetPeerNodeId() const { return mPeer.GetNodeId(); } bool IsReadType() { return mInteractionType == InteractionType::Read; } bool IsSubscriptionType() const { return mInteractionType == InteractionType::Subscribe; }; @@ -300,21 +324,59 @@ class ReadClient : public Messaging::ExchangeDelegate ReadClient * GetNextClient() { return mpNext; } void SetNextClient(ReadClient * apClient) { mpNext = apClient; } - // Like SendSubscribeRequest, but the ReadClient will automatically attempt to re-establish the subscription if - // we decide that the subscription has dropped. The exact behavior of the re-establishment can be controlled - // by setting mResubscribePolicy in the ReadPrepareParams. If not set, a default behavior with exponential backoff will be - // used. - // - // The application has to know to - // a) allocate a ReadPrepareParams object that will have fields mpEventPathParamsList and mpAttributePathParamsList and - // mpDataVersionFilterList with lifetimes as long as the ReadClient itself and b) free those up later in the call to - // OnDeallocatePaths. Note: At a given time in the system, you can either have a single subscription with re-sub enabled that - // that has mKeepSubscriptions = false, OR, multiple subs with re-sub enabled with mKeepSubscriptions = true. You shall not have - // a mix of both simultaneously. If SendAutoResubscribeRequest is called at all, it guarantees that it will call - // OnDeallocatePaths when OnDone is called. SendAutoResubscribeRequest is the only case that calls OnDeallocatePaths, since - // that's the only case when the consumer moved a ReadParams into the client. + /** + * Like SendSubscribeRequest, but the ReadClient will automatically attempt to re-establish the subscription if + * we decide that the subscription has dropped. The exact behavior of the re-establishment can be controlled + * by setting mResubscribePolicy in the ReadPrepareParams. If not set, a default behavior with exponential backoff will be + * used. + * + * The application has to know to + * a) allocate a ReadPrepareParams object that will have fields mpEventPathParamsList and mpAttributePathParamsList and + * mpDataVersionFilterList with lifetimes as long as the ReadClient itself and b) free those up later in the call to + * OnDeallocatePaths. Note: At a given time in the system, you can either have a single subscription with re-sub enabled that + * has mKeepSubscriptions = false, OR, multiple subs with re-sub enabled with mKeepSubscriptions = true. You shall not + * have a mix of both simultaneously. If SendAutoResubscribeRequest is called at all, it guarantees that it will call + * OnDeallocatePaths when OnDone is called. SendAutoResubscribeRequest is the only case that calls OnDeallocatePaths, since + * that's the only case when the consumer moved a ReadParams into the client. + * + */ CHIP_ERROR SendAutoResubscribeRequest(ReadPrepareParams && aReadPrepareParams); + /** + * This provides a standard re-subscription policy implementation that given a termination cause, does the following: + * - Calculates the time till next subscription with fibonacci back-off (implemented by ComputeTimeTillNextSubscription()). + * - Schedules the next subscription attempt at the computed interval from the previous step. Operational discovery and + * CASE establishment will be attempted if aTerminationCause was CHIP_ERROR_TIMEOUT. In all other cases, it will attempt + * to re-use a previously established session. + */ + CHIP_ERROR DefaultResubscribePolicy(CHIP_ERROR aTerminationCause); + + /** + * Computes the time, in milliseconds, until the next re-subscription over + * an ever increasing window following a fibonacci sequence with the current retry count + * used as input to the fibonacci algorithm. + * + * CHIP_RESUBSCRIBE_MAX_FIBONACCI_STEP_INDEX is the maximum value the retry count can tick up to. + * + */ + uint32_t ComputeTimeTillNextSubscription(); + + /** + * Schedules a re-subscription aTimeTillNextResubscriptionMs into the future. + * + * If an application wants to set up CASE on their own, they should call ComputeTimeTillNextSubscription() to compute the next + * interval at which they should attempt CASE and attempt CASE at that time. On successful CASE establishment, this method + * should be called with the new SessionHandle provided through 'aNewSessionHandle', 'aTimeTillNextResubscriptionMs' set to 0 + * (i.e async, but as soon as possible) and 'aReestablishCASE' set to false. + * + * Otherwise, if aReestablishCASE is true, operational discovery and CASE will be attempted at that time before + * the actual IM interaction is initiated. + * + * aReestablishCASE SHALL NOT be set to true if a valid SessionHandle is provided through newSessionHandle. + */ + CHIP_ERROR ScheduleResubscription(uint32_t aTimeTillNextResubscriptionMs, Optional aNewSessionHandle, + bool aReestablishCASE); + // Like SendSubscribeRequest, but allows sending certain forms of invalid // subscribe requests that servers are expected to reject, for testing // purposes. Should only be called from tests. @@ -325,6 +387,18 @@ class ReadClient : public Messaging::ExchangeDelegate } #endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST + /** + * Override the interval at which liveness of the subscription is assessed. + * By default, this is set set to the max interval of the subscription + ACK timeout of the underlying session. + * + * This can be only be called once a subscription has been established and is active. Once called, this will cancel any existing + * liveness timers and schedule a new one. + * + * This can be called from the Callback::OnSubscriptionEstablished callback. + * + */ + void OverrideLivenessTimeout(System::Clock::Timeout aLivenessTimeout); + private: friend class TestReadInteraction; friend class InteractionModelEngine; @@ -368,7 +442,6 @@ class ReadClient : public Messaging::ExchangeDelegate CHIP_ERROR ProcessAttributeReportIBs(TLV::TLVReader & aAttributeDataIBsReader); CHIP_ERROR ProcessEventReportIBs(TLV::TLVReader & aEventReportIBsReader); - void ClearExchangeContext() { mpExchangeCtx = nullptr; } static void OnLivenessTimeoutCallback(System::Layer * apSystemLayer, void * apAppState); CHIP_ERROR ProcessSubscribeResponse(System::PacketBufferHandle && aPayload); CHIP_ERROR RefreshLivenessCheckTimer(); @@ -405,17 +478,23 @@ class ReadClient : public Messaging::ExchangeDelegate * exchange and finally, signal to the application that it's * safe to release this object. * - * If aError != CHIP_NO_ERROR, it is delivered to the application through the OnError callback first. + * If aError != CHIP_NO_ERROR, this will trigger re-subscriptions if allowResubscription is true + * AND if this ReadClient instance is tracking a subscription AND the applications decides to do so + * in their implementation of Callback::OnResubscriptionNeeded(). * */ - void Close(CHIP_ERROR aError); + void Close(CHIP_ERROR aError, bool allowResubscription = true); void StopResubscription(); void ClearActiveSubscriptionState(); + + static void HandleDeviceConnected(void * context, OperationalDeviceProxy * device); + static void HandleDeviceConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); + CHIP_ERROR GetMinEventNumber(const ReadPrepareParams & aReadPrepareParams, Optional & aEventMin); Messaging::ExchangeManager * mpExchangeMgr = nullptr; - Messaging::ExchangeContext * mpExchangeCtx = nullptr; + Messaging::ExchangeHolder mExchange; Callback & mpCallback; ClientState mState = ClientState::Idle; bool mIsReporting = false; @@ -425,16 +504,22 @@ class ReadClient : public Messaging::ExchangeDelegate uint16_t mMinIntervalFloorSeconds = 0; uint16_t mMaxInterval = 0; SubscriptionId mSubscriptionId = 0; - NodeId mPeerNodeId = kUndefinedNodeId; - FabricIndex mFabricIndex = kUndefinedFabricIndex; - InteractionType mInteractionType = InteractionType::Read; + ScopedNodeId mPeer; + InteractionType mInteractionType = InteractionType::Read; Timestamp mEventTimestamp; + bool mDoCaseOnNextResub = true; + + chip::Callback::Callback mOnConnectedCallback; + chip::Callback::Callback mOnConnectionFailureCallback; + ReadClient * mpNext = nullptr; InteractionModelEngine * mpImEngine = nullptr; ReadPrepareParams mReadPrepareParams; uint32_t mNumRetries = 0; + System::Clock::Timeout mLivenessTimeoutOverride = System::Clock::kZero; + // End Of Container (0x18) uses one byte. static constexpr uint16_t kReservedSizeForEndOfContainer = 1; // Reserved size for the uint8_t InteractionModelRevision flag, which takes up 1 byte for the control tag and 1 byte for the diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index d80292233fdcd8..ff04308c06f269 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -22,7 +22,7 @@ * */ -#include +#include #include #include #include @@ -39,46 +39,20 @@ namespace app { ReadHandler::ReadHandler(ManagementCallback & apCallback, Messaging::ExchangeContext * apExchangeContext, InteractionType aInteractionType) : + mExchangeCtx(*this), mManagementCallback(apCallback) { - mpExchangeCtx = apExchangeContext; + VerifyOrDie(apExchangeContext != nullptr); + + mExchangeCtx.Grab(apExchangeContext); + mInteractionType = aInteractionType; mLastWrittenEventsBytes = 0; mTransactionStartGeneration = InteractionModelEngine::GetInstance()->GetReportingEngine().GetDirtySetGeneration(); mFlags.ClearAll(); mFlags.Set(ReadHandlerFlags::PrimingReports, true); - if (apExchangeContext != nullptr) - { - apExchangeContext->SetDelegate(this); - mSessionHandle.Grab(mpExchangeCtx->GetSessionHandle()); - } -} - -void ReadHandler::Abort(bool aCalledFromDestructor) -{ - // - // If the exchange context hasn't already been gracefully closed - // (signaled by setting it to null), then we need to forcibly - // tear it down. - // - if (mpExchangeCtx != nullptr) - { - // We might be a delegate for this exchange, and we don't want the - // OnExchangeClosing notification in that case. Null out the delegate - // to avoid that. - // - // TODO: This makes all sorts of assumptions about what the delegate is - // (notice the "might" above!) that might not hold in practice. We - // really need a better solution here.... - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx->Abort(); - mpExchangeCtx = nullptr; - } - if (!aCalledFromDestructor) - { - Close(); - } + mSessionHandle.Grab(mExchangeCtx->GetSessionHandle()); } ReadHandler::~ReadHandler() @@ -89,8 +63,6 @@ ReadHandler::~ReadHandler() appCallback->OnSubscriptionTerminated(*this); } - Abort(true); - if (IsType(InteractionType::Subscribe)) { InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( @@ -111,12 +83,6 @@ ReadHandler::~ReadHandler() void ReadHandler::Close() { - if (mpExchangeCtx != nullptr) - { - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx = nullptr; - } - MoveToState(HandlerState::AwaitingDestruction); mManagementCallback.OnDone(*this); } @@ -150,15 +116,16 @@ CHIP_ERROR ReadHandler::OnInitialRequest(System::PacketBufferHandle && aPayload) CHIP_ERROR ReadHandler::OnStatusResponse(Messaging::ExchangeContext * apExchangeContext, System::PacketBufferHandle && aPayload) { - CHIP_ERROR err = CHIP_NO_ERROR; - err = StatusResponse::ProcessStatusResponse(std::move(aPayload)); - SuccessOrExit(err); + CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR statusError = CHIP_NO_ERROR; + SuccessOrExit(err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError)); + SuccessOrExit(err = statusError); switch (mState) { case HandlerState::AwaitingReportResponse: if (IsChunkedReport()) { - mpExchangeCtx->WillSendMessage(); + mExchangeCtx->WillSendMessage(); } else if (IsType(InteractionType::Subscribe)) { @@ -166,9 +133,6 @@ CHIP_ERROR ReadHandler::OnStatusResponse(Messaging::ExchangeContext * apExchange { err = SendSubscribeResponse(); - mpExchangeCtx = nullptr; - SuccessOrExit(err); - mFlags.Set(ReadHandlerFlags::ActiveSubscription); auto * appCallback = mManagementCallback.GetAppCallback(); @@ -177,10 +141,6 @@ CHIP_ERROR ReadHandler::OnStatusResponse(Messaging::ExchangeContext * apExchange appCallback->OnSubscriptionEstablished(*this); } } - else - { - mpExchangeCtx = nullptr; - } } else { @@ -215,18 +175,19 @@ CHIP_ERROR ReadHandler::SendStatusReport(Protocols::InteractionModel::Status aSt VerifyOrReturnLogError(IsReportable(), CHIP_ERROR_INCORRECT_STATE); if (IsPriming() || IsChunkedReport()) { - mSessionHandle.Grab(mpExchangeCtx->GetSessionHandle()); + mSessionHandle.Grab(mExchangeCtx->GetSessionHandle()); } else { - VerifyOrReturnLogError(mpExchangeCtx == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnLogError(!mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnLogError(mSessionHandle, CHIP_ERROR_INCORRECT_STATE); - mpExchangeCtx = InteractionModelEngine::GetInstance()->GetExchangeManager()->NewContext(mSessionHandle.Get().Value(), this); + auto exchange = InteractionModelEngine::GetInstance()->GetExchangeManager()->NewContext(mSessionHandle.Get().Value(), this); + VerifyOrReturnLogError(exchange != nullptr, CHIP_ERROR_INCORRECT_STATE); + mExchangeCtx.Grab(exchange); } - VerifyOrReturnLogError(mpExchangeCtx != nullptr, CHIP_ERROR_INCORRECT_STATE); - return StatusResponse::Send(aStatus, mpExchangeCtx, - /* aExpectResponse = */ false); + VerifyOrReturnLogError(mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); + return StatusResponse::Send(aStatus, mExchangeCtx.Get(), /* aExpectResponse = */ false); } CHIP_ERROR ReadHandler::SendReportData(System::PacketBufferHandle && aPayload, bool aMoreChunks) @@ -234,16 +195,19 @@ CHIP_ERROR ReadHandler::SendReportData(System::PacketBufferHandle && aPayload, b VerifyOrReturnLogError(IsReportable(), CHIP_ERROR_INCORRECT_STATE); if (IsPriming() || IsChunkedReport()) { - mSessionHandle.Grab(mpExchangeCtx->GetSessionHandle()); + mSessionHandle.Grab(mExchangeCtx->GetSessionHandle()); } else { - VerifyOrReturnLogError(mpExchangeCtx == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnLogError(!mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnLogError(mSessionHandle, CHIP_ERROR_INCORRECT_STATE); - mpExchangeCtx = InteractionModelEngine::GetInstance()->GetExchangeManager()->NewContext(mSessionHandle.Get().Value(), this); + auto exchange = InteractionModelEngine::GetInstance()->GetExchangeManager()->NewContext(mSessionHandle.Get().Value(), this); + VerifyOrReturnLogError(exchange != nullptr, CHIP_ERROR_INCORRECT_STATE); + mExchangeCtx.Grab(exchange); } - VerifyOrReturnLogError(mpExchangeCtx != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnLogError(mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); + if (!IsReporting()) { mCurrentReportsBeginGeneration = InteractionModelEngine::GetInstance()->GetReportingEngine().GetDirtySetGeneration(); @@ -255,14 +219,13 @@ CHIP_ERROR ReadHandler::SendReportData(System::PacketBufferHandle && aPayload, b MoveToState(HandlerState::AwaitingReportResponse); } - mpExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); + mExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); CHIP_ERROR err = - mpExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::ReportData, std::move(aPayload), - Messaging::SendFlags(noResponseExpected ? Messaging::SendMessageFlags::kNone - : Messaging::SendMessageFlags::kExpectResponse)); + mExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::ReportData, std::move(aPayload), + Messaging::SendFlags(noResponseExpected ? Messaging::SendMessageFlags::kNone + : Messaging::SendMessageFlags::kExpectResponse)); if (err == CHIP_NO_ERROR && noResponseExpected) { - mpExchangeCtx = nullptr; InteractionModelEngine::GetInstance()->GetReportingEngine().OnReportConfirm(); } @@ -279,6 +242,7 @@ CHIP_ERROR ReadHandler::SendReportData(System::PacketBufferHandle && aPayload, b ClearDirty(); InteractionModelEngine::GetInstance()->ReleaseDataVersionFilterList(mpDataVersionFilterList); } + return err; } @@ -391,7 +355,7 @@ CHIP_ERROR ReadHandler::ProcessReadRequest(System::PacketBufferHandle && aPayloa ReturnErrorOnFailure(readRequestParser.ExitContainer()); MoveToState(HandlerState::GeneratingReports); - mpExchangeCtx->WillSendMessage(); + mExchangeCtx->WillSendMessage(); // There must be no code after the WillSendMessage() call that can cause // this method to return a failure. @@ -676,12 +640,12 @@ CHIP_ERROR ReadHandler::SendSubscribeResponse() ReturnErrorOnFailure(response.GetError()); ReturnErrorOnFailure(writer.Finalize(&packet)); - VerifyOrReturnLogError(mpExchangeCtx != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnLogError(mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(RefreshSubscribeSyncTimer()); mFlags.Set(ReadHandlerFlags::PrimingReports, false); - return mpExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::SubscribeResponse, std::move(packet)); + return mExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::SubscribeResponse, std::move(packet)); } CHIP_ERROR ReadHandler::ProcessSubscribeRequest(System::PacketBufferHandle && aPayload) @@ -750,7 +714,7 @@ CHIP_ERROR ReadHandler::ProcessSubscribeRequest(System::PacketBufferHandle && aP auto * appCallback = mManagementCallback.GetAppCallback(); if (appCallback) { - if (appCallback->OnSubscriptionRequested(*this, *mpExchangeCtx->GetSessionHandle()->AsSecureSession()) != CHIP_NO_ERROR) + if (appCallback->OnSubscriptionRequested(*this, *mExchangeCtx->GetSessionHandle()->AsSecureSession()) != CHIP_NO_ERROR) { return CHIP_ERROR_TRANSACTION_CANCELED; } @@ -766,7 +730,7 @@ CHIP_ERROR ReadHandler::ProcessSubscribeRequest(System::PacketBufferHandle && aP ReturnErrorOnFailure(subscribeRequestParser.ExitContainer()); MoveToState(HandlerState::GeneratingReports); - mpExchangeCtx->WillSendMessage(); + mExchangeCtx->WillSendMessage(); return CHIP_NO_ERROR; } diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index b3191760a5ae4c..548df710a96b2c 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -354,20 +354,8 @@ class ReadHandler : public Messaging::ExchangeDelegate AwaitingDestruction, ///< The object has completed its work and is awaiting destruction by the application. }; - /* - * This forcibly closes the exchange context if a valid one is pointed to. Such a situation does - * not arise during normal message processing flows that all normally call Close() above. - * - * This will eventually call Close() to drive the process of eventually releasing this object (unless called from the - * destructor). - * - * This is only called by a very narrow set of external objects as needed. - */ - void Abort(bool aCalledFromDestructor = false); - /** - * Called internally to signal the completion of all work on this object, gracefully close the - * exchange and finally, signal to a registerd callback that it's + * Called internally to signal the completion of all work on this objecta and signal to a registered callback that it's * safe to release this object. */ void Close(); @@ -445,7 +433,7 @@ class ReadHandler : public Messaging::ExchangeDelegate // TODO: We should shutdown the transaction when the session expires. SessionHolder mSessionHandle; - Messaging::ExchangeContext * mpExchangeCtx = nullptr; + Messaging::ExchangeHolder mExchangeCtx; ObjectList * mpAttributePathList = nullptr; ObjectList * mpEventPathList = nullptr; diff --git a/src/app/ReadPrepareParams.h b/src/app/ReadPrepareParams.h index 6d95b8b0b48a17..c37a2ef6e36eab 100644 --- a/src/app/ReadPrepareParams.h +++ b/src/app/ReadPrepareParams.h @@ -29,15 +29,6 @@ namespace chip { namespace app { -/** - * @brief Used to specify the re-subscription policy. Namely, the method is invoked and provided the number of - * retries that have occurred so far. - * - * aShouldResubscribe and aNextSubscriptionIntervalMsec are outparams indicating whether and how long into - * the future a re-subscription should happen. - */ -typedef void (*OnResubscribePolicyCB)(uint32_t aNumCumulativeRetries, uint32_t & aNextSubscriptionIntervalMsec, - bool & aShouldResubscribe); struct ReadPrepareParams { @@ -51,12 +42,11 @@ struct ReadPrepareParams Optional mEventNumber; // The timeout for waiting for the response or System::Clock::kZero to let the interaction model decide the timeout based on the // MRP timeouts of the session. - System::Clock::Timeout mTimeout = System::Clock::kZero; - uint16_t mMinIntervalFloorSeconds = 0; - uint16_t mMaxIntervalCeilingSeconds = 0; - bool mKeepSubscriptions = false; - bool mIsFabricFiltered = true; - OnResubscribePolicyCB mResubscribePolicy = nullptr; + System::Clock::Timeout mTimeout = System::Clock::kZero; + uint16_t mMinIntervalFloorSeconds = 0; + uint16_t mMaxIntervalCeilingSeconds = 0; + bool mKeepSubscriptions = false; + bool mIsFabricFiltered = true; ReadPrepareParams() {} ReadPrepareParams(const SessionHandle & sessionHandle) { mSessionHolder.Grab(sessionHandle); } @@ -78,7 +68,6 @@ struct ReadPrepareParams other.mEventPathParamsListSize = 0; other.mpAttributePathParamsList = nullptr; other.mAttributePathParamsListSize = 0; - mResubscribePolicy = other.mResubscribePolicy; } ReadPrepareParams & operator=(ReadPrepareParams && other) @@ -103,7 +92,6 @@ struct ReadPrepareParams other.mEventPathParamsListSize = 0; other.mpAttributePathParamsList = nullptr; other.mAttributePathParamsListSize = 0; - mResubscribePolicy = other.mResubscribePolicy; return *this; } }; diff --git a/src/app/RequiredPrivilege.cpp b/src/app/RequiredPrivilege.cpp index 621105891431a3..012a48c421c130 100644 --- a/src/app/RequiredPrivilege.cpp +++ b/src/app/RequiredPrivilege.cpp @@ -25,23 +25,3 @@ constexpr Access::Privilege RequiredPrivilege::kPrivilegeMapper[]; } // namespace app } // namespace chip - -int __attribute__((weak)) MatterGetAccessPrivilegeForReadAttribute(chip::ClusterId cluster, chip::AttributeId attribute) -{ - return kMatterAccessPrivilegeAdminister; -} - -int __attribute__((weak)) MatterGetAccessPrivilegeForWriteAttribute(chip::ClusterId cluster, chip::AttributeId attribute) -{ - return kMatterAccessPrivilegeAdminister; -} - -int __attribute__((weak)) MatterGetAccessPrivilegeForInvokeCommand(chip::ClusterId cluster, chip::CommandId command) -{ - return kMatterAccessPrivilegeAdminister; -} - -int __attribute__((weak)) MatterGetAccessPrivilegeForReadEvent(chip::ClusterId cluster, chip::EventId event) -{ - return kMatterAccessPrivilegeAdminister; -} diff --git a/src/app/StatusResponse.cpp b/src/app/StatusResponse.cpp index e9e8af70a5f656..c6ed1cbfaf57b4 100644 --- a/src/app/StatusResponse.cpp +++ b/src/app/StatusResponse.cpp @@ -44,7 +44,7 @@ CHIP_ERROR StatusResponse::Send(Protocols::InteractionModel::Status aStatus, Mes return CHIP_NO_ERROR; } -CHIP_ERROR StatusResponse::ProcessStatusResponse(System::PacketBufferHandle && aPayload) +CHIP_ERROR StatusResponse::ProcessStatusResponse(System::PacketBufferHandle && aPayload, CHIP_ERROR & aStatusError) { StatusResponseMessage::Parser response; System::PacketBufferTLVReader reader; @@ -59,12 +59,8 @@ CHIP_ERROR StatusResponse::ProcessStatusResponse(System::PacketBufferHandle && a ChipLogValueIMStatus(status.mStatus)); ReturnErrorOnFailure(response.ExitContainer()); - if (status.mStatus == Protocols::InteractionModel::Status::Success) - { - return CHIP_NO_ERROR; - } - - return status.ToChipError(); + aStatusError = status.ToChipError(); + return CHIP_NO_ERROR; } } // namespace app } // namespace chip diff --git a/src/app/StatusResponse.h b/src/app/StatusResponse.h index 583cbb3dae8120..7021e3868bcb5a 100644 --- a/src/app/StatusResponse.h +++ b/src/app/StatusResponse.h @@ -32,7 +32,10 @@ class StatusResponse public: static CHIP_ERROR Send(Protocols::InteractionModel::Status aStatus, Messaging::ExchangeContext * apExchangeContext, bool aExpectResponse); - static CHIP_ERROR ProcessStatusResponse(System::PacketBufferHandle && aPayload); + + // The return value indicates whether the StatusResponse was parsed properly, and if it is CHIP_NO_ERROR + // then aStatus has been set to the actual status, which might be success or failure. + static CHIP_ERROR ProcessStatusResponse(System::PacketBufferHandle && aPayload, CHIP_ERROR & aStatus); }; } // namespace app } // namespace chip diff --git a/src/app/TimedRequest.cpp b/src/app/TimedRequest.cpp index 1c325b62a19187..59921ce17cbc11 100644 --- a/src/app/TimedRequest.cpp +++ b/src/app/TimedRequest.cpp @@ -53,12 +53,5 @@ CHIP_ERROR TimedRequest::Send(ExchangeContext * aExchangeContext, uint16_t aTime return aExchangeContext->SendMessage(MsgType::TimedRequest, std::move(payload), SendMessageFlags::kExpectResponse); } -CHIP_ERROR TimedRequest::HandleResponse(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) -{ - VerifyOrReturnError(aPayloadHeader.HasMessageType(MsgType::StatusResponse), CHIP_ERROR_INVALID_MESSAGE_TYPE); - - return StatusResponse::ProcessStatusResponse(std::move(aPayload)); -} - } // namespace app } // namespace chip diff --git a/src/app/WriteClient.cpp b/src/app/WriteClient.cpp index c17c63af372500..85af809681aedc 100644 --- a/src/app/WriteClient.cpp +++ b/src/app/WriteClient.cpp @@ -23,7 +23,7 @@ */ #include "lib/core/CHIPError.h" -#include +#include #include #include #include @@ -35,46 +35,12 @@ void WriteClient::Close() { MoveToState(State::AwaitingDestruction); - // OnDone below can destroy us before we unwind all the way back into the - // exchange code and it tries to close itself. Make sure that it doesn't - // try to notify us that it's closing, since we will be dead. - // - // For more details, see #10344. - if (mpExchangeCtx != nullptr) - { - mpExchangeCtx->SetDelegate(nullptr); - } - - mpExchangeCtx = nullptr; - if (mpCallback) { mpCallback->OnDone(this); } } -void WriteClient::Abort() -{ - // - // If the exchange context hasn't already been gracefully closed - // (signaled by setting it to null), then we need to forcibly - // tear it down. - // - if (mpExchangeCtx != nullptr) - { - // We might be a delegate for this exchange, and we don't want the - // OnExchangeClosing notification in that case. Null out the delegate - // to avoid that. - // - // TODO: This makes all sorts of assumptions about what the delegate is - // (notice the "might" above!) that might not hold in practice. We - // really need a better solution here.... - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx->Abort(); - mpExchangeCtx = nullptr; - } -} - CHIP_ERROR WriteClient::ProcessWriteResponseMessage(System::PacketBufferHandle && payload) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -365,23 +331,28 @@ CHIP_ERROR WriteClient::SendWriteRequest(const SessionHandle & session, System:: err = FinalizeMessage(false /* hasMoreChunks */); SuccessOrExit(err); - // Create a new exchange context. - mpExchangeCtx = mpExchangeMgr->NewContext(session, this); - VerifyOrExit(mpExchangeCtx != nullptr, err = CHIP_ERROR_NO_MEMORY); - VerifyOrReturnError(!(mpExchangeCtx->IsGroupExchangeContext() && mHasDataVersion), CHIP_ERROR_INVALID_MESSAGE_TYPE); + { + // Create a new exchange context. + auto exchange = mpExchangeMgr->NewContext(session, this); + VerifyOrExit(exchange != nullptr, err = CHIP_ERROR_NO_MEMORY); + + mExchangeCtx.Grab(exchange); + } + + VerifyOrReturnError(!(mExchangeCtx->IsGroupExchangeContext() && mHasDataVersion), CHIP_ERROR_INVALID_MESSAGE_TYPE); if (timeout == System::Clock::kZero) { - mpExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); + mExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); } else { - mpExchangeCtx->SetResponseTimeout(timeout); + mExchangeCtx->SetResponseTimeout(timeout); } if (mTimedWriteTimeoutMs.HasValue()) { - err = TimedRequest::Send(mpExchangeCtx, mTimedWriteTimeoutMs.Value()); + err = TimedRequest::Send(mExchangeCtx.Get(), mTimedWriteTimeoutMs.Value()); SuccessOrExit(err); MoveToState(State::AwaitingTimedStatus); } @@ -425,7 +396,7 @@ CHIP_ERROR WriteClient::SendWriteRequest() System::PacketBufferHandle data = mChunks.PopHead(); - bool isGroupWrite = mpExchangeCtx->IsGroupExchangeContext(); + bool isGroupWrite = mExchangeCtx->IsGroupExchangeContext(); if (!mChunks.IsNull() && isGroupWrite) { // Reject this request if we have more than one chunk (mChunks is not null after PopHead()), and this is a group @@ -434,13 +405,8 @@ CHIP_ERROR WriteClient::SendWriteRequest() } // kExpectResponse is ignored by ExchangeContext in case of groupcast - ReturnErrorOnFailure(mpExchangeCtx->SendMessage(MsgType::WriteRequest, std::move(data), SendMessageFlags::kExpectResponse)); - if (isGroupWrite) - { - // Exchange is closed now, since there are no group responses. Drop our - // ref to it. - mpExchangeCtx = nullptr; - } + ReturnErrorOnFailure(mExchangeCtx->SendMessage(MsgType::WriteRequest, std::move(data), SendMessageFlags::kExpectResponse)); + MoveToState(State::AwaitingResponse); return CHIP_NO_ERROR; } @@ -448,6 +414,8 @@ CHIP_ERROR WriteClient::SendWriteRequest() CHIP_ERROR WriteClient::OnMessageReceived(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) { + using namespace Protocols::InteractionModel; + if (mState == State::AwaitingResponse && // We had sent the last chunk of data, and received all responses mChunks.IsNull()) @@ -456,21 +424,27 @@ CHIP_ERROR WriteClient::OnMessageReceived(Messaging::ExchangeContext * apExchang } CHIP_ERROR err = CHIP_NO_ERROR; + // Assert that the exchange context matches the client's current context. // This should never fail because even if SendWriteRequest is called // back-to-back, the second call will call Close() on the first exchange, // which clears the OnMessageReceived callback. - VerifyOrExit(apExchangeContext == mpExchangeCtx, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(apExchangeContext == mExchangeCtx.Get(), err = CHIP_ERROR_INCORRECT_STATE); if (mState == State::AwaitingTimedStatus) { - err = HandleTimedStatus(aPayloadHeader, std::move(aPayload)); + VerifyOrExit(aPayloadHeader.HasMessageType(MsgType::StatusResponse), err = CHIP_ERROR_INVALID_MESSAGE_TYPE); + CHIP_ERROR statusError = CHIP_NO_ERROR; + SuccessOrExit(err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError)); + SuccessOrExit(err = statusError); + err = SendWriteRequest(); + // Skip all other processing here (which is for the response to the // write request), no matter whether err is success or not. goto exit; } - if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::WriteResponse)) + if (aPayloadHeader.HasMessageType(MsgType::WriteResponse)) { err = ProcessWriteResponseMessage(std::move(aPayload)); SuccessOrExit(err); @@ -480,10 +454,12 @@ CHIP_ERROR WriteClient::OnMessageReceived(Messaging::ExchangeContext * apExchang SuccessOrExit(SendWriteRequest()); } } - else if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::StatusResponse)) + else if (aPayloadHeader.HasMessageType(MsgType::StatusResponse)) { - err = StatusResponse::ProcessStatusResponse(std::move(aPayload)); - SuccessOrExit(err); + CHIP_ERROR statusError = CHIP_NO_ERROR; + SuccessOrExit(err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError)); + SuccessOrExit(err = statusError); + err = CHIP_ERROR_INVALID_MESSAGE_TYPE; } else { @@ -555,12 +531,5 @@ CHIP_ERROR WriteClient::ProcessAttributeStatusIB(AttributeStatusIB::Parser & aAt return err; } -CHIP_ERROR WriteClient::HandleTimedStatus(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) -{ - ReturnErrorOnFailure(TimedRequest::HandleResponse(aPayloadHeader, std::move(aPayload))); - - return SendWriteRequest(); -} - } // namespace app } // namespace chip diff --git a/src/app/WriteClient.h b/src/app/WriteClient.h index 2f7ca2366de728..3afe6ff9179ff6 100644 --- a/src/app/WriteClient.h +++ b/src/app/WriteClient.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -125,14 +125,15 @@ class WriteClient : public Messaging::ExchangeDelegate WriteClient(Messaging::ExchangeManager * apExchangeMgr, Callback * apCallback, const Optional & aTimedWriteTimeoutMs, bool aSuppressResponse = false) : mpExchangeMgr(apExchangeMgr), - mpCallback(apCallback), mTimedWriteTimeoutMs(aTimedWriteTimeoutMs), mSuppressResponse(aSuppressResponse) + mExchangeCtx(*this), mpCallback(apCallback), mTimedWriteTimeoutMs(aTimedWriteTimeoutMs), + mSuppressResponse(aSuppressResponse) {} #if CONFIG_BUILD_FOR_HOST_UNIT_TEST WriteClient(Messaging::ExchangeManager * apExchangeMgr, Callback * apCallback, const Optional & aTimedWriteTimeoutMs, uint16_t aReservedSize) : mpExchangeMgr(apExchangeMgr), - mpCallback(apCallback), mTimedWriteTimeoutMs(aTimedWriteTimeoutMs), mReservedSize(aReservedSize) + mExchangeCtx(*this), mpCallback(apCallback), mTimedWriteTimeoutMs(aTimedWriteTimeoutMs), mReservedSize(aReservedSize) {} #endif @@ -226,14 +227,6 @@ class WriteClient : public Messaging::ExchangeDelegate */ void Shutdown(); - /* - * Destructor - as part of destruction, it will abort the exchange context - * if a valid one still exists. - * - * See Abort() for details on when that might occur. - */ - ~WriteClient() override { Abort(); } - private: friend class TestWriteInteraction; friend class InteractionModelEngine; @@ -347,15 +340,6 @@ class WriteClient : public Messaging::ExchangeDelegate */ void Abort(); - // Handle a message received when we are expecting a status response to a - // Timed Request. The caller is assumed to have already checked that our - // exchange context member is the one the message came in on. - // - // If the server returned an error status response its status will be - // encapsulated in the CHIP_ERROR this returns. In that case, - // StatusIB::InitFromChipError can be used to extract the status. - CHIP_ERROR HandleTimedStatus(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload); - // Send our queued-up Write Request message. Assumes the exchange is ready // and mPendingWriteData is populated. CHIP_ERROR SendWriteRequest(); @@ -378,9 +362,9 @@ class WriteClient : public Messaging::ExchangeDelegate CHIP_ERROR FinalizeMessage(bool aHasMoreChunks); Messaging::ExchangeManager * mpExchangeMgr = nullptr; - Messaging::ExchangeContext * mpExchangeCtx = nullptr; - Callback * mpCallback = nullptr; - State mState = State::Initialized; + Messaging::ExchangeHolder mExchangeCtx; + Callback * mpCallback = nullptr; + State mState = State::Initialized; System::PacketBufferTLVWriter mMessageWriter; WriteRequestMessage::Builder mWriteRequestBuilder; // TODO Maybe we should change PacketBufferTLVWriter so we can finalize it diff --git a/src/app/WriteHandler.cpp b/src/app/WriteHandler.cpp index ba52461882abe9..12a2086e7c48d3 100644 --- a/src/app/WriteHandler.cpp +++ b/src/app/WriteHandler.cpp @@ -17,7 +17,7 @@ */ #include "messaging/ExchangeContext.h" -#include +#include #include #include #include @@ -36,7 +36,7 @@ constexpr uint8_t kListAttributeType = 0x48; CHIP_ERROR WriteHandler::Init() { - VerifyOrReturnError(mpExchangeCtx == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); MoveToState(State::Initialized); @@ -51,31 +51,11 @@ void WriteHandler::Close() mSuppressResponse = false; VerifyOrReturn(mState != State::Uninitialized); - if (mpExchangeCtx != nullptr) - { - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx = nullptr; - } - ClearState(); } void WriteHandler::Abort() { - if (mpExchangeCtx != nullptr) - { - // We might be a delegate for this exchange, and we don't want the - // OnExchangeClosing notification in that case. Null out the delegate - // to avoid that. - // - // TODO: This makes all sorts of assumptions about what the delegate is - // (notice the "might" above!) that might not hold in practice. We - // really need a better solution here.... - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx->Abort(); - mpExchangeCtx = nullptr; - } - ClearState(); } @@ -110,13 +90,11 @@ Status WriteHandler::HandleWriteRequestMessage(Messaging::ExchangeContext * apEx Status WriteHandler::OnWriteRequest(Messaging::ExchangeContext * apExchangeContext, System::PacketBufferHandle && aPayload, bool aIsTimedWrite) { - mpExchangeCtx = apExchangeContext; - // // Let's take over further message processing on this exchange from the IM. // This is only relevant during chunked requests. // - mpExchangeCtx->SetDelegate(this); + mExchangeCtx.Grab(apExchangeContext); Status status = HandleWriteRequestMessage(apExchangeContext, std::move(aPayload), aIsTimedWrite); @@ -134,7 +112,7 @@ CHIP_ERROR WriteHandler::OnMessageReceived(Messaging::ExchangeContext * apExchan { CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrDieWithMsg(apExchangeContext == mpExchangeCtx, DataManagement, + VerifyOrDieWithMsg(apExchangeContext == mExchangeCtx.Get(), DataManagement, "Incoming exchange context should be same as the initial request."); VerifyOrDieWithMsg(!apExchangeContext->IsGroupExchangeContext(), DataManagement, "OnMessageReceived should not be called on GroupExchangeContext"); @@ -191,11 +169,11 @@ CHIP_ERROR WriteHandler::SendWriteResponse(System::PacketBufferTLVWriter && aMes err = FinalizeMessage(std::move(aMessageWriter), packet); SuccessOrExit(err); - VerifyOrExit(mpExchangeCtx != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - mpExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); - err = mpExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::WriteResponse, std::move(packet), - mHasMoreChunks ? Messaging::SendMessageFlags::kExpectResponse - : Messaging::SendMessageFlags::kNone); + VerifyOrExit(mExchangeCtx, err = CHIP_ERROR_INCORRECT_STATE); + mExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); + err = mExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::WriteResponse, std::move(packet), + mHasMoreChunks ? Messaging::SendMessageFlags::kExpectResponse + : Messaging::SendMessageFlags::kNone); SuccessOrExit(err); MoveToState(State::Sending); @@ -237,7 +215,7 @@ CHIP_ERROR WriteHandler::DeliverFinalListWriteEndForGroupWrite(bool writeWasSucc Credentials::GroupDataProvider * groupDataProvider = Credentials::GetGroupDataProvider(); Credentials::GroupDataProvider::EndpointIterator * iterator; - GroupId groupId = mpExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); + GroupId groupId = mExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); FabricIndex fabricIndex = GetAccessingFabricIndex(); auto processingConcreteAttributePath = mProcessingAttributePath.Value(); @@ -289,8 +267,8 @@ CHIP_ERROR WriteHandler::ProcessAttributeDataIBs(TLV::TLVReader & aAttributeData { CHIP_ERROR err = CHIP_NO_ERROR; - ReturnErrorCodeIf(mpExchangeCtx == nullptr, CHIP_ERROR_INTERNAL); - const Access::SubjectDescriptor subjectDescriptor = mpExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); + ReturnErrorCodeIf(!mExchangeCtx, CHIP_ERROR_INTERNAL); + const Access::SubjectDescriptor subjectDescriptor = mExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); while (CHIP_NO_ERROR == (err = aAttributeDataIBsReader.Next())) { @@ -396,11 +374,11 @@ CHIP_ERROR WriteHandler::ProcessGroupAttributeDataIBs(TLV::TLVReader & aAttribut { CHIP_ERROR err = CHIP_NO_ERROR; - ReturnErrorCodeIf(mpExchangeCtx == nullptr, CHIP_ERROR_INTERNAL); + ReturnErrorCodeIf(!mExchangeCtx, CHIP_ERROR_INTERNAL); const Access::SubjectDescriptor subjectDescriptor = - mpExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetSubjectDescriptor(); + mExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetSubjectDescriptor(); - GroupId groupId = mpExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); + GroupId groupId = mExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); FabricIndex fabric = GetAccessingFabricIndex(); while (CHIP_NO_ERROR == (err = aAttributeDataIBsReader.Next())) @@ -590,7 +568,7 @@ Status WriteHandler::ProcessWriteRequest(System::PacketBufferHandle && aPayload, } SuccessOrExit(err); - if (mHasMoreChunks && (mpExchangeCtx->IsGroupExchangeContext() || mIsTimedRequest)) + if (mHasMoreChunks && (mExchangeCtx->IsGroupExchangeContext() || mIsTimedRequest)) { // Sanity check: group exchange context should only have one chunk. // Also, timed requests should not have more than one chunk. @@ -610,7 +588,7 @@ Status WriteHandler::ProcessWriteRequest(System::PacketBufferHandle && aPayload, AttributeDataIBsParser.GetReader(&AttributeDataIBsReader); - if (mpExchangeCtx->IsGroupExchangeContext()) + if (mExchangeCtx->IsGroupExchangeContext()) { err = ProcessGroupAttributeDataIBs(AttributeDataIBsReader); } @@ -680,7 +658,7 @@ CHIP_ERROR WriteHandler::AddStatus(const ConcreteDataAttributePath & aPath, cons FabricIndex WriteHandler::GetAccessingFabricIndex() const { - return mpExchangeCtx->GetSessionHandle()->GetFabricIndex(); + return mExchangeCtx->GetSessionHandle()->GetFabricIndex(); } const char * WriteHandler::GetStateStr() const @@ -712,6 +690,7 @@ void WriteHandler::MoveToState(const State aTargetState) void WriteHandler::ClearState() { DeliverFinalListWriteEnd(false /* wasSuccessful */); + mExchangeCtx.Release(); MoveToState(State::Uninitialized); } diff --git a/src/app/WriteHandler.h b/src/app/WriteHandler.h index 1edf40b15273ff..43163a2b8abab9 100644 --- a/src/app/WriteHandler.h +++ b/src/app/WriteHandler.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -41,6 +41,8 @@ namespace app { class WriteHandler : public Messaging::ExchangeDelegate { public: + WriteHandler() : mExchangeCtx(*this) {} + /** * Initialize the WriteHandler. Within the lifetime * of this instance, this method is invoked once after object @@ -96,7 +98,7 @@ class WriteHandler : public Messaging::ExchangeDelegate bool MatchesExchangeContext(Messaging::ExchangeContext * apExchangeContext) const { - return !IsFree() && mpExchangeCtx == apExchangeContext; + return !IsFree() && mExchangeCtx.Get() == apExchangeContext; } void CacheACLCheckResult(const AttributeAccessToken & aToken) { mACLCheckCache.SetValue(aToken); } @@ -158,7 +160,7 @@ class WriteHandler : public Messaging::ExchangeDelegate System::PacketBufferHandle && aPayload) override; void OnResponseTimeout(Messaging::ExchangeContext * apExchangeContext) override; - Messaging::ExchangeContext * mpExchangeCtx = nullptr; + Messaging::ExchangeHolder mExchangeCtx; WriteResponseMessage::Builder mWriteResponseBuilder; State mState = State::Uninitialized; bool mIsTimedRequest = false; diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index 222b52992246ab..5557c092dcb8b9 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -414,11 +414,13 @@ CHIP_ERROR ContentAppPlatform::ManageClientAccess(OperationalDeviceProxy * targe VerifyOrReturnError(successCb != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(failureCb != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + Access::Privilege vendorPrivilege = mContentAppFactory->GetVendorPrivilege(targetVendorId); + Access::AccessControl::Entry entry; ReturnErrorOnFailure(GetAccessControl().PrepareEntry(entry)); ReturnErrorOnFailure(entry.SetAuthMode(Access::AuthMode::kCase)); entry.SetFabricIndex(targetDeviceProxy->GetFabricIndex()); - ReturnErrorOnFailure(entry.SetPrivilege(Access::Privilege::kOperate)); + ReturnErrorOnFailure(entry.SetPrivilege(vendorPrivilege)); ReturnErrorOnFailure(entry.AddSubject(nullptr, targetDeviceProxy->GetDeviceId())); std::vector bindings; @@ -438,18 +440,31 @@ CHIP_ERROR ContentAppPlatform::ManageClientAccess(OperationalDeviceProxy * targe ChipLogProgress(Controller, "Create video player endpoint ACL and binding"); { - std::list allowedClusterList = { kClusterIdDescriptor, kClusterIdOnOff, kClusterIdWakeOnLAN, - kClusterIdMediaPlayback, kClusterIdLowPower, kClusterIdKeypadInput, - kClusterIdContentLauncher, kClusterIdAudioOutput }; - - for (const auto & clusterId : allowedClusterList) + if (vendorPrivilege == Access::Privilege::kAdminister) { - Access::AccessControl::Entry::Target target = { .flags = Access::AccessControl::Entry::Target::kCluster | - Access::AccessControl::Entry::Target::kEndpoint, - .cluster = clusterId, + ChipLogProgress(Controller, "ContentAppPlatform::ManageClientAccess Admin privilege granted"); + // a vendor with admin privilege gets access to all clusters on ep1 + Access::AccessControl::Entry::Target target = { .flags = Access::AccessControl::Entry::Target::kEndpoint, .endpoint = kLocalVideoPlayerEndpointId }; ReturnErrorOnFailure(entry.AddTarget(nullptr, target)); } + else + { + ChipLogProgress(Controller, "ContentAppPlatform::ManageClientAccess non-Admin privilege granted"); + // a vendor with non-admin privilege gets access to select clusters on ep1 + std::list allowedClusterList = { kClusterIdDescriptor, kClusterIdOnOff, kClusterIdWakeOnLAN, + kClusterIdMediaPlayback, kClusterIdLowPower, kClusterIdKeypadInput, + kClusterIdContentLauncher, kClusterIdAudioOutput }; + + for (const auto & clusterId : allowedClusterList) + { + Access::AccessControl::Entry::Target target = { .flags = Access::AccessControl::Entry::Target::kCluster | + Access::AccessControl::Entry::Target::kEndpoint, + .cluster = clusterId, + .endpoint = kLocalVideoPlayerEndpointId }; + ReturnErrorOnFailure(entry.AddTarget(nullptr, target)); + } + } bindings.push_back(Binding::Structs::TargetStruct::Type{ .node = MakeOptional(localNodeId), diff --git a/src/app/app-platform/ContentAppPlatform.h b/src/app/app-platform/ContentAppPlatform.h index af1e680c2000f2..4246914e223990 100644 --- a/src/app/app-platform/ContentAppPlatform.h +++ b/src/app/app-platform/ContentAppPlatform.h @@ -57,6 +57,12 @@ class DLL_EXPORT ContentAppFactory // Converts application (any catalog) into the platform's catalog Vendor // and then writes it to destinationApp virtual CHIP_ERROR ConvertToPlatformCatalogVendorApp(const CatalogVendorApp & sourceApp, CatalogVendorApp * destinationApp) = 0; + + // Get the privilege this vendorId should have on endpoints 1, 2, and content app endpoints + // In the case of casting video clients, this should usually be Access::Privilege::kOperate + // and for voice agents, this may be Access::Privilege::kAdminister + // When a vendor has admin privileges, it will get access to all clusters on ep1 + virtual Access::Privilege GetVendorPrivilege(uint16_t vendorId) = 0; }; class DLL_EXPORT ContentAppPlatform diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 47ebd1cd926293..b2b50687503dc5 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -31,10 +31,6 @@ _zap_cluster_list_script = get_path_info("zap_cluster_list.py", "abspath") # zap_file # Path to the ZAP input file. # -# cluster_sources -# Names of the clusters directories to compile. -# Deprecated, specify zap_file instead. -# # Forwards all the remaining variables to the source_set. # template("chip_data_model") { @@ -56,7 +52,6 @@ template("chip_data_model") { "*", [ "zap_pregenerated_dir", - "cluster_sources", "zap_file", "is_server", ]) @@ -93,9 +88,7 @@ template("chip_data_model") { "${chip_root}/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp", ] - if (defined(invoker.cluster_sources)) { - _cluster_sources = invoker.cluster_sources - } else if (defined(invoker.zap_file)) { + if (defined(invoker.zap_file)) { _zap_path = rebase_path(invoker.zap_file, root_build_dir) _script_path = rebase_path(_zap_cluster_list_script, root_build_dir) _script_args = [ "--zap_file=" + _zap_path ] diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index d03900855d182f..988f082c8c7cf2 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -86,7 +86,7 @@ CHIP_ERROR LogExtensionChangedEvent(const AccessControlCluster::Structs::Extensi const Access::SubjectDescriptor & subjectDescriptor, AccessControlCluster::ChangeTypeEnum changeType) { - ExtensionEvent event{ .changeType = changeType, .adminFabricIndex = subjectDescriptor.fabricIndex }; + ExtensionEvent event{ .changeType = changeType, .fabricIndex = subjectDescriptor.fabricIndex }; if (subjectDescriptor.authMode == Access::AuthMode::kCase) { @@ -387,7 +387,7 @@ void AccessControlAttribute::OnEntryChanged(const SubjectDescriptor * subjectDes } CHIP_ERROR err; - AclEvent event{ .changeType = ChangeTypeEnum::kChanged, .adminFabricIndex = subjectDescriptor->fabricIndex }; + AclEvent event{ .changeType = ChangeTypeEnum::kChanged, .fabricIndex = subjectDescriptor->fabricIndex }; if (changeType == ChangeType::kAdded) { diff --git a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp index 5ca4685427cec6..f33fa4c184bded 100644 --- a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp +++ b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp @@ -111,7 +111,7 @@ bool emberAfAdministratorCommissioningClusterOpenCommissioningWindowCallback( auto & commissionMgr = Server::GetInstance().GetCommissioningWindowManager(); VerifyOrExit(fabricInfo != nullptr, status.Emplace(StatusCode::EMBER_ZCL_STATUS_CODE_PAKE_PARAMETER_ERROR)); - VerifyOrExit(!failSafeContext.IsFailSafeArmed(), status.Emplace(StatusCode::EMBER_ZCL_STATUS_CODE_BUSY)); + VerifyOrExit(failSafeContext.IsFailSafeFullyDisarmed(), status.Emplace(StatusCode::EMBER_ZCL_STATUS_CODE_BUSY)); VerifyOrExit(commissionMgr.CommissioningWindowStatus() == CommissioningWindowStatus::kWindowNotOpen, status.Emplace(StatusCode::EMBER_ZCL_STATUS_CODE_BUSY)); @@ -176,7 +176,7 @@ bool emberAfAdministratorCommissioningClusterOpenBasicCommissioningWindowCallbac VerifyOrExit(commissionMgr.CommissioningWindowStatus() == CommissioningWindowStatus::kWindowNotOpen, status.Emplace(StatusCode::EMBER_ZCL_STATUS_CODE_BUSY)); - VerifyOrExit(!failSafeContext.IsFailSafeArmed(), status.Emplace(StatusCode::EMBER_ZCL_STATUS_CODE_BUSY)); + VerifyOrExit(failSafeContext.IsFailSafeFullyDisarmed(), status.Emplace(StatusCode::EMBER_ZCL_STATUS_CODE_BUSY)); VerifyOrExit(commissioningTimeout <= commissionMgr.MaxCommissioningTimeout(), globalStatus = InteractionModel::Status::InvalidCommand); VerifyOrExit(commissioningTimeout >= commissionMgr.MinCommissioningTimeout(), diff --git a/src/app/clusters/bindings/BindingManager.cpp b/src/app/clusters/bindings/BindingManager.cpp index 5e8415b08f4668..73bcf93e0b9aff 100644 --- a/src/app/clusters/bindings/BindingManager.cpp +++ b/src/app/clusters/bindings/BindingManager.cpp @@ -50,16 +50,6 @@ BindingFabricTableDelegate gFabricTableDelegate; namespace { -chip::PeerId PeerIdForNode(chip::FabricTable * fabricTable, chip::FabricIndex fabric, chip::NodeId node) -{ - const chip::FabricInfo * fabricInfo = fabricTable->FindFabricWithIndex(fabric); - if (fabricInfo == nullptr) - { - return chip::PeerId(); - } - return fabricInfo->GetPeerIdForNode(node); -} - } // namespace namespace chip { @@ -68,7 +58,7 @@ BindingManager BindingManager::sBindingManager; CHIP_ERROR BindingManager::UnicastBindingCreated(uint8_t fabricIndex, NodeId nodeId) { - return EstablishConnection(fabricIndex, nodeId); + return EstablishConnection(ScopedNodeId(nodeId, fabricIndex)); } CHIP_ERROR BindingManager::UnicastBindingRemoved(uint8_t bindingEntryId) @@ -106,29 +96,26 @@ CHIP_ERROR BindingManager::Init(const BindingManagerInitParams & params) return CHIP_NO_ERROR; } -CHIP_ERROR BindingManager::EstablishConnection(FabricIndex fabric, NodeId node) +CHIP_ERROR BindingManager::EstablishConnection(const ScopedNodeId & nodeId) { VerifyOrReturnError(mInitParams.mCASESessionManager != nullptr, CHIP_ERROR_INCORRECT_STATE); - PeerId peer = PeerIdForNode(mInitParams.mFabricTable, fabric, node); - VerifyOrReturnError(peer.GetNodeId() != kUndefinedNodeId, CHIP_ERROR_NOT_FOUND); mLastSessionEstablishmentError = CHIP_NO_ERROR; - mInitParams.mCASESessionManager->FindOrEstablishSession(peer, &mOnConnectedCallback, &mOnConnectionFailureCallback); + mInitParams.mCASESessionManager->FindOrEstablishSession(nodeId, &mOnConnectedCallback, &mOnConnectionFailureCallback); if (mLastSessionEstablishmentError == CHIP_ERROR_NO_MEMORY) { // Release the least recently used entry // TODO: Some reference counting mechanism shall be added the CASESessionManager // so that other session clients don't get accidentally closed. - FabricIndex fabricToRemove; - NodeId nodeToRemove; - if (mPendingNotificationMap.FindLRUConnectPeer(&fabricToRemove, &nodeToRemove) == CHIP_NO_ERROR) + ScopedNodeId peerToRemove; + if (mPendingNotificationMap.FindLRUConnectPeer(peerToRemove) == CHIP_NO_ERROR) { - mPendingNotificationMap.RemoveAllEntriesForNode(fabricToRemove, nodeToRemove); - PeerId lruPeer = PeerIdForNode(mInitParams.mFabricTable, fabricToRemove, nodeToRemove); - mInitParams.mCASESessionManager->ReleaseSession(lruPeer); + mPendingNotificationMap.RemoveAllEntriesForNode(peerToRemove); + mInitParams.mCASESessionManager->ReleaseSession(peerToRemove); + // Now retry mLastSessionEstablishmentError = CHIP_NO_ERROR; - mInitParams.mCASESessionManager->FindOrEstablishSession(peer, &mOnConnectedCallback, &mOnConnectionFailureCallback); + mInitParams.mCASESessionManager->FindOrEstablishSession(nodeId, &mOnConnectedCallback, &mOnConnectionFailureCallback); } } return mLastSessionEstablishmentError; @@ -151,24 +138,24 @@ void BindingManager::HandleDeviceConnected(OperationalDeviceProxy * device) { EmberBindingTableEntry entry = BindingTable::GetInstance().GetAt(pendingNotification.mBindingEntryId); - PeerId peer = PeerIdForNode(mInitParams.mFabricTable, entry.fabricIndex, entry.nodeId); - if (device->GetPeerId() == peer) + if (device->GetPeerId() == ScopedNodeId(entry.nodeId, entry.fabricIndex)) { fabricToRemove = entry.fabricIndex; nodeToRemove = entry.nodeId; mBoundDeviceChangedHandler(entry, device, pendingNotification.mContext->GetContext()); } } - mPendingNotificationMap.RemoveAllEntriesForNode(fabricToRemove, nodeToRemove); + + mPendingNotificationMap.RemoveAllEntriesForNode(ScopedNodeId(nodeToRemove, fabricToRemove)); } -void BindingManager::HandleDeviceConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error) +void BindingManager::HandleDeviceConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { BindingManager * manager = static_cast(context); manager->HandleDeviceConnectionFailure(peerId, error); } -void BindingManager::HandleDeviceConnectionFailure(PeerId peerId, CHIP_ERROR error) +void BindingManager::HandleDeviceConnectionFailure(const ScopedNodeId & peerId, CHIP_ERROR error) { // Simply release the entry, the connection will be re-established as needed. ChipLogError(AppServer, "Failed to establish connection to node 0x" ChipLogFormatX64, ChipLogValueX64(peerId.GetNodeId())); @@ -202,10 +189,8 @@ CHIP_ERROR BindingManager::NotifyBoundClusterChanged(EndpointId endpoint, Cluste { if (iter->type == EMBER_UNICAST_BINDING) { - const FabricInfo * fabricInfo = mInitParams.mFabricTable->FindFabricWithIndex(iter->fabricIndex); - VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_NOT_FOUND); - PeerId peer = fabricInfo->GetPeerIdForNode(iter->nodeId); - OperationalDeviceProxy * peerDevice = mInitParams.mCASESessionManager->FindExistingSession(peer); + OperationalDeviceProxy * peerDevice = + mInitParams.mCASESessionManager->FindExistingSession(ScopedNodeId(iter->nodeId, iter->fabricIndex)); if (peerDevice != nullptr && peerDevice->IsConnected()) { // We already have an active connection @@ -214,7 +199,7 @@ CHIP_ERROR BindingManager::NotifyBoundClusterChanged(EndpointId endpoint, Cluste else { mPendingNotificationMap.AddPendingNotification(iter.GetIndex(), bindingContext); - error = EstablishConnection(iter->fabricIndex, iter->nodeId); + error = EstablishConnection(ScopedNodeId(iter->nodeId, iter->fabricIndex)); SuccessOrExit(error == CHIP_NO_ERROR); } } diff --git a/src/app/clusters/bindings/BindingManager.h b/src/app/clusters/bindings/BindingManager.h index 86b01795d140dd..308b672a482590 100644 --- a/src/app/clusters/bindings/BindingManager.h +++ b/src/app/clusters/bindings/BindingManager.h @@ -126,10 +126,10 @@ class BindingManager static void HandleDeviceConnected(void * context, OperationalDeviceProxy * device); void HandleDeviceConnected(OperationalDeviceProxy * device); - static void HandleDeviceConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error); - void HandleDeviceConnectionFailure(PeerId peerId, CHIP_ERROR error); + static void HandleDeviceConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); + void HandleDeviceConnectionFailure(const ScopedNodeId & peerId, CHIP_ERROR error); - CHIP_ERROR EstablishConnection(FabricIndex fabric, NodeId node); + CHIP_ERROR EstablishConnection(const ScopedNodeId & nodeId); PendingNotificationMap mPendingNotificationMap; BoundDeviceChangedHandler mBoundDeviceChangedHandler; diff --git a/src/app/clusters/bindings/PendingNotificationMap.cpp b/src/app/clusters/bindings/PendingNotificationMap.cpp index 6676a82b779d4d..a7e6adb595ce59 100644 --- a/src/app/clusters/bindings/PendingNotificationMap.cpp +++ b/src/app/clusters/bindings/PendingNotificationMap.cpp @@ -22,7 +22,7 @@ namespace chip { -CHIP_ERROR PendingNotificationMap::FindLRUConnectPeer(FabricIndex * fabric, NodeId * node) +CHIP_ERROR PendingNotificationMap::FindLRUConnectPeer(ScopedNodeId & nodeId) { // When entries are added to PendingNotificationMap, they are appended to the end. // To find the LRU peer, we need to find the peer whose last entry in the map is closer @@ -72,8 +72,7 @@ CHIP_ERROR PendingNotificationMap::FindLRUConnectPeer(FabricIndex * fabric, Node if (minLastAppearValue < UINT16_MAX) { EmberBindingTableEntry entry = BindingTable::GetInstance().GetAt(static_cast(lruBindingEntryIndex)); - *fabric = entry.fabricIndex; - *node = entry.nodeId; + nodeId = ScopedNodeId(entry.nodeId, entry.fabricIndex); return CHIP_NO_ERROR; } return CHIP_ERROR_NOT_FOUND; @@ -110,13 +109,13 @@ void PendingNotificationMap::RemoveEntry(uint8_t bindingEntryId) mNumEntries = newEntryCount; } -void PendingNotificationMap::RemoveAllEntriesForNode(FabricIndex fabric, NodeId node) +void PendingNotificationMap::RemoveAllEntriesForNode(const ScopedNodeId & nodeId) { uint8_t newEntryCount = 0; for (int i = 0; i < mNumEntries; i++) { EmberBindingTableEntry entry = BindingTable::GetInstance().GetAt(mPendingBindingEntries[i]); - if (entry.fabricIndex != fabric || entry.nodeId != node) + if (entry.fabricIndex != nodeId.GetFabricIndex() || entry.nodeId != nodeId.GetNodeId()) { mPendingBindingEntries[newEntryCount] = mPendingBindingEntries[i]; mPendingContexts[newEntryCount] = mPendingContexts[i]; diff --git a/src/app/clusters/bindings/PendingNotificationMap.h b/src/app/clusters/bindings/PendingNotificationMap.h index 5ef12ee560cbad..2e70a0718d047b 100644 --- a/src/app/clusters/bindings/PendingNotificationMap.h +++ b/src/app/clusters/bindings/PendingNotificationMap.h @@ -100,15 +100,13 @@ class PendingNotificationMap Iterator end() { return Iterator(this, mNumEntries); } - CHIP_ERROR FindLRUConnectPeer(FabricIndex * fabric, NodeId * node); + CHIP_ERROR FindLRUConnectPeer(ScopedNodeId & nodeId); void AddPendingNotification(uint8_t bindingEntryId, PendingNotificationContext * context); void RemoveEntry(uint8_t bindingEntryId); - void RemoveAllEntriesForNode(FabricTable * fabricTable, PeerId peer); - - void RemoveAllEntriesForNode(FabricIndex fabric, NodeId node); + void RemoveAllEntriesForNode(const ScopedNodeId & nodeId); void RemoveAllEntriesForFabric(FabricIndex fabric); diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 8807846ee69ca3..2035997603a7ad 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -99,7 +99,6 @@ typedef struct CommandId commandId; uint8_t moveToLevel; bool increasing; - bool useOnLevel; uint8_t onLevel; uint8_t minLevel; uint8_t maxLevel; @@ -114,16 +113,16 @@ static EmberAfLevelControlState stateTable[kLevelControlStateTableSize]; static EmberAfLevelControlState * getState(EndpointId endpoint); static EmberAfStatus moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8_t level, uint16_t transitionTimeDs, - uint8_t optionMask, uint8_t optionOverride, uint16_t storedLevel); -static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMode, uint8_t rate, uint8_t optionMask, - uint8_t optionOverride); + uint8_t optionsMask, uint8_t optionsOverride, uint16_t storedLevel); +static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMode, uint8_t rate, uint8_t optionsMask, + uint8_t optionsOverride); static void stepHandler(EndpointId endpoint, CommandId commandId, uint8_t stepMode, uint8_t stepSize, uint16_t transitionTimeDs, - uint8_t optionMask, uint8_t optionOverride); -static void stopHandler(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride); + uint8_t optionsMask, uint8_t optionsOverride); +static void stopHandler(EndpointId endpoint, CommandId commandId, uint8_t optionsMask, uint8_t optionsOverride); static void setOnOffValue(EndpointId endpoint, bool onOff); static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs); -static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride); +static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionsMask, uint8_t optionsOverride); #if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) static void reallyUpdateCoupledColorTemp(EndpointId endpoint); @@ -248,18 +247,6 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) state->commandId == Commands::StepWithOnOff::Id) { setOnOffValue(endpoint, (currentLevel != state->minLevel)); - if (currentLevel == state->minLevel && state->useOnLevel) - { - status = Attributes::CurrentLevel::Set(endpoint, state->onLevel); - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - emberAfLevelControlClusterPrintln("ERR: writing current level %x", status); - } - else - { - updateCoupledColorTemp(endpoint); - } - } } else { @@ -327,7 +314,7 @@ static void setOnOffValue(EndpointId endpoint, bool onOff) #endif // EMBER_AF_PLUGIN_ON_OFF } -static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride) +static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionsMask, uint8_t optionsOverride) { #ifndef IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::Options::Id)) @@ -389,7 +376,7 @@ static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t // ---------- The following order is important in decision making ------- // -----------more readable ---------- // - if (optionMask == 0xFF && optionOverride == 0xFF) + if (optionsMask == 0xFF && optionsOverride == 0xFF) { // 0xFF are the default values passed to the command handler when // the payload is not present - in that case there is use of option @@ -398,11 +385,11 @@ static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t } // ---------- The above is to distinguish if the payload is present or not - if (READBITS(optionMask, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)) + if (READBITS(optionsMask, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)) { // Mask is present and set in the command payload, this indicates // use the over ride as temporary option - return READBITS(optionOverride, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); + return READBITS(optionsOverride, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); } // if we are here - use the option bits return (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)); @@ -416,15 +403,15 @@ static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t bool emberAfLevelControlClusterMoveToLevelCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::MoveToLevel::DecodableType & commandData) { - auto & level = commandData.level; - auto & transitionTime = commandData.transitionTime; - auto & optionMask = commandData.optionMask; - auto & optionOverride = commandData.optionOverride; + auto & level = commandData.level; + auto & transitionTime = commandData.transitionTime; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; - emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL %x %2x %x %x", "RX level-control:", level, transitionTime, optionMask, - optionOverride); + emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL %x %2x %x %x", "RX level-control:", level, transitionTime, optionsMask, + optionsOverride); EmberAfStatus status = - moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevel::Id, level, transitionTime, optionMask, optionOverride, + moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevel::Id, level, transitionTime, optionsMask, optionsOverride, INVALID_STORED_LEVEL); // Don't revert to the stored level emberAfSendImmediateDefaultResponse(status); @@ -436,13 +423,15 @@ bool emberAfLevelControlClusterMoveToLevelWithOnOffCallback(app::CommandHandler const app::ConcreteCommandPath & commandPath, const Commands::MoveToLevelWithOnOff::DecodableType & commandData) { - auto & level = commandData.level; - auto & transitionTime = commandData.transitionTime; + auto & level = commandData.level; + auto & transitionTime = commandData.transitionTime; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL_WITH_ON_OFF %x %2x", "RX level-control:", level, transitionTime); - EmberAfStatus status = - moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevelWithOnOff::Id, level, transitionTime, 0xFF, 0xFF, - INVALID_STORED_LEVEL); // Don't revert to the stored level + EmberAfStatus status = moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevelWithOnOff::Id, level, transitionTime, + optionsMask, optionsOverride, + INVALID_STORED_LEVEL); // Don't revert to the stored level emberAfSendImmediateDefaultResponse(status); @@ -452,74 +441,81 @@ bool emberAfLevelControlClusterMoveToLevelWithOnOffCallback(app::CommandHandler bool emberAfLevelControlClusterMoveCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::Move::DecodableType & commandData) { - auto & moveMode = commandData.moveMode; - auto & rate = commandData.rate; - auto & optionMask = commandData.optionMask; - auto & optionOverride = commandData.optionOverride; + auto & moveMode = commandData.moveMode; + auto & rate = commandData.rate; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pMOVE %x %x", "RX level-control:", moveMode, rate); - moveHandler(commandPath.mEndpointId, Commands::Move::Id, moveMode, rate, optionMask, optionOverride); + moveHandler(commandPath.mEndpointId, Commands::Move::Id, moveMode, rate, optionsMask, optionsOverride); return true; } bool emberAfLevelControlClusterMoveWithOnOffCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::MoveWithOnOff::DecodableType & commandData) { - auto & moveMode = commandData.moveMode; - auto & rate = commandData.rate; + auto & moveMode = commandData.moveMode; + auto & rate = commandData.rate; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pMOVE_WITH_ON_OFF %x %x", "RX level-control:", moveMode, rate); - moveHandler(commandPath.mEndpointId, Commands::MoveWithOnOff::Id, moveMode, rate, 0xFF, 0xFF); + moveHandler(commandPath.mEndpointId, Commands::MoveWithOnOff::Id, moveMode, rate, optionsMask, optionsOverride); return true; } bool emberAfLevelControlClusterStepCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::Step::DecodableType & commandData) { - auto & stepMode = commandData.stepMode; - auto & stepSize = commandData.stepSize; - auto & transitionTime = commandData.transitionTime; - auto & optionMask = commandData.optionMask; - auto & optionOverride = commandData.optionOverride; + auto & stepMode = commandData.stepMode; + auto & stepSize = commandData.stepSize; + auto & transitionTime = commandData.transitionTime; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pSTEP %x %x %2x", "RX level-control:", stepMode, stepSize, transitionTime); - stepHandler(commandPath.mEndpointId, Commands::Step::Id, stepMode, stepSize, transitionTime, optionMask, optionOverride); + stepHandler(commandPath.mEndpointId, Commands::Step::Id, stepMode, stepSize, transitionTime, optionsMask, optionsOverride); return true; } bool emberAfLevelControlClusterStepWithOnOffCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::StepWithOnOff::DecodableType & commandData) { - auto & stepMode = commandData.stepMode; - auto & stepSize = commandData.stepSize; - auto & transitionTime = commandData.transitionTime; + auto & stepMode = commandData.stepMode; + auto & stepSize = commandData.stepSize; + auto & transitionTime = commandData.transitionTime; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pSTEP_WITH_ON_OFF %x %x %2x", "RX level-control:", stepMode, stepSize, transitionTime); - stepHandler(commandPath.mEndpointId, Commands::StepWithOnOff::Id, stepMode, stepSize, transitionTime, 0xFF, 0xFF); + stepHandler(commandPath.mEndpointId, Commands::StepWithOnOff::Id, stepMode, stepSize, transitionTime, optionsMask, + optionsOverride); return true; } bool emberAfLevelControlClusterStopCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::Stop::DecodableType & commandData) { - auto & optionMask = commandData.optionMask; - auto & optionOverride = commandData.optionOverride; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pSTOP", "RX level-control:"); - stopHandler(commandPath.mEndpointId, Commands::Stop::Id, optionMask, optionOverride); + stopHandler(commandPath.mEndpointId, Commands::Stop::Id, optionsMask, optionsOverride); return true; } bool emberAfLevelControlClusterStopWithOnOffCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::StopWithOnOff::DecodableType & commandData) { + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pSTOP_WITH_ON_OFF", "RX level-control:"); - stopHandler(commandPath.mEndpointId, Commands::StopWithOnOff::Id, 0xFF, 0xFF); + stopHandler(commandPath.mEndpointId, Commands::StopWithOnOff::Id, optionsMask, optionsOverride); return true; } static EmberAfStatus moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8_t level, uint16_t transitionTimeDs, - uint8_t optionMask, uint8_t optionOverride, uint16_t storedLevel) + uint8_t optionsMask, uint8_t optionsOverride, uint16_t storedLevel) { EmberAfLevelControlState * state = getState(endpoint); EmberAfStatus status; @@ -536,7 +532,7 @@ static EmberAfStatus moveToLevelHandler(EndpointId endpoint, CommandId commandId return EMBER_ZCL_STATUS_INVALID_COMMAND; } - if (!shouldExecuteIfOff(endpoint, commandId, optionMask, optionOverride)) + if (!shouldExecuteIfOff(endpoint, commandId, optionsMask, optionsOverride)) { return EMBER_ZCL_STATUS_SUCCESS; } @@ -635,9 +631,6 @@ static EmberAfStatus moveToLevelHandler(EndpointId endpoint, CommandId commandId state->eventDurationMs = state->transitionTimeMs / actualStepSize; state->elapsedTimeMs = 0; - // OnLevel is not used for Move commands. - state->useOnLevel = false; - state->storedLevel = storedLevel; // The setup was successful, so mark the new state as active and return. @@ -657,8 +650,8 @@ static EmberAfStatus moveToLevelHandler(EndpointId endpoint, CommandId commandId return status; } -static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMode, uint8_t rate, uint8_t optionMask, - uint8_t optionOverride) +static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMode, uint8_t rate, uint8_t optionsMask, + uint8_t optionsOverride) { EmberAfLevelControlState * state = getState(endpoint); EmberAfStatus status; @@ -671,7 +664,7 @@ static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMo goto send_default_response; } - if (rate == 0 || !shouldExecuteIfOff(endpoint, commandId, optionMask, optionOverride)) + if (rate == 0 || !shouldExecuteIfOff(endpoint, commandId, optionsMask, optionsOverride)) { status = EMBER_ZCL_STATUS_SUCCESS; goto send_default_response; @@ -755,9 +748,6 @@ static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMo state->transitionTimeMs = difference * state->eventDurationMs; state->elapsedTimeMs = 0; - // OnLevel is not used for Move commands. - state->useOnLevel = false; - // storedLevel is not used for Move commands. state->storedLevel = INVALID_STORED_LEVEL; @@ -770,7 +760,7 @@ static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMo } static void stepHandler(EndpointId endpoint, CommandId commandId, uint8_t stepMode, uint8_t stepSize, uint16_t transitionTimeDs, - uint8_t optionMask, uint8_t optionOverride) + uint8_t optionsMask, uint8_t optionsOverride) { EmberAfLevelControlState * state = getState(endpoint); EmberAfStatus status; @@ -783,7 +773,7 @@ static void stepHandler(EndpointId endpoint, CommandId commandId, uint8_t stepMo goto send_default_response; } - if (!shouldExecuteIfOff(endpoint, commandId, optionMask, optionOverride)) + if (!shouldExecuteIfOff(endpoint, commandId, optionsMask, optionsOverride)) { status = EMBER_ZCL_STATUS_SUCCESS; goto send_default_response; @@ -876,9 +866,6 @@ static void stepHandler(EndpointId endpoint, CommandId commandId, uint8_t stepMo state->eventDurationMs = state->transitionTimeMs / actualStepSize; state->elapsedTimeMs = 0; - // OnLevel is not used for Step commands. - state->useOnLevel = false; - // storedLevel is not used for Step commands state->storedLevel = INVALID_STORED_LEVEL; @@ -890,7 +877,7 @@ static void stepHandler(EndpointId endpoint, CommandId commandId, uint8_t stepMo emberAfSendImmediateDefaultResponse(status); } -static void stopHandler(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride) +static void stopHandler(EndpointId endpoint, CommandId commandId, uint8_t optionsMask, uint8_t optionsOverride) { EmberAfLevelControlState * state = getState(endpoint); EmberAfStatus status; @@ -901,7 +888,7 @@ static void stopHandler(EndpointId endpoint, CommandId commandId, uint8_t option goto send_default_response; } - if (!shouldExecuteIfOff(endpoint, commandId, optionMask, optionOverride)) + if (!shouldExecuteIfOff(endpoint, commandId, optionsMask, optionsOverride)) { status = EMBER_ZCL_STATUS_SUCCESS; goto send_default_response; @@ -924,6 +911,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new uint8_t temporaryCurrentLevelCache; uint16_t currentOnOffTransitionTime; EmberAfStatus status; + bool useOnLevel = false; EmberAfLevelControlState * state = getState(endpoint); if (state == nullptr) @@ -942,14 +930,13 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new return; } - // Read the OnLevel attribute. #ifndef IGNORE_LEVEL_CONTROL_CLUSTER_ON_LEVEL_ATTRIBUTE if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::OnLevel::Id)) { status = Attributes::OnLevel::Get(endpoint, resolvedLevel); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + emberAfLevelControlClusterPrintln("ERR: reading on level %x", status); return; } @@ -958,6 +945,10 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new // OnLevel has undefined value; fall back to CurrentLevel. resolvedLevel.SetNonNull(temporaryCurrentLevelCache); } + else + { + useOnLevel = true; + } } else { @@ -1007,12 +998,18 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new // ...else if newValue is OnOff::Commands::Off::Id... // "Move CurrentLevel to the minimum level allowed for the device over the // time period OnOffTransitionTime." - moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, currentOnOffTransitionTime, 0xFF, - 0xFF, temporaryCurrentLevelCache); - - // "If OnLevel is not defined, set the CurrentLevel to the stored level." - // The emberAfLevelControlClusterServerTickCallback implementation handles - // this. + if (useOnLevel) + { + // If OnLevel is defined, don't revert to stored level. + moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, currentOnOffTransitionTime, + 0xFF, 0xFF, INVALID_STORED_LEVEL); + } + else + { + // If OnLevel is not defined, set the CurrentLevel to the stored level. + moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, currentOnOffTransitionTime, + 0xFF, 0xFF, temporaryCurrentLevelCache); + } } } diff --git a/src/app/clusters/mode-select-server/mode-select-server.cpp b/src/app/clusters/mode-select-server/mode-select-server.cpp index 0266c4dc6e0992..a25f66915a7525 100644 --- a/src/app/clusters/mode-select-server/mode-select-server.cpp +++ b/src/app/clusters/mode-select-server/mode-select-server.cpp @@ -33,6 +33,7 @@ #include #include #include +#include using namespace std; using namespace chip; @@ -41,6 +42,8 @@ using namespace chip::app::Clusters; using namespace chip::app::Clusters::ModeSelect; using namespace chip::Protocols; +using BootReasonType = GeneralDiagnostics::BootReasonType; + static InteractionModel::Status verifyModeValue(const EndpointId endpointId, const uint8_t newMode); namespace { @@ -132,9 +135,6 @@ void emberAfModeSelectClusterServerInitCallback(EndpointId endpointId) EmberAfStatus status = Attributes::StartUpMode::Get(endpointId, startUpMode); if (status == EMBER_ZCL_STATUS_SUCCESS && !startUpMode.IsNull()) { - // Initialise currentMode to 0 - uint8_t currentMode = 0; - status = Attributes::CurrentMode::Get(endpointId, ¤tMode); #ifdef EMBER_AF_PLUGIN_ON_OFF // OnMode with Power Up // If the On/Off feature is supported and the On/Off cluster attribute StartUpOnOff is present, with a @@ -158,7 +158,27 @@ void emberAfModeSelectClusterServerInitCallback(EndpointId endpointId) } } #endif // EMBER_AF_PLUGIN_ON_OFF - if (status == EMBER_ZCL_STATUS_SUCCESS && startUpMode.Value() != currentMode) + + BootReasonType bootReason = BootReasonType::kUnspecified; + CHIP_ERROR error = DeviceLayer::GetDiagnosticDataProvider().GetBootReason(bootReason); + + if (error != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Unable to retrieve boot reason: %" CHIP_ERROR_FORMAT, error.Format()); + // We really only care whether the boot reason is OTA. Assume it's not. + bootReason = BootReasonType::kUnspecified; + } + if (bootReason == BootReasonType::kSoftwareUpdateCompleted) + { + ChipLogDetail(Zcl, "ModeSelect: CurrentMode is ignored for OTA reboot"); + return; + } + + // Initialise currentMode to 0 + uint8_t currentMode = 0; + status = Attributes::CurrentMode::Get(endpointId, ¤tMode); + + if ((status == EMBER_ZCL_STATUS_SUCCESS) && (startUpMode.Value() != currentMode)) { status = Attributes::CurrentMode::Set(endpointId, startUpMode.Value()); if (status != EMBER_ZCL_STATUS_SUCCESS) diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index f6d7e11b992b9c..13c890a61bd1bb 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -271,12 +271,14 @@ void Instance::HandleScanNetworks(HandlerContext & ctx, const Commands::ScanNetw } mCurrentOperationBreadcrumb = req.breadcrumb; mAsyncCommandHandle = CommandHandler::Handle(&ctx.mCommandHandler); + ctx.mCommandHandler.FlushAcksRightAwayOnSlowCommand(); mpDriver.Get()->ScanNetworks(ssid, this); } else if (mFeatureFlags.Has(NetworkCommissioningFeature::kThreadNetworkInterface)) { mCurrentOperationBreadcrumb = req.breadcrumb; mAsyncCommandHandle = CommandHandler::Handle(&ctx.mCommandHandler); + ctx.mCommandHandler.FlushAcksRightAwayOnSlowCommand(); mpDriver.Get()->ScanNetworks(this); } else 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 0894122eab8fb7..b2777dff5f338b 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -206,6 +207,24 @@ CHIP_ERROR OperationalCredentialsAttrAccess::ReadRootCertificates(EndpointId end ReturnErrorOnFailure(encoder.Encode(ByteSpan{ cert })); } + { + uint8_t certBuf[kMaxCHIPCertLength]; + MutableByteSpan cert{ certBuf }; + CHIP_ERROR err = fabricTable.FetchPendingNonFabricAssociatedRootCert(cert); + if (err == CHIP_ERROR_NOT_FOUND) + { + // No pending root cert, do nothing + } + else if (err != CHIP_NO_ERROR) + { + return err; + } + else + { + ReturnErrorOnFailure(encoder.Encode(ByteSpan{ cert })); + } + } + return CHIP_NO_ERROR; }); } @@ -325,25 +344,18 @@ void OnPlatformEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, in // As per specifications section 11.22.5.1. Constant RESP_MAX constexpr size_t kMaxRspLen = 900; -// TODO: The code currently has two sources of truths for fabrics, the fabricInfo table + the attributes. There should only be one, -// the attributes list. Currently the attributes are not persisted so we are keeping the fabric table to have the -// fabrics/admrins be persisted. Once attributes are persisted, there should only be one sorce of truth, the attributes list and -// only that should be modifed to perosst/read/write fabrics. -// TODO: Once attributes are persisted, implement reading/writing/manipulation fabrics around that and remove fabricTable -// logic. class OpCredsFabricTableDelegate : public chip::FabricTable::Delegate { public: - // Gets called when a fabric is deleted from KVS store - void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) override + // Gets called when a fabric is about to be deleted + void FabricWillBeRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) override { - ChipLogProgress(Zcl, "OpCreds: Fabric index 0x%x was removed", static_cast(fabricIndex)); - // The Leave event SHOULD be emitted by a Node prior to permanently leaving the Fabric. for (auto endpoint : EnabledEndpointsWithServerCluster(Basic::Id)) { // If Basic cluster is implemented on this endpoint Basic::Events::Leave::Type event; + event.fabricIndex = fabricIndex; EventNumber eventNumber; if (CHIP_NO_ERROR != LogEvent(event, endpoint, eventNumber)) @@ -359,8 +371,14 @@ class OpCredsFabricTableDelegate : public chip::FabricTable::Delegate // - removing the fabric removes all associated access control entries, so generating // subsequent reports containing the leave event will fail the access control check. InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleUrgentEventDeliverySync(); - EventManagement::GetInstance().FabricRemoved(fabricIndex); + } + + // Gets called when a fabric is deleted + void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) override + { + ChipLogProgress(Zcl, "OpCreds: Fabric index 0x%x was removed", static_cast(fabricIndex)); + EventManagement::GetInstance().FabricRemoved(fabricIndex); NotifyFabricTableChanged(); } @@ -490,22 +508,11 @@ bool emberAfOperationalCredentialsClusterUpdateFabricLabelCallback(app::CommandH } } - CHIP_ERROR err = CHIP_ERROR_INTERNAL; - - // Fetch current fabric - const FabricInfo * fabric = RetrieveCurrentFabric(commandObj); - if (fabric == nullptr) - { - SendNOCResponse(commandObj, commandPath, OperationalCertStatus::kInsufficientPrivilege, ourFabricIndex, - CharSpan::fromCharString("Current fabric not found")); - return true; - } - // Set Label on fabric. Any error on this is basically an internal error... // NOTE: if an UpdateNOC had caused a pending fabric, that pending fabric is // the one updated thereafter. Otherwise, the data is committed to storage // as soon as the update is done. - err = fabricTable.SetFabricLabel(ourFabricIndex, label); + CHIP_ERROR err = fabricTable.SetFabricLabel(ourFabricIndex, label); VerifyOrExit(err == CHIP_NO_ERROR, finalStatus = Status::Failure); finalStatus = Status::Success; @@ -588,10 +595,6 @@ OperationalCertStatus ConvertToNOCResponseStatus(CHIP_ERROR err) { return OperationalCertStatus::kInvalidAdminSubject; } - if (err == CHIP_ERROR_INSUFFICIENT_PRIVILEGE) - { - return OperationalCertStatus::kInsufficientPrivilege; - } return OperationalCertStatus::kInvalidNOC; } @@ -650,9 +653,6 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co // Flush acks before really slow work commandObj->FlushAcksRightAwayOnSlowCommand(); - // TODO: Add support for calling AddNOC without a prior AddTrustedRootCertificate if - // the root properly matches an existing one. - // We can't possibly have a matching root based on the fact that we don't have // a shared root store. Therefore we would later fail path validation due to // missing root. Let's early-bail with InvalidNOC. @@ -1179,8 +1179,6 @@ bool emberAfOperationalCredentialsClusterAddTrustedRootCertificateCallback( // Flush acks before really slow work commandObj->FlushAcksRightAwayOnSlowCommand(); - // TODO(#17208): Handle checking for byte-to-byte match with existing fabrics before allowing the add - err = ValidateChipRCAC(rootCertificate); VerifyOrExit(err == CHIP_NO_ERROR, finalStatus = Status::InvalidCommand); diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp index 603d3874ec4369..1aecdb3022ae27 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp @@ -366,23 +366,13 @@ void DefaultOTARequestor::ConnectToProvider(OnConnectedAction onConnectedAction) return; } - const FabricInfo * fabricInfo = mServer->GetFabricTable().FindFabricWithIndex(mProviderLocation.Value().fabricIndex); - - if (fabricInfo == nullptr) - { - ChipLogError(SoftwareUpdate, "Cannot find fabric"); - RecordErrorUpdateState(CHIP_ERROR_INCORRECT_STATE); - return; - } - // Set the action to take once connection is successfully established mOnConnectedAction = onConnectedAction; ChipLogDetail(SoftwareUpdate, "Establishing session to provider node ID 0x" ChipLogFormatX64 " on fabric index %d", ChipLogValueX64(mProviderLocation.Value().providerNodeID), mProviderLocation.Value().fabricIndex); - mCASESessionManager->FindOrEstablishSession(fabricInfo->GetPeerIdForNode(mProviderLocation.Value().providerNodeID), - &mOnConnectedCallback, &mOnConnectionFailureCallback); + mCASESessionManager->FindOrEstablishSession(GetProviderScopedId(), &mOnConnectedCallback, &mOnConnectionFailureCallback); } void DefaultOTARequestor::DisconnectFromProvider() @@ -396,17 +386,9 @@ void DefaultOTARequestor::DisconnectFromProvider() return; } - const FabricInfo * fabricInfo = mServer->GetFabricTable().FindFabricWithIndex(mProviderLocation.Value().fabricIndex); - if (fabricInfo == nullptr) - { - ChipLogError(SoftwareUpdate, "Cannot find fabric"); - RecordErrorUpdateState(CHIP_ERROR_INCORRECT_STATE); - return; - } - - PeerId peerID = fabricInfo->GetPeerIdForNode(mProviderLocation.Value().providerNodeID); - mCASESessionManager->FindExistingSession(peerID)->Disconnect(); - mCASESessionManager->ReleaseSession(peerID); + auto providerNodeId = GetProviderScopedId(); + mCASESessionManager->FindExistingSession(providerNodeId)->Disconnect(); + mCASESessionManager->ReleaseSession(providerNodeId); } // Requestor is directed to cancel image update in progress. All the Requestor state is @@ -492,7 +474,7 @@ void DefaultOTARequestor::OnConnected(void * context, OperationalDeviceProxy * d } // Called whenever FindOrEstablishSession fails -void DefaultOTARequestor::OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error) +void DefaultOTARequestor::OnConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { DefaultOTARequestor * requestorCore = static_cast(context); VerifyOrDie(requestorCore != nullptr); diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.h b/src/app/clusters/ota-requestor/DefaultOTARequestor.h index 49b8dfeb865859..f80f7555fe05ee 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.h +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.h @@ -205,6 +205,12 @@ class DefaultOTARequestor : public OTARequestorInterface, public BDXDownloader:: */ IdleStateReason MapErrorToIdleStateReason(CHIP_ERROR error); + ScopedNodeId GetProviderScopedId() const + { + VerifyOrDie(mProviderLocation.HasValue()); + return ScopedNodeId(mProviderLocation.Value().providerNodeID, mProviderLocation.Value().fabricIndex); + } + /** * Record the new update state by updating the corresponding server attribute and logging a StateTransition event */ @@ -280,7 +286,7 @@ class DefaultOTARequestor : public OTARequestorInterface, public BDXDownloader:: * Session connection callbacks */ static void OnConnected(void * context, OperationalDeviceProxy * deviceProxy); - static void OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error); + static void OnConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); Callback::Callback mOnConnectedCallback; Callback::Callback mOnConnectionFailureCallback; diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index 702b881c18e031..55527a5ce4639f 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -23,8 +23,9 @@ * */ -#include +#include #include +#include #include #include @@ -290,21 +291,62 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu return err; } +CHIP_ERROR Engine::CheckAccessDeniedEventPaths(TLV::TLVWriter & aWriter, bool & aHasEncodedData, ReadHandler * apReadHandler) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + for (auto current = apReadHandler->mpEventPathList; current != nullptr;) + { + if (current->mValue.HasEventWildcard()) + { + current = current->mpNext; + continue; + } + + Access::RequestPath requestPath{ .cluster = current->mValue.mClusterId, .endpoint = current->mValue.mEndpointId }; + ConcreteEventPath path(current->mValue.mEndpointId, current->mValue.mClusterId, current->mValue.mEventId); + Access::Privilege requestPrivilege = RequiredPrivilege::ForReadEvent(path); + + err = Access::GetAccessControl().Check(apReadHandler->GetSubjectDescriptor(), requestPath, requestPrivilege); + if (err != CHIP_ERROR_ACCESS_DENIED) + { + ReturnErrorOnFailure(err); + } + else + { + TLV::TLVWriter checkpoint = aWriter; + err = EventReportIB::ConstructEventStatusIB(aWriter, path, + StatusIB(Protocols::InteractionModel::Status::UnsupportedAccess)); + if (err != CHIP_NO_ERROR) + { + aWriter = checkpoint; + break; + } + aHasEncodedData = true; + ChipLogDetail(InteractionModel, "Acces to event (%u, " ChipLogFormatMEI ", " ChipLogFormatMEI ") denied by ACL", + current->mValue.mEndpointId, ChipLogValueMEI(current->mValue.mClusterId), + ChipLogValueMEI(current->mValue.mEventId)); + } + current = current->mpNext; + } + + return err; +} + CHIP_ERROR Engine::BuildSingleReportDataEventReports(ReportDataMessage::Builder & aReportDataBuilder, ReadHandler * apReadHandler, bool aBufferIsUsed, bool * apHasMoreChunks, bool * apHasEncodedData) { - CHIP_ERROR err = CHIP_NO_ERROR; - size_t eventCount = 0; + CHIP_ERROR err = CHIP_NO_ERROR; + size_t eventCount = 0; + bool hasEncodedStatus = false; TLV::TLVWriter backup; bool eventClean = true; - const auto * eventList = apReadHandler->GetEventPathList(); auto & eventMin = apReadHandler->GetEventMin(); EventManagement & eventManager = EventManagement::GetInstance(); bool hasMoreChunks = false; aReportDataBuilder.Checkpoint(backup); - VerifyOrExit(eventList != nullptr, ); + VerifyOrExit(apReadHandler->GetEventPathList() != nullptr, ); // If the eventManager is not valid or has not been initialized, // skip the rest of processing @@ -326,7 +368,11 @@ CHIP_ERROR Engine::BuildSingleReportDataEventReports(ReportDataMessage::Builder SuccessOrExit(err = aReportDataBuilder.GetError()); VerifyOrExit(eventReportIBs.GetWriter() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = eventReportIBs.GetWriter()->ReserveBuffer(kReservedSizeEndOfReportIBs)); - err = eventManager.FetchEventsSince(*(eventReportIBs.GetWriter()), eventList, eventMin, eventCount, + + err = CheckAccessDeniedEventPaths(*(eventReportIBs.GetWriter()), hasEncodedStatus, apReadHandler); + SuccessOrExit(err); + + err = eventManager.FetchEventsSince(*(eventReportIBs.GetWriter()), apReadHandler->GetEventPathList(), eventMin, eventCount, apReadHandler->GetSubjectDescriptor()); if ((err == CHIP_END_OF_TLV) || (err == CHIP_ERROR_TLV_UNDERRUN) || (err == CHIP_NO_ERROR)) @@ -375,12 +421,12 @@ CHIP_ERROR Engine::BuildSingleReportDataEventReports(ReportDataMessage::Builder exit: if (apHasEncodedData != nullptr) { - *apHasEncodedData = !(eventCount == 0 || eventClean); + *apHasEncodedData = hasEncodedStatus || (eventCount != 0); } // Maybe encoding the attributes has already used up all space. if ((err == CHIP_NO_ERROR || err == CHIP_ERROR_NO_MEMORY || err == CHIP_ERROR_BUFFER_TOO_SMALL) && - (eventCount == 0 || eventClean)) + !(hasEncodedStatus || (eventCount != 0))) { aReportDataBuilder.Rollback(backup); aReportDataBuilder.ResetError(); @@ -515,15 +561,8 @@ CHIP_ERROR Engine::BuildAndSendSingleReportData(ReadHandler * apReadHandler) mCurReadHandlerIdx, hasMoreChunks ? "more messages" : "no more messages"); exit: - if (err != CHIP_NO_ERROR) - { - // - // WillSendMessage() was called on this EC well before it got here (since there was an intention to generate reports, which - // occurs asynchronously. Consequently, if any error occurs, it's on us to close down the exchange. - // - apReadHandler->Abort(); - } - else if ((apReadHandler->IsType(ReadHandler::InteractionType::Read) && !hasMoreChunks) || needCloseReadHandler) + if (err != CHIP_NO_ERROR || (apReadHandler->IsType(ReadHandler::InteractionType::Read) && !hasMoreChunks) || + needCloseReadHandler) { // // In the case of successful report generation and we're on the last chunk of a read, we don't expect diff --git a/src/app/reporting/Engine.h b/src/app/reporting/Engine.h index cb25b85d0b873b..620cecf0b70b15 100644 --- a/src/app/reporting/Engine.h +++ b/src/app/reporting/Engine.h @@ -154,6 +154,7 @@ class Engine AttributeReportIBs::Builder & aAttributeReportIBs, const ConcreteReadAttributePath & aClusterInfo, AttributeValueEncoder::AttributeEncodeState * apEncoderState); + CHIP_ERROR CheckAccessDeniedEventPaths(TLV::TLVWriter & aWriter, bool & aHasEncodedData, ReadHandler * apReadHandler); // If version match, it means don't send, if version mismatch, it means send. // If client sends the same path with multiple data versions, client will get the data back per the spec, because at least one diff --git a/src/app/server/AppDelegate.h b/src/app/server/AppDelegate.h index e722e1b41b8f00..49937c62d7168e 100644 --- a/src/app/server/AppDelegate.h +++ b/src/app/server/AppDelegate.h @@ -28,6 +28,13 @@ class AppDelegate virtual ~AppDelegate() {} virtual void OnCommissioningSessionStarted() {} virtual void OnCommissioningSessionStopped() {} + + /* + * This is called anytime a basic or enhanced commissioning window is opened. + * + * The type of the window can be retrieved by calling + * CommissioningWindowManager::CommissioningWindowStatus() + */ virtual void OnCommissioningWindowOpened() {} virtual void OnCommissioningWindowClosed() {} }; diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index 039bf7da5105d3..eaea53d90ec00d 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -195,7 +195,7 @@ CHIP_ERROR CommissioningWindowManager::OpenCommissioningWindow(Seconds16 commiss VerifyOrReturnError(commissioningTimeout <= MaxCommissioningTimeout() && commissioningTimeout >= MinCommissioningTimeout(), CHIP_ERROR_INVALID_ARGUMENT); auto & failSafeContext = Server::GetInstance().GetFailSafeContext(); - VerifyOrReturnError(!failSafeContext.IsFailSafeArmed(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(failSafeContext.IsFailSafeFullyDisarmed(), CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(Dnssd::ServiceAdvertiser::Instance().UpdateCommissionableInstanceName()); @@ -374,11 +374,6 @@ CHIP_ERROR CommissioningWindowManager::StartAdvertisement() } #endif // CONFIG_NETWORK_LAYER_BLE - if (mAppDelegate != nullptr) - { - mAppDelegate->OnCommissioningWindowOpened(); - } - if (mUseECM) { mWindowStatus = AdministratorCommissioning::CommissioningWindowStatus::kEnhancedWindowOpen; @@ -388,6 +383,11 @@ CHIP_ERROR CommissioningWindowManager::StartAdvertisement() mWindowStatus = AdministratorCommissioning::CommissioningWindowStatus::kBasicWindowOpen; } + if (mAppDelegate != nullptr) + { + mAppDelegate->OnCommissioningWindowOpened(); + } + // reset all advertising, switching to our new commissioning mode. app::DnssdServer::Instance().StartServer(); diff --git a/src/app/server/OnboardingCodesUtil.cpp b/src/app/server/OnboardingCodesUtil.cpp index 261db799345899..72d1a9d9306893 100644 --- a/src/app/server/OnboardingCodesUtil.cpp +++ b/src/app/server/OnboardingCodesUtil.cpp @@ -115,13 +115,15 @@ CHIP_ERROR GetPayloadContents(chip::PayloadContents & aPayload, chip::Rendezvous #endif } - err = GetCommissionableDataProvider()->GetSetupDiscriminator(aPayload.discriminator); + uint16_t discriminator = 0; + err = GetCommissionableDataProvider()->GetSetupDiscriminator(discriminator); if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "GetCommissionableDataProvider()->GetSetupDiscriminator() failed: %" CHIP_ERROR_FORMAT, err.Format()); return err; } + aPayload.discriminator.SetLongValue(discriminator); err = chip::DeviceLayer::GetDeviceInstanceInfoProvider()->GetVendorId(aPayload.vendorID); if (err != CHIP_NO_ERROR) diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 6e8799911c554b..15674b10b92b38 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -221,9 +221,6 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) app::DnssdServer::Instance().SetFabricTable(&mFabrics); app::DnssdServer::Instance().SetCommissioningModeProvider(&mCommissioningWindowManager); - err = chip::app::InteractionModelEngine::GetInstance()->Init(&mExchangeMgr, &GetFabricTable()); - SuccessOrExit(err); - chip::Dnssd::Resolver::Instance().Init(DeviceLayer::UDPEndPointManager()); #if CHIP_CONFIG_ENABLE_SERVER_IM_EVENT @@ -307,6 +304,9 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) mCertificateValidityPolicy, mGroupsProvider); SuccessOrExit(err); + err = chip::app::InteractionModelEngine::GetInstance()->Init(&mExchangeMgr, &GetFabricTable(), &mCASESessionManager); + SuccessOrExit(err); + // This code is necessary to restart listening to existing groups after a reboot // Each manufacturer needs to validate that they can rejoin groups by placing this code at the appropriate location for them // diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index fd8d1571623cf6..7d57e72ebb8667 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -26,12 +26,14 @@ static_library("helpers") { sources = [ "AppTestContext.cpp", "AppTestContext.h", + "integration/RequiredPrivilegeStubs.cpp", ] cflags = [ "-Wconversion" ] deps = [ "${chip_root}/src/access", + "${chip_root}/src/app", "${chip_root}/src/lib/support", "${chip_root}/src/messaging/tests:helpers", "${chip_root}/src/transport/raw/tests:helpers", @@ -69,6 +71,7 @@ chip_test_suite("tests") { output_name = "libAppTests" test_sources = [ + "TestAclEvent.cpp", "TestAttributePathExpandIterator.cpp", "TestAttributeValueDecoder.cpp", "TestAttributeValueEncoder.cpp", diff --git a/src/app/tests/TestAclEvent.cpp b/src/app/tests/TestAclEvent.cpp new file mode 100644 index 00000000000000..b67ca621c7e44f --- /dev/null +++ b/src/app/tests/TestAclEvent.cpp @@ -0,0 +1,405 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file implements unit tests for CHIP Interaction Model Read Interaction + * + */ + +#include "lib/support/CHIPMem.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace { +using namespace chip; +using namespace chip::Access; + +uint8_t gDebugEventBuffer[128]; +uint8_t gInfoEventBuffer[128]; +uint8_t gCritEventBuffer[128]; +chip::app::CircularEventBuffer gCircularEventBuffer[3]; +chip::ClusterId kTestClusterId1 = 6; +chip::ClusterId kTestClusterId2 = 7; +chip::EndpointId kTestEndpointId = 1; +chip::EventId kTestEventIdDebug = 1; +chip::EventId kTestEventIdCritical = 2; +chip::TLV::Tag kTestEventTag = chip::TLV::ContextTag(1); + +class TestAccessControlDelegate : public AccessControl::Delegate +{ +public: + // Check + CHIP_ERROR Check(const SubjectDescriptor & subjectDescriptor, const chip::Access::RequestPath & requestPath, + Privilege requestPrivilege) override + { + if (requestPath.cluster == kTestClusterId1) + { + return CHIP_ERROR_ACCESS_DENIED; + } + return CHIP_NO_ERROR; + } +}; + +AccessControl::Delegate * GetTestAccessControlDelegate() +{ + static TestAccessControlDelegate accessControlDelegate; + return &accessControlDelegate; +} + +class TestDeviceTypeResolver : public AccessControl::DeviceTypeResolver +{ +public: + bool IsDeviceTypeOnEndpoint(DeviceTypeId deviceType, EndpointId endpoint) override { return false; } +} gDeviceTypeResolver; + +class TestContext : public chip::Test::AppContext +{ +public: + static int Initialize(void * context) + { + if (AppContext::Initialize(context) != SUCCESS) + return FAILURE; + + auto * ctx = static_cast(context); + + if (ctx->mEventCounter.Init(0) != CHIP_NO_ERROR) + { + return FAILURE; + } + + chip::app::LogStorageResources logStorageResources[] = { + { &gDebugEventBuffer[0], sizeof(gDebugEventBuffer), chip::app::PriorityLevel::Debug }, + { &gInfoEventBuffer[0], sizeof(gInfoEventBuffer), chip::app::PriorityLevel::Info }, + { &gCritEventBuffer[0], sizeof(gCritEventBuffer), chip::app::PriorityLevel::Critical }, + }; + + chip::app::EventManagement::CreateEventManagement(&ctx->GetExchangeManager(), ArraySize(logStorageResources), + gCircularEventBuffer, logStorageResources, &ctx->mEventCounter); + Access::GetAccessControl().Finish(); + Access::GetAccessControl().Init(GetTestAccessControlDelegate(), gDeviceTypeResolver); + return SUCCESS; + } + + static int Finalize(void * context) + { + chip::app::EventManagement::DestroyEventManagement(); + + if (AppContext::Finalize(context) != SUCCESS) + return FAILURE; + + return SUCCESS; + } + +private: + chip::MonotonicallyIncreasingCounter mEventCounter; +}; + +class TestEventGenerator : public chip::app::EventLoggingDelegate +{ +public: + CHIP_ERROR WriteEvent(chip::TLV::TLVWriter & aWriter) + { + chip::TLV::TLVType dataContainerType; + ReturnErrorOnFailure(aWriter.StartContainer(chip::TLV::ContextTag(chip::to_underlying(chip::app::EventDataIB::Tag::kData)), + chip::TLV::kTLVType_Structure, dataContainerType)); + ReturnErrorOnFailure(aWriter.Put(kTestEventTag, mStatus)); + return aWriter.EndContainer(dataContainerType); + } + + void SetStatus(int32_t aStatus) { mStatus = aStatus; } + +private: + int32_t mStatus; +}; + +void GenerateEvents(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + chip::EventNumber eid1, eid2; + chip::app::EventOptions options1; + options1.mPath = { kTestEndpointId, kTestClusterId1, kTestEventIdDebug }; + options1.mPriority = chip::app::PriorityLevel::Info; + + chip::app::EventOptions options2; + options2.mPath = { kTestEndpointId, kTestClusterId2, kTestEventIdCritical }; + options2.mPriority = chip::app::PriorityLevel::Critical; + TestEventGenerator testEventGenerator; + chip::app::EventManagement & logMgmt = chip::app::EventManagement::GetInstance(); + + ChipLogDetail(DataManagement, "Generating Events"); + testEventGenerator.SetStatus(0); + err = logMgmt.LogEvent(&testEventGenerator, options1, eid1); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + testEventGenerator.SetStatus(1); + err = logMgmt.LogEvent(&testEventGenerator, options2, eid2); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); +} + +class MockInteractionModelApp : public chip::app::ReadClient::Callback +{ +public: + void OnEventData(const chip::app::EventHeader & aEventHeader, chip::TLV::TLVReader * apData, + const chip::app::StatusIB * apStatus) override + { + ++mNumDataElementIndex; + mGotEventResponse = true; + if (apStatus != nullptr && !apStatus->IsSuccess()) + { + mNumReadEventFailureStatusReceived++; + mLastStatusReceived = *apStatus; + } + else + { + mLastStatusReceived = chip::app::StatusIB(); + } + } + + void OnError(CHIP_ERROR aError) override + { + mError = aError; + mReadError = true; + } + + void OnDone(chip::app::ReadClient *) override {} + + void OnDeallocatePaths(chip::app::ReadPrepareParams && aReadPrepareParams) override + { + if (aReadPrepareParams.mpEventPathParamsList != nullptr) + { + delete[] aReadPrepareParams.mpEventPathParamsList; + } + } + + int mNumDataElementIndex = 0; + bool mGotEventResponse = false; + int mNumReadEventFailureStatusReceived = 0; + int mNumAttributeResponse = 0; + bool mGotReport = false; + bool mReadError = false; + chip::app::ReadHandler * mpReadHandler = nullptr; + chip::app::StatusIB mLastStatusReceived; + CHIP_ERROR mError = CHIP_NO_ERROR; + std::vector mReceivedAttributePaths; +}; + +} // namespace + +namespace chip { +namespace app { +class TestAclEvent +{ +public: + static void TestReadRoundtripWithEventStatusIBInEventReport(nlTestSuite * apSuite, void * apContext); +}; + +void TestAclEvent::TestReadRoundtripWithEventStatusIBInEventReport(nlTestSuite * apSuite, void * apContext) +{ + TestContext & ctx = *static_cast(apContext); + CHIP_ERROR err = CHIP_NO_ERROR; + + Messaging::ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); + // Shouldn't have anything in the retransmit table when starting the test. + NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); + + GenerateEvents(apSuite, apContext); + + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + // A custom AccessControl::Delegate has been installed that grants privilege to any cluster except the test cluster. + // When reading events with concrete paths without enough privilege, we will get a EventStatusIB + { + chip::app::EventPathParams eventPathParams[1]; + eventPathParams[0].mEndpointId = kTestEndpointId; + eventPathParams[0].mClusterId = kTestClusterId1; + eventPathParams[0].mEventId = kTestEventIdDebug; + + ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); + readPrepareParams.mpEventPathParamsList = eventPathParams; + readPrepareParams.mEventPathParamsListSize = 1; + readPrepareParams.mEventNumber.SetValue(1); + + MockInteractionModelApp delegate; + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + + app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, + chip::app::ReadClient::InteractionType::Read); + + err = readClient.SendRequest(readPrepareParams); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); + NL_TEST_ASSERT(apSuite, delegate.mNumReadEventFailureStatusReceived == 1); + NL_TEST_ASSERT(apSuite, delegate.mLastStatusReceived.mStatus == Protocols::InteractionModel::Status::UnsupportedAccess); + NL_TEST_ASSERT(apSuite, !delegate.mReadError); + } + + GenerateEvents(apSuite, apContext); + + // When reading events with withcard paths without enough privilege for reading all events, we will exclude all events without + // enough priviledge when generating the report. + { + chip::app::EventPathParams eventPathParams[1]; + eventPathParams[0].mEndpointId = kTestEndpointId; + eventPathParams[0].mClusterId = kTestClusterId1; + + ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); + readPrepareParams.mpEventPathParamsList = eventPathParams; + readPrepareParams.mEventPathParamsListSize = 1; + readPrepareParams.mEventNumber.SetValue(1); + + MockInteractionModelApp delegate; + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + + app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, + chip::app::ReadClient::InteractionType::Read); + + err = readClient.SendRequest(readPrepareParams); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + NL_TEST_ASSERT(apSuite, delegate.mNumReadEventFailureStatusReceived == 0); + NL_TEST_ASSERT(apSuite, !delegate.mReadError); + } + + GenerateEvents(apSuite, apContext); + + // When reading events with withcard paths where the partial don't have enough privilege, we will exclude those partial + // when generating the report. + { + chip::app::EventPathParams eventPathParams[1]; + eventPathParams[0].mEndpointId = kTestEndpointId; + + ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); + readPrepareParams.mpEventPathParamsList = eventPathParams; + readPrepareParams.mEventPathParamsListSize = 1; + readPrepareParams.mEventNumber.SetValue(1); + + MockInteractionModelApp delegate; + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + + app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, + chip::app::ReadClient::InteractionType::Read); + + err = readClient.SendRequest(readPrepareParams); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); + NL_TEST_ASSERT(apSuite, delegate.mNumReadEventFailureStatusReceived == 0); + NL_TEST_ASSERT(apSuite, !delegate.mReadError); + } + + GenerateEvents(apSuite, apContext); + + // When reading events with two concrete paths where one has enough priviledge, another don't have , we will get a EventStatusIB + // and eventDataIB + { + chip::app::EventPathParams eventPathParams[2]; + eventPathParams[0].mEndpointId = kTestEndpointId; + eventPathParams[0].mClusterId = kTestClusterId1; + eventPathParams[0].mEventId = kTestEventIdDebug; + eventPathParams[1].mEndpointId = kTestEndpointId; + eventPathParams[1].mClusterId = kTestClusterId2; + eventPathParams[1].mEventId = kTestEventIdCritical; + + ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); + readPrepareParams.mpEventPathParamsList = eventPathParams; + readPrepareParams.mEventPathParamsListSize = 1; + readPrepareParams.mEventNumber.SetValue(1); + + MockInteractionModelApp delegate; + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + + app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, + chip::app::ReadClient::InteractionType::Read); + + err = readClient.SendRequest(readPrepareParams); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); + NL_TEST_ASSERT(apSuite, delegate.mNumReadEventFailureStatusReceived == 1); + NL_TEST_ASSERT(apSuite, !delegate.mReadError); + } + NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadClients() == 0); + engine->Shutdown(); + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +} // namespace app +} // namespace chip + +namespace { + +/** + * Test Suite. It lists all the test functions. + */ + +// clang-format off +const nlTest sTests[] = +{ + NL_TEST_DEF("TestReadRoundtripWithEventStatusIBInEventReport", chip::app::TestAclEvent::TestReadRoundtripWithEventStatusIBInEventReport), + NL_TEST_SENTINEL() +}; +// clang-format on + +// clang-format off +nlTestSuite sSuite = +{ + "TestAclEvent", + &sTests[0], + TestContext::Initialize, + TestContext::Finalize +}; +// clang-format on + +} // namespace + +int TestAclEvent() +{ + return chip::ExecuteTestsWithContext(&sSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestAclEvent) diff --git a/src/app/tests/TestBuilderParser.cpp b/src/app/tests/TestBuilderParser.cpp index 74ff9af2a0eb5e..314353e8b70029 100644 --- a/src/app/tests/TestBuilderParser.cpp +++ b/src/app/tests/TestBuilderParser.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include +#include #include #include #include diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index 6b7a089104229c..41245dca9be0a5 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -24,7 +24,7 @@ #include -#include +#include #include #include #include @@ -452,8 +452,8 @@ void TestCommandInteraction::TestCommandHandlerWithWrongState(nlTestSuite * apSu NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); - err = commandHandler.SendCommandResponse(); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); + err = commandHandler.SendCommandResponse(); NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_INCORRECT_STATE); } @@ -488,7 +488,7 @@ void TestCommandInteraction::TestCommandHandlerWithSendEmptyCommand(nlTestSuite System::PacketBufferHandle commandDatabuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); err = commandHandler.PrepareCommand(path); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -521,7 +521,7 @@ void TestCommandInteraction::ValidateCommandHandlerWithSendCommand(nlTestSuite * System::PacketBufferHandle commandPacket; TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); AddInvokeResponseData(apSuite, apContext, &commandHandler, aNeedStatusCode); err = commandHandler.Finalize(commandPacket); @@ -581,7 +581,7 @@ void TestCommandInteraction::TestCommandHandlerCommandDataEncoding(nlTestSuite * System::PacketBufferHandle commandPacket; TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); auto path = MakeTestCommandPath(); @@ -608,7 +608,7 @@ void TestCommandInteraction::TestCommandHandlerCommandEncodeFailure(nlTestSuite System::PacketBufferHandle commandPacket; TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); auto path = MakeTestCommandPath(); @@ -635,7 +635,7 @@ void TestCommandInteraction::TestCommandHandlerCommandEncodeExternalFailure(nlTe System::PacketBufferHandle commandPacket; TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); auto path = MakeTestCommandPath(); @@ -672,7 +672,7 @@ void TestCommandInteraction::TestCommandHandlerWithProcessReceivedMsg(nlTestSuit System::PacketBufferHandle commandDatabuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); GenerateInvokeRequest(apSuite, apContext, commandDatabuf, /* aIsTimedRequest = */ false, kTestCommandIdWithData); err = commandHandler.ProcessInvokeRequest(std::move(commandDatabuf), false); @@ -711,7 +711,7 @@ void TestCommandInteraction::TestCommandHandlerWithProcessReceivedEmptyDataMsg(n System::PacketBufferHandle commandDatabuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); chip::isCommandDispatched = false; GenerateInvokeRequest(apSuite, apContext, commandDatabuf, messageIsTimed, kTestCommandIdNoData); diff --git a/src/app/tests/TestMessageDef.cpp b/src/app/tests/TestMessageDef.cpp index fbd40af24d4ee1..fdae70499b5c8d 100644 --- a/src/app/tests/TestMessageDef.cpp +++ b/src/app/tests/TestMessageDef.cpp @@ -22,7 +22,7 @@ * */ -#include +#include #include #include #include diff --git a/src/app/tests/TestPendingNotificationMap.cpp b/src/app/tests/TestPendingNotificationMap.cpp index 621f8ad1c84f0a..271b427f31013a 100644 --- a/src/app/tests/TestPendingNotificationMap.cpp +++ b/src/app/tests/TestPendingNotificationMap.cpp @@ -53,9 +53,8 @@ void TestEmptyMap(nlTestSuite * aSuite, void * aContext) { PendingNotificationMap pendingMap; NL_TEST_ASSERT(aSuite, pendingMap.begin() == pendingMap.end()); - FabricIndex fabricIndex; - NodeId node; - NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(&fabricIndex, &node) == CHIP_ERROR_NOT_FOUND); + chip::ScopedNodeId peer; + NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(peer) == CHIP_ERROR_NOT_FOUND); } void TestAddRemove(nlTestSuite * aSuite, void * aContext) @@ -75,7 +74,7 @@ void TestAddRemove(nlTestSuite * aSuite, void * aContext) ++iter; } NL_TEST_ASSERT(aSuite, iter == pendingMap.end()); - pendingMap.RemoveAllEntriesForNode(0, 0); + pendingMap.RemoveAllEntriesForNode(chip::ScopedNodeId()); uint8_t expectedEntryIndecies[] = { 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }; iter = pendingMap.begin(); for (size_t i = 0; i < sizeof(expectedEntryIndecies); i++) @@ -109,19 +108,18 @@ void TestLRUEntry(nlTestSuite * aSuite, void * aContext) pendingMap.AddPendingNotification(7, nullptr); pendingMap.AddPendingNotification(11, nullptr); - FabricIndex fabricIndex; - NodeId node; + chip::ScopedNodeId node; - NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(&fabricIndex, &node) == CHIP_NO_ERROR); - NL_TEST_ASSERT(aSuite, fabricIndex == 0 && node == 1); + NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(node) == CHIP_NO_ERROR); + NL_TEST_ASSERT(aSuite, node.GetFabricIndex() == 0 && node.GetNodeId() == 1); pendingMap.RemoveEntry(1); - NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(&fabricIndex, &node) == CHIP_NO_ERROR); - NL_TEST_ASSERT(aSuite, fabricIndex == 0 && node == 0); + NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(node) == CHIP_NO_ERROR); + NL_TEST_ASSERT(aSuite, node.GetFabricIndex() == 0 && node.GetNodeId() == 0); pendingMap.RemoveAllEntriesForFabric(0); - NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(&fabricIndex, &node) == CHIP_NO_ERROR); - NL_TEST_ASSERT(aSuite, fabricIndex == 1 && node == 1); + NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(node) == CHIP_NO_ERROR); + NL_TEST_ASSERT(aSuite, node.GetFabricIndex() == 1 && node.GetNodeId() == 1); } } // namespace diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 4173fc2d99adc9..bc349cb6d9135a 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -23,6 +23,7 @@ */ #include "lib/support/CHIPMem.h" +#include #include #include #include @@ -41,9 +42,8 @@ #include #include #include -#include - #include +#include #include @@ -299,7 +299,6 @@ class TestReadInteraction static void TestReadRoundtripWithNoMatchPathDataVersionFilter(nlTestSuite * apSuite, void * apContext); static void TestReadRoundtripWithMultiSamePathDifferentDataVersionFilter(nlTestSuite * apSuite, void * apContext); static void TestReadRoundtripWithSameDifferentPathsDataVersionFilter(nlTestSuite * apSuite, void * apContext); - static void TestReadRoundtripWithEventStatusIBInEventReport(nlTestSuite * apSuite, void * apContext); static void TestReadWildcard(nlTestSuite * apSuite, void * apContext); static void TestReadChunking(nlTestSuite * apSuite, void * apContext); static void TestSetDirtyBetweenChunks(nlTestSuite * apSuite, void * apContext); @@ -1050,84 +1049,6 @@ void TestReadInteraction::TestReadRoundtripWithSameDifferentPathsDataVersionFilt NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } -void TestReadInteraction::TestReadRoundtripWithEventStatusIBInEventReport(nlTestSuite * apSuite, void * apContext) -{ - TestContext & ctx = *static_cast(apContext); - CHIP_ERROR err = CHIP_NO_ERROR; - - Messaging::ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); - // Shouldn't have anything in the retransmit table when starting the test. - NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); - - GenerateEvents(apSuite, apContext); - - auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - - // When reading events with concrete paths without enough privilege, we will get a EventStatusIB - { - chip::app::EventPathParams eventPathParams[1]; - eventPathParams[0].mEndpointId = kTestEndpointId; - eventPathParams[0].mClusterId = kTestClusterId; - eventPathParams[0].mEventId = kTestEventIdDebug; - - ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); - readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mEventPathParamsListSize = 1; - readPrepareParams.mEventNumber.SetValue(1); - - MockInteractionModelApp delegate; - NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); - - app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, - chip::app::ReadClient::InteractionType::Read); - - err = readClient.SendRequest(readPrepareParams); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - - ctx.DrainAndServiceIO(); - - NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); - NL_TEST_ASSERT(apSuite, delegate.mNumReadEventFailureStatusReceived > 0); - NL_TEST_ASSERT(apSuite, delegate.mLastStatusReceived.mStatus == Protocols::InteractionModel::Status::UnsupportedAccess); - NL_TEST_ASSERT(apSuite, !delegate.mReadError); - } - - GenerateEvents(apSuite, apContext); - - // When reading events with withcard paths without enough privilege for reading one or more event, we will exclude the events - // when generating the report. - { - chip::app::EventPathParams eventPathParams[1]; - eventPathParams[0].mEndpointId = kTestEndpointId; - eventPathParams[0].mClusterId = kTestClusterId; - - ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); - readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mEventPathParamsListSize = 1; - readPrepareParams.mEventNumber.SetValue(1); - - MockInteractionModelApp delegate; - NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); - - app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, - chip::app::ReadClient::InteractionType::Read); - - err = readClient.SendRequest(readPrepareParams); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - - ctx.DrainAndServiceIO(); - NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); - NL_TEST_ASSERT(apSuite, delegate.mNumReadEventFailureStatusReceived == 0); - NL_TEST_ASSERT(apSuite, !delegate.mReadError); - } - - NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadClients() == 0); - engine->Shutdown(); - NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); -} - void TestReadInteraction::TestReadWildcard(nlTestSuite * apSuite, void * apContext) { TestContext & ctx = *static_cast(apContext); @@ -2045,9 +1966,6 @@ void TestReadInteraction::TestSubscribeEarlyShutdown(nlTestSuite * apSuite, void NL_TEST_ASSERT(apSuite, engine.ActiveHandlerAt(0) != nullptr); delegate.mpReadHandler = engine.ActiveHandlerAt(0); NL_TEST_ASSERT(apSuite, delegate.mpReadHandler != nullptr); - - // Shutdown the subscription - readClient.Abort(); } // Cleanup @@ -2739,9 +2657,6 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadRoundtripWithNoMatchPathDataVersionFilter", chip::app::TestReadInteraction::TestReadRoundtripWithNoMatchPathDataVersionFilter), NL_TEST_DEF("TestReadRoundtripWithMultiSamePathDifferentDataVersionFilter", chip::app::TestReadInteraction::TestReadRoundtripWithMultiSamePathDifferentDataVersionFilter), NL_TEST_DEF("TestReadRoundtripWithSameDifferentPathsDataVersionFilter", chip::app::TestReadInteraction::TestReadRoundtripWithSameDifferentPathsDataVersionFilter), - // TODO(#10253): In unit tests, the access control delegate will always pass, in this case, we will never get a StatusIB for - // UnsupportedAccess status code, the test below can be re-enabled after we have a better access control function in unit tests. - // NL_TEST_DEF("TestReadRoundtripWithEventStatusIBInEventReport", chip::app::TestReadInteraction::TestReadRoundtripWithEventStatusIBInEventReport), NL_TEST_DEF("TestReadWildcard", chip::app::TestReadInteraction::TestReadWildcard), NL_TEST_DEF("TestReadChunking", chip::app::TestReadInteraction::TestReadChunking), NL_TEST_DEF("TestSetDirtyBetweenChunks", chip::app::TestReadInteraction::TestSetDirtyBetweenChunks), diff --git a/src/app/tests/TestStatusIB.cpp b/src/app/tests/TestStatusIB.cpp index 55a1919a583aac..0132c1ad589666 100644 --- a/src/app/tests/TestStatusIB.cpp +++ b/src/app/tests/TestStatusIB.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include +#include #include #include #include diff --git a/src/app/tests/TestStatusResponseMessage.cpp b/src/app/tests/TestStatusResponseMessage.cpp index 425ba316f56f13..ac48f3732b7dac 100644 --- a/src/app/tests/TestStatusResponseMessage.cpp +++ b/src/app/tests/TestStatusResponseMessage.cpp @@ -22,7 +22,7 @@ * */ -#include +#include #include #include #include diff --git a/src/app/tests/TestTimedHandler.cpp b/src/app/tests/TestTimedHandler.cpp index e460d10d4a4dfe..6c081e27428a94 100644 --- a/src/app/tests/TestTimedHandler.cpp +++ b/src/app/tests/TestTimedHandler.cpp @@ -68,7 +68,12 @@ class TestExchangeDelegate : public Messaging::ExchangeDelegate mLastMessageWasStatus = aPayloadHeader.HasMessageType(MsgType::StatusResponse); if (mLastMessageWasStatus) { - mError = StatusResponse::ProcessStatusResponse(std::move(aPayload)); + CHIP_ERROR statusError = CHIP_NO_ERROR; + mError = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError); + if (mError == CHIP_NO_ERROR) + { + mError = statusError; + } } if (mKeepExchangeOpen) { diff --git a/src/app/tests/TestWriteInteraction.cpp b/src/app/tests/TestWriteInteraction.cpp index 9836c8933cd348..f1af80cef330b7 100644 --- a/src/app/tests/TestWriteInteraction.cpp +++ b/src/app/tests/TestWriteInteraction.cpp @@ -306,15 +306,6 @@ void TestWriteInteraction::TestWriteHandler(nlTestSuite * apSuite, void * apCont } else { - // - // In a normal execution flow, the exchange manager would have closed out the exchange after the - // message dispatch call path had unwound. In this test however, we've manually allocated the exchange - // ourselves (as opposed to the exchange manager), so we need to take ownership of closing out the exchange. - // - // Note that this doesn't happen in the success case above, since that results in a call to send a message through - // the exchange context, which results in the exchange manager correctly closing it. - // - exchange->Close(); NL_TEST_ASSERT(apSuite, status == Status::UnsupportedAccess); } diff --git a/src/app/tests/integration/BUILD.gn b/src/app/tests/integration/BUILD.gn index 77eb99bcaa3f27..05e06d897ca690 100644 --- a/src/app/tests/integration/BUILD.gn +++ b/src/app/tests/integration/BUILD.gn @@ -21,6 +21,7 @@ assert(chip_build_tools) executable("chip-im-initiator") { sources = [ + "RequiredPrivilegeStubs.cpp", "chip_im_initiator.cpp", "common.cpp", ] @@ -41,6 +42,7 @@ executable("chip-im-initiator") { executable("chip-im-responder") { sources = [ "MockEvents.cpp", + "RequiredPrivilegeStubs.cpp", "chip_im_responder.cpp", "common.cpp", ] diff --git a/src/app/tests/integration/RequiredPrivilegeStubs.cpp b/src/app/tests/integration/RequiredPrivilegeStubs.cpp new file mode 100644 index 00000000000000..17dbc27490520c --- /dev/null +++ b/src/app/tests/integration/RequiredPrivilegeStubs.cpp @@ -0,0 +1,38 @@ +/* + * + * 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 + +int MatterGetAccessPrivilegeForReadAttribute(chip::ClusterId cluster, chip::AttributeId attribute) +{ + return kMatterAccessPrivilegeAdminister; +} + +int MatterGetAccessPrivilegeForWriteAttribute(chip::ClusterId cluster, chip::AttributeId attribute) +{ + return kMatterAccessPrivilegeAdminister; +} + +int MatterGetAccessPrivilegeForInvokeCommand(chip::ClusterId cluster, chip::CommandId command) +{ + return kMatterAccessPrivilegeAdminister; +} + +int MatterGetAccessPrivilegeForReadEvent(chip::ClusterId cluster, chip::EventId event) +{ + return kMatterAccessPrivilegeAdminister; +} diff --git a/src/app/tests/integration/chip_im_initiator.cpp b/src/app/tests/integration/chip_im_initiator.cpp index b83c598bce4b14..4636e14bc3fc0f 100644 --- a/src/app/tests/integration/chip_im_initiator.cpp +++ b/src/app/tests/integration/chip_im_initiator.cpp @@ -146,7 +146,6 @@ class MockInteractionModelApp : public ::chip::app::CommandSender::Callback, } } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override {} void OnAttributeData(const chip::app::ConcreteDataAttributePath & aPath, chip::TLV::TLVReader * aData, const chip::app::StatusIB & status) override {} diff --git a/src/app/tests/suites/OTA_SuccessfulTransfer.yaml b/src/app/tests/suites/OTA_SuccessfulTransfer.yaml index f15d5ded5013f4..4e186d4fd5b815 100644 --- a/src/app/tests/suites/OTA_SuccessfulTransfer.yaml +++ b/src/app/tests/suites/OTA_SuccessfulTransfer.yaml @@ -17,34 +17,34 @@ name: Test OTA Software Update Successful Transfer config: endpoint: 0 requestorNodeId: - type: NODE_ID + type: node_id defaultValue: 0x12344321 providerNodeId: - type: NODE_ID + type: node_id defaultValue: 0xC0FFEE providerPayload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0IX4122-.548G00" # This value needs to be generated providerDiscriminator: - type: INT16U + type: int16u defaultValue: 50 providerPort: - type: INT16U + type: int16u defaultValue: 5560 providerKvs: - type: CHAR_STRING + type: char_string defaultValue: "/tmp/chip_kvs_provider" otaImageFilePath: - type: CHAR_STRING + type: char_string defaultValue: "/tmp/otaImage" rawImageFilePath: - type: CHAR_STRING + type: char_string defaultValue: "/tmp/rawImage" rawImageContent: - type: CHAR_STRING + type: char_string defaultValue: "Have a hootenanny!" downloadImageFilePath: - type: CHAR_STRING + type: char_string defaultValue: "/tmp/downloadedImage" tests: diff --git a/src/app/tests/suites/TestClusterMultiFabric.yaml b/src/app/tests/suites/TestClusterMultiFabric.yaml index 6c934778872783..6a1bef07b816b1 100644 --- a/src/app/tests/suites/TestClusterMultiFabric.yaml +++ b/src/app/tests/suites/TestClusterMultiFabric.yaml @@ -18,10 +18,10 @@ config: nodeId: 0x12344321 endpoint: 1 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: diff --git a/src/app/tests/suites/TestConfigVariables.yaml b/src/app/tests/suites/TestConfigVariables.yaml index 5889887896fd69..eff8a39aaa106c 100644 --- a/src/app/tests/suites/TestConfigVariables.yaml +++ b/src/app/tests/suites/TestConfigVariables.yaml @@ -19,10 +19,10 @@ config: cluster: "Test Cluster" endpoint: 1 arg1: - type: INT8U + type: int8u defaultValue: 5 returnValueWithArg1: - type: INT8U + type: int8u defaultValue: 25 tests: diff --git a/src/app/tests/suites/TestDiscovery.yaml b/src/app/tests/suites/TestDiscovery.yaml index b1d889d9406eff..febff676e13b64 100644 --- a/src/app/tests/suites/TestDiscovery.yaml +++ b/src/app/tests/suites/TestDiscovery.yaml @@ -18,16 +18,16 @@ config: nodeId: 0x12344321 endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 vendorId: - type: INT16U + type: int16u defaultValue: 65521 productId: - type: INT16U + type: int16u defaultValue: 32769 deviceType: - type: INT16U + type: int16u defaultValue: 5 tests: diff --git a/src/app/tests/suites/TestFabricRemovalWhileSubscribed.yaml b/src/app/tests/suites/TestFabricRemovalWhileSubscribed.yaml index 5271f380749cf1..cdd8fded717805 100644 --- a/src/app/tests/suites/TestFabricRemovalWhileSubscribed.yaml +++ b/src/app/tests/suites/TestFabricRemovalWhileSubscribed.yaml @@ -21,10 +21,10 @@ config: cluster: "Operational Credentials" endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: @@ -42,7 +42,7 @@ tests: response: value: 1 constraints: - type: uint8 + type: int8u - label: "Read current fabric index" command: "readAttribute" @@ -50,7 +50,7 @@ tests: response: saveAs: ourFabricIndex constraints: - type: uint8 + type: int8u # 0 is not a valid value, but past that we have no idea what the # other side will claim here. minValue: 1 diff --git a/src/app/tests/suites/TestGeneralCommissioning.yaml b/src/app/tests/suites/TestGeneralCommissioning.yaml index 42c24b93b79ac8..dbd7072d3e8b39 100644 --- a/src/app/tests/suites/TestGeneralCommissioning.yaml +++ b/src/app/tests/suites/TestGeneralCommissioning.yaml @@ -19,10 +19,10 @@ config: cluster: "General Commissioning" endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: @@ -271,4 +271,4 @@ tests: attribute: "SupportsConcurrentConnection" response: constraints: - type: bool + type: boolean diff --git a/src/app/tests/suites/TestGroupMessaging.yaml b/src/app/tests/suites/TestGroupMessaging.yaml index 36ce37b69596ea..df7355429e8dba 100644 --- a/src/app/tests/suites/TestGroupMessaging.yaml +++ b/src/app/tests/suites/TestGroupMessaging.yaml @@ -23,13 +23,13 @@ config: cluster: "Basic" endpoint: 0 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0x43211234 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: diff --git a/src/app/tests/suites/TestLevelControlWithOnOffDependency.yaml b/src/app/tests/suites/TestLevelControlWithOnOffDependency.yaml new file mode 100644 index 00000000000000..6a3f63bd1ca9ee --- /dev/null +++ b/src/app/tests/suites/TestLevelControlWithOnOffDependency.yaml @@ -0,0 +1,249 @@ +# 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: Dependency with the On/Off cluster Verification (DUT as Server) + +config: + nodeId: 0x12344321 + cluster: "Level Control" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Sends a MoveToLevel command to set current level to min value" + command: "MoveToLevel" + arguments: + values: + - name: "level" + value: 1 + - name: "transitionTime" + value: 0 + - name: "optionsMask" + value: 1 + - name: "optionsOverride" + value: 1 + + - label: "Wait 100 ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: "Reads CurrentLevel attribute from DUT" + command: "readAttribute" + attribute: "current level" + response: + value: 1 + + - label: "Write OnOffTransitionTime attribute" + command: "writeAttribute" + attribute: "on off transition time" + arguments: + value: 0 + + - label: "Wait 100 ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: "Read OnOffTransitionTime attribute" + command: "readAttribute" + attribute: "on off transition time" + response: + value: 0 + + - label: "Write OnLevel attribute" + command: "writeAttribute" + attribute: "on level" + arguments: + value: 254 + + - label: "Wait 100 ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: "Read OnLevel attribute" + command: "readAttribute" + attribute: "on level" + response: + value: 254 + + - label: "Read MinValue attribute" + command: "readAttribute" + attribute: "min level" + response: + value: 1 + + - label: "Send On Command" + cluster: "On/Off" + command: "On" + + - label: "Check on/off attribute value is true after on command" + cluster: "On/Off" + command: "readAttribute" + attribute: "OnOff" + response: + value: 1 + + - label: "Wait OnOffTransitionTime" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: "If OnLevel is defined, check CurrentLevel is OnLevel value" + command: "readAttribute" + attribute: "current level" + response: + value: 254 + + - label: "Send Off Command" + cluster: "On/Off" + command: "Off" + + - label: "Check on/off attribute value is false after off command" + cluster: "On/Off" + command: "readAttribute" + attribute: "OnOff" + response: + value: 0 + + - label: "Wait OnOffTransitionTime" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 0 + + - label: "If OnLevel is defined, check CurrentLevel is min value" + command: "readAttribute" + attribute: "current level" + response: + value: 1 + + - label: "Sends a MoveToLevel command to set current level to a mid value" + command: "MoveToLevel" + arguments: + values: + - name: "level" + value: 127 + - name: "transitionTime" + value: 0 + - name: "optionsMask" + value: 1 + - name: "optionsOverride" + value: 1 + + - label: "Wait 100 ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: "Reads CurrentLevel attribute from DUT" + command: "readAttribute" + attribute: "current level" + response: + value: 127 + + - label: "Set OnLevel attribute to null" + command: "writeAttribute" + attribute: "on level" + arguments: + value: null + + - label: "Wait 100 ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: "Read OnLevel attribute" + command: "readAttribute" + attribute: "on level" + response: + value: null + + - label: "Send On Command" + cluster: "On/Off" + command: "On" + + - label: "Check on/off attribute value is true after on command" + cluster: "On/Off" + command: "readAttribute" + attribute: "OnOff" + response: + value: 1 + + - label: "Wait OnOffTransitionTime" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: "If OnLevel is not defined, check CurrentLevel is restored" + command: "readAttribute" + attribute: "current level" + response: + value: 127 + + - label: "Send Off Command" + cluster: "On/Off" + command: "Off" + + - label: "Check on/off attribute value is false after off command" + cluster: "On/Off" + command: "readAttribute" + attribute: "OnOff" + response: + value: 0 + + - label: "Wait OnOffTransitionTime" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 0 + + - label: "If OnLevel is not defined, check CurrentLevel is restored" + command: "readAttribute" + attribute: "current level" + response: + value: 127 diff --git a/src/app/tests/suites/TestModeSelectCluster.yaml b/src/app/tests/suites/TestModeSelectCluster.yaml index b8ec4e07177ebc..68f8317e16580f 100644 --- a/src/app/tests/suites/TestModeSelectCluster.yaml +++ b/src/app/tests/suites/TestModeSelectCluster.yaml @@ -58,9 +58,9 @@ tests: }, ] constraints: - - type: list - - minLength: 3 - - maxLength: 3 + type: list + minLength: 3 + maxLength: 3 - label: "Read CurrentMode" command: "readAttribute" diff --git a/src/app/tests/suites/TestMultiAdmin.yaml b/src/app/tests/suites/TestMultiAdmin.yaml index 9ae6519ffcab7b..ff45d1bbe1d985 100644 --- a/src/app/tests/suites/TestMultiAdmin.yaml +++ b/src/app/tests/suites/TestMultiAdmin.yaml @@ -17,20 +17,20 @@ name: Test Multi Admin config: nodeId: 0x12344321 nodeIdForDuplicateCommissioning: - type: NODE_ID + type: node_id defaultValue: 0x11 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE nodeId3: - type: NODE_ID + type: node_id defaultValue: 0xC00FEE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: diff --git a/src/app/tests/suites/TestOperationalCredentialsCluster.yaml b/src/app/tests/suites/TestOperationalCredentialsCluster.yaml index 12a0ee83a486b2..7bc03fb52a9b18 100644 --- a/src/app/tests/suites/TestOperationalCredentialsCluster.yaml +++ b/src/app/tests/suites/TestOperationalCredentialsCluster.yaml @@ -33,7 +33,7 @@ tests: attribute: "SupportedFabrics" response: constraints: - type: uint8 + type: int8u minValue: 4 - label: "Read number of commissioned fabrics" @@ -41,7 +41,7 @@ tests: attribute: "CommissionedFabrics" response: constraints: - type: uint8 + type: int8u minValue: 1 - label: "Read current fabric index" @@ -50,7 +50,7 @@ tests: response: saveAs: ourFabricIndex constraints: - type: uint8 + type: int8u # 0 is not a valid value, but past that we have no idea what the # other side will claim here. minValue: 1 diff --git a/src/app/tests/suites/TestSelfFabricRemoval.yaml b/src/app/tests/suites/TestSelfFabricRemoval.yaml index 4c7dfcf8ff22ab..9e2295fe09099f 100644 --- a/src/app/tests/suites/TestSelfFabricRemoval.yaml +++ b/src/app/tests/suites/TestSelfFabricRemoval.yaml @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint8 + type: int8u - label: "Read current fabric index" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: saveAs: ourFabricIndex constraints: - type: uint8 + type: int8u # 0 is not a valid value, but past that we have no idea what the # other side will claim here. minValue: 1 diff --git a/src/app/tests/suites/TestSystemCommands.yaml b/src/app/tests/suites/TestSystemCommands.yaml index d9df986451d7cc..f4ad90f14e42ac 100644 --- a/src/app/tests/suites/TestSystemCommands.yaml +++ b/src/app/tests/suites/TestSystemCommands.yaml @@ -19,7 +19,7 @@ config: cluster: "SystemCommands" endpoint: 0 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0IX4122-.548G00" # This value needs to be generated tests: diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index fa1b3bee48f8b8..46aa68b1025c50 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -608,38 +608,23 @@ PICS: id: DGSW.S.C00.Rsp # Thermostat cluster - - label: "Does the device implement the Heating feature" + - label: "Thermostat is capable of managing a heating device" id: TSTAT.S.F00 - - label: "Does the device implement the Cooling feature" + - label: "Thermostat is capable of managing a cooling device" id: TSTAT.S.F01 - - label: "Does the device implement the Occupancy feature" + - label: "Supports Occupied and Unoccupied setpoints" id: TSTAT.S.F02 - - label: "Does the device implement the Auto feature" - id: TSTAT.S.F05 - - - label: "Does the device implement the MinHeatSetpointLimit attribute" - id: A_MINHEATSETPOINTLIMIT - - - label: "Does the device implement the MaxHeatSetpointLimit attribute" - id: A_MAXHEATSETPOINTLIMIT - - - label: "Does the device implement the MinCoolSetpointLimit attribute" - id: A_MINCOOLSETPOINTLIMIT - - - label: "Does the device implement the MaxCoolSetpointLimit attribute" - id: A_MAXCOOLSETPOINTLIMIT - - - label: "Does the device implement the Tolerance attribute?" - id: A_TEMPERATURE_TOLERANCE + - label: "Supports a weekly schedule of setpoint transitions(Schedule)" + id: TSTAT.S.F03 - - label: "Does the device implement the OccupiedCoolingSetpoint attribute?" - id: A_OCCUPIEDCOOLINGSETPOINT + - label: "Supports configurable setback (or span)" + id: TSTAT.S.F04 - - label: "Does the device implement the OccupiedHeatingSetpoint attribute?" - id: A_OCCUPIEDHEATINGSETPOINT + - label: "Supports a System Mode of Auto" + id: TSTAT.S.F05 - label: "Does the device implement the LocalTemperature attribute?" id: TSTAT.S.A0000 @@ -819,24 +804,6 @@ PICS: - label: "Does the device implement the GetRelayStatusLog command?" id: TSTAT.S.C04.Rsp - - label: "Thermostat is capable of managing a heating device" - id: TSTAT.S.F00 - - - label: "Thermostat is capable of managing a cooling device" - id: TSTAT.S.F01 - - - label: "Supports Occupied and Unoccupied setpoints" - id: TSTAT.S.F02 - - - label: "Supports a weekly schedule of setpoint transitions" - id: TSTAT.S.F03 - - - label: "Supports configurable setback (or span)" - id: TSTAT.S.F04 - - - label: "Supports a System Mode of Auto" - id: TSTAT.S.F05 - #Client Commands - label: "Does the device implement sending the SetpointRaiseLower command?" id: TSTAT.C.C00.Tx @@ -1375,6 +1342,9 @@ PICS: id: LVL.S.M.VarRate #Groups Cluster + - label: "Does the DUT(Server) support Group Names feature?" + id: G.S.F00 + - label: "Does the DUT(Server) support NameSupport attribute?" id: G.S.A0000 @@ -1766,13 +1736,13 @@ PICS: id: CADMIN.AudioInterface #server - label: "Does the Device support Enhanced Commissioning Method (ECM)?" - id: CADMIN.S.C0000 + id: CADMIN.S.C00.Rsp - label: "Does the Device support Basic Commissioning Method (BCM)?" - id: CADMIN.S.C0001 + id: CADMIN.S.C01.Rsp - label: "Does the Device support revoking commissioning window?" - id: CADMIN.S.C0002 + id: CADMIN.S.C02.Rsp - label: "Does the Device implement receiving the RemoveFabric command?" id: OPCREDS.S.C0a.Rsp @@ -1788,13 +1758,13 @@ PICS: #client - label: "Does the Device support Enhanced Commissioning Method (ECM)?" - id: CADMIN.C.C0000 + id: CADMIN.C.C00.Tx - label: "Does the Device support Basic Commissioning Method (BCM)?" - id: CADMIN.C.C0001 + id: CADMIN.C.C01.Tx - label: "Does the Device support revoking commissioning window?" - id: CADMIN.C.C0002 + id: CADMIN.C.C02.Tx - label: "Does the Device implement receiving the RemoveFabric command?" id: OPCREDS.C.C0a.Tx @@ -1808,6 +1778,12 @@ PICS: - label: "Does the Device support WindowStatus attribute?" id: CADMIN.C.A0000 + - label: "Does the Device implement the Multi Fabric cluster as a server?" + id: CADMIN.S + + - label: "Does the Device implement the Multi Fabric cluster as a client?" + id: CADMIN.C + #User Label cluster - label: "Does the DUT Server support LabelList attribute?" id: ULABEL.S.A0000 @@ -1890,16 +1866,16 @@ PICS: - label: "Does the DUT support the Channel server cluster ChangeChannel command?" - id: CHANNEL.S.C0000 + id: CHANNEL.S.C00.Rsp - label: "Does the DUT support the Channel server cluster ChangeChannelByNumber command?" - id: CHANNEL.S.C0002 + id: CHANNEL.S.C02.Rsp - label: "Does the DUT support the Channel server cluster SkipChannel command?" - id: CHANNEL.S.C0003 + id: CHANNEL.S.C03.Rsp - label: "Does the DUT support the Media Playback server cluster Advanced Seek @@ -2056,18 +2032,9 @@ PICS: id: CHANNEL.S.A0002 - label: - "Does the DUT support the Channel server cluster ChangeChannel + "Does the DUT support the Channel server cluster ChangeChannelResponse command?" - id: CHANNEL.S.C0000 - - - label: - "Does the DUT support the Channel server cluster ChangeChannelByNumber - command?" - id: CHANNEL.S.C0002 - - - label: - "Does the DUT support the Channel server cluster SkipChannel command?" - id: CHANNEL.S.C0003 + id: CHANNEL.S.C01.Tx - label: "Does the DUT support the Media Playback server cluster Advanced Seek @@ -2116,103 +2083,90 @@ PICS: - label: "Does the DUT support the Media Playback server cluster Play command?" - id: MEDIAPLAYBACK.S.C0000 + id: MEDIAPLAYBACK.S.C00.Rsp - label: "Does the DUT support the Media Playback server cluster Pause command?" - id: MEDIAPLAYBACK.S.C0001 + id: MEDIAPLAYBACK.S.C01.Rsp - label: "Does the DUT support the Media Playback server cluster Stop command?" - id: MEDIAPLAYBACK.S.C0002 + id: MEDIAPLAYBACK.S.C02.Rsp - label: "Does the DUT support the Media Playback server cluster StartOver command?" - id: MEDIAPLAYBACK.S.C0003 + id: MEDIAPLAYBACK.S.C03.Rsp - label: "Does the DUT support the Media Playback server cluster Previous command?" - id: MEDIAPLAYBACK.S.C0004 + id: MEDIAPLAYBACK.S.C04.Rsp - label: "Does the DUT support the Media Playback server cluster Next command?" - id: MEDIAPLAYBACK.S.C0005 + id: MEDIAPLAYBACK.S.C05.Rsp - label: "Does the DUT support the Media Playback server cluster Rewind command?" - id: MEDIAPLAYBACK.S.C0006 + id: MEDIAPLAYBACK.S.C06.Rsp - label: "Does the DUT support the Media Playback server cluster FastForward command?" - id: MEDIAPLAYBACK.S.C0007 + id: MEDIAPLAYBACK.S.C07.Rsp - label: "Does the DUT support the Media Playback server cluster SkipForward command?" - id: MEDIAPLAYBACK.S.C0008 + id: MEDIAPLAYBACK.S.C08.Rsp - label: "Does the DUT support the Media Playback server cluster SkipBackward command?" - id: MEDIAPLAYBACK.S.C0009 + id: MEDIAPLAYBACK.S.C09.Rsp - label: "Does the DUT support the Media Playback server cluster Seek command?" - id: MEDIAPLAYBACK.S.C000B - - - label: - "Does the DUT support the Media Playback client cluster Play command?" - id: MEDIAPLAYBACK.C.C0000 - - - label: - "Does the DUT support the Media Playback client cluster Pause command?" - id: MEDIAPLAYBACK.C.C0001 - - - label: - "Does the DUT support the Media Playback client cluster Stop command?" - id: MEDIAPLAYBACK.C.C0002 + id: MEDIAPLAYBACK.S.C0B.Rsp - label: - "Does the DUT support the Media Playback client cluster StartOver - command?" - id: MEDIAPLAYBACK.C.C0003 + "Does the DUT support the Media Playback client cluster, Play command?" + id: MEDIAPLAYBACK.C.C00.Tx - label: - "Does the DUT support the Media Playback client cluster Previous + "Does the DUT support the Media Playback client cluster, Pause command?" - id: MEDIAPLAYBACK.C.C0004 + id: MEDIAPLAYBACK.C.C01.Tx - label: - "Does the DUT support the Media Playback client cluster Next command?" - id: MEDIAPLAYBACK.C.C0005 + "Does the DUT support the Media Playback client cluster, Stop command?" + id: MEDIAPLAYBACK.C.C02.Tx - label: - "Does the DUT support the Media Playback client cluster Rewind + "Does the DUT support the Media Playback client cluster, StartOver command?" - id: MEDIAPLAYBACK.C.C0006 + id: MEDIAPLAYBACK.C.C03.Tx - label: - "Does the DUT support the Media Playback client cluster FastForward + "Does the DUT support the Media Playback client cluster, Previous command?" - id: MEDIAPLAYBACK.C.C0007 + id: MEDIAPLAYBACK.C.C04.Tx - label: - "Does the DUT support the Media Playback client cluster SkipForward - command?" - id: MEDIAPLAYBACK.C.C0008 + "Does the DUT support the Media Playback client cluster, Next command?" + id: MEDIAPLAYBACK.C.C05.Tx - label: - "Does the DUT support the Media Playback client cluster SkipBackward + "Does the DUT support the Media Playback client cluster, SkipForward command?" - id: MEDIAPLAYBACK.C.C0009 + id: MEDIAPLAYBACK.C.C08.Tx - label: - "Does the DUT support the Media Playback client cluster Seek command?" - id: MEDIAPLAYBACK.C.C000B + "Does the DUT support the Media Playback client cluster, SkipBackward + command?" + id: MEDIAPLAYBACK.C.C09.Tx - label: "Does the DUT support the Audio Output server cluster OutputList @@ -2812,10 +2766,10 @@ PICS: id: MCORE.DD.CONTROLLER - label: "Does the DUT support Discovery Capability over IP Network?" - id: MCORE.DD.DT_IP + id: MCORE.DD.DISCOVERY_IP - label: "Does the DUT support Discovery Capability over SoftAP?" - id: MCORE.DD.DT_SOFTAP + id: MCORE.DD.DISCOVERY_SOFTAP - label: "Does the DUT support Standard Commissioning Flow?" id: MCORE.DD.STANDARD_COMM_FLOW @@ -2857,6 +2811,62 @@ PICS: - label: "Does the device support Wifi or Thread interfaces?" id: MCORE.DD.WIRELESS + - label: + "Does the device support TXT Key 'VP' (Vendor ID / Product ID) in it’s + DNS-SD TXT Records for Commissionable Node Discovery?" + id: MCORE.DD.TXT_KEY_VP + + - label: + "Does the device support TXT Key 'DT' (Device Type) in it’s DNS-SD TXT + Records for Commissionable Node Discovery?" + id: MCORE.DD.TXT_KEY_DT + + - label: "Does the Commissioner support Discovery Capability over BLE?" + id: MCORE.DD.DISCOVERY_BLE + + - label: "Does the device support discovery over Wi-Fi?" + id: MCORE.DD.WIFI + + - label: "Does the device have a vendor specific information element (IE)?" + id: MCORE.DD.IE + + - label: + "Does the device support TXT Key 'DN' (Device Name) in it’s DNS-SD TXT + Records for Commissionable Node Discovery?" + id: MCORE.DD.TXT_KEY_DN + + - label: + "Does the device support TXT Key 'RI' (Rotating Identifier) in it’s + DNS-SD TXT Records for Commissionable Node Discovery?" + id: MCORE.DD.TXT_KEY_RI + + - label: + "Does the device support TXT Key 'PH' (Pairing Hint) in it’s DNS-SD + TXT Records for Commissionable Node Discovery?" + id: MCORE.DD.TXT_KEY_PH + + - label: + "Does the device support TXT Key 'PI' (Pairing Instruction) in it’s + DNS-SD TXT Records for Commissionable Node Discovery?" + id: MCORE.DD.TXT_KEY_PI + + - label: + "Does the device support Extended Discovery through DNS-SD + advertisements when device is not in commissioning mode?" + id: MCORE.DD.EXTENDED_DISCOVERY + + - label: + "Does the device support advertising the Vendor ID Commissioning + Subtype in Commissionable Node Discovery through DNS-SD + advertisements?" + id: MCORE.DD.COMMISSIONING_SUBTYPE_V + + - label: + "Does the device support advertising the Device Type Commissioning + Subtype in Commissionable Node Discovery through DNS-SD + advertisements?" + id: MCORE.DD.COMMISSIONING_SUBTYPE_T + #Ethernet Network Diagnostics Cluster - label: "Does the device implement the ResetCounts command?" id: DGETH.S.C00.Rsp @@ -4338,6 +4348,11 @@ PICS: #Node Operational Credential #Server Attributes + - label: + "Factory Reset DUT (to ensure NOC list is empty at the beginning of + the following steps)" + id: MCORE.FACTORY_RESET + - label: "Does the DUT(server) support the NOC list attribute?" id: OPCREDS.S.A0000 @@ -4519,7 +4534,6 @@ PICS: - label: "Does the DUT support the AccessControlExtensionChanged Event?" id: ACL.S.E01 - #Mode select #Mode select - label: "Does the DUT support the StartUpMode attribute?" id: MOD.S.A0004 @@ -4557,3 +4571,101 @@ PICS: "Does commissionee provide a Firmware Information field in the AttestationResponse?" id: MCORE.DA.ATTESTELEMENT_FW_INFO + + #Descriptor Cluster TestPlan + #server + - label: "Does the DUT(server) support the DEVICETYPELIST attribute?" + id: DESC.S.A0000 + + - label: "Does the DUT(server) support the SERVERLIST attribute?" + id: DESC.S.A0001 + + - label: "Does the DUT(server) support the CLIENTLIST attribute?" + id: DESC.S.A0002 + + - label: "Does the DUT(server) support the PARTSLIST attribute?" + id: DESC.S.A0003 + + - label: "Does the DUT(server) support the REVISIONFIELD attribute?" + id: DESC.S.A0004 + + #cluster + - label: "Does the DUT(client) support the DEVICETYPELIST attribute?" + id: DESC.C.A0000 + + - label: "Does the DUT(client) support the SERVERLIST attribute?" + id: DESC.C.A0001 + + - label: "Does the DUT(client) support the CLIENTLIST attribute?" + id: DESC.C.A0002 + + - label: "Does the DUT(client) support the PARTSLIST attribute?" + id: DESC.C.A0003 + + - label: "Does the DUT(client) support the REVISIONFIELD attribute?" + id: DESC.C.A0004 + + #Secure Channel + - label: + "Does device support optional key SII in operational discovery mDNS?" + id: MCORE.SC.SII_OP_DISCOVERY_KEY + + - label: + "Does device support optional key SII in operational discovery mDNS?" + id: MCORE.SC.SAI_OP_DISCOVERY_KEY + + - label: + "Does device support optional key SII in operational discovery mDNS?" + id: MCORE.SC.T_KEY + + - label: "Does the device support discovery over Bluetooth Low Power (BLE)?" + id: MCORE.SC.BLE + + - label: "Does the device support discovery over Wi-Fi?" + id: MCORE.SC.WIFI + + - label: "Does the device support discovery over Ethernet?" + id: MCORE.SC.ETH + + - label: "Does the device support discovery over Thread?" + id: MCORE.SC.THR + + - label: + "Does device support optional subtype _V in commissionable node + discovery mDNS?" + id: MCORE.SC.VENDOR_SUBTYPE + + - label: + "Does device support optional subtype _T in commissionable node + discovery mDNS?" + id: MCORE.SC.DEVTYPE_SUBTYPE + + - label: + "Does device support optional key VP in commissionable node discovery + mDNS?" + id: MCORE.SC.VP_KEY + + - label: + "Does device support optional key DT in commissionable node discovery + mDNS?" + id: MCORE.SC.DT_KEY + + - label: + "Does device support optional key DN in commissionable node discovery + mDNS?" + id: MCORE.SC.DN_KEY + + - label: + "Does device support optional key RI in commissionable node discovery + mDNS?" + id: MCORE.SC.RI_KEY + + - label: + "Does device support optional key PH in commissionable node discovery + mDNS?" + id: MCORE.SC.PH_KEY + + - label: + "Does device support optional key PI in commissionable node discovery + mDNS?" + id: MCORE.SC.PI_KEY 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 7b1bda48b01248..67284f571f9a4e 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 @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 129.2.10. [TC-ACL-2.10] Persistence +name: 131.2.10. [TC-ACL-2.10] Persistence config: nodeId: 0x12344321 @@ -22,13 +22,6 @@ config: tests: - label: "TH1 commissions DUT using admin node ID N1" - verification: | - - disabled: true - - - label: - "TH1 reads DUT Endpoint 0 OperationalCredentials cluster - CurrentFabricIndex attribute" verification: | DUT sudo ./chip-all-clusters-app @@ -38,53 +31,53 @@ tests: disabled: true - label: - "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin - node ID N2" + "TH1 reads DUT Endpoint 0 OperationalCredentials cluster + CurrentFabricIndex attribute" verification: | ./chip-tool operationalcredentials read current-fabric-index 1 0 - - [1656588171.078880][3260:3265] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 1776815488 - [1656588171.078952][3260:3265] CHIP:TOO: CurrentFabricIndex: 1 - [1656588171.079037][3260:3265] CHIP:EM: Sending Standalone Ack for MessageCounter:260718042 on exchange 36423i + [1658329512.220471][3036:3041] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 1369963572 + [1658329512.220529][3036:3041] CHIP:TOO: CurrentFabricIndex: 1 + [1658329512.220601][3036:3041] CHIP:EM: Sending Standalone Ack for MessageCounter:23447431 on exchange 2287i disabled: true - label: - "TH2 reads DUT Endpoint 0 OperationalCredentials cluster - CurrentFabricIndex attribute" + "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin + node ID N2" verification: | Open a commissioning window on TH1 using below command ./chip-tool administratorcommissioning open-basic-commissioning-window 180 1 0 --timedInteractionTimeoutMs 1000 + On TH2, verify DUT Responds SUCCESSFULLY [1657286379.420840][4724:4729] CHIP:DMG: InvokeResponseMessage = [1657286379.420894][4724:4729] CHIP:DMG: { - [1657286379.420937][4724:4729] CHIP:DMG: suppressResponse = false, - [1657286379.421000][4724:4729] CHIP:DMG: InvokeResponseIBs = - [1657286379.421068][4724:4729] CHIP:DMG: [ - [1657286379.421120][4724:4729] CHIP:DMG: InvokeResponseIB = - [1657286379.421208][4724:4729] CHIP:DMG: { - [1657286379.421264][4724:4729] CHIP:DMG: CommandStatusIB = - [1657286379.421344][4724:4729] CHIP:DMG: { - [1657286379.421407][4724:4729] CHIP:DMG: CommandPathIB = - [1657286379.421493][4724:4729] CHIP:DMG: { - [1657286379.421581][4724:4729] CHIP:DMG: EndpointId = 0x0, - [1657286379.421656][4724:4729] CHIP:DMG: ClusterId = 0x3c, - [1657286379.421754][4724:4729] CHIP:DMG: CommandId = 0x1, - [1657286379.421838][4724:4729] CHIP:DMG: }, + [1657286379.420937][4724:4729] CHIP:DMG: suppressResponse = false, + [1657286379.421000][4724:4729] CHIP:DMG: InvokeResponseIBs = + [1657286379.421068][4724:4729] CHIP:DMG: [ + [1657286379.421120][4724:4729] CHIP:DMG: InvokeResponseIB = + [1657286379.421208][4724:4729] CHIP:DMG: { + [1657286379.421264][4724:4729] CHIP:DMG: CommandStatusIB = + [1657286379.421344][4724:4729] CHIP:DMG: { + [1657286379.421407][4724:4729] CHIP:DMG: CommandPathIB = + [1657286379.421493][4724:4729] CHIP:DMG: { + [1657286379.421581][4724:4729] CHIP:DMG: EndpointId = 0x0, + [1657286379.421656][4724:4729] CHIP:DMG: ClusterId = 0x3c, + [1657286379.421754][4724:4729] CHIP:DMG: CommandId = 0x1, + [1657286379.421838][4724:4729] CHIP:DMG: }, [1657286379.421916][4724:4729] CHIP:DMG: - [1657286379.421998][4724:4729] CHIP:DMG: StatusIB = - [1657286379.422084][4724:4729] CHIP:DMG: { - [1657286379.422159][4724:4729] CHIP:DMG: status = 0x00 (SUCCESS), - [1657286379.422251][4724:4729] CHIP:DMG: }, + [1657286379.421998][4724:4729] CHIP:DMG: StatusIB = + [1657286379.422084][4724:4729] CHIP:DMG: { + [1657286379.422159][4724:4729] CHIP:DMG: status = 0x00 (SUCCESS), + [1657286379.422251][4724:4729] CHIP:DMG: }, [1657286379.422336][4724:4729] CHIP:DMG: - [1657286379.422397][4724:4729] CHIP:DMG: }, + [1657286379.422397][4724:4729] CHIP:DMG: }, [1657286379.422483][4724:4729] CHIP:DMG: - [1657286379.422537][4724:4729] CHIP:DMG: }, + [1657286379.422537][4724:4729] CHIP:DMG: }, [1657286379.422616][4724:4729] CHIP:DMG: - [1657286379.422666][4724:4729] CHIP:DMG: ], + [1657286379.422666][4724:4729] CHIP:DMG: ], [1657286379.422745][4724:4729] CHIP:DMG: - [1657286379.422796][4724:4729] CHIP:DMG: InteractionModelRevision = 1 + [1657286379.422796][4724:4729] CHIP:DMG: InteractionModelRevision = 1 [1657286379.422861][4724:4729] CHIP:DMG: }, [1657286379.422975][4724:4729] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 [1657286379.423058][4724:4729] CHIP:DMG: ICR moving to [AwaitingDe] @@ -99,172 +92,234 @@ tests: [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success disabled: true + - label: + "TH2 reads DUT Endpoint 0 OperationalCredentials cluster + CurrentFabricIndex attribute" + verification: | + ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-nodeid 223344 --commissioner-name beta + On TH, Verify DUT Responds to CurrentFabricIndex attribute of operationalCredential cluster as 2 + + 1658329570.828165][4563:4568] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 1369963572 + [1658329570.831838][4563:4568] CHIP:TOO: CurrentFabricIndex: 2 + [1658329570.831929][4563:4568] CHIP:EM: Sending Standalone Ack for MessageCounter:4928928 on exchange 29185i + disabled: true + - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1, 1111] Targets field: null struct Privilege field: Operate - (3) AuthMode field: Group (3) Subjects field: [3333] Targets field: - null" + field: [N1, 1111] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: Group (3) Subjects field: [3333] Targets + field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool operationalcredentials read current-fabric-index 2 0 - - [1657188499.165669][4046:4051] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 1529840827 - [1657188499.165816][4046:4051] CHIP:TOO: CurrentFabricIndex: 2 + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233,1111], "targets": null}, + {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects":[3333] , "targets": null}]' 1 0 --commissioner-nodeid 223344 --commissioner-name beta + On TH1 , Verify DUT Responds Successfully + [1658329787.635523][3056:3061] CHIP:DMG: WriteClient moving to [ResponseRe] + [1658329787.635615][3056:3061] CHIP:DMG: WriteResponseMessage = + [1658329787.635661][3056:3061] CHIP:DMG: { + [1658329787.635701][3056:3061] CHIP:DMG: AttributeStatusIBs = + [1658329787.635758][3056:3061] CHIP:DMG: [ + [1658329787.635804][3056:3061] CHIP:DMG: AttributeStatusIB = + [1658329787.635864][3056:3061] CHIP:DMG: { + [1658329787.635913][3056:3061] CHIP:DMG: AttributePathIB = + [1658329787.635971][3056:3061] CHIP:DMG: { + [1658329787.636030][3056:3061] CHIP:DMG: Endpoint = 0x0, + [1658329787.636093][3056:3061] CHIP:DMG: Cluster = 0x1f, + [1658329787.636157][3056:3061] CHIP:DMG: Attribute = 0x0000_0000, + [1658329787.636216][3056:3061] CHIP:DMG: } + [1658329787.636280][3056:3061] CHIP:DMG: + [1658329787.636334][3056:3061] CHIP:DMG: StatusIB = + [1658329787.636395][3056:3061] CHIP:DMG: { + [1658329787.636452][3056:3061] CHIP:DMG: status = 0x00 (SUCCESS), + [1658329787.636509][3056:3061] CHIP:DMG: }, + [1658329787.636566][3056:3061] CHIP:DMG: + [1658329787.636613][3056:3061] CHIP:DMG: }, + [1658329787.636678][3056:3061] CHIP:DMG: + [1658329787.636723][3056:3061] CHIP:DMG: AttributeStatusIB = + [1658329787.636774][3056:3061] CHIP:DMG: { + [1658329787.636822][3056:3061] CHIP:DMG: AttributePathIB = + [1658329787.636880][3056:3061] CHIP:DMG: { + [1658329787.636937][3056:3061] CHIP:DMG: Endpoint = 0x0, + [1658329787.636998][3056:3061] CHIP:DMG: Cluster = 0x1f, + [1658329787.637066][3056:3061] CHIP:DMG: Attribute = 0x0000_0000, + [1658329787.637131][3056:3061] CHIP:DMG: ListIndex = Null, + [1658329787.637194][3056:3061] CHIP:DMG: } + [1658329787.637263][3056:3061] CHIP:DMG: + [1658329787.637319][3056:3061] CHIP:DMG: StatusIB = + [1658329787.637376][3056:3061] CHIP:DMG: { + [1658329787.637626][3056:3061] CHIP:DMG: status = 0x00 (SUCCESS), + [1658329787.637691][3056:3061] CHIP:DMG: }, + [1658329787.637750][3056:3061] CHIP:DMG: + [1658329787.637801][3056:3061] CHIP:DMG: }, + [1658329787.637868][3056:3061] CHIP:DMG: + [1658329787.637913][3056:3061] CHIP:DMG: AttributeStatusIB = + [1658329787.637966][3056:3061] CHIP:DMG: { + [1658329787.638017][3056:3061] CHIP:DMG: AttributePathIB = + [1658329787.638074][3056:3061] CHIP:DMG: { + [1658329787.638131][3056:3061] CHIP:DMG: Endpoint = 0x0, + [1658329787.638193][3056:3061] CHIP:DMG: Cluster = 0x1f, + [1658329787.638256][3056:3061] CHIP:DMG: Attribute = 0x0000_0000, + [1658329787.638322][3056:3061] CHIP:DMG: ListIndex = Null, + [1658329787.638382][3056:3061] CHIP:DMG: } + [1658329787.638444][3056:3061] CHIP:DMG: + [1658329787.638505][3056:3061] CHIP:DMG: StatusIB = + [1658329787.638562][3056:3061] CHIP:DMG: { + [1658329787.638639][3056:3061] CHIP:DMG: status = 0x00 (SUCCESS), + [1658329787.638698][3056:3061] CHIP:DMG: }, + [1658329787.638754][3056:3061] CHIP:DMG: + [1658329787.638801][3056:3061] CHIP:DMG: }, + [1658329787.638854][3056:3061] CHIP:DMG: + [1658329787.638899][3056:3061] CHIP:DMG: ], + [1658329787.638965][3056:3061] CHIP:DMG: + [1658329787.639009][3056:3061] CHIP:DMG: InteractionModelRevision = 1 + [1658329787.639053][3056:3061] CHIP:DMG: } + [1658329787.639281][3056:3061] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658329787.639370][3056:3061] CHIP:EM: Sending Standalone Ack for MessageCounter:32017076 on exchange 14424i disabled: true - label: "TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N2, 2222] Targets field: null struct Privilege field: Operate - (3) AuthMode field: Group (3) Subjects field: [4444] Targets field: - null" + field: [N2, 2222] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: Group (3) Subjects field: [4444] Targets + field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233,1111], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects":[3333] , "targets": null}]' 1 0 - - [1657287441.844970][4884:4889] CHIP:DMG: WriteResponseMessage = - [1657287441.845030][4884:4889] CHIP:DMG: { - [1657287441.845083][4884:4889] CHIP:DMG: AttributeStatusIBs = - [1657287441.845157][4884:4889] CHIP:DMG: [ - [1657287441.845218][4884:4889] CHIP:DMG: AttributeStatusIB = - [1657287441.845285][4884:4889] CHIP:DMG: { - [1657287441.845348][4884:4889] CHIP:DMG: AttributePathIB = - [1657287441.845425][4884:4889] CHIP:DMG: { - [1657287441.845513][4884:4889] CHIP:DMG: Endpoint = 0x0, - [1657287441.845588][4884:4889] CHIP:DMG: Cluster = 0x1f, - [1657287441.845664][4884:4889] CHIP:DMG: Attribute = 0x0000_0000, - [1657287441.845749][4884:4889] CHIP:DMG: } - [1657287441.845830][4884:4889] CHIP:DMG: - [1657287441.845902][4884:4889] CHIP:DMG: StatusIB = - [1657287441.845977][4884:4889] CHIP:DMG: { - [1657287441.846051][4884:4889] CHIP:DMG: status = 0x00 (SUCCESS), - [1657287441.846127][4884:4889] CHIP:DMG: }, - [1657287441.846197][4884:4889] CHIP:DMG: - [1657287441.846259][4884:4889] CHIP:DMG: }, - [1657287441.846345][4884:4889] CHIP:DMG: - [1657287441.846405][4884:4889] CHIP:DMG: AttributeStatusIB = - [1657287441.846470][4884:4889] CHIP:DMG: { - [1657287441.846616][4884:4889] CHIP:DMG: AttributePathIB = - [1657287441.846698][4884:4889] CHIP:DMG: { - [1657287441.846774][4884:4889] CHIP:DMG: Endpoint = 0x0, - [1657287441.846857][4884:4889] CHIP:DMG: Cluster = 0x1f, - [1657287441.846932][4884:4889] CHIP:DMG: Attribute = 0x0000_0000, - [1657287441.847010][4884:4889] CHIP:DMG: ListIndex = Null, - [1657287441.847093][4884:4889] CHIP:DMG: } - [1657287441.847175][4884:4889] CHIP:DMG: - [1657287441.847247][4884:4889] CHIP:DMG: StatusIB = - [1657287441.847319][4884:4889] CHIP:DMG: { - [1657287441.847389][4884:4889] CHIP:DMG: status = 0x00 (SUCCESS), - [1657287441.847470][4884:4889] CHIP:DMG: }, - [1657287441.847540][4884:4889] CHIP:DMG: - [1657287441.847601][4884:4889] CHIP:DMG: }, - [1657287441.847686][4884:4889] CHIP:DMG: - [1657287441.847746][4884:4889] CHIP:DMG: AttributeStatusIB = - [1657287441.847811][4884:4889] CHIP:DMG: { - [1657287441.847934][4884:4889] CHIP:DMG: AttributePathIB = - [1657287441.848013][4884:4889] CHIP:DMG: { - [1657287441.848088][4884:4889] CHIP:DMG: Endpoint = 0x0, - [1657287441.848196][4884:4889] CHIP:DMG: Cluster = 0x1f, - [1657287441.848284][4884:4889] CHIP:DMG: Attribute = 0x0000_0000, - [1657287441.848363][4884:4889] CHIP:DMG: ListIndex = Null, - [1657287441.848439][4884:4889] CHIP:DMG: } - [1657287441.848522][4884:4889] CHIP:DMG: - [1657287441.848593][4884:4889] CHIP:DMG: StatusIB = - [1657287441.848665][4884:4889] CHIP:DMG: { - [1657287441.848739][4884:4889] CHIP:DMG: status = 0x00 (SUCCESS), - [1657287441.848823][4884:4889] CHIP:DMG: }, - [1657287441.848899][4884:4889] CHIP:DMG: - [1657287441.848960][4884:4889] CHIP:DMG: }, - [1657287441.849032][4884:4889] CHIP:DMG: - [1657287441.849090][4884:4889] CHIP:DMG: ], - [1657287441.849177][4884:4889] CHIP:DMG: - [1657287441.849358][4884:4889] CHIP:DMG: InteractionModelRevision = 1 - [1657287441.849425][4884:4889] CHIP:DMG: } - [1657287441.849729][4884:4889] CHIP:DMG: WriteClient moving to [AwaitingDe] + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [223344,2222], "targets": null}, + {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects":[4444] , "targets": null}]' 2 0 --commissioner-nodeid 223344 --commissioner-name beta + + + On TH2 , Verify DUT Responds Successfully + + [1658329868.113411][4587:4592] CHIP:DMG: WriteClient moving to [ResponseRe] + [1658329868.113469][4587:4592] CHIP:DMG: WriteResponseMessage = + [1658329868.113496][4587:4592] CHIP:DMG: { + [1658329868.113537][4587:4592] CHIP:DMG: AttributeStatusIBs = + [1658329868.113568][4587:4592] CHIP:DMG: [ + [1658329868.113602][4587:4592] CHIP:DMG: AttributeStatusIB = + [1658329868.113646][4587:4592] CHIP:DMG: { + [1658329868.113672][4587:4592] CHIP:DMG: AttributePathIB = + [1658329868.113712][4587:4592] CHIP:DMG: { + [1658329868.113745][4587:4592] CHIP:DMG: Endpoint = 0x0, + [1658329868.113788][4587:4592] CHIP:DMG: Cluster = 0x1f, + [1658329868.113833][4587:4592] CHIP:DMG: Attribute = 0x0000_0000, + [1658329868.113868][4587:4592] CHIP:DMG: } + [1658329868.113914][4587:4592] CHIP:DMG: + [1658329868.113951][4587:4592] CHIP:DMG: StatusIB = + [1658329868.113984][4587:4592] CHIP:DMG: { + [1658329868.114028][4587:4592] CHIP:DMG: status = 0x00 (SUCCESS), + [1658329868.114091][4587:4592] CHIP:DMG: }, + [1658329868.114124][4587:4592] CHIP:DMG: + [1658329868.114160][4587:4592] CHIP:DMG: }, + [1658329868.114197][4587:4592] CHIP:DMG: + [1658329868.114229][4587:4592] CHIP:DMG: AttributeStatusIB = + [1658329868.114266][4587:4592] CHIP:DMG: { + [1658329868.114294][4587:4592] CHIP:DMG: AttributePathIB = + [1658329868.114335][4587:4592] CHIP:DMG: { + [1658329868.114367][4587:4592] CHIP:DMG: Endpoint = 0x0, + [1658329868.114411][4587:4592] CHIP:DMG: Cluster = 0x1f, + [1658329868.114458][4587:4592] CHIP:DMG: Attribute = 0x0000_0000, + [1658329868.114491][4587:4592] CHIP:DMG: ListIndex = Null, + [1658329868.114529][4587:4592] CHIP:DMG: } + [1658329868.114563][4587:4592] CHIP:DMG: + [1658329868.114604][4587:4592] CHIP:DMG: StatusIB = + [1658329868.114645][4587:4592] CHIP:DMG: { + [1658329868.114677][4587:4592] CHIP:DMG: status = 0x00 (SUCCESS), + [1658329868.114716][4587:4592] CHIP:DMG: }, + [1658329868.114747][4587:4592] CHIP:DMG: + [1658329868.114782][4587:4592] CHIP:DMG: }, + [1658329868.114826][4587:4592] CHIP:DMG: + [1658329868.114850][4587:4592] CHIP:DMG: AttributeStatusIB = + [1658329868.114884][4587:4592] CHIP:DMG: { + [1658329868.114910][4587:4592] CHIP:DMG: AttributePathIB = + [1658329868.114948][4587:4592] CHIP:DMG: { + [1658329868.114980][4587:4592] CHIP:DMG: Endpoint = 0x0, + [1658329868.115024][4587:4592] CHIP:DMG: Cluster = 0x1f, + [1658329868.115067][4587:4592] CHIP:DMG: Attribute = 0x0000_0000, + [1658329868.115102][4587:4592] CHIP:DMG: ListIndex = Null, + [1658329868.115145][4587:4592] CHIP:DMG: } + [1658329868.115188][4587:4592] CHIP:DMG: + [1658329868.115222][4587:4592] CHIP:DMG: StatusIB = + [1658329868.115260][4587:4592] CHIP:DMG: { + [1658329868.115291][4587:4592] CHIP:DMG: status = 0x00 (SUCCESS), + [1658329868.115333][4587:4592] CHIP:DMG: }, + [1658329868.115371][4587:4592] CHIP:DMG: + [1658329868.115398][4587:4592] CHIP:DMG: }, + [1658329868.115438][4587:4592] CHIP:DMG: + [1658329868.115463][4587:4592] CHIP:DMG: ], + [1658329868.115507][4587:4592] CHIP:DMG: + [1658329868.115531][4587:4592] CHIP:DMG: InteractionModelRevision = 1 + [1658329868.115565][4587:4592] CHIP:DMG: } + [1658329868.115702][4587:4592] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658329868.115764][4587:4592] CHIP:EM: Sending Standalone Ack for MessageCounter:240702602 on exchange 57878i disabled: true - label: "TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, - value is list of AccessControlExtensionStruct containing 1 element + value is list of AccessControlExtensionStruct containing 1 element 1. struct Data field: D_OK_EMPTY" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 2, "privilege": 5, "authMode": 2, "subjects": [223344,2222], "targets": null}, - {"fabricIndex": 2, "privilege": 3, "authMode": 3, "subjects":[4444] , "targets": null}]' 2 0 --commissioner-name beta --commissioner-nodeid 223344 - - [1657287539.047027][18486:18491] CHIP:DMG: WriteResponseMessage = - [1657287539.047052][18486:18491] CHIP:DMG: { - [1657287539.047072][18486:18491] CHIP:DMG: AttributeStatusIBs = - [1657287539.047106][18486:18491] CHIP:DMG: [ - [1657287539.047127][18486:18491] CHIP:DMG: AttributeStatusIB = - [1657287539.047150][18486:18491] CHIP:DMG: { - [1657287539.047163][18486:18491] CHIP:DMG: AttributePathIB = - [1657287539.047177][18486:18491] CHIP:DMG: { - [1657287539.047193][18486:18491] CHIP:DMG: Endpoint = 0x0, - [1657287539.047214][18486:18491] CHIP:DMG: Cluster = 0x1f, - [1657287539.047237][18486:18491] CHIP:DMG: Attribute = 0x0000_0000, - [1657287539.047262][18486:18491] CHIP:DMG: } - [1657287539.047301][18486:18491] CHIP:DMG: - [1657287539.047326][18486:18491] CHIP:DMG: StatusIB = - [1657287539.047349][18486:18491] CHIP:DMG: { - [1657287539.047370][18486:18491] CHIP:DMG: status = 0x00 (SUCCESS), - [1657287539.047383][18486:18491] CHIP:DMG: }, - [1657287539.047401][18486:18491] CHIP:DMG: - [1657287539.047418][18486:18491] CHIP:DMG: }, - [1657287539.047473][18486:18491] CHIP:DMG: - [1657287539.047495][18486:18491] CHIP:DMG: AttributeStatusIB = - [1657287539.047514][18486:18491] CHIP:DMG: { - [1657287539.047531][18486:18491] CHIP:DMG: AttributePathIB = - [1657287539.047549][18486:18491] CHIP:DMG: { - [1657287539.047573][18486:18491] CHIP:DMG: Endpoint = 0x0, - [1657287539.047596][18486:18491] CHIP:DMG: Cluster = 0x1f, - [1657287539.047622][18486:18491] CHIP:DMG: Attribute = 0x0000_0000, - [1657287539.047646][18486:18491] CHIP:DMG: ListIndex = Null, - [1657287539.047669][18486:18491] CHIP:DMG: } - [1657287539.047700][18486:18491] CHIP:DMG: - [1657287539.047721][18486:18491] CHIP:DMG: StatusIB = - [1657287539.047744][18486:18491] CHIP:DMG: { - [1657287539.047768][18486:18491] CHIP:DMG: status = 0x00 (SUCCESS), - [1657287539.047791][18486:18491] CHIP:DMG: }, - [1657287539.047818][18486:18491] CHIP:DMG: - [1657287539.047837][18486:18491] CHIP:DMG: }, - [1657287539.047875][18486:18491] CHIP:DMG: - [1657287539.047896][18486:18491] CHIP:DMG: AttributeStatusIB = - [1657287539.047921][18486:18491] CHIP:DMG: { - [1657287539.047943][18486:18491] CHIP:DMG: AttributePathIB = - [1657287539.047967][18486:18491] CHIP:DMG: { - [1657287539.047993][18486:18491] CHIP:DMG: Endpoint = 0x0, - [1657287539.048019][18486:18491] CHIP:DMG: Cluster = 0x1f, - [1657287539.048044][18486:18491] CHIP:DMG: Attribute = 0x0000_0000, - [1657287539.048066][18486:18491] CHIP:DMG: ListIndex = Null, - [1657287539.048081][18486:18491] CHIP:DMG: } - [1657287539.048104][18486:18491] CHIP:DMG: - [1657287539.048120][18486:18491] CHIP:DMG: StatusIB = - [1657287539.048207][18486:18491] CHIP:DMG: { - [1657287539.048226][18486:18491] CHIP:DMG: status = 0x00 (SUCCESS), - [1657287539.048242][18486:18491] CHIP:DMG: }, - [1657287539.048260][18486:18491] CHIP:DMG: - [1657287539.048276][18486:18491] CHIP:DMG: }, - [1657287539.048297][18486:18491] CHIP:DMG: - [1657287539.048311][18486:18491] CHIP:DMG: ], - [1657287539.048345][18486:18491] CHIP:DMG: - [1657287539.048361][18486:18491] CHIP:DMG: InteractionModelRevision = 1 - [1657287539.048376][18486:18491] CHIP:DMG: } - [1657287539.048530][18486:18491] CHIP:DMG: WriteClient moving to [AwaitingDe] + ./chip-tool accesscontrol write extension '[{"data":"1718"}]' 1 0 + On TH , Verify DUT Responds Successfully to extension attribute list containg one element + [1658330105.863185][3079:3084] CHIP:DMG: WriteClient moving to [ResponseRe] + [1658330105.863237][3079:3084] CHIP:DMG: WriteResponseMessage = + [1658330105.863262][3079:3084] CHIP:DMG: { + [1658330105.863284][3079:3084] CHIP:DMG: AttributeStatusIBs = + [1658330105.863315][3079:3084] CHIP:DMG: [ + [1658330105.863339][3079:3084] CHIP:DMG: AttributeStatusIB = + [1658330105.863367][3079:3084] CHIP:DMG: { + [1658330105.863393][3079:3084] CHIP:DMG: AttributePathIB = + [1658330105.863428][3079:3084] CHIP:DMG: { + [1658330105.863460][3079:3084] CHIP:DMG: Endpoint = 0x0, + [1658330105.863495][3079:3084] CHIP:DMG: Cluster = 0x1f, + [1658330105.863529][3079:3084] CHIP:DMG: Attribute = 0x0000_0001, + [1658330105.863589][3079:3084] CHIP:DMG: } + [1658330105.863670][3079:3084] CHIP:DMG: + [1658330105.863745][3079:3084] CHIP:DMG: StatusIB = + [1658330105.863812][3079:3084] CHIP:DMG: { + [1658330105.863877][3079:3084] CHIP:DMG: status = 0x00 (SUCCESS), + [1658330105.863945][3079:3084] CHIP:DMG: }, + [1658330105.864010][3079:3084] CHIP:DMG: + [1658330105.864068][3079:3084] CHIP:DMG: }, + [1658330105.864146][3079:3084] CHIP:DMG: + [1658330105.864197][3079:3084] CHIP:DMG: AttributeStatusIB = + [1658330105.864257][3079:3084] CHIP:DMG: { + [1658330105.864315][3079:3084] CHIP:DMG: AttributePathIB = + [1658330105.864379][3079:3084] CHIP:DMG: { + [1658330105.864444][3079:3084] CHIP:DMG: Endpoint = 0x0, + [1658330105.864516][3079:3084] CHIP:DMG: Cluster = 0x1f, + [1658330105.864592][3079:3084] CHIP:DMG: Attribute = 0x0000_0001, + [1658330105.864669][3079:3084] CHIP:DMG: ListIndex = Null, + [1658330105.864736][3079:3084] CHIP:DMG: } + [1658330105.864808][3079:3084] CHIP:DMG: + [1658330105.864871][3079:3084] CHIP:DMG: StatusIB = + [1658330105.864936][3079:3084] CHIP:DMG: { + [1658330105.865001][3079:3084] CHIP:DMG: status = 0x00 (SUCCESS), + [1658330105.865068][3079:3084] CHIP:DMG: }, + [1658330105.865134][3079:3084] CHIP:DMG: + [1658330105.865188][3079:3084] CHIP:DMG: }, + [1658330105.865251][3079:3084] CHIP:DMG: + [1658330105.865302][3079:3084] CHIP:DMG: ], + [1658330105.865370][3079:3084] CHIP:DMG: + [1658330105.865421][3079:3084] CHIP:DMG: InteractionModelRevision = 1 + [1658330105.865472][3079:3084] CHIP:DMG: } + [1658330105.865672][3079:3084] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658330105.865769][3079:3084] CHIP:EM: Sending Standalone Ack for MessageCounter:104745751 on exchange 216i disabled: true - label: "TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute value is list of AccessControlExtensionStruct containing 1 element - struct Data field: D_OK_SINGLE" + 1.struct Data field: D_OK_SINGLE" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension '[{"data":"1000110010001100"}]' 1 0 - + ./chip-tool accesscontrol write extension '[{"data":"1000110010001100"}]' 2 0 --commissioner-nodeid 223344 --commissioner-name beta + On TH , Verify DUT Responds Successfully to extension attribute list containg one element + On TH2 , Verify DUT Responds Successfully to extension attribute list containg one element . [1657187217.204901][10872:10877] CHIP:DMG: WriteResponseMessage = [1657187217.204928][10872:10877] CHIP:DMG: { [1657187217.204947][10872:10877] CHIP:DMG: AttributeStatusIBs = @@ -311,49 +366,14 @@ tests: - label: "Reboot the DUT" verification: | - ./chip-tool accesscontrol write extension '[{"data":"1000110010001101"}]' 2 0 --commissioner-name beta --commissioner-nodeid 223344 - [1657287839.618348][18563:18568] CHIP:DMG: WriteResponseMessage = - [1657287839.618369][18563:18568] CHIP:DMG: { - [1657287839.618381][18563:18568] CHIP:DMG: AttributeStatusIBs = - [1657287839.618402][18563:18568] CHIP:DMG: [ - [1657287839.618414][18563:18568] CHIP:DMG: AttributeStatusIB = - [1657287839.618434][18563:18568] CHIP:DMG: { - [1657287839.618456][18563:18568] CHIP:DMG: AttributePathIB = - [1657287839.618481][18563:18568] CHIP:DMG: { - [1657287839.618508][18563:18568] CHIP:DMG: Endpoint = 0x0, - [1657287839.618532][18563:18568] CHIP:DMG: Cluster = 0x1f, - [1657287839.618557][18563:18568] CHIP:DMG: Attribute = 0x0000_0001, - [1657287839.618577][18563:18568] CHIP:DMG: } - [1657287839.618610][18563:18568] CHIP:DMG: - [1657287839.618630][18563:18568] CHIP:DMG: StatusIB = - [1657287839.618661][18563:18568] CHIP:DMG: { - [1657287839.618684][18563:18568] CHIP:DMG: status = 0x00 (SUCCESS), - [1657287839.618712][18563:18568] CHIP:DMG: }, - [1657287839.618738][18563:18568] CHIP:DMG: - [1657287839.618758][18563:18568] CHIP:DMG: }, - [1657287839.618794][18563:18568] CHIP:DMG: - [1657287839.618814][18563:18568] CHIP:DMG: AttributeStatusIB = - [1657287839.618834][18563:18568] CHIP:DMG: { - [1657287839.618858][18563:18568] CHIP:DMG: AttributePathIB = - [1657287839.618883][18563:18568] CHIP:DMG: { - [1657287839.618907][18563:18568] CHIP:DMG: Endpoint = 0x0, - [1657287839.618927][18563:18568] CHIP:DMG: Cluster = 0x1f, - [1657287839.618961][18563:18568] CHIP:DMG: Attribute = 0x0000_0001, - [1657287839.618983][18563:18568] CHIP:DMG: ListIndex = Null, - [1657287839.619010][18563:18568] CHIP:DMG: } - [1657287839.619038][18563:18568] CHIP:DMG: - [1657287839.619057][18563:18568] CHIP:DMG: StatusIB = - [1657287839.619079][18563:18568] CHIP:DMG: { - [1657287839.619099][18563:18568] CHIP:DMG: status = 0x00 (SUCCESS), - [1657287839.619120][18563:18568] CHIP:DMG: }, - [1657287839.619145][18563:18568] CHIP:DMG: - [1657287839.619166][18563:18568] CHIP:DMG: }, - [1657287839.619196][18563:18568] CHIP:DMG: - [1657287839.619215][18563:18568] CHIP:DMG: ], - [1657287839.619251][18563:18568] CHIP:DMG: - [1657287839.619267][18563:18568] CHIP:DMG: InteractionModelRevision = 1 - [1657287839.619278][18563:18568] CHIP:DMG: } - [1657287839.619400][18563:18568] CHIP:DMG: WriteClient moving to [AwaitingDe] + Follow the below procedure for rebooting (Only applicable on raspi) + + 1. create a file using touch command , something like touch mytest.txt + 2. chmod 777 mytest.txt + 3. launch the app sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt + 4. commission DUT with TH using above steps + + And in this step use kill DUT and launch again, without commission follow the next steps disabled: true - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" @@ -361,6 +381,8 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 + On TH 1, Verify DUT Responds Successfully. + [1657289627.393651][5251:5256] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1884338152 [1657289627.393731][5251:5256] CHIP:TOO: ACL: 2 entries [1657289627.393798][5251:5256] CHIP:TOO: [1]: { @@ -387,11 +409,13 @@ tests: PICS: ACL.S.A0001 verification: | ./chip-tool accesscontrol read extension 1 0 + On TH1 , Verify DUT Responds Successfully + [1657289676.947323][5260:5265] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 [1657289676.947388][5260:5265] CHIP:TOO: Extension: 1 entries [1657289676.947438][5260:5265] CHIP:TOO: [1]: { - [1657289676.947467][5260:5265] CHIP:TOO: Data: 1000110010001100 + [1657289676.947467][5260:5265] CHIP:TOO: Data: 1718 [1657289676.947504][5260:5265] CHIP:TOO: FabricIndex: 1 [1657289676.947528][5260:5265] CHIP:TOO: } disabled: true @@ -401,6 +425,9 @@ tests: verification: | ./chip-tool accesscontrol read acl 2 0 --commissioner-name beta --commissioner-nodeid 223344 + On TH 2, Verify DUT Responds Successfully . + + [1657289713.626327][19279:19284] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1884338152 [1657289713.626381][19279:19284] CHIP:TOO: ACL: 2 entries [1657289713.626417][19279:19284] CHIP:TOO: [1]: { @@ -428,10 +455,12 @@ tests: verification: | ./chip-tool accesscontrol read extension 2 0 --commissioner-name beta --commissioner-nodeid 223344 + On TH2 , Verify DUT Responds Successfully to extension attribute list containg one element . + [1657289746.737641][19293:19298] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 [1657289746.737713][19293:19298] CHIP:TOO: Extension: 1 entries [1657289746.737778][19293:19298] CHIP:TOO: [1]: { - [1657289746.737803][19293:19298] CHIP:TOO: Data: 1000110010001101 + [1657289746.737803][19293:19298] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 [1657289746.737844][19293:19298] CHIP:TOO: FabricIndex: 2 [1657289746.737862][19293:19298] CHIP:TOO: } disabled: true @@ -447,6 +476,8 @@ tests: verification: | ./chip-tool operationalcredentials remove-fabric 2 2 0 --commissioner-name beta --commissioner-nodeid 223344 + On TH2 , Verify DUT Responds Successfully . + [1657289809.358455][19309:19314] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1657289809.358500][19309:19314] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 [1657289809.358559][19309:19314] CHIP:TOO: NOCResponse: { @@ -459,6 +490,8 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH1 , Verify DUT Responds Successfully . + [1657289848.956276][5274:5279] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1884338152 [1657289848.956366][5274:5279] CHIP:TOO: ACL: 2 entries @@ -486,11 +519,13 @@ tests: PICS: ACL.S.A0001 verification: | ./chip-tool accesscontrol read extension 1 0 + On TH1 , Verify DUT Responds Successfully to extension attribute list containg one element . + [1657289881.142883][5283:5288] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 [1657289881.142955][5283:5288] CHIP:TOO: Extension: 1 entries [1657289881.143019][5283:5288] CHIP:TOO: [1]: { - [1657289881.143056][5283:5288] CHIP:TOO: Data: 1000110010001100 + [1657289881.143056][5283:5288] CHIP:TOO: Data: 1718 [1657289881.143107][5283:5288] CHIP:TOO: FabricIndex: 1 [1657289881.143138][5283:5288] CHIP:TOO: } disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml index b3d1aa8610d7a2..b65371b3af2f6b 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 129.2.4. [TC-ACL-2.4] ACL attribute +name: 131.2.4. [TC-ACL-2.4] ACL attribute config: nodeId: 0x12344321 @@ -32,6 +32,9 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 1 0 + + On TH, Verify DUT Responds to CurrentFabricIndex attribute of operationalCredential cluster as 1 + [1656652012.060584][2763:2768] CHIP:DMG: [1656652012.060609][2763:2768] CHIP:DMG: SuppressResponse = true, [1656652012.060634][2763:2768] CHIP:DMG: InteractionModelRevision = 1 @@ -48,6 +51,8 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully . + [1656652338.381499][2784:2789] CHIP:DMG: }, [1656652338.381552][2784:2789] CHIP:DMG: [1656652338.381590][2784:2789] CHIP:DMG: ], @@ -71,179 +76,233 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements struct + is list of AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: View (1) + 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}, {DeviceType: 33}] struct - Privilege field: Operate (3) AuthMode field: Group (3) Subjects field: - [555, 666, 777, 888] Targets field: [{Cluster: 55}, {Endpoint: 66}, - {DeviceType: 77}]" + 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}]" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": 33}]}, - {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType": 77 }]}]' 1 0 - - - [1657616506.497802][8683:8688] CHIP:DMG: WriteResponseMessage = - [1657616506.497838][8683:8688] CHIP:DMG: { - [1657616506.497865][8683:8688] CHIP:DMG: AttributeStatusIBs = - [1657616506.497903][8683:8688] CHIP:DMG: [ - [1657616506.497937][8683:8688] CHIP:DMG: AttributeStatusIB = - [1657616506.497977][8683:8688] CHIP:DMG: { - [1657616506.498013][8683:8688] CHIP:DMG: AttributePathIB = - [1657616506.498054][8683:8688] CHIP:DMG: { - [1657616506.498096][8683:8688] CHIP:DMG: Endpoint = 0x0, - [1657616506.498138][8683:8688] CHIP:DMG: Cluster = 0x1f, - [1657616506.498180][8683:8688] CHIP:DMG: Attribute = 0x0000_0000, - [1657616506.498219][8683:8688] CHIP:DMG: } - [1657616506.498264][8683:8688] CHIP:DMG: - [1657616506.498301][8683:8688] CHIP:DMG: StatusIB = - [1657616506.498341][8683:8688] CHIP:DMG: { - [1657616506.498447][8683:8688] CHIP:DMG: status = 0x00 (SUCCESS), - [1657616506.498492][8683:8688] CHIP:DMG: }, - [1657616506.498534][8683:8688] CHIP:DMG: - [1657616506.498571][8683:8688] CHIP:DMG: }, - [1657616506.498617][8683:8688] CHIP:DMG: - [1657616506.498650][8683:8688] CHIP:DMG: AttributeStatusIB = - [1657616506.498686][8683:8688] CHIP:DMG: { - [1657616506.498720][8683:8688] CHIP:DMG: AttributePathIB = - [1657616506.498759][8683:8688] CHIP:DMG: { - [1657616506.498800][8683:8688] CHIP:DMG: Endpoint = 0x0, - [1657616506.498845][8683:8688] CHIP:DMG: Cluster = 0x1f, - [1657616506.498890][8683:8688] CHIP:DMG: Attribute = 0x0000_0000, - [1657616506.498933][8683:8688] CHIP:DMG: ListIndex = Null, - [1657616506.498974][8683:8688] CHIP:DMG: } - [1657616506.499019][8683:8688] CHIP:DMG: - [1657616506.499059][8683:8688] CHIP:DMG: StatusIB = - [1657616506.499098][8683:8688] CHIP:DMG: { - [1657616506.499140][8683:8688] CHIP:DMG: status = 0x00 (SUCCESS), - [1657616506.499181][8683:8688] CHIP:DMG: }, - [1657616506.499221][8683:8688] CHIP:DMG: - [1657616506.499255][8683:8688] CHIP:DMG: }, - [1657616506.499304][8683:8688] CHIP:DMG: - [1657616506.499336][8683:8688] CHIP:DMG: AttributeStatusIB = - [1657616506.499371][8683:8688] CHIP:DMG: { - [1657616506.499405][8683:8688] CHIP:DMG: AttributePathIB = - [1657616506.499444][8683:8688] CHIP:DMG: { - [1657616506.499491][8683:8688] CHIP:DMG: Endpoint = 0x0, - [1657616506.499536][8683:8688] CHIP:DMG: Cluster = 0x1f, - [1657616506.499576][8683:8688] CHIP:DMG: Attribute = 0x0000_0000, - [1657616506.499619][8683:8688] CHIP:DMG: ListIndex = Null, - [1657616506.499656][8683:8688] CHIP:DMG: } - [1657616506.499702][8683:8688] CHIP:DMG: - [1657616506.499740][8683:8688] CHIP:DMG: StatusIB = - [1657616506.499784][8683:8688] CHIP:DMG: { - [1657616506.499826][8683:8688] CHIP:DMG: status = 0x01 (FAILURE), - [1657616506.499866][8683:8688] CHIP:DMG: }, - [1657616506.499906][8683:8688] CHIP:DMG: - [1657616506.499943][8683:8688] CHIP:DMG: }, - [1657616506.499989][8683:8688] CHIP:DMG: - [1657616506.500021][8683:8688] CHIP:DMG: AttributeStatusIB = - [1657616506.500056][8683:8688] CHIP:DMG: { - [1657616506.500090][8683:8688] CHIP:DMG: AttributePathIB = - [1657616506.500129][8683:8688] CHIP:DMG: { - [1657616506.500221][8683:8688] CHIP:DMG: Endpoint = 0x0, - [1657616506.500277][8683:8688] CHIP:DMG: Cluster = 0x1f, - [1657616506.500325][8683:8688] CHIP:DMG: Attribute = 0x0000_0000, - [1657616506.500368][8683:8688] CHIP:DMG: ListIndex = Null, - [1657616506.500413][8683:8688] CHIP:DMG: } - [1657616506.500459][8683:8688] CHIP:DMG: - [1657616506.500502][8683:8688] CHIP:DMG: StatusIB = - [1657616506.500547][8683:8688] CHIP:DMG: { - [1657616506.500593][8683:8688] CHIP:DMG: status = 0x01 (FAILURE), - [1657616506.500636][8683:8688] CHIP:DMG: }, - [1657616506.500677][8683:8688] CHIP:DMG: - [1657616506.500710][8683:8688] CHIP:DMG: }, - [1657616506.500749][8683:8688] CHIP:DMG: - [1657616506.500781][8683:8688] CHIP:DMG: ], - [1657616506.500834][8683:8688] CHIP:DMG: - [1657616506.500866][8683:8688] CHIP:DMG: InteractionModelRevision = 1 - [1657616506.500897][8683:8688] CHIP:DMG: } - [1657616506.501105][8683:8688] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1657616506.501147][8683:8688] CHIP:TOO: Response Failure: IM Error 0x00000501: General error: 0x01 (FAILURE) + {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]}, + {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]' 1 0 + + + [1658323877.660699][2502:2507] CHIP:DMG: WriteClient moving to [ResponseRe] + [1658323877.660829][2502:2507] CHIP:DMG: WriteResponseMessage = + [1658323877.660890][2502:2507] CHIP:DMG: { + [1658323877.660943][2502:2507] CHIP:DMG: AttributeStatusIBs = + [1658323877.661019][2502:2507] CHIP:DMG: [ + [1658323877.661079][2502:2507] CHIP:DMG: AttributeStatusIB = + [1658323877.661251][2502:2507] CHIP:DMG: { + [1658323877.661321][2502:2507] CHIP:DMG: AttributePathIB = + [1658323877.661397][2502:2507] CHIP:DMG: { + [1658323877.661477][2502:2507] CHIP:DMG: Endpoint = 0x0, + [1658323877.661568][2502:2507] CHIP:DMG: Cluster = 0x1f, + [1658323877.661657][2502:2507] CHIP:DMG: Attribute = 0x0000_0000, + [1658323877.661744][2502:2507] CHIP:DMG: } + [1658323877.661838][2502:2507] CHIP:DMG: + [1658323877.661920][2502:2507] CHIP:DMG: StatusIB = + [1658323877.662004][2502:2507] CHIP:DMG: { + [1658323877.662084][2502:2507] CHIP:DMG: status = 0x00 (SUCCESS), + [1658323877.662167][2502:2507] CHIP:DMG: }, + [1658323877.662243][2502:2507] CHIP:DMG: + [1658323877.662309][2502:2507] CHIP:DMG: }, + [1658323877.662398][2502:2507] CHIP:DMG: + [1658323877.662458][2502:2507] CHIP:DMG: AttributeStatusIB = + [1658323877.662527][2502:2507] CHIP:DMG: { + [1658323877.662590][2502:2507] CHIP:DMG: AttributePathIB = + [1658323877.662706][2502:2507] CHIP:DMG: { + [1658323877.662784][2502:2507] CHIP:DMG: Endpoint = 0x0, + [1658323877.662872][2502:2507] CHIP:DMG: Cluster = 0x1f, + [1658323877.662939][2502:2507] CHIP:DMG: Attribute = 0x0000_0000, + [1658323877.663079][2502:2507] CHIP:DMG: ListIndex = Null, + [1658323877.663151][2502:2507] CHIP:DMG: } + [1658323877.663228][2502:2507] CHIP:DMG: + [1658323877.663298][2502:2507] CHIP:DMG: StatusIB = + [1658323877.663364][2502:2507] CHIP:DMG: { + [1658323877.663428][2502:2507] CHIP:DMG: status = 0x00 (SUCCESS), + [1658323877.663500][2502:2507] CHIP:DMG: }, + [1658323877.663566][2502:2507] CHIP:DMG: + [1658323877.663624][2502:2507] CHIP:DMG: }, + [1658323877.663703][2502:2507] CHIP:DMG: + [1658323877.663754][2502:2507] CHIP:DMG: AttributeStatusIB = + [1658323877.663814][2502:2507] CHIP:DMG: { + [1658323877.663871][2502:2507] CHIP:DMG: AttributePathIB = + [1658323877.663941][2502:2507] CHIP:DMG: { + [1658323877.664007][2502:2507] CHIP:DMG: Endpoint = 0x0, + [1658323877.664077][2502:2507] CHIP:DMG: Cluster = 0x1f, + [1658323877.664147][2502:2507] CHIP:DMG: Attribute = 0x0000_0000, + [1658323877.664214][2502:2507] CHIP:DMG: ListIndex = Null, + [1658323877.664278][2502:2507] CHIP:DMG: } + [1658323877.664350][2502:2507] CHIP:DMG: + [1658323877.664414][2502:2507] CHIP:DMG: StatusIB = + [1658323877.664477][2502:2507] CHIP:DMG: { + [1658323877.664541][2502:2507] CHIP:DMG: status = 0x00 (SUCCESS), + [1658323877.664606][2502:2507] CHIP:DMG: }, + [1658323877.664670][2502:2507] CHIP:DMG: + [1658323877.664727][2502:2507] CHIP:DMG: }, + [1658323877.664800][2502:2507] CHIP:DMG: + [1658323877.664850][2502:2507] CHIP:DMG: AttributeStatusIB = + [1658323877.664910][2502:2507] CHIP:DMG: { + [1658323877.664967][2502:2507] CHIP:DMG: AttributePathIB = + [1658323877.665031][2502:2507] CHIP:DMG: { + [1658323877.665096][2502:2507] CHIP:DMG: Endpoint = 0x0, + [1658323877.665170][2502:2507] CHIP:DMG: Cluster = 0x1f, + [1658323877.665240][2502:2507] CHIP:DMG: Attribute = 0x0000_0000, + [1658323877.665313][2502:2507] CHIP:DMG: ListIndex = Null, + [1658323877.665384][2502:2507] CHIP:DMG: } + [1658323877.665453][2502:2507] CHIP:DMG: + [1658323877.665515][2502:2507] CHIP:DMG: StatusIB = + [1658323877.665577][2502:2507] CHIP:DMG: { + [1658323877.665643][2502:2507] CHIP:DMG: status = 0x00 (SUCCESS), + [1658323877.665708][2502:2507] CHIP:DMG: }, + [1658323877.665771][2502:2507] CHIP:DMG: + [1658323877.665828][2502:2507] CHIP:DMG: }, + [1658323877.665889][2502:2507] CHIP:DMG: + [1658323877.665938][2502:2507] CHIP:DMG: ], + [1658323877.666020][2502:2507] CHIP:DMG: + [1658323877.666070][2502:2507] CHIP:DMG: InteractionModelRevision = 1 + [1658323877.666119][2502:2507] CHIP:DMG: } + [1658323877.666433][2502:2507] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658323877.666532][2502:2507] CHIP:EM: Sending Standalone Ack for MessageCounter:122439856 on exchange 57514i disabled: true - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - [1657616943.336147][8703:8708] CHIP:DMG: } - [1657616943.336447][8703:8708] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 2543339509 - [1657616943.336529][8703:8708] CHIP:TOO: ACL: 1 entries - [1657616943.336583][8703:8708] CHIP:TOO: [1]: { - [1657616943.336630][8703:8708] CHIP:TOO: Privilege: 5 - [1657616943.336659][8703:8708] CHIP:TOO: AuthMode: 2 - [1657616943.336692][8703:8708] CHIP:TOO: Subjects: 1 entries - [1657616943.336726][8703:8708] CHIP:TOO: [1]: 112233 - [1657616943.336757][8703:8708] CHIP:TOO: Targets: null - [1657616943.336786][8703:8708] CHIP:TOO: FabricIndex: 1 - [1657616943.336813][8703:8708] CHIP:TOO: } + InteractionModelRevision = 1 + [1658229676.712083][4872:4878] CHIP:DMG: } + [1658229676.712624][4872:4878] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1307037423 + [1658229676.712736][4872:4878] CHIP:TOO: ACL: 3 entries + [1658229676.712809][4872:4878] CHIP:TOO: [1]: { + [1658229676.712839][4872:4878] CHIP:TOO: Privilege: 5 + [1658229676.712864][4872:4878] CHIP:TOO: AuthMode: 2 + [1658229676.712893][4872:4878] CHIP:TOO: Subjects: 1 entries + [1658229676.712923][4872:4878] CHIP:TOO: [1]: 112233 + [1658229676.712949][4872:4878] CHIP:TOO: Targets: null + [1658229676.712972][4872:4878] CHIP:TOO: FabricIndex: 1 + [1658229676.712995][4872:4878] CHIP:TOO: } + [1658229676.713033][4872:4878] CHIP:TOO: [2]: { + [1658229676.713058][4872:4878] CHIP:TOO: Privilege: 1 + [1658229676.713082][4872:4878] CHIP:TOO: AuthMode: 3 + [1658229676.713109][4872:4878] CHIP:TOO: Subjects: 4 entries + [1658229676.713136][4872:4878] CHIP:TOO: [1]: 111 + [1658229676.713161][4872:4878] CHIP:TOO: [2]: 222 + [1658229676.713187][4872:4878] CHIP:TOO: [3]: 333 + [1658229676.713212][4872:4878] CHIP:TOO: [4]: 444 + [1658229676.713241][4872:4878] CHIP:TOO: Targets: 1 entries + [1658229676.713295][4872:4878] CHIP:TOO: [1]: { + [1658229676.713322][4872:4878] CHIP:TOO: Cluster: 11 + [1658229676.713347][4872:4878] CHIP:TOO: Endpoint: 22 + [1658229676.713371][4872:4878] CHIP:TOO: DeviceType: null + [1658229676.713429][4872:4878] CHIP:TOO: } + [1658229676.713457][4872:4878] CHIP:TOO: FabricIndex: 1 + [1658229676.713480][4872:4878] CHIP:TOO: } + [1658229676.713517][4872:4878] CHIP:TOO: [3]: { + [1658229676.713543][4872:4878] CHIP:TOO: Privilege: 3 + [1658229676.713566][4872:4878] CHIP:TOO: AuthMode: 3 + [1658229676.713593][4872:4878] CHIP:TOO: Subjects: 4 entries + [1658229676.713620][4872:4878] CHIP:TOO: [1]: 555 + [1658229676.713645][4872:4878] CHIP:TOO: [2]: 666 + [1658229676.713670][4872:4878] CHIP:TOO: [3]: 777 + [1658229676.713695][4872:4878] CHIP:TOO: [4]: 888 + [1658229676.713724][4872:4878] CHIP:TOO: Targets: 1 entries + [1658229676.713756][4872:4878] CHIP:TOO: [1]: { + [1658229676.713780][4872:4878] CHIP:TOO: Cluster: 55 + [1658229676.713804][4872:4878] CHIP:TOO: Endpoint: 66 + [1658229676.713826][4872:4878] CHIP:TOO: DeviceType: null + [1658229676.713849][4872:4878] CHIP:TOO: } + [1658229676.713873][4872:4878] CHIP:TOO: FabricIndex: 1 + [1658229676.713896][4872:4878] CHIP:TOO: } + [1658229676.714004][4872:4878] CHIP:EM: Sending Standalone Ack for MessageCounter:20458493 on exchange 31143i disabled: true - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements struct + is list of AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Manage (4) + 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}, {DeviceType: 22}] struct - Privilege field: Administer (5) AuthMode field: CASE (3) Subjects - field: [888, 777, 666, 555] Targets field: [{Cluster: 88}, {Endpoint: - 77}, {DeviceType: 66}]" + field: [{Cluster: 44}, {Endpoint: 33}] 3.struct Privilege field: + Administer (5) AuthMode field: CASE (3) Subjects field: [888, 777, + 666, 555] Targets field: [{Cluster: 88}, {Endpoint: 77}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 4, "authMode": 2, "subjects": [444,333,222,111], "targets": [{"cluster":44 , "endpoint":33, "deviceType":22}]},{"fabricIndex": 1, "privilege":4 , "authMode":2, "subjects": [888,777,666,555], "targets": [{"cluster": 88, "endpoint": 77, "deviceType":66}]}]' 1 0 - - 57547786.191042][2846:2851] CHIP:DMG: StatusIB = - [1657547786.191115][2846:2851] CHIP:DMG: { - [1657547786.191192][2846:2851] CHIP:DMG: status = 0x00 (SUCCESS), - [1657547786.191267][2846:2851] CHIP:DMG: }, - [1657547786.191340][2846:2851] CHIP:DMG: - [1657547786.191405][2846:2851] CHIP:DMG: }, - [1657547786.191496][2846:2851] CHIP:DMG: - [1657547786.191555][2846:2851] CHIP:DMG: AttributeStatusIB = - [1657547786.191618][2846:2851] CHIP:DMG: { - [1657547786.191680][2846:2851] CHIP:DMG: AttributePathIB = - [1657547786.191752][2846:2851] CHIP:DMG: { - [1657547786.191829][2846:2851] CHIP:DMG: Endpoint = 0x0, - [1657547786.191910][2846:2851] CHIP:DMG: Cluster = 0x1f, - [1657547786.191991][2846:2851] CHIP:DMG: Attribute = 0x0000_0000, - [1657547786.192074][2846:2851] CHIP:DMG: ListIndex = Null, - [1657547786.192151][2846:2851] CHIP:DMG: } - [1657547786.192232][2846:2851] CHIP:DMG: - [1657547786.192306][2846:2851] CHIP:DMG: StatusIB = - [1657547786.192379][2846:2851] CHIP:DMG: { - [1657547786.192455][2846:2851] CHIP:DMG: status = 0x01 (FAILURE), - [1657547786.192536][2846:2851] CHIP:DMG: }, - [1657547786.192612][2846:2851] CHIP:DMG: - [1657547786.192677][2846:2851] CHIP:DMG: }, - [1657547786.192761][2846:2851] CHIP:DMG: - [1657547786.192819][2846:2851] CHIP:DMG: AttributeStatusIB = - [1657547786.192883][2846:2851] CHIP:DMG: { - [1657547786.192944][2846:2851] CHIP:DMG: AttributePathIB = - [1657547786.193015][2846:2851] CHIP:DMG: { - [1657547786.193092][2846:2851] CHIP:DMG: Endpoint = 0x0, - [1657547786.193172][2846:2851] CHIP:DMG: Cluster = 0x1f, - [1657547786.193254][2846:2851] CHIP:DMG: Attribute = 0x0000_0000, - [1657547786.193338][2846:2851] CHIP:DMG: ListIndex = Null, - [1657547786.193441][2846:2851] CHIP:DMG: } - [1657547786.193528][2846:2851] CHIP:DMG: - [1657547786.193602][2846:2851] CHIP:DMG: StatusIB = - [1657547786.193676][2846:2851] CHIP:DMG: { - [1657547786.193751][2846:2851] CHIP:DMG: status = 0x01 (FAILURE), - [1657547786.193827][2846:2851] CHIP:DMG: }, - [1657547786.193901][2846:2851] CHIP:DMG: - [1657547786.193967][2846:2851] CHIP:DMG: }, - [1657547786.194091][2846:2851] CHIP:DMG: - [1657547786.194250][2846:2851] CHIP:DMG: ], - [1657547786.194406][2846:2851] CHIP:DMG: - [1657547786.194468][2846:2851] CHIP:DMG: InteractionModelRevision = 1 - [1657547786.194573][2846:2851] CHIP:DMG: } - [1657547786.194932][2846:2851] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1657547786.195005][2846:2851] CHIP:TOO: Response Failure: IM Error 0x00000501: General error: 0x01 (FAILURE) - [1657547786.195115][2846:2851] CHIP:EM: Sending Standalone Ack for MessageCounter:46770013 on exchange 27227i + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 4, "authMode": 2, "subjects": [444,333,222,111], "targets": [{"cluster":44 , "endpoint":33, "deviceType":null}]},{"fabricIndex": 1, "privilege":4 , "authMode":3, "subjects": [888,777,666,555], "targets": [{"cluster": 88, "endpoint": 77, "deviceType":null}]}]' 1 0 + + 1658226959.554674][4736:4741] CHIP:DMG: AttributeStatusIBs = + [1658226959.554706][4736:4741] CHIP:DMG: [ + [1658226959.554732][4736:4741] CHIP:DMG: AttributeStatusIB = + [1658226959.554761][4736:4741] CHIP:DMG: { + [1658226959.554787][4736:4741] CHIP:DMG: AttributePathIB = + [1658226959.554822][4736:4741] CHIP:DMG: { + [1658226959.554855][4736:4741] CHIP:DMG: Endpoint = 0x0, + [1658226959.554887][4736:4741] CHIP:DMG: Cluster = 0x1f, + [1658226959.554916][4736:4741] CHIP:DMG: Attribute = 0x0000_0000, + [1658226959.554941][4736:4741] CHIP:DMG: } + [1658226959.554982][4736:4741] CHIP:DMG: + [1658226959.555013][4736:4741] CHIP:DMG: StatusIB = + [1658226959.555049][4736:4741] CHIP:DMG: { + [1658226959.555085][4736:4741] CHIP:DMG: status = 0x00 (SUCCESS), + [1658226959.555121][4736:4741] CHIP:DMG: }, + [1658226959.555152][4736:4741] CHIP:DMG: + [1658226959.555181][4736:4741] CHIP:DMG: }, + [1658226959.555216][4736:4741] CHIP:DMG: + [1658226959.555241][4736:4741] CHIP:DMG: AttributeStatusIB = + [1658226959.555269][4736:4741] CHIP:DMG: { + [1658226959.555296][4736:4741] CHIP:DMG: AttributePathIB = + [1658226959.555329][4736:4741] CHIP:DMG: { + [1658226959.555360][4736:4741] CHIP:DMG: Endpoint = 0x0, + [1658226959.555392][4736:4741] CHIP:DMG: Cluster = 0x1f, + [1658226959.555424][4736:4741] CHIP:DMG: Attribute = 0x0000_0000, + [1658226959.555455][4736:4741] CHIP:DMG: ListIndex = Null, + [1658226959.555487][4736:4741] CHIP:DMG: } + [1658226959.555521][4736:4741] CHIP:DMG: + [1658226959.555552][4736:4741] CHIP:DMG: StatusIB = + [1658226959.555582][4736:4741] CHIP:DMG: { + [1658226959.555614][4736:4741] CHIP:DMG: status = 0x00 (SUCCESS), + [1658226959.555646][4736:4741] CHIP:DMG: }, + [1658226959.555678][4736:4741] CHIP:DMG: + [1658226959.555704][4736:4741] CHIP:DMG: }, + [1658226959.555740][4736:4741] CHIP:DMG: + [1658226959.555765][4736:4741] CHIP:DMG: AttributeStatusIB = + [1658226959.555793][4736:4741] CHIP:DMG: { + [1658226959.555819][4736:4741] CHIP:DMG: AttributePathIB = + [1658226959.555850][4736:4741] CHIP:DMG: { + [1658226959.555881][4736:4741] CHIP:DMG: Endpoint = 0x0, + [1658226959.555912][4736:4741] CHIP:DMG: Cluster = 0x1f, + [1658226959.555947][4736:4741] CHIP:DMG: Attribute = 0x0000_0000, + [1658226959.555983][4736:4741] CHIP:DMG: ListIndex = Null, + [1658226959.556017][4736:4741] CHIP:DMG: } + [1658226959.556053][4736:4741] CHIP:DMG: + [1658226959.556083][4736:4741] CHIP:DMG: StatusIB = + [1658226959.556114][4736:4741] CHIP:DMG: { + [1658226959.556146][4736:4741] CHIP:DMG: status = 0x00 (SUCCESS), + [1658226959.556177][4736:4741] CHIP:DMG: }, + [1658226959.556209][4736:4741] CHIP:DMG: + [1658226959.556235][4736:4741] CHIP:DMG: }, + [1658226959.556271][4736:4741] CHIP:DMG: + [1658226959.556296][4736:4741] CHIP:DMG: AttributeStatusIB = + [1658226959.556323][4736:4741] CHIP:DMG: { + [1658226959.556350][4736:4741] CHIP:DMG: AttributePathIB = + [1658226959.556380][4736:4741] CHIP:DMG: { + [1658226959.556412][4736:4741] CHIP:DMG: Endpoint = 0x0, + [1658226959.556445][4736:4741] CHIP:DMG: Cluster = 0x1f, + [1658226959.556479][4736:4741] CHIP:DMG: Attribute = 0x0000_0000, + [1658226959.556547][4736:4741] CHIP:DMG: ListIndex = Null, + [1658226959.556583][4736:4741] CHIP:DMG: } + [1658226959.556620][4736:4741] CHIP:DMG: + [1658226959.556651][4736:4741] CHIP:DMG: StatusIB = + [1658226959.556679][4736:4741] CHIP:DMG: { + [1658226959.556711][4736:4741] CHIP:DMG: status = 0x00 (SUCCESS), + [1658226959.556743][4736:4741] CHIP:DMG: }, + [1658226959.556774][4736:4741] CHIP:DMG: + [1658226959.556800][4736:4741] CHIP:DMG: }, + [1658226959.556830][4736:4741] CHIP:DMG: disabled: true - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" @@ -251,42 +310,71 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 - - [1657547862.774115][2857:2862] CHIP:DMG: ], - [1657547862.774169][2857:2862] CHIP:DMG: - [1657547862.774206][2857:2862] CHIP:DMG: SuppressResponse = true, - [1657547862.774243][2857:2862] CHIP:DMG: InteractionModelRevision = 1 - [1657547862.774277][2857:2862] CHIP:DMG: } - [1657547862.774631][2857:2862] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3138396318 - [1657547862.774709][2857:2862] CHIP:TOO: ACL: 1 entries - [1657547862.774786][2857:2862] CHIP:TOO: [1]: { - [1657547862.774841][2857:2862] CHIP:TOO: Privilege: 5 - [1657547862.774877][2857:2862] CHIP:TOO: AuthMode: 2 - [1657547862.774916][2857:2862] CHIP:TOO: Subjects: 1 entries - [1657547862.774957][2857:2862] CHIP:TOO: [1]: 112233 - [1657547862.774995][2857:2862] CHIP:TOO: Targets: null - [1657547862.775029][2857:2862] CHIP:TOO: FabricIndex: 1 - [1657547862.775061][2857:2862] CHIP:TOO: } - [1657547862.775162][2857:2862] CHIP:EM: Sending Standalone Ack for MessageCounter:258110233 on exchange 26412i - [1657547862.775244][2857:2862] CHIP:IN: Prepared secure message 0xffff8a77d958 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 26412i with MessageCounter:67511035. - [1657547862.775296][2857:2862] CHIP:IN: Sending encrypted msg 0xffff8a77d958 with MessageCounter:67511035 to 0x0000000000000001 (1) at monotonic time: 00000000006AC015 msec - [1657547862.775440][2857:2862] C + 9800.959293][4892:4897] CHIP:DMG: + [1658229800.959325][4892:4897] CHIP:DMG: ], + [1658229800.959399][4892:4897] CHIP:DMG: + [1658229800.959433][4892:4897] CHIP:DMG: SuppressResponse = true, + [1658229800.959466][4892:4897] CHIP:DMG: InteractionModelRevision = 1 + [1658229800.959497][4892:4897] CHIP:DMG: } + [1658229800.960148][4892:4897] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1307037427 + [1658229800.960272][4892:4897] CHIP:TOO: ACL: 3 entries + [1658229800.960360][4892:4897] CHIP:TOO: [1]: { + [1658229800.960397][4892:4897] CHIP:TOO: Privilege: 5 + [1658229800.960429][4892:4897] CHIP:TOO: AuthMode: 2 + [1658229800.960465][4892:4897] CHIP:TOO: Subjects: 1 entries + [1658229800.960526][4892:4897] CHIP:TOO: [1]: 112233 + [1658229800.960564][4892:4897] CHIP:TOO: Targets: null + [1658229800.960595][4892:4897] CHIP:TOO: FabricIndex: 1 + [1658229800.960625][4892:4897] CHIP:TOO: } + [1658229800.960673][4892:4897] CHIP:TOO: [2]: { + [1658229800.960706][4892:4897] CHIP:TOO: Privilege: 4 + [1658229800.960736][4892:4897] CHIP:TOO: AuthMode: 2 + [1658229800.960771][4892:4897] CHIP:TOO: Subjects: 4 entries + [1658229800.960806][4892:4897] CHIP:TOO: [1]: 444 + [1658229800.960840][4892:4897] CHIP:TOO: [2]: 333 + [1658229800.960874][4892:4897] CHIP:TOO: [3]: 222 + [1658229800.960907][4892:4897] CHIP:TOO: [4]: 111 + [1658229800.960944][4892:4897] CHIP:TOO: Targets: 1 entries + [1658229800.961008][4892:4897] CHIP:TOO: [1]: { + [1658229800.961042][4892:4897] CHIP:TOO: Cluster: 44 + [1658229800.961074][4892:4897] CHIP:TOO: Endpoint: 33 + [1658229800.961105][4892:4897] CHIP:TOO: DeviceType: null + [1658229800.961135][4892:4897] CHIP:TOO: } + [1658229800.961167][4892:4897] CHIP:TOO: FabricIndex: 1 + [1658229800.961197][4892:4897] CHIP:TOO: } + [1658229800.961245][4892:4897] CHIP:TOO: [3]: { + [1658229800.961277][4892:4897] CHIP:TOO: Privilege: 4 + [1658229800.961308][4892:4897] CHIP:TOO: AuthMode: 3 + [1658229800.961343][4892:4897] CHIP:TOO: Subjects: 4 entries + [1658229800.961378][4892:4897] CHIP:TOO: [1]: 888 + [1658229800.961411][4892:4897] CHIP:TOO: [2]: 777 + [1658229800.961445][4892:4897] CHIP:TOO: [3]: 666 + [1658229800.961479][4892:4897] CHIP:TOO: [4]: 555 + [1658229800.961516][4892:4897] CHIP:TOO: Targets: 1 entries + [1658229800.961556][4892:4897] CHIP:TOO: [1]: { + [1658229800.961589][4892:4897] CHIP:TOO: Cluster: 88 + [1658229800.961620][4892:4897] CHIP:TOO: Endpoint: 77 + [1658229800.961650][4892:4897] CHIP:TOO: DeviceType: null + [1658229800.961679][4892:4897] CHIP:TOO: } + [1658229800.961711][4892:4897] CHIP:TOO: FabricIndex: 1 + [1658229800.961741][4892:4897] CHIP:TOO: } + [1658229800.961850][4892:4897] CHIP:EM: Sending Standalone Ack for MessageCounter:261677764 on exchange 51705i disabled: true - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements struct + is list of AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: View (1) + 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}] - 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}]" + 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}]" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 2, "subjects": [111,222,333,444], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]' 1 0 - + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements 1657276276.708941][2297:2302] CHIP:DMG: WriteClient moving to [ResponseRe] [1657276276.709021][2297:2302] CHIP:DMG: WriteResponseMessage = [1657276276.709058][2297:2302] CHIP:DMG: { @@ -369,6 +457,8 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully . + [1657278053.764924][2231:2236] CHIP:DMG: SuppressResponse = true, [1657278053.764958][2231:2236] CHIP:DMG: InteractionModelRevision = 1 @@ -432,17 +522,18 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements struct + is list of AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: View (1) + 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}] struct + [{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}]" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 2, "subjects": [], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]' 1 0 + Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements [1657541707.114348][3004:3009] CHIP:DMG: { [1657541707.114393][3004:3009] CHIP:DMG: AttributeStatusIBs = @@ -524,6 +615,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1657278352.938811][2258:2263] CHIP:DMG: [1657278352.938840][2258:2263] CHIP:DMG: }, @@ -583,17 +675,18 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements struct + is list of AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: View (1) + field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) Subjects field: [111, 222, 333, 444] Targets - field: null struct Privilege field: Operate (3) AuthMode field: Group - (3) Subjects field: [555, 666, 777, 888] Targets field: null" + field: null 3.struct Privilege field: Operate (3) AuthMode field: + Group (3) Subjects field: [555, 666, 777, 888] Targets field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 2, "subjects": [111, 222, 333, 444], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [111, 222, 333, 444], "targets": null}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements as Target Null. [1657542060.230268][3398:3403] CHIP:DMG: { [1657542060.230322][3398:3403] CHIP:DMG: AttributeStatusIBs = @@ -675,6 +768,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1656656511.643560][2994:2999] CHIP:DMG: [1656656511.643593][2994:2999] CHIP:DMG: SuppressResponse = true, [1656656511.643626][2994:2999] CHIP:DMG: InteractionModelRevision = 1 @@ -716,15 +810,17 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": null, "targets": null}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements. + [1656507141.628453][3224:3229] CHIP:DMG: WriteResponseMessage = [1656507141.628515][3224:3229] CHIP:DMG: { [1656507141.628569][3224:3229] CHIP:DMG: AttributeStatusIBs = @@ -791,6 +887,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1656507318.740283][3241:3246] CHIP:DMG: ], [1656507318.740346][3241:3246] CHIP:DMG: @@ -819,14 +916,15 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: ProxyView (2) - AuthMode field: CASE (2) Subjects field: null Targets field: null" + field: [N1] Targets field: null 2.struct Privilege field: ProxyView + (2) AuthMode field: CASE (2) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 2, "authMode": 2, "subjects": null, "targets": null}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements [1656507439.868495][3249:3254] CHIP:DMG: WriteClient moving to [ResponseRe] [1656507439.868612][3249:3254] CHIP:DMG: WriteResponseMessage = @@ -894,6 +992,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1656507517.730614][3261:3266] CHIP:DMG: [1656507517.730654][3261:3266] CHIP:DMG: SuppressResponse = true, @@ -925,6 +1024,9 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read subjects-per-access-control-entry 1 0 + + On TH, verify DUT responds with value 4 or greater as subjects-per-access-control-entry + [1656657490.002372][3078:3083] CHIP:DMG: [1656657490.002408][3078:3083] CHIP:DMG: ], [1656657490.002452][3078:3083] CHIP:DMG: @@ -939,14 +1041,17 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + 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" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects":[33,44,55,66] , "targets": null}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements + + [1657542321.144954][3461:3466] CHIP:DMG: { [1657542321.144990][3461:3466] CHIP:DMG: AttributeStatusIBs = @@ -1012,6 +1117,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1656928460.992030][4255:4260] CHIP:DMG: ], [1656928460.992075][4255:4260] CHIP:DMG: [1656928460.992101][4255:4260] CHIP:DMG: SuppressResponse = true, @@ -1044,15 +1150,16 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: [CAT1, CAT1, CAT3, CAT4] Targets field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects":[65520,65521,65522,65523] , "targets": null}]' 1 0 + Verify in TH log: [1656509348.174135][3403:3408] CHIP:DMG: WriteClient moving to [ResponseRe] [1656509348.174227][3403:3408] CHIP:DMG: WriteResponseMessage = @@ -1121,6 +1228,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1656509471.738046][3416:3421] CHIP:DMG: [1656509471.738082][3416:3421] CHIP:DMG: SuppressResponse = true, @@ -1156,6 +1264,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read targets-per-access-control-entry 1 0 + On TH, verify DUT responds with value 3 or greater as Targets-per-access-control-entry. [1656509737.166763][3434:3439] CHIP:DMG: [1656509737.166786][3434:3439] CHIP:DMG: ], [1656509737.166816][3434:3439] CHIP:DMG: @@ -1170,15 +1279,17 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: null Targets field: null struct Privilege field: Operate (3) + field: null Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: Targets field: list of MAXTARGETS targets {Cluster: random} (stored as TARGETS)" PICS: ACL.S.A0000 verification: | ./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": 40, "endpoint": null, "deviceType": null },{ "cluster": 28, "endpoint": null, "deviceType": null }]}]' 1 0 + Verify in TH log: + [1657542520.140869][3499:3504] CHIP:DMG: { [1657542520.140922][3499:3504] CHIP:DMG: AttributeStatusIBs = [1657542520.140966][3499:3504] CHIP:DMG: [ @@ -1243,6 +1354,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1657542633.704684][3522:3527] CHIP:DMG: } [1657542633.705098][3522:3527] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3549245792 @@ -1280,6 +1392,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read access-control-entries-per-fabric 1 0 + On TH, verify DUT responds with value 3 or greater as AccessControlEntriesPerFabric. [1656594850.964909][4043:4048] CHIP:DMG: AttributeReportIBs = [1656594850.964954][4043:4048] CHIP:DMG: [ @@ -1314,8 +1427,8 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing MAXENTRIES elements - struct Privilege field: Administer (5) AuthMode field: CASE (2) - Subjects field: null Targets field: null struct Privilege field: + 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) + Subjects field: null 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" PICS: ACL.S.A0000 @@ -1324,6 +1437,8 @@ tests: {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [], "targets":null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [], "targets":null}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements + [1657617362.022161][8840:8845] CHIP:DMG: WriteResponseMessage = [1657617362.022190][8840:8845] CHIP:DMG: { [1657617362.022216][8840:8845] CHIP:DMG: AttributeStatusIBs = @@ -1406,6 +1521,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1657543165.385093][3592:3597] CHIP:DMG: } [1657543165.385508][3592:3597] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3549245812 @@ -1435,9 +1551,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: PASE (1) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | @@ -1445,6 +1561,7 @@ tests: {"fabricIndex": 1, "privilege": 3, "authMode": 1, "subjects": [], "targets":null}]' 1 0 + [1656914449.000227][3252:3257] CHIP:DMG: AttributePathIB = [1656914449.000272][3252:3257] CHIP:DMG: { [1656914449.000317][3252:3257] CHIP:DMG: Endpoint = 0x0, @@ -1491,6 +1608,8 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + + On TH , Verify DUT Responds Successfully [1656914601.250655][3267:3272] CHIP:DMG: ], [1656914601.250709][3267:3272] CHIP:DMG: [1656914601.250746][3267:3272] CHIP:DMG: SuppressResponse = true, @@ -1512,10 +1631,10 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Administer (5) - AuthMode field: Group (3) Subjects field: null Targets field: null" + field: [N1] Targets field: null 2.struct Privilege field: Administer + (5) AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, @@ -1556,11 +1675,11 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: invalid value - (not 1-5) AuthMode field: CASE (2) Subjects field: null Targets field: - null" + field: [N1] Targets field: null 2.struct Privilege field: invalid + value (not 1-5) AuthMode field: CASE (2) Subjects field: null Targets + field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, @@ -1603,9 +1722,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: invalid value (not 1-3) Subjects field: null Targets field: null" PICS: ACL.S.A0000 @@ -1676,9 +1795,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: [0] Targets field: null" PICS: ACL.S.A0000 verification: | @@ -1749,9 +1868,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: [0xFFFFFFFFFFFFFFFF] Targets field: null" PICS: ACL.S.A0000 @@ -1823,9 +1942,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: [0xFFFFFFFD_BAD_NONE0000000] Targets field: null" PICS: ACL.S.A0000 @@ -1970,9 +2089,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: [{}]" PICS: ACL.S.A0000 verification: | @@ -2043,9 +2162,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: [{Cluster: 0xFFFFFFFF}]" PICS: ACL.S.A0000 @@ -2116,86 +2235,64 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: [{Endpoint: 255}]" PICS: ACL.S.A0000 verification: | ./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": null, "endpoint": 255, "deviceType": null }]}]' 1 0 - - [1657617886.621245][8939:8944] CHIP:DMG: WriteResponseMessage = - [1657617886.621277][8939:8944] CHIP:DMG: { - [1657617886.621304][8939:8944] CHIP:DMG: AttributeStatusIBs = - [1657617886.621340][8939:8944] CHIP:DMG: [ - [1657617886.621370][8939:8944] CHIP:DMG: AttributeStatusIB = - [1657617886.621406][8939:8944] CHIP:DMG: { - [1657617886.621452][8939:8944] CHIP:DMG: AttributePathIB = - [1657617886.621492][8939:8944] CHIP:DMG: { - [1657617886.621531][8939:8944] CHIP:DMG: Endpoint = 0x0, - [1657617886.621569][8939:8944] CHIP:DMG: Cluster = 0x1f, - [1657617886.621606][8939:8944] CHIP:DMG: Attribute = 0x0000_0000, - [1657617886.621644][8939:8944] CHIP:DMG: } - [1657617886.621683][8939:8944] CHIP:DMG: - [1657617886.621721][8939:8944] CHIP:DMG: StatusIB = - [1657617886.621755][8939:8944] CHIP:DMG: { - [1657617886.621792][8939:8944] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617886.621830][8939:8944] CHIP:DMG: }, - [1657617886.621862][8939:8944] CHIP:DMG: - [1657617886.621891][8939:8944] CHIP:DMG: }, - [1657617886.621930][8939:8944] CHIP:DMG: - [1657617886.621957][8939:8944] CHIP:DMG: AttributeStatusIB = - [1657617886.621987][8939:8944] CHIP:DMG: { - [1657617886.622016][8939:8944] CHIP:DMG: AttributePathIB = - [1657617886.622049][8939:8944] CHIP:DMG: { - [1657617886.622085][8939:8944] CHIP:DMG: Endpoint = 0x0, - [1657617886.622122][8939:8944] CHIP:DMG: Cluster = 0x1f, - [1657617886.622162][8939:8944] CHIP:DMG: Attribute = 0x0000_0000, - [1657617886.622199][8939:8944] CHIP:DMG: ListIndex = Null, - [1657617886.622234][8939:8944] CHIP:DMG: } - [1657617886.622271][8939:8944] CHIP:DMG: - [1657617886.622308][8939:8944] CHIP:DMG: StatusIB = - [1657617886.622343][8939:8944] CHIP:DMG: { - [1657617886.622416][8939:8944] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617886.622452][8939:8944] CHIP:DMG: }, - [1657617886.622488][8939:8944] CHIP:DMG: - [1657617886.622518][8939:8944] CHIP:DMG: }, - [1657617886.622560][8939:8944] CHIP:DMG: - [1657617886.622589][8939:8944] CHIP:DMG: AttributeStatusIB = - [1657617886.622622][8939:8944] CHIP:DMG: { - [1657617886.622652][8939:8944] CHIP:DMG: AttributePathIB = - [1657617886.622686][8939:8944] CHIP:DMG: { - [1657617886.622721][8939:8944] CHIP:DMG: Endpoint = 0x0, - [1657617886.622762][8939:8944] CHIP:DMG: Cluster = 0x1f, - [1657617886.622803][8939:8944] CHIP:DMG: Attribute = 0x0000_0000, - [1657617886.622840][8939:8944] CHIP:DMG: ListIndex = Null, - [1657617886.622878][8939:8944] CHIP:DMG: } - [1657617886.622920][8939:8944] CHIP:DMG: - [1657617886.622957][8939:8944] CHIP:DMG: StatusIB = - [1657617886.622994][8939:8944] CHIP:DMG: { - [1657617886.623029][8939:8944] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617886.623064][8939:8944] CHIP:DMG: }, - [1657617886.623101][8939:8944] CHIP:DMG: - [1657617886.623131][8939:8944] CHIP:DMG: }, - [1657617886.623167][8939:8944] CHIP:DMG: - [1657617886.623196][8939:8944] CHIP:DMG: ], - [1657617886.623237][8939:8944] CHIP:DMG: - [1657617886.623264][8939:8944] CHIP:DMG: InteractionModelRevision = 1 - [1657617886.623292][8939:8944] CHIP:DMG: } - [1657617886.623435][8939:8944] CHIP:DMG: WriteClient moving to [AwaitingDe] + 79.812353][2515:2520] CHIP:DMG: } + [1658382979.812390][2515:2520] CHIP:DMG: + [1658382979.812427][2515:2520] CHIP:DMG: StatusIB = + [1658382979.812464][2515:2520] CHIP:DMG: { + [1658382979.812502][2515:2520] CHIP:DMG: status = 0x00 (SUCCESS), + [1658382979.812559][2515:2520] CHIP:DMG: }, + [1658382979.812589][2515:2520] CHIP:DMG: + [1658382979.812613][2515:2520] CHIP:DMG: }, + [1658382979.812647][2515:2520] CHIP:DMG: + [1658382979.812675][2515:2520] CHIP:DMG: AttributeStatusIB = + [1658382979.812706][2515:2520] CHIP:DMG: { + [1658382979.812737][2515:2520] CHIP:DMG: AttributePathIB = + [1658382979.812771][2515:2520] CHIP:DMG: { + [1658382979.812806][2515:2520] CHIP:DMG: Endpoint = 0x0, + [1658382979.812843][2515:2520] CHIP:DMG: Cluster = 0x1f, + [1658382979.812881][2515:2520] CHIP:DMG: Attribute = 0x0000_0000, + [1658382979.812917][2515:2520] CHIP:DMG: ListIndex = Null, + [1658382979.812951][2515:2520] CHIP:DMG: } + [1658382979.812989][2515:2520] CHIP:DMG: + [1658382979.813026][2515:2520] CHIP:DMG: StatusIB = + [1658382979.813060][2515:2520] CHIP:DMG: { + [1658382979.813096][2515:2520] CHIP:DMG: status = 0x00 (SUCCESS), + [1658382979.813130][2515:2520] CHIP:DMG: }, + [1658382979.813165][2515:2520] CHIP:DMG: + [1658382979.813195][2515:2520] CHIP:DMG: }, + [1658382979.813230][2515:2520] CHIP:DMG: + [1658382979.813257][2515:2520] CHIP:DMG: ], + [1658382979.813297][2515:2520] CHIP:DMG: + [1658382979.813324][2515:2520] CHIP:DMG: InteractionModelRevision = 1 + [1658382979.813351][2515:2520] CHIP:DMG: } + [1658382979.813497][2515:2520] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658382979.813563][2515:2520] CHIP:EM: Sending Standalone Ack for MessageCounter:223359153 on exchange 17128i + [1658382979.813637][2515:2520] CHIP:IN: Prepared secure message 0xffffa7ffda68 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 17128i with MessageCounter:12942839. + [1658382979.813680][2515:2520] CHIP:IN: Sending encrypted msg 0xffffa7ffda68 with MessageCounter:12942839 to 0x0000000000000001 (1) at monotonic time: 00000000003C9D9D msec + [1658382979.813841][2515:2520] CHIP: disabled: true - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: [{DeviceType: 0xFFFFFFFF}]" PICS: ACL.S.A0000 verification: | ./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": null, "endpoint": null, "deviceType": 4294967295 }]}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements + + [1657617920.044059][8948:8953] CHIP:DMG: { [1657617920.044085][8948:8953] CHIP:DMG: AttributeStatusIBs = @@ -2260,9 +2357,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: [{Endpoint: 22, DeviceType: 33}]" PICS: ACL.S.A0000 @@ -2330,9 +2427,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + 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}]" PICS: ACL.S.A0000 @@ -2407,6 +2504,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [], "targets": null}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing `1 element. [1657618011.091198][8968:8973] CHIP:DMG: { [1657618011.091228][8968:8973] CHIP:DMG: AttributeStatusIBs = [1657618011.091272][8968:8973] CHIP:DMG: [ 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 a04d35984eb0dc..2ee40a3308a034 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 @@ -36,6 +36,8 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 1 0 + On TH, Verify DUT Responds to CurrentFabricIndex attribute of operationalCredential cluster as 1 + [1657186774.908634][10846:10851] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 3161849734 [1657186774.911149][10846:10851] CHIP:TOO: CurrentFabricIndex: 1 disabled: true @@ -66,112 +68,111 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 2 0 + On TH, Verify DUT Responds to CurrentFabricIndex attribute of operationalCredential cluster as 2 [1657186956.724761][3910:3915] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 3161849734 [1657186956.731658][3910:3915] CHIP:TOO: CurrentFabricIndex: 2 disabled: true - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, + 'TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element - struct Data field: D_OK_EMPTY" + 1.struct .Data field: D_OK_EMPTY "1718"' PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write extension '[{"data":"1000110010001100"}]' 1 0 - - [1657187217.204901][10872:10877] CHIP:DMG: WriteResponseMessage = - [1657187217.204928][10872:10877] CHIP:DMG: { - [1657187217.204947][10872:10877] CHIP:DMG: AttributeStatusIBs = - [1657187217.204977][10872:10877] CHIP:DMG: [ - [1657187217.205002][10872:10877] CHIP:DMG: AttributeStatusIB = - [1657187217.205029][10872:10877] CHIP:DMG: { - [1657187217.205055][10872:10877] CHIP:DMG: AttributePathIB = - [1657187217.205092][10872:10877] CHIP:DMG: { - [1657187217.205129][10872:10877] CHIP:DMG: Endpoint = 0x0, - [1657187217.205160][10872:10877] CHIP:DMG: Cluster = 0x1f, - [1657187217.205199][10872:10877] CHIP:DMG: Attribute = 0x0000_0001, - [1657187217.205234][10872:10877] CHIP:DMG: } - [1657187217.205270][10872:10877] CHIP:DMG: - [1657187217.205300][10872:10877] CHIP:DMG: StatusIB = - [1657187217.205332][10872:10877] CHIP:DMG: { - [1657187217.205363][10872:10877] CHIP:DMG: status = 0x00 (SUCCESS), - [1657187217.205395][10872:10877] CHIP:DMG: }, - [1657187217.205425][10872:10877] CHIP:DMG: - [1657187217.205451][10872:10877] CHIP:DMG: }, - [1657187217.205486][10872:10877] CHIP:DMG: - [1657187217.205511][10872:10877] CHIP:DMG: AttributeStatusIB = - [1657187217.205537][10872:10877] CHIP:DMG: { - [1657187217.205562][10872:10877] CHIP:DMG: AttributePathIB = - [1657187217.205592][10872:10877] CHIP:DMG: { - [1657187217.205623][10872:10877] CHIP:DMG: Endpoint = 0x0, - [1657187217.205660][10872:10877] CHIP:DMG: Cluster = 0x1f, - [1657187217.205694][10872:10877] CHIP:DMG: Attribute = 0x0000_0001, - [1657187217.205730][10872:10877] CHIP:DMG: ListIndex = Null, - [1657187217.205764][10872:10877] CHIP:DMG: } - [1657187217.205797][10872:10877] CHIP:DMG: - [1657187217.205827][10872:10877] CHIP:DMG: StatusIB = - [1657187217.205856][10872:10877] CHIP:DMG: { - [1657187217.205887][10872:10877] CHIP:DMG: status = 0x00 (SUCCESS), - [1657187217.205922][10872:10877] CHIP:DMG: }, - [1657187217.205953][10872:10877] CHIP:DMG: - [1657187217.205978][10872:10877] CHIP:DMG: }, - [1657187217.206007][10872:10877] CHIP:DMG: - [1657187217.206031][10872:10877] CHIP:DMG: ], - [1657187217.206063][10872:10877] CHIP:DMG: - [1657187217.206086][10872:10877] CHIP:DMG: InteractionModelRevision = 1 - [1657187217.206110][10872:10877] CHIP:DMG: } - [1657187217.206211][10872:10877] CHIP:DMG: WriteClient moving to [AwaitingDe] + ./chip-tool accesscontrol write extension '[{"data":"1718"}]' 1 0 + + ON TH1,Verify DUT Responds Successfully to extension attribute list containg one element . + + + 657893593.975649][4116:4121] CHIP:DMG: { + [1657893593.975678][4116:4121] CHIP:DMG: AttributePathIB = + [1657893593.975718][4116:4121] CHIP:DMG: { + [1657893593.975755][4116:4121] CHIP:DMG: Endpoint = 0x0, + [1657893593.975797][4116:4121] CHIP:DMG: Cluster = 0x1f, + [1657893593.975835][4116:4121] CHIP:DMG: Attribute = 0x0000_0001, + [1657893593.975871][4116:4121] CHIP:DMG: } + [1657893593.975910][4116:4121] CHIP:DMG: + [1657893593.975944][4116:4121] CHIP:DMG: StatusIB = + [1657893593.975980][4116:4121] CHIP:DMG: { + [1657893593.976015][4116:4121] CHIP:DMG: status = 0x00 (SUCCESS), + [1657893593.976054][4116:4121] CHIP:DMG: }, + [1657893593.976088][4116:4121] CHIP:DMG: + [1657893593.976119][4116:4121] CHIP:DMG: }, + [1657893593.976161][4116:4121] CHIP:DMG: + [1657893593.976188][4116:4121] CHIP:DMG: AttributeStatusIB = + [1657893593.976220][4116:4121] CHIP:DMG: { + [1657893593.976248][4116:4121] CHIP:DMG: AttributePathIB = + [1657893593.976281][4116:4121] CHIP:DMG: { + [1657893593.976316][4116:4121] CHIP:DMG: Endpoint = 0x0, + [1657893593.976354][4116:4121] CHIP:DMG: Cluster = 0x1f, + [1657893593.976395][4116:4121] CHIP:DMG: Attribute = 0x0000_0001, + [1657893593.976434][4116:4121] CHIP:DMG: ListIndex = Null, + [1657893593.976469][4116:4121] CHIP:DMG: } + [1657893593.976507][4116:4121] CHIP:DMG: + [1657893593.976541][4116:4121] CHIP:DMG: StatusIB = + [1657893593.976574][4116:4121] CHIP:DMG: { + [1657893593.976610][4116:4121] CHIP:DMG: status = 0x00 (SUCCESS), + [1657893593.976645][4116:4121] CHIP:DMG: }, + [1657893593.976678][4116:4121] CHIP:DMG: + [1657893593.976709][4116:4121] CHIP:DMG: }, + [1657893593.976744][4116:4121] CHIP:DMG: + [1657893593.976771][4116:4121] CHIP:DMG: ], + [1657893593.976808][4116:4121] CHIP:DMG: + [1657893593.976835][4116:4121] CHIP:D disabled: true - label: - "TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute + 'TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute value is list of AccessControlExtensionStruct containing 1 element - struct Data field: D_OK_SINGLE" + 1.struct Data field: D_OK_SINGLE + "17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"' PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write extension '[{"data":"1000110010001100"}]' 2 0 - - [1657187392.197366][3939:3944] CHIP:DMG: WriteResponseMessage = - [1657187392.197462][3939:3944] CHIP:DMG: { - [1657187392.197516][3939:3944] CHIP:DMG: AttributeStatusIBs = - [1657187392.197616][3939:3944] CHIP:DMG: [ - [1657187392.197678][3939:3944] CHIP:DMG: AttributeStatusIB = - [1657187392.197767][3939:3944] CHIP:DMG: { - [1657187392.197832][3939:3944] CHIP:DMG: AttributePathIB = - [1657187392.197939][3939:3944] CHIP:DMG: { - [1657187392.198044][3939:3944] CHIP:DMG: Endpoint = 0x0, - [1657187392.198130][3939:3944] CHIP:DMG: Cluster = 0x1f, - [1657187392.198235][3939:3944] CHIP:DMG: Attribute = 0x0000_0001, - [1657187392.198333][3939:3944] CHIP:DMG: } - [1657187392.198422][3939:3944] CHIP:DMG: - [1657187392.198521][3939:3944] CHIP:DMG: StatusIB = - [1657187392.198601][3939:3944] CHIP:DMG: { - [1657187392.198703][3939:3944] CHIP:DMG: status = 0x00 (SUCCESS), - [1657187392.198800][3939:3944] CHIP:DMG: }, - [1657187392.198882][3939:3944] CHIP:DMG: - [1657187392.198965][3939:3944] CHIP:DMG: }, - [1657187392.199052][3939:3944] CHIP:DMG: - [1657187392.199135][3939:3944] CHIP:DMG: AttributeStatusIB = - [1657187392.199201][3939:3944] CHIP:DMG: { - [1657187392.199286][3939:3944] CHIP:DMG: AttributePathIB = - [1657187392.199382][3939:3944] CHIP:DMG: { - [1657187392.199463][3939:3944] CHIP:DMG: Endpoint = 0x0, - [1657187392.199566][3939:3944] CHIP:DMG: Cluster = 0x1f, - [1657187392.199650][3939:3944] CHIP:DMG: Attribute = 0x0000_0001, - [1657187392.199753][3939:3944] CHIP:DMG: ListIndex = Null, - [1657187392.199830][3939:3944] CHIP:DMG: } - [1657187392.199937][3939:3944] CHIP:DMG: - [1657187392.200030][3939:3944] CHIP:DMG: StatusIB = - [1657187392.200109][3939:3944] CHIP:DMG: { - [1657187392.200208][3939:3944] CHIP:DMG: status = 0x00 (SUCCESS), - [1657187392.200287][3939:3944] CHIP:DMG: }, - [1657187392.200385][3939:3944] CHIP:DMG: - [1657187392.200467][3939:3944] CHIP:DMG: }, - [1657187392.200543][3939:3944] CHIP:DMG: - [1657187392.200680][3939:3944] CHIP:DMG: ], - [1657187392.200821][3939:3944] CHIP:DMG: - [1657187392.200885][3939:3944] CHIP:DMG: InteractionModelRevision = 1 - [1657187392.200943][3939:3944] CHIP:DMG: } - [1657187392.201175][3939:3944] CHIP:DMG: WriteClient moving to [AwaitingDe] + ./chip-tool accesscontrol write extension '[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]' 2 0 + + ON TH2,Verify DUT Responds Successfully to extension attribute list containg one element . + 1657894672.479983][2433:2438] CHIP:DMG: WriteClient moving to [ResponseRe] + [1657894672.480057][2433:2438] CHIP:DMG: WriteResponseMessage = + [1657894672.480092][2433:2438] CHIP:DMG: { + [1657894672.480124][2433:2438] CHIP:DMG: AttributeStatusIBs = + [1657894672.480175][2433:2438] CHIP:DMG: [ + [1657894672.480211][2433:2438] CHIP:DMG: AttributeStatusIB = + [1657894672.480251][2433:2438] CHIP:DMG: { + [1657894672.480288][2433:2438] CHIP:DMG: AttributePathIB = + [1657894672.480333][2433:2438] CHIP:DMG: { + [1657894672.480379][2433:2438] CHIP:DMG: Endpoint = 0x0, + [1657894672.480427][2433:2438] CHIP:DMG: Cluster = 0x1f, + [1657894672.480476][2433:2438] CHIP:DMG: Attribute = 0x0000_0001, + [1657894672.480521][2433:2438] CHIP:DMG: } + [1657894672.480570][2433:2438] CHIP:DMG: + [1657894672.480612][2433:2438] CHIP:DMG: StatusIB = + [1657894672.480657][2433:2438] CHIP:DMG: { + [1657894672.480700][2433:2438] CHIP:DMG: status = 0x00 (SUCCESS), + [1657894672.480745][2433:2438] CHIP:DMG: }, + [1657894672.480789][2433:2438] CHIP:DMG: + [1657894672.480826][2433:2438] CHIP:DMG: }, + [1657894672.480877][2433:2438] CHIP:DMG: + [1657894672.480911][2433:2438] CHIP:DMG: AttributeStatusIB = + [1657894672.480949][2433:2438] CHIP:DMG: { + [1657894672.480986][2433:2438] CHIP:DMG: AttributePathIB = + [1657894672.481028][2433:2438] CHIP:DMG: { + [1657894672.481072][2433:2438] CHIP:DMG: Endpoint = 0x0, + [1657894672.481120][2433:2438] CHIP:DMG: Cluster = 0x1f, + [1657894672.481168][2433:2438] CHIP:DMG: Attribute = 0x0000_0001, + [1657894672.481214][2433:2438] CHIP:DMG: ListIndex = Null, + [1657894672.481258][2433:2438] CHIP:DMG: } + [1657894672.481306][2433:2438] CHIP:DMG: + [1657894672.481347][2433:2438] CHIP:DMG: StatusIB = + [1657894672.481390][2433:2438] CHIP:DMG: { + [1657894672.481433][2433:2438] CHIP:DMG: status = 0x00 (SUCCESS), + [1657894672.481482][2433:2438] CHIP:DMG: }, + [1657894672.481526][2433:2438] CHIP:DMG: + [1657894672.481562][2433:2438] CHIP:DMG: }, + [1657894672.481605][2433:2438] CHIP:DMG: + [1657894672.481639][2433:2438] CHIP:DMG: ], + [1657894672.481686][2433:2438] CHIP:DMG: + [1657894672.481720][2433:2438] CHIP:DMG: InteractionModelRevision = 1 + [1657894672.481754][2433:2438] CHIP:DMG: } disabled: true - label: @@ -179,6 +180,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read extension 1 0 + On TH1 ,VERIFY DUT RESPONDS SUCCESSFULLY. [1657187433.621369][10890:10895] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 3415499944 [1657187433.621422][10890:10895] CHIP:TOO: Extension: 1 entries @@ -194,12 +196,13 @@ tests: verification: | ./chip-tool accesscontrol read extension 2 0 - [1657187461.411759][3951:3956] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 3415499944 - [1657187461.411876][3951:3956] CHIP:TOO: Extension: 1 entries - [1657187461.411988][3951:3956] CHIP:TOO: [1]: { - [1657187461.412055][3951:3956] CHIP:TOO: Data: 1000110010001100 - [1657187461.412142][3951:3956] CHIP:TOO: FabricIndex: 2 - [1657187461.412199][3951:3956] CHIP:TOO: } + On TH2, Verify DUT Responds successfully + [1658327214.683199][2749:2754] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 2953114587 + [1658327214.683283][2749:2754] CHIP:TOO: Extension: 1 entries + [1658327214.683348][2749:2754] CHIP:TOO: [1]: { + [1658327214.683388][2749:2754] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 + [1658327214.683423][2749:2754] CHIP:TOO: FabricIndex: 2 + [1658327214.683454][2749:2754] CHIP:TOO: } disabled: true - label: @@ -207,22 +210,21 @@ tests: AccessControlExtensionChanged event" PICS: ACL.S.E01 verification: | - ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 - - [1657187785.328447][10914:10919] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 - [1657187785.328472][10914:10919] CHIP:TOO: Event number: 5 - [1657187785.328494][10914:10919] CHIP:TOO: Priority: Info - [1657187785.328515][10914:10919] CHIP:TOO: Timestamp: 19186697 - [1657187785.328678][10914:10919] CHIP:TOO: AccessControlExtensionChanged: { - [1657187785.328716][10914:10919] CHIP:TOO: AdminNodeID: 112233 - [1657187785.328740][10914:10919] CHIP:TOO: AdminPasscodeID: null - [1657187785.328764][10914:10919] CHIP:TOO: ChangeType: 1 - [1657187785.328788][10914:10919] CHIP:TOO: LatestValue: { - [1657187785.328813][10914:10919] CHIP:TOO: Data: 1000110010001100 - [1657187785.328835][10914:10919] CHIP:TOO: FabricIndex: 1 - [1657187785.328856][10914:10919] CHIP:TOO: } - [1657187785.328878][10914:10919] CHIP:TOO: AdminFabricIndex: 1 - [1657187785.328900][10914:10919] CHIP:TOO: } + ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 + [1658327494.282263][2810:2815] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 + [1658327494.282295][2810:2815] CHIP:TOO: Event number: 5 + [1658327494.282319][2810:2815] CHIP:TOO: Priority: Info + [1658327494.282342][2810:2815] CHIP:TOO: Timestamp: 4621721 + [1658327494.282458][2810:2815] CHIP:TOO: AccessControlExtensionChanged: { + [1658327494.282497][2810:2815] CHIP:TOO: AdminNodeID: 112233 + [1658327494.282524][2810:2815] CHIP:TOO: AdminPasscodeID: null + [1658327494.282551][2810:2815] CHIP:TOO: ChangeType: 1 + [1658327494.282576][2810:2815] CHIP:TOO: LatestValue: { + [1658327494.282633][2810:2815] CHIP:TOO: Data: 1718 + [1658327494.282660][2810:2815] CHIP:TOO: FabricIndex: 1 + [1658327494.282684][2810:2815] CHIP:TOO: } + [1658327494.282709][2810:2815] CHIP:TOO: AdminFabricIndex: 1 + [1658327494.282733][2810:2815] CHIP:TOO: } disabled: true - label: @@ -231,19 +233,20 @@ tests: PICS: ACL.S.E01 verification: | ./chip-tool accesscontrol read-event access-control-extension-changed 2 0 - - [1657187837.562681][3976:3981] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 - [1657187837.562746][3976:3981] CHIP:TOO: Event number: 6 - [1657187837.562801][3976:3981] CHIP:TOO: Priority: Info - [1657187837.562855][3976:3981] CHIP:TOO: Timestamp: 19361672 - [1657187837.566248][3976:3981] CHIP:TOO: AccessControlExtensionChanged: { - [1657187837.566371][3976:3981] CHIP:TOO: AdminNodeID: 112233 - [1657187837.566434][3976:3981] CHIP:TOO: AdminPasscodeID: null - [1657187837.566575][3976:3981] CHIP:TOO: ChangeType: 1 - [1657187837.566642][3976:3981] CHIP:TOO: LatestValue: { - [1657187837.566705][3976:3981] CHIP:TOO: Data: 1000110010001100 - [1657187837.566829][3976:3981] CHIP:TOO: FabricIndex: 2 - [1657187837.566889][3976:3981] CHIP:TOO: } - [1657187837.566946][3976:3981] CHIP:TOO: AdminFabricIndex: 2 - [1657187837.567065][3976:3981] CHIP:TOO: } + On TH2, Verify DUT Responds successfully + + [1658327551.622018][4295:4300] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 + [1658327551.622043][4295:4300] CHIP:TOO: Event number: 6 + [1658327551.622065][4295:4300] CHIP:TOO: Priority: Info + [1658327551.622130][4295:4300] CHIP:TOO: Timestamp: 4633724 + [1658327551.622239][4295:4300] CHIP:TOO: AccessControlExtensionChanged: { + [1658327551.622287][4295:4300] CHIP:TOO: AdminNodeID: 112233 + [1658327551.622313][4295:4300] CHIP:TOO: AdminPasscodeID: null + [1658327551.622337][4295:4300] CHIP:TOO: ChangeType: 1 + [1658327551.622361][4295:4300] CHIP:TOO: LatestValue: { + [1658327551.622389][4295:4300] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 + [1658327551.622414][4295:4300] CHIP:TOO: FabricIndex: 2 + [1658327551.622436][4295:4300] CHIP:TOO: } + [1658327551.622459][4295:4300] CHIP:TOO: AdminFabricIndex: 2 + [1658327551.622480][4295:4300] CHIP:TOO: } disabled: true 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 43556debfb33ca..29d85932b5e9ce 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 @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,33 +42,33 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: ACT.S.A0002 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1, 2] + contains: [0, 1] - - label: "Read the global attribute: AttributeList" - PICS: " !ACT.S.A0002 " + - label: "Read the optional attribute(SetupURL) in AttributeList" + PICS: ACT.S.A0002 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1] + contains: [0, 1, 2] + # Checking only type check all attributes are optional - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: - value: [] constraints: type: list + maxLength: 11 - label: "Read the global attribute: GeneratedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_ACT_3_1.yaml b/src/app/tests/suites/certification/Test_TC_ACT_3_1.yaml index 9aec071cf8518d..8268d4b403c9da 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_3_1.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 76.2.3. [TC-ACT-3.1] GLobal attributes with client as DUT +name: 77.2.3. [TC-ACT-3.1] GLobal attributes with client as DUT config: nodeId: 0x12344321 @@ -26,28 +26,58 @@ tests: a manufacturer specific order" verification: | ./chip-tool bridgedactions read action-list 1 1 + + Verify in DUT as client side log + [1657608767.991103][57130:57135] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 2843363251 + [1657608767.991158][57130:57135] CHIP:TOO: action list: 0 entries + + ./chip-tool bridgedactions read endpoint-list 1 1 + + Verify in DUT as client side log + [1657608786.230461][57139:57144] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 2843363251 + [1657608786.230485][57139:57144] CHIP:TOO: endpoint list: 2 entries + [1657608786.230504][57139:57144] CHIP:TOO: [1]: { + [1657608786.230514][57139:57144] CHIP:TOO: EndpointListID: 57345 + [1657608786.230519][57139:57144] CHIP:TOO: Name: Room 1 + [1657608786.230525][57139:57144] CHIP:TOO: Type: 1 + [1657608786.230531][57139:57144] CHIP:TOO: Endpoints: 2 entries + [1657608786.230538][57139:57144] CHIP:TOO: [1]: 10 + [1657608786.230544][57139:57144] CHIP:TOO: [2]: 11 + [1657608786.230549][57139:57144] CHIP:TOO: } + [1657608786.230558][57139:57144] CHIP:TOO: [2]: { + [1657608786.230563][57139:57144] CHIP:TOO: EndpointListID: 57346 + [1657608786.230567][57139:57144] CHIP:TOO: Name: Room 2 + [1657608786.230572][57139:57144] CHIP:TOO: Type: 1 + [1657608786.230578][57139:57144] CHIP:TOO: Endpoints: 2 entries + [1657608786.230583][57139:57144] CHIP:TOO: [1]: 12 + [1657608786.230589][57139:57144] CHIP:TOO: [2]: 13 + [1657608786.230594][57139:57144] CHIP:TOO: } disabled: true - label: "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order" verification: | + Optional attibute + Verify in DUT as client side log + ./chip-tool bridgedactions read setup-url 1 1 + Needs an SDK Implementation disabled: true - label: "DUT writes a suitable value to all supported mandatory attributes on the TH one at a time in a manufacturer specific order" verification: | - No writeable attribute + This cluster doesn't have any writable attributes disabled: true - label: "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer specific order" verification: | - No writeable attribute + This cluster doesn't have any writable attributes disabled: true - label: @@ -57,7 +87,33 @@ tests: AttributeList. Commission DUT to TH again" verification: | ./chip-tool bridgedactions read action-list 1 1 + + Verify in DUT as client side log + [1657608767.991103][57130:57135] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 2843363251 + [1657608767.991158][57130:57135] CHIP:TOO: action list: 0 entries + + ./chip-tool bridgedactions read endpoint-list 1 1 + + Verify in DUT as client side log + [1657608786.230461][57139:57144] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 2843363251 + [1657608786.230485][57139:57144] CHIP:TOO: endpoint list: 2 entries + [1657608786.230504][57139:57144] CHIP:TOO: [1]: { + [1657608786.230514][57139:57144] CHIP:TOO: EndpointListID: 57345 + [1657608786.230519][57139:57144] CHIP:TOO: Name: Room 1 + [1657608786.230525][57139:57144] CHIP:TOO: Type: 1 + [1657608786.230531][57139:57144] CHIP:TOO: Endpoints: 2 entries + [1657608786.230538][57139:57144] CHIP:TOO: [1]: 10 + [1657608786.230544][57139:57144] CHIP:TOO: [2]: 11 + [1657608786.230549][57139:57144] CHIP:TOO: } + [1657608786.230558][57139:57144] CHIP:TOO: [2]: { + [1657608786.230563][57139:57144] CHIP:TOO: EndpointListID: 57346 + [1657608786.230567][57139:57144] CHIP:TOO: Name: Room 2 + [1657608786.230572][57139:57144] CHIP:TOO: Type: 1 + [1657608786.230578][57139:57144] CHIP:TOO: Endpoints: 2 entries + [1657608786.230583][57139:57144] CHIP:TOO: [1]: 12 + [1657608786.230589][57139:57144] CHIP:TOO: [2]: 13 + [1657608786.230594][57139:57144] CHIP:TOO: } disabled: true - label: @@ -66,34 +122,35 @@ tests: verification: | ./chip-tool bridgedactions read setup-url 1 1 + Verify in DUT as client side log [1656480136859] [49753:5741500] CHIP: [DMG] ReportDataMessage = [1656480136859] [49753:5741500] CHIP: [DMG] { - [1656480136859] [49753:5741500] CHIP: [DMG] AttributeReportIBs = - [1656480136859] [49753:5741500] CHIP: [DMG] [ - [1656480136859] [49753:5741500] CHIP: [DMG] AttributeReportIB = - [1656480136859] [49753:5741500] CHIP: [DMG] { - [1656480136859] [49753:5741500] CHIP: [DMG] AttributeStatusIB = - [1656480136859] [49753:5741500] CHIP: [DMG] { - [1656480136859] [49753:5741500] CHIP: [DMG] AttributePathIB = - [1656480136859] [49753:5741500] CHIP: [DMG] { - [1656480136859] [49753:5741500] CHIP: [DMG] Endpoint = 0x1, - [1656480136859] [49753:5741500] CHIP: [DMG] Cluster = 0x25, - [1656480136859] [49753:5741500] CHIP: [DMG] Attribute = 0x0000_0002, - [1656480136859] [49753:5741500] CHIP: [DMG] } + [1656480136859] [49753:5741500] CHIP: [DMG] AttributeReportIBs = + [1656480136859] [49753:5741500] CHIP: [DMG] [ + [1656480136859] [49753:5741500] CHIP: [DMG] AttributeReportIB = + [1656480136859] [49753:5741500] CHIP: [DMG] { + [1656480136859] [49753:5741500] CHIP: [DMG] AttributeStatusIB = + [1656480136859] [49753:5741500] CHIP: [DMG] { + [1656480136859] [49753:5741500] CHIP: [DMG] AttributePathIB = + [1656480136859] [49753:5741500] CHIP: [DMG] { + [1656480136859] [49753:5741500] CHIP: [DMG] Endpoint = 0x1, + [1656480136859] [49753:5741500] CHIP: [DMG] Cluster = 0x25, + [1656480136859] [49753:5741500] CHIP: [DMG] Attribute = 0x0000_0002, + [1656480136859] [49753:5741500] CHIP: [DMG] } [1656480136859] [49753:5741500] CHIP: [DMG] - [1656480136859] [49753:5741500] CHIP: [DMG] StatusIB = - [1656480136859] [49753:5741500] CHIP: [DMG] { - [1656480136859] [49753:5741500] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1656480136859] [49753:5741500] CHIP: [DMG] }, + [1656480136859] [49753:5741500] CHIP: [DMG] StatusIB = + [1656480136859] [49753:5741500] CHIP: [DMG] { + [1656480136859] [49753:5741500] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), + [1656480136859] [49753:5741500] CHIP: [DMG] }, [1656480136859] [49753:5741500] CHIP: [DMG] - [1656480136859] [49753:5741500] CHIP: [DMG] }, + [1656480136859] [49753:5741500] CHIP: [DMG] }, [1656480136859] [49753:5741500] CHIP: [DMG] - [1656480136859] [49753:5741500] CHIP: [DMG] }, + [1656480136859] [49753:5741500] CHIP: [DMG] }, [1656480136859] [49753:5741500] CHIP: [DMG] - [1656480136859] [49753:5741500] CHIP: [DMG] ], + [1656480136859] [49753:5741500] CHIP: [DMG] ], [1656480136859] [49753:5741500] CHIP: [DMG] - [1656480136859] [49753:5741500] CHIP: [DMG] SuppressResponse = true, - [1656480136859] [49753:5741500] CHIP: [DMG] InteractionModelRevision = 1 + [1656480136859] [49753:5741500] CHIP: [DMG] SuppressResponse = true, + [1656480136859] [49753:5741500] CHIP: [DMG] InteractionModelRevision = 1 [1656480136859] [49753:5741500] CHIP: [DMG] } [1656480136859] [49753:5741500] CHIP: [TOO] Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) disabled: true @@ -102,5 +159,5 @@ tests: "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer specific order" verification: | - No writeable attribute + This cluster doesn't have any writable attributes disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml b/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml index 14fc3be363f2a6..a5ab639f85d669 100644 --- a/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -44,7 +44,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml b/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml index bb20164b81e8a7..e6b473d7bfe496 100644 --- a/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read FeatureMap attribute from the DUT" command: "readAttribute" @@ -44,10 +44,9 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: APBSC.S.A0000 && APBSC.S.A0001 && APBSC.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -55,6 +54,33 @@ tests: type: list contains: [2, 4, 5, 6, 7, 65528, 65529, 65531, 65532, 65533] + - label: "Read the optional attribute(VendorName) in AttributeList" + PICS: APBSC.S.A0000 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0] + + - label: "Read the optional attribute(VendorID) in AttributeList" + PICS: APBSC.S.A0001 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [1] + + - label: "Read the optional attribute(ProductID) in AttributeList" + PICS: APBSC.S.A0003 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3] + - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_APBSC_9_1.yaml b/src/app/tests/suites/certification/Test_TC_APBSC_9_1.yaml index fa7f138e3a9283..73ac569a6c095a 100644 --- a/src/app/tests/suites/certification/Test_TC_APBSC_9_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_APBSC_9_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "VendorName" response: constraints: - type: string + type: char_string maxLength: 32 - label: "Reads the VendorID attribute" @@ -43,8 +43,8 @@ tests: attribute: "VendorID" response: constraints: - type: vendor-id - saveAs: vendorID + type: vendor_id + saveAs: vendorID - label: "Reads the ApplicationName attribute" PICS: APBSC.S.A0002 @@ -52,7 +52,7 @@ tests: attribute: "ApplicationName" response: constraints: - type: string + type: char_string maxLength: 256 - label: "Reads the ProductID attribute" @@ -61,7 +61,7 @@ tests: attribute: "ProductID" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -71,7 +71,7 @@ tests: attribute: "Application" response: constraints: - type: struct + type: ApplicationBasicApplication - label: "Reads the Status attribute" PICS: APBSC.S.A0005 @@ -88,7 +88,7 @@ tests: attribute: "ApplicationVersion" response: constraints: - type: string + type: char_string maxLength: 32 - label: "Reads the AllowedVendorList attribute" diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml index c1fded43f574ea..7b9eecd1ced204 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml @@ -36,16 +36,16 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - - label: "Read the optional global attribute: FeatureMap" + - label: "Read the global attribute: FeatureMap" PICS: APPLAUNCHER.S.AP command: "readAttribute" attribute: "FeatureMap" response: value: 1 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: FeatureMap" PICS: " !APPLAUNCHER.S.AP " @@ -54,10 +54,9 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: APPLAUNCHER.S.A0000 && APPLAUNCHER.S.A0001 command: "readAttribute" attribute: "AttributeList" response: diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_7.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_7.yaml index fd6c9337b31c20..88ebf1183b5d55 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_7.yaml @@ -19,10 +19,10 @@ config: cluster: "Application Launcher" endpoint: 1 catalogVendorId: - type: INT16U + type: int16u defaultValue: 123 applicationId: - type: CHAR_STRING + type: char_string defaultValue: "exampleid" tests: diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml index caa412e0171b04..cff97c0e92b2b3 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml @@ -19,10 +19,10 @@ config: cluster: "Application Launcher" endpoint: 1 catalogVendorId: - type: INT16U + type: int16u defaultValue: 123 applicationId: - type: CHAR_STRING + type: char_string defaultValue: "exampleid" tests: diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml index 08b966f0e45e31..c233063ad86216 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml @@ -19,10 +19,10 @@ config: cluster: "Application Launcher" endpoint: 1 catalogVendorId: - type: INT16U + type: int16u defaultValue: 123 applicationId: - type: CHAR_STRING + type: char_string defaultValue: "exampleid" tests: diff --git a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml index f59c26a9caff9c..d3fef20d04f878 100644 --- a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml @@ -36,14 +36,14 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 3 diff --git a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_1.yaml b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_1.yaml index ebc17cc9dbc7f2..f43a7c27fb1103 100644 --- a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "OutputList" response: constraints: - type: OutPutInfo + type: list - label: "Sends a SelectAudioOutput command" PICS: AUDIOOUTPUT.S.C0000 diff --git a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_2.yaml b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_2.yaml index 43acc9f3ce66a9..258970c1ad8d50 100644 --- a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_2.yaml @@ -35,7 +35,7 @@ tests: response: saveAs: audioOutputListValues constraints: - type: OutPutInfo + type: list - label: "Sends a RenameOutput command" PICS: AUDIOOUTPUT.S.C0001 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 5ee85e3d7f9981..5e8a9fe31a9c1b 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 @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 117.1.1. [TC-BIND-1.1] Global Attributes [DUT-Controller] +name: 118.1.1. [TC-BIND-1.1] Global Attributes [DUT-Controllee] config: nodeId: 0x12344321 @@ -30,14 +30,17 @@ tests: verification: | ./chip-tool binding read cluster-revision 1 0 + On TH, verify DUT responsds ClusterRevision attribute as the value 1 + [1649417989.863435][3040:3045] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFD DataVersion: 1411817517 [1649417989.863557][3040:3045] CHIP:TOO: ClusterRevision: 1 - [1649417989.863691][3040:3045] CHIP:EM: Sending Standalone Ack for MessageCounter:2888019 on exchange 4263i disabled: true - label: "TH1 reads the FeatureMap from DUT" verification: | - ./chip-tool binding read feature-map 1 0 + ./chip-tool binding read feature-map 1 0 + + Verify on the TH Log: [1653560808.265422][3439:3444] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFC DataVersion: 2519252823 [1653560808.265507][3439:3444] CHIP:TOO: FeatureMap: 0 @@ -47,6 +50,8 @@ tests: verification: | ./chip-tool binding read attribute-list 1 0 + Verify on the TH Log: + [1653560826.815841][3445:3450] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFB DataVersion: 2519252823 [1653560826.816170][3445:3450] CHIP:TOO: AttributeList: 6 entries [1653560826.816239][3445:3450] CHIP:TOO: [1]: 0 @@ -59,13 +64,15 @@ tests: - label: "TH1 reads EventList from DUT" verification: | - No Event-list is on attributes list + Out of scope for V1.0 disabled: true - label: "TH1 reads AcceptedCommandList from DUT" verification: | ./chip-tool binding read accepted-command-list 1 0 + Verify on the TH Log: + [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 disabled: true @@ -74,6 +81,8 @@ tests: verification: | ./chip-tool binding read generated-command-list 1 0 - [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 + Verify on the TH Log: + + [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 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml index 6c20a583032e76..8189aedcfcc2a3 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml @@ -23,22 +23,100 @@ config: tests: - label: "Factory Reset DUT" verification: | - + Vendor specific action, for chip-tool run + rm -rf /tmp/chip* disabled: true - label: "Commission DUT to TH1s fabric" verification: | + ./chip-tool pairing ble-wifi 1 chipsetup4 matter123 20202021 3840 + + + + ./chip-tool pairing open-commissioning-window 1 1 400 1000 3840 + + MessageCounter:141758774 from RetransTable on exchange 63698i + [1657796688.322878][3738:3743] CHIP:DMG: ICR moving to [ResponseRe] + [1657796688.322964][3738:3743] CHIP:DMG: InvokeResponseMessage = + [1657796688.323016][3738:3743] CHIP:DMG: { + [1657796688.323066][3738:3743] CHIP:DMG: suppressResponse = false, + [1657796688.323118][3738:3743] CHIP:DMG: InvokeResponseIBs = + [1657796688.323180][3738:3743] CHIP:DMG: [ + [1657796688.323231][3738:3743] CHIP:DMG: InvokeResponseIB = + [1657796688.323299][3738:3743] CHIP:DMG: { + [1657796688.323353][3738:3743] CHIP:DMG: CommandStatusIB = + [1657796688.323418][3738:3743] CHIP:DMG: { + [1657796688.323480][3738:3743] CHIP:DMG: CommandPathIB = + [1657796688.323549][3738:3743] CHIP:DMG: { + [1657796688.323627][3738:3743] CHIP:DMG: EndpointId = 0x0, + [1657796688.323704][3738:3743] CHIP:DMG: ClusterId = 0x3c, + [1657796688.323776][3738:3743] CHIP:DMG: CommandId = 0x0, + [1657796688.323845][3738:3743] CHIP:DMG: }, + [1657796688.323920][3738:3743] CHIP:DMG: + [1657796688.323982][3738:3743] CHIP:DMG: StatusIB = + [1657796688.324052][3738:3743] CHIP:DMG: { + [1657796688.324174][3738:3743] CHIP:DMG: status = 0x00 (SUCCESS), + [1657796688.324246][3738:3743] CHIP:DMG: }, + [1657796688.324314][3738:3743] CHIP:DMG: + [1657796688.324375][3738:3743] CHIP:DMG: }, + [1657796688.324451][3738:3743] CHIP:DMG: + [1657796688.324509][3738:3743] CHIP:DMG: }, + [1657796688.324572][3738:3743] CHIP:DMG: + [1657796688.324623][3738:3743] CHIP:DMG: ], + [1657796688.324684][3738:3743] CHIP:DMG: + [1657796688.324734][3738:3743] CHIP:DMG: InteractionModelRevision = 1 + [1657796688.324783][3738:3743] CHIP:DMG: }, + [1657796688.324897][3738:3743] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1657796688.324956][3738:3743] CHIP:CTL: Successfully opened pairing window on the device + [1657796688.325135][3738:3743] CHIP:CTL: Manual pairing code: [35297957587] + [1657796688.325206][3738:3743] CHIP:CTL: SetupQRCode: [MT:-24J0AFN00GARZ0T.10] + [1657796688.325289][3738:3743] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - label: "Commission TH2 to TH1s fabric (Node ID = 2)" verification: | + ./chip-tool pairing code 2 35297957587 + [1657796711.261433][1364:1369] CHIP:DMG: { + [1657796711.261488][1364:1369] CHIP:DMG: suppressResponse = false, + [1657796711.261549][1364:1369] CHIP:DMG: InvokeResponseIBs = + [1657796711.261623][1364:1369] CHIP:DMG: [ + [1657796711.261683][1364:1369] CHIP:DMG: InvokeResponseIB = + [1657796711.261760][1364:1369] CHIP:DMG: { + [1657796711.261823][1364:1369] CHIP:DMG: CommandDataIB = + [1657796711.261899][1364:1369] CHIP:DMG: { + [1657796711.261969][1364:1369] CHIP:DMG: CommandPathIB = + [1657796711.262051][1364:1369] CHIP:DMG: { + [1657796711.262133][1364:1369] CHIP:DMG: EndpointId = 0x0, + [1657796711.262217][1364:1369] CHIP:DMG: ClusterId = 0x3e, + [1657796711.262308][1364:1369] CHIP:DMG: CommandId = 0x8, + [1657796711.262387][1364:1369] CHIP:DMG: }, + [1657796711.262469][1364:1369] CHIP:DMG: + [1657796711.262535][1364:1369] CHIP:DMG: CommandFields = + [1657796711.262609][1364:1369] CHIP:DMG: { + [1657796711.262689][1364:1369] CHIP:DMG: 0x0 = 0, + [1657796711.262761][1364:1369] CHIP:DMG: 0x1 = 2, + [1657796711.262869][1364:1369] CHIP:DMG: }, + [1657796711.262935][1364:1369] CHIP:DMG: }, + [1657796711.263003][1364:1369] CHIP:DMG: + [1657796711.263060][1364:1369] CHIP:DMG: }, + [1657796711.263124][1364:1369] CHIP:DMG: + [1657796711.263173][1364:1369] CHIP:DMG: ], + [1657796711.263236][1364:1369] CHIP:DMG: + [1657796711.263287][1364:1369] CHIP:DMG: InteractionModelRevision = 1 + [1657796711.263336][1364:1369] CHIP:DMG: }, + [1657796711.263456][1364:1369] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 + [1657796711.263527][1364:1369] CHIP:CTL: Device returned status 0 on receiving the NOC + [1657796711.263576][1364:1369] CHIP:CTL: Operational credentials provisioned on device 0xffff7400ceb0 + [1657796711.263624][1364:1369] CHIP:TOO: Secure Pairing Success + [1657796711.263665][1364:1369] CHIP:TOO: CASE establishment successful + [1657796711.263716][1364:1369] CHIP:CTL: Successfully finished commissioning step 'SendNOC' disabled: true - label: "Commission TH3 to TH1s fabric (Node ID = 3)" verification: | - + ./chip-tool pairing code 3 35468051682 disabled: true - label: @@ -47,7 +125,24 @@ tests: Entry 2: Node = 3 Cluster = 0x0006(onoff) Endpoint = 2 Note: Node 2 corresponds to TH2s Node ID Node 3 corresponds to TH3s Node ID" verification: | + ./chip-tool binding write binding '[{"node" : 2 , "cluster" : "0x0006" , "endpoint" : 1 }, { "node" : 3 , "cluster" : "0x0006" , "endpoint" : 2 }]' 1 0 + + + + [1657797710.456056][3796:3801] CHIP:DMG: status = 0x00 (SUCCESS), + MG: status = 0x00 (SUCCESS), + [1657797710.457093][3796:3801] CHIP:DMG: }, + [1657797710.457171][3796:3801] CHIP:DMG: + [1657797710.457232][3796:3801] CHIP:DMG: }, + [1657797710.457318][3796:3801] CHIP:DMG: + [1 StatusIB = + [1657797710.458209][3796:3801] CHIP:DMG: { + [1657797710.458286][3796:3801] CHIP:DMG: status = 0x00 (SUCCESS), + [1657797710.458369][3796:3801] CHIP:DMG: }, + [1657797710.458444][3796:3801] CHIP:DMG: + pted msg 0xffff7e7cd9d8 with MessageCounter:161235290 to 0x0000000000000001 (1) at monotonic time: 000000000071D1BB msec + [1657797710.459711][3796:3801] CHIP:EM: Flushed pending ack for MessageCounter:23683634 on exchange 26818i disabled: true - label: "TH1 enables DUT as Controller" @@ -58,34 +153,116 @@ tests: - label: "DUT is triggered to send On command to its binding node entries" PICS: OO.C.C01.Tx verification: | - TH2 receives On command(Endpoint 1) TH3 receives On command(Endpoint 2) + ./chip-tool onoff on 1 1 + + [1657798258.634672][1444:1449] CHIP:DMG: { + [1657798258.634719][1444:1449] CHIP:DMG: status = 0x00 (SUCCESS), + [1657798258.634771][1444:1449] CHIP:DMG: }, + + [1657798258.635250][1444:1449] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x0 + + + ./chip-tool onoff on 1 2 + + [1657798258.634719][1444:1449] CHIP:DMG: status = 0x00 (SUCCESS), disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | - Verify that the value is set to On + ./chip-tool onoff read on-off 1 1 + + [1657798291.396477][3835:3841] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 4260513117 + [1657798291.396514][3835:3841] CHIP:TOO: OnOff: TRUE + + ./chip-tool onoff read on-off 1 2 + + [1657798691.194894][3869:3874] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 470320746 + [1657798691.194948][3869:3874] CHIP:TOO: OnOff: TRUE disabled: true - label: "TH1 removes second binding entry corresponding to TH3 from DUT" verification: | + ./chip-tool binding write binding '[{"node" : 2 , "cluster" : "0x0006" , "endpoint" : 1 }]' 1 0 + [1657800844.739833][4000:4006] CHIP:EM: Removed CHIP MessageCounter:244702117 from RetransTable on exchange 12653i + [1657800844.739867][4000:4006] CHIP:DMG: WriteClient moving to [ResponseRe] + [1657800844.739922][4000:4006] CHIP:DMG: WriteResponseMessage = + [1657800844.739949][4000:4006] CHIP:DMG: { + [1657800844.739990][4000:4006] CHIP:DMG: AttributeStatusIBs = + [1657800844.740021][4000:4006] CHIP:DMG: [ + [1657800844.740057][4000:4006] CHIP:DMG: AttributeStatusIB = + [1657800844.740111][4000:4006] CHIP:DMG: { + [1657800844.740150][4000:4006] CHIP:DMG: AttributePathIB = + [1657800844.740195][4000:4006] CHIP:DMG: { + [1657800844.740230][4000:4006] CHIP:DMG: Endpoint = 0x0, + [1657800844.740275][4000:4006] CHIP:DMG: Cluster = 0x1e, + [1657800844.740322][4000:4006] CHIP:DMG: Attribute = 0x0000_0000, + [1657800844.740359][4000:4006] CHIP:DMG: } + [1657800844.740405][4000:4006] CHIP:DMG: + [1657800844.740444][4000:4006] CHIP:DMG: StatusIB = + [1657800844.740477][4000:4006] CHIP:DMG: { + [1657800844.740516][4000:4006] CHIP:DMG: status = 0x00 (SUCCESS), + [1657800844.740548][4000:4006] CHIP:DMG: }, + [1657800844.740584][4000:4006] CHIP:DMG: + [1657800844.740607][4000:4006] CHIP:DMG: }, + [1657800844.740653][4000:4006] CHIP:DMG: + [1657800844.740687][4000:4006] CHIP:DMG: AttributeStatusIB = + [1657800844.740714][4000:4006] CHIP:DMG: { + [1657800844.740748][4000:4006] CHIP:DMG: AttributePathIB = + [1657800844.740781][4000:4006] CHIP:DMG: { + [1657800844.740820][4000:4006] CHIP:DMG: Endpoint = 0x0, + [1657800844.740858][4000:4006] CHIP:DMG: Cluster = 0x1e, + [1657800844.740905][4000:4006] CHIP:DMG: Attribute = 0x0000_0000, + [1657800844.740946][4000:4006] CHIP:DMG: ListIndex = Null, + [1657800844.740981][4000:4006] CHIP:DMG: } + [1657800844.741025][4000:4006] CHIP:DMG: + [1657800844.741063][4000:4006] CHIP:DMG: StatusIB = + [1657800844.741094][4000:4006] CHIP:DMG: { + [1657800844.741133][4000:4006] CHIP:DMG: status = 0x00 (SUCCESS), + [1657800844.741168][4000:4006] CHIP:DMG: }, + [1657800844.741208][4000:4006] CHIP:DMG: + [1657800844.741241][4000:4006] CHIP:DMG: }, + [1657800844.741272][4000:4006] CHIP:DMG: + [1657800844.741295][4000:4006] CHIP:DMG: ], + [1657800844.741336][4000:4006] CHIP:DMG: + [1657800844.741369][4000:4006] CHIP:DMG: InteractionModelRevision = 1 + [1657800844.741392][4000:4006] CHIP:DMG: } + [1657800844.741511][4000:4006] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657800844.741591][4000:4006] CHIP:EM: Sending Standalone Ack for MessageCounter:142199059 on exchange 12653i disabled: true - label: "DUT is triggered to send off command to its binding entries" PICS: OO.C.C00.Tx verification: | - TH2 receives off command (Endpoint 1) TH3 does not receive off command (Endpoint 2) + ./chip-tool onoff off 1 1 + + [1657800932.012989][1497:1502] CHIP:DMG: StatusIB = + [1657800932.013027][1497:1502] CHIP:DMG: { + [1657800932.013063][1497:1502] CHIP:DMG: status = 0x00 (SUCCESS), + [1657800932.013102][1497:1502] CHIP:DMG: }, + + + ./chip-tool onoff off 1 2 disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C00.Tx verification: | - Verify that the value is set to Off + ./chip-tool onoff read on-off 1 1 + + + [1657803168.769564][4272:4277] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1968648540 + + [1657803168.769598][4272:4277] CHIP:TOO: OnOff: FALSE disabled: true - label: "TH1 reads OnOff attribute from TH3 (Endpoint 2)" PICS: OO.C.C01.Tx verification: | - Verify that the value is set to On + ./chip-tool onoff read on-off 1 2 + + [1657803609.731464][4333:4339] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3914456390 + + [1657803609.731521][4333:4339] CHIP:TOO: OnOff: TRUE disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml index d84ec28c3e5ba6..b3d5f8a26322a5 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 117.2.2. [TC-BIND-2.2] Binding Cluster Attributes-DUT handles its Groups + 118.2.2. [TC-BIND-2.2] Binding Cluster Attributes-DUT handles its Groups settings [DUT-Controller] config: @@ -25,29 +25,59 @@ config: tests: - label: "Factory Reset DUT" verification: | - + Vendor specific action, for chip-tool run + rm -rf /tmp/chip* disabled: true - label: "Commission DUT to TH1s fabric" verification: | - + ./chip-tool pairing ble-wifi 1 chipsetup4 matter123 20202021 3840 disabled: true - label: "TH1 enables DUT as Controller" verification: | + ./chip-tool pairing open-commissioning-window 1 1 400 1000 3840 + + [1657716927.940140][4326:4331] CHIP:DMG: + [1657716927.940201][4326:4331] CHIP:DMG: StatusIB = + [1657716927.940275][4326:4331] CHIP:DMG: { + [1657716927.940344][4326:4331] CHIP:DMG: status = 0x00 (SUCCESS), + [1657716927.940411][4326:4331] CHIP:DMG: }, + [1657716927.940478][4326:4331] CHIP:DMG: + [1657716927.940537][4326:4331] CHIP:DMG: }, + [1657716927.940605][4326:4331] CHIP:DMG: + [1657716927.940658][4326:4331] CHIP:DMG: }, + [1657716927.940721][4326:4331] CHIP:DMG: + [1657716927.940771][4326:4331] CHIP:DMG: ], + [1657716927.940832][4326:4331] CHIP:DMG: + [1657716927.940882][4326:4331] CHIP:DMG: InteractionModelRevision = 1 + [1657716927.940931][4326:4331] CHIP:DMG: }, + [1657716927.941044][4326:4331] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1657716927.941099][4326:4331] CHIP:CTL: Successfully opened pairing window on the device + [1657716927.941205][4326:4331] CHIP:CTL: Manual pairing code: [36299144405] + [1657716927.941270][4326:4331] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01-85F3GK10] + [1657716927.941345][4326:4331] CHIP:DMG: ICR moving to [AwaitingDe] + [1657716927.941403][4326:4331] CHIP:EM: Sending Standalone Ack for MessageCount disabled: true - label: "Commission TH2 to TH1s fabric (Node ID = 2)" verification: | + ./chip-tool pairing code 2 36299144405 + [1657716992.250570][3330:3336] CHIP:CTL: Received CommissioningComplete response, errorCode=0 + [1657716992.250614][3330:3336] CHIP:CTL: Successfully finished commissioning step 'SendComplete' + [1657716992.250650][3330:3336] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1657716992.250690][3330:3336] CHIP:CTL: Performing next commissioning step 'Cleanup' + [1657716992.250769][3330:3336] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1657716992.250812][3330:3336] CHIP:TOO: Device commissioning completed with success disabled: true - label: "DUT generates fabric-unique GroupID, GroupName, random key, EpochKey0 and GroupKeySetID." verification: | - ./chip-tool groupkeymanagement key-set-read 42 1 0 + As Admin generates it is not necessary to verify disabled: true - label: @@ -59,7 +89,42 @@ tests: "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 + "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 2 0 + + + + + [1657717291.809861][3361:3366] CHIP:DMG: ICR moving to [ResponseRe] + [1657717291.809913][3361:3366] CHIP:DMG: InvokeResponseMessage = + [1657717291.809939][3361:3366] CHIP:DMG: { + [1657717291.809965][3361:3366] CHIP:DMG: suppressResponse = false, + [1657717291.809992][3361:3366] CHIP:DMG: InvokeResponseIBs = + [1657717291.810025][3361:3366] CHIP:DMG: [ + [1657717291.810051][3361:3366] CHIP:DMG: InvokeResponseIB = + [1657717291.810088][3361:3366] CHIP:DMG: { + [1657717291.810115][3361:3366] CHIP:DMG: CommandStatusIB = + [1657717291.810149][3361:3366] CHIP:DMG: { + [1657717291.810179][3361:3366] CHIP:DMG: CommandPathIB = + [1657717291.810215][3361:3366] CHIP:DMG: { + [1657717291.810252][3361:3366] CHIP:DMG: EndpointId = 0x0, + [1657717291.810290][3361:3366] CHIP:DMG: ClusterId = 0x3f, + [1657717291.810326][3361:3366] CHIP:DMG: CommandId = 0x0, + [1657717291.810364][3361:3366] CHIP:DMG: }, + [1657717291.810403][3361:3366] CHIP:DMG: + [1657717291.810435][3361:3366] CHIP:DMG: StatusIB = + [1657717291.810470][3361:3366] CHIP:DMG: { + [1657717291.810507][3361:3366] CHIP:DMG: status = 0x00 (SUCCESS), + [1657717291.810540][3361:3366] CHIP:DMG: }, + [1657717291.810575][3361:3366] CHIP:DMG: + [1657717291.810606][3361:3366] CHIP:DMG: }, + [1657717291.810641][3361:3366] CHIP:DMG: + [1657717291.810668][3361:3366] CHIP:DMG: }, + [1657717291.810700][3361:3366] CHIP:DMG: + [1657717291.810725][3361:3366] CHIP:DMG: ], + [1657717291.810757][3361:3366] CHIP:DMG: + [1657717291.810782][3361:3366] CHIP:DMG: InteractionModelRevision = 1 + [1657717291.810807][3361:3366] CHIP:DMG: }, + [1657717291.810869][3361:3366] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003F Command=0x0000_0000 Status=0x0 disabled: true - label: @@ -67,7 +132,14 @@ tests: Endpoint 1." PICS: G.C.C00.Tx verification: | - ./chip-tool groups add-group 0x0001 grp1 1 1 + ./chip-tool groups add-group 0x0001 grp1 2 1 + + [1657717342.599740][3368:3373] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 + [1657717342.599891][3368:3373] CHIP:TOO: AddGroupResponse: { + [1657717342.599959][3368:3373] CHIP:TOO: status: 0 + [1657717342.600007][3368:3373] CHIP:TOO: groupId: 1 + [1657717342.600054][3368:3373] CHIP:TOO: } + [1657717342.600130][3368:3373] CHIP:DMG: ICR moving t disabled: true - label: @@ -75,14 +147,43 @@ tests: list on GroupKeyManagement cluster to TH2 on Endpoint 0" PICS: GRPKEY.C.A0000 verification: | - ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]' 1 0 + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]' 2 0 + + StatusIB = + { + status = 0x00 (SUCCESS), + } + + ./chip-tool groupsettings add-group grp1 0x0001 + + ./chip-tool groupsettings add-keysets 0x0042 0 0x000000000021dfe0 hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf + + ./chip-tool groupsettings bind-keyset 0x0001 0x0042 + + ./chip-tool groupsettings show-groups + + +-------------------------------------------------------------------------------------+ + | Available Groups : | + +-------------------------------------------------------------------------------------+ + | Group Id | KeySet Id | Group Name | + | 0x101 0x1a1 Group #1 | + | 0x102 0x1a2 Group #2 | + | 0x1 0x42 grp1 | + +-------------------------------------------------------------------------------------+" disabled: true - label: "TH1 writes Binding entry into DUT with Entry 1: Group = The Group ID in the AddGroup command sent from DUT to TH2" verification: | - ./chip-tool binding write binding '[{"Group" : 0x0001 }]' 1 0 + ./chip-tool binding write binding '[{"group" : "0x0001"}]' 1 0 + + + [1657717436.184899][4353:4358] CHIP:DMG: StatusIB = + [1657717436.184940][4353:4358] CHIP:DMG: { + [1657717436.184981][4353:4358] CHIP:DMG: status = 0x00 (SUCCESS), + [1657717436.185022][4353:4358] CHIP:DMG: }, + [1657717436.185062][4353:4358] CHIP:DMG: disabled: true - label: @@ -90,18 +191,141 @@ tests: entries" PICS: OO.C.C01.Tx verification: | - ./chip-tool onoff on 0x0001 1 + ./chip-tool onoff on 0xffffffffffff0001 1 + + 1657717627.565673][3417:3422] CHIP:TOO: Sending command to group 0x1 + [1657717627.565718][3417:3422] CHIP:TOO: Sending cluster (0x00000006) command (0x00000001) on Group 1 disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | ./chip-tool onoff read on-off 1 1 + + [1657717900.832851][4381:4386] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1558029216 + [1657717900.832890][4381:4386] CHIP:TOO: OnOff: TRUE disabled: true - label: "TH1 removes all the binding entries from DUT" verification: | - ./chip-tool binding write binding [] 1 0 + ./chip-tool groupsettings unbind-keyset 0x0001 0x0042 + + + [1657804100.222346][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs + [1657804100.222880][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_factory.ini + [1657804100.223041][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_config.ini + [1657804100.223149][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_counters.ini + [1657804100.223500][1483:1483] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-mlceY7) + [1657804100.224151][1483:1483] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1657804100.224208][1483:1483] CHIP:DL: NVS set: chip-counters/reboot-count = 16 (0x10) + [1657804100.224925][1483:1483] CHIP:DL: Got Ethernet interface: eth0 + [1657804100.225323][1483:1483] CHIP:DL: Found the primary Ethernet interface:eth0 + [1657804100.225720][1483:1483] CHIP:DL: Got WiFi interface: wlan0 + [1657804100.225791][1483:1483] CHIP:DL: Failed to reset WiFi statistic counts + [1657804100.225873][1483:1483] CHIP:IN: UDP::Init bind&listen port=0 + [1657804100.226005][1483:1483] CHIP:IN: UDP::Init bound to port=43367 + [1657804100.226030][1483:1483] CHIP:IN: BLEBase::Init - setting/overriding transport + [1657804100.226052][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.226085][1483:1483] CHIP:FP: Initializing FabricTable from persistent storage + [1657804100.226331][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.226953][1483:1483] CHIP:FP: Fabric index 0x1 was retrieved from storage. Compressed FabricId 0xAF5C7831F3704268, FabricId 0x0000000000000001, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657804100.227380][1483:1483] CHIP:FP: Fabric index 0x2 was retrieved from storage. Compressed FabricId 0x756CE95FCDF96118, FabricId 0x0000000000000002, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657804100.227789][1483:1483] CHIP:FP: Fabric index 0x3 was retrieved from storage. Compressed FabricId 0xCCD838643BEE9065, FabricId 0x0000000000000003, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657804100.230946][1483:1483] CHIP:ZCL: Using ZAP configuration... + [1657804100.235033][1483:1483] CHIP:DL: Avahi client registered + [1657804100.236263][1483:1483] CHIP:CTL: System State Initialized... + [1657804100.236328][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.236364][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.236412][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.236485][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.236621][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.236646][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.236733][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.236763][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.236811][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.239619][1483:1483] CHIP:CTL: Generating NOC + [1657804100.240796][1483:1483] CHIP:FP: Validating NOC chain + [1657804100.242766][1483:1483] CHIP:FP: NOC chain validation successful + [1657804100.242960][1483:1483] CHIP:FP: Updated fabric at index: 0x1, Node ID: 0x000000000001B669 + [1657804100.243000][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.243029][1483:1483] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657804100.243055][1483:1483] CHIP:TS: Retaining current Last Known Good Time + [1657804100.246677][1483:1483] CHIP:FP: Metadata for Fabric 0x1 persisted to storage. + [1657804100.250025][1483:1483] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T12:47:52 + [1657804100.253538][1483:1483] CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x0000000000000000 + [1657804100.253600][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.253724][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.253751][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.253834][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.253872][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.253934][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.254935][1483:1483] CHIP:CTL: Generating NOC + [1657804100.256071][1483:1483] CHIP:FP: Validating NOC chain + [1657804100.257762][1483:1483] CHIP:FP: NOC chain validation successful + [1657804100.257921][1483:1483] CHIP:FP: Updated fabric at index: 0x2, Node ID: 0x000000000001B669 + [1657804100.257955][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.257978][1483:1483] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657804100.257998][1483:1483] CHIP:TS: Retaining current Last Known Good Time + [1657804100.260948][1483:1483] CHIP:FP: Metadata for Fabric 0x2 persisted to storage. + [1657804100.263784][1483:1483] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T12:47:52 + [1657804100.266433][1483:1483] CHIP:CTL: Joined the fabric at index 2. Compressed fabric ID is: 0x0000000000000000 + [1657804100.266491][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.266615][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.266641][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.266727][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.266766][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.266828][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.267811][1483:1483] CHIP:CTL: Generating NOC + [1657804100.268914][1483:1483] CHIP:FP: Validating NOC chain + [1657804100.270701][1483:1483] CHIP:FP: NOC chain validation successful + [1657804100.270859][1483:1483] CHIP:FP: Updated fabric at index: 0x3, Node ID: 0x000000000001B669 + [1657804100.270892][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.270914][1483:1483] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657804100.270935][1483:1483] CHIP:TS: Retaining current Last Known Good Time + [1657804100.273854][1483:1483] CHIP:FP: Metadata for Fabric 0x3 persisted to storage. + [1657804100.276610][1483:1483] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T12:47:52 + [1657804100.279350][1483:1483] CHIP:CTL: Joined the fabric at index 3. Compressed fabric ID is: 0x0000000000000000 + [1657804100.279411][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.279535][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.279560][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.315695][1483:1488] CHIP:DL: CHIP task running + [1657804100.315921][1483:1488] CHIP:DL: HandlePlatformSpecificBLEEvent 32784 + [1657804100.321174][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.321268][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.321299][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.321348][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.321373][1483:1483] CHIP:IN: Expiring all sessions for fabric 0x1!! + [1657804100.321396][1483:1483] CHIP:FP: Forgetting fabric 0x1 + [1657804100.321429][1483:1483] CHIP:TS: Pending Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.321597][1483:1483] CHIP:TS: Previous Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.321622][1483:1483] CHIP:TS: Reverted Last Known Good Time to previous value + [1657804100.321661][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.321718][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.321819][1483:1483] CHIP:IN: Expiring all sessions for fabric 0x2!! + [1657804100.321849][1483:1483] CHIP:FP: Forgetting fabric 0x2 + [1657804100.321875][1483:1483] CHIP:TS: Pending Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.321998][1483:1483] CHIP:TS: Previous Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.322022][1483:1483] CHIP:TS: Reverted Last Known Good Time to previous value + [1657804100.322056][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.322113][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.322136][1483:1483] CHIP:IN: Expiring all sessions for fabric 0x3!! + [1657804100.322156][1483:1483] CHIP:FP: Forgetting fabric 0x3 + [1657804100.322179][1483:1483] CHIP:TS: Pending Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.322314][1483:1483] CHIP:TS: Previous Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.322339][1483:1483] CHIP:TS: Reverted Last Known Good Time to previous value + [1657804100.322367][1483:1483] CHIP:CTL: Shutting down the System State, this will teardown the CHIP Stack + [1657804100.323278][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323318][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323341][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323362][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323384][1483:1483] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet + [1657804100.323455][1483:1483] CHIP:BLE: BleConnectionDelegate::CancelConnection is not implemented. + [1657804100.323744][1483:1483] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-wsLxnz) + [1657804100.324436][1483:1483] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1657804100.324498][1483:1483] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1657804100.324524][1483:1483] CHIP:DL: Inet Layer shutdown + [1657804100.324547][1483:1483] CHIP:DL: BLE shutdown + [1657804100.324569][1483:1483] CHIP:DL: System Layer shutdown disabled: true - label: @@ -109,11 +333,18 @@ tests: entries" PICS: OO.C.C00.Tx verification: | - ./chip-tool onoff on 0x0001 1 + ./chip-tool onoff off 0xffffffffffff0001 1 + + [1657718018.006875][3467:3472] CHIP:TOO: Sending command to group 0x1 + [1657718018.006899][3467:3472] CHIP:TOO: Sending cluster (0x00000006) command (0x00000000) on Group 1 + [1657718018.006949][3467:3472] CHIP:DMG: ICR moving to [AddingComm] disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | ./chip-tool onoff read on-off 1 1 + + [1657718251.169765][4425:4431] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1558029223 + [1657718251.169817][4425:4431] CHIP:TOO: OnOff: TRUE disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml index 0640a6570d9347..ae8c28d97da943 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 117.2.3. [TC-BIND-2.3] Binding Cluster Attributes-TH1 enables DUT to handle + 118.2.3. [TC-BIND-2.3] Binding Cluster Attributes-TH1 enables DUT to handle its Group settings [DUT-Controller] config: @@ -25,29 +25,59 @@ config: tests: - label: "Factory Reset DUT" verification: | - + Vendor specific action, for chip-tool run + rm -rf /tmp/chip* disabled: true - label: "Commission DUT to TH1s fabric" verification: | - + ./chip-tool pairing ble-wifi 1 chipsetup4 matter123 20202021 3840 disabled: true - label: "TH1 enables DUT as Controller" verification: | + ./chip-tool pairing open-commissioning-window 1 1 400 1000 3840 + + [1657716927.940140][4326:4331] CHIP:DMG: + [1657716927.940201][4326:4331] CHIP:DMG: StatusIB = + [1657716927.940275][4326:4331] CHIP:DMG: { + [1657716927.940344][4326:4331] CHIP:DMG: status = 0x00 (SUCCESS), + [1657716927.940411][4326:4331] CHIP:DMG: }, + [1657716927.940478][4326:4331] CHIP:DMG: + [1657716927.940537][4326:4331] CHIP:DMG: }, + [1657716927.940605][4326:4331] CHIP:DMG: + [1657716927.940658][4326:4331] CHIP:DMG: }, + [1657716927.940721][4326:4331] CHIP:DMG: + [1657716927.940771][4326:4331] CHIP:DMG: ], + [1657716927.940832][4326:4331] CHIP:DMG: + [1657716927.940882][4326:4331] CHIP:DMG: InteractionModelRevision = 1 + [1657716927.940931][4326:4331] CHIP:DMG: }, + [1657716927.941044][4326:4331] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1657716927.941099][4326:4331] CHIP:CTL: Successfully opened pairing window on the device + [1657716927.941205][4326:4331] CHIP:CTL: Manual pairing code: [36299144405] + [1657716927.941270][4326:4331] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01-85F3GK10] + [1657716927.941345][4326:4331] CHIP:DMG: ICR moving to [AwaitingDe] + [1657716927.941403][4326:4331] CHIP:EM: Sending Standalone Ack for MessageCount disabled: true - label: "Commission TH2 to TH1s fabric (Node ID = 2)" verification: | + ./chip-tool pairing code 2 36299144405 + [1657716992.250570][3330:3336] CHIP:CTL: Received CommissioningComplete response, errorCode=0 + [1657716992.250614][3330:3336] CHIP:CTL: Successfully finished commissioning step 'SendComplete' + [1657716992.250650][3330:3336] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1657716992.250690][3330:3336] CHIP:CTL: Performing next commissioning step 'Cleanup' + [1657716992.250769][3330:3336] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1657716992.250812][3330:3336] CHIP:TOO: Device commissioning completed with success disabled: true - label: "TH1 generates fabric-unique GroupID, GroupName, random key, EpochKey0 and GroupKeySetID." verification: | - As TH generates it is not required to verify + As Admin generates it is not required to verify disabled: true - label: @@ -59,6 +89,37 @@ tests: "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 + + [1657719041.075123][4541:4546] CHIP:DMG: ICR moving to [ResponseRe] + [1657719041.075174][4541:4546] CHIP:DMG: InvokeResponseMessage = + [1657719041.075200][4541:4546] CHIP:DMG: { + [1657719041.075224][4541:4546] CHIP:DMG: suppressResponse = false, + [1657719041.075255][4541:4546] CHIP:DMG: InvokeResponseIBs = + [1657719041.075287][4541:4546] CHIP:DMG: [ + [1657719041.075311][4541:4546] CHIP:DMG: InvokeResponseIB = + [1657719041.075347][4541:4546] CHIP:DMG: { + [1657719041.075376][4541:4546] CHIP:DMG: CommandStatusIB = + [1657719041.075408][4541:4546] CHIP:DMG: { + [1657719041.075439][4541:4546] CHIP:DMG: CommandPathIB = + [1657719041.075473][4541:4546] CHIP:DMG: { + [1657719041.075507][4541:4546] CHIP:DMG: EndpointId = 0x0, + [1657719041.075542][4541:4546] CHIP:DMG: ClusterId = 0x3f, + [1657719041.075577][4541:4546] CHIP:DMG: CommandId = 0x0, + [1657719041.075609][4541:4546] CHIP:DMG: }, + [1657719041.075646][4541:4546] CHIP:DMG: + [1657719041.075676][4541:4546] CHIP:DMG: StatusIB = + [1657719041.075709][4541:4546] CHIP:DMG: { + [1657719041.075743][4541:4546] CHIP:DMG: status = 0x00 (SUCCESS), + [1657719041.075775][4541:4546] CHIP:DMG: }, + [1657719041.075809][4541:4546] CHIP:DMG: + [1657719041.075840][4541:4546] CHIP:DMG: }, + [1657719041.075874][4541:4546] CHIP:DMG: + [1657719041.075902][4541:4546] CHIP:DMG: }, + [1657719041.075935][4541:4546] CHIP:DMG: + [1657719041.075959][4541:4546] CHIP:DMG: ], + [1657719041.075988][4541:4546] CHIP:DMG: + [1657719041.076012][4541:4546] CHIP:DMG: InteractionModelRevision = 1 + [1657719041.076036][4541:4546] CHIP:DMG: }, disabled: true - label: @@ -66,6 +127,12 @@ tests: Endpoint 1." verification: | ./chip-tool groups add-group 0x0001 grp1 1 1 + + [1657719097.788236][4548:4554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 + [1657719097.788325][4548:4554] CHIP:TOO: AddGroupResponse: { + [1657719097.788366][4548:4554] CHIP:TOO: status: 0 + [1657719097.788393][4548:4554] CHIP:TOO: groupId: 1 + [1657719097.788418][4548:4554] CHIP:TOO: } disabled: true - label: @@ -73,13 +140,41 @@ tests: list on GroupKeyManagement cluster to TH2 on Endpoint 0" verification: | ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]' 1 0 + + [1657719130.464175][4557:4562] CHIP:DMG: StatusIB = + [1657719130.464214][4557:4562] CHIP:DMG: { + [1657719130.464256][4557:4562] CHIP:DMG: status = 0x00 (SUCCESS), + [1657719130.464298][4557:4562] CHIP:DMG: }, + [1657719130.464342][4557:4562] CHIP:DMG: + + ./chip-tool groupsettings add-group grp1 0x0001 + + ./chip-tool groupsettings add-keysets 0x0042 0 0x000000000021dfe0 hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf + + ./chip-tool groupsettings bind-keyset 0x0001 0x0042 + + ./chip-tool groupsettings show-groups + + +-------------------------------------------------------------------------------------+ + | Available Groups : | + +-------------------------------------------------------------------------------------+ + | Group Id | KeySet Id | Group Name | + | 0x101 0x1a1 Group #1 | + | 0x102 0x1a2 Group #2 | + | 0x1 0x42 grp1 | + +-------------------------------------------------------------------------------------+" disabled: true - label: "TH1 writes Binding entry into DUT with Entry 1: Group = The Group ID in the AddGroup command sent from TH1 to TH2" verification: | - ./chip-tool binding write binding '[{"Group" : 0x0001 }]' 1 0 + ./chip-tool binding write binding '[{"group" : "0x0001"}]' 1 0 + + [1657719251.763323][4597:4602] CHIP:DMG: StatusIB = + [1657719251.763360][4597:4602] CHIP:DMG: { + [1657719251.763402][4597:4602] CHIP:DMG: status = 0x00 (SUCCESS), + [1657719251.763440][4597:4602] CHIP:DMG: }, disabled: true - label: "TH1 sets up group settings on DUT" @@ -92,18 +187,142 @@ tests: entries" PICS: OO.C.C01.Tx verification: | - ./chip-tool onoff on 0x0001 1 + ./chip-tool onoff on 0xffffffffffff0001 1 + + + [1657719341.187186][3608:3613] CHIP:TOO: Sending command to group 0x1 + [1657719341.187212][3608:3613] CHIP:TOO: Sending cluster (0x00000006) command (0x00000001) on Group 1 disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | ./chip-tool onoff read on-off 1 1 + + [1657719363.799344][4615:4620] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3526720174 + [1657719363.799380][4615:4620] CHIP:TOO: OnOff: TRUE disabled: true - label: "TH1 removes all the binding entries from DUT" verification: | - ./chip-tool binding write binding [] 1 0 + ./chip-tool groupsettings unbind-keyset 0x0001 0x0042 + + + [1657804100.222346][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs + [1657804100.222880][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_factory.ini + [1657804100.223041][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_config.ini + [1657804100.223149][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_counters.ini + [1657804100.223500][1483:1483] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-mlceY7) + [1657804100.224151][1483:1483] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1657804100.224208][1483:1483] CHIP:DL: NVS set: chip-counters/reboot-count = 16 (0x10) + [1657804100.224925][1483:1483] CHIP:DL: Got Ethernet interface: eth0 + [1657804100.225323][1483:1483] CHIP:DL: Found the primary Ethernet interface:eth0 + [1657804100.225720][1483:1483] CHIP:DL: Got WiFi interface: wlan0 + [1657804100.225791][1483:1483] CHIP:DL: Failed to reset WiFi statistic counts + [1657804100.225873][1483:1483] CHIP:IN: UDP::Init bind&listen port=0 + [1657804100.226005][1483:1483] CHIP:IN: UDP::Init bound to port=43367 + [1657804100.226030][1483:1483] CHIP:IN: BLEBase::Init - setting/overriding transport + [1657804100.226052][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.226085][1483:1483] CHIP:FP: Initializing FabricTable from persistent storage + [1657804100.226331][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.226953][1483:1483] CHIP:FP: Fabric index 0x1 was retrieved from storage. Compressed FabricId 0xAF5C7831F3704268, FabricId 0x0000000000000001, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657804100.227380][1483:1483] CHIP:FP: Fabric index 0x2 was retrieved from storage. Compressed FabricId 0x756CE95FCDF96118, FabricId 0x0000000000000002, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657804100.227789][1483:1483] CHIP:FP: Fabric index 0x3 was retrieved from storage. Compressed FabricId 0xCCD838643BEE9065, FabricId 0x0000000000000003, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657804100.230946][1483:1483] CHIP:ZCL: Using ZAP configuration... + [1657804100.235033][1483:1483] CHIP:DL: Avahi client registered + [1657804100.236263][1483:1483] CHIP:CTL: System State Initialized... + [1657804100.236328][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.236364][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.236412][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.236485][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.236621][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.236646][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.236733][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.236763][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.236811][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.239619][1483:1483] CHIP:CTL: Generating NOC + [1657804100.240796][1483:1483] CHIP:FP: Validating NOC chain + [1657804100.242766][1483:1483] CHIP:FP: NOC chain validation successful + [1657804100.242960][1483:1483] CHIP:FP: Updated fabric at index: 0x1, Node ID: 0x000000000001B669 + [1657804100.243000][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.243029][1483:1483] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657804100.243055][1483:1483] CHIP:TS: Retaining current Last Known Good Time + [1657804100.246677][1483:1483] CHIP:FP: Metadata for Fabric 0x1 persisted to storage. + [1657804100.250025][1483:1483] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T12:47:52 + [1657804100.253538][1483:1483] CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x0000000000000000 + [1657804100.253600][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.253724][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.253751][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.253834][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.253872][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.253934][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.254935][1483:1483] CHIP:CTL: Generating NOC + [1657804100.256071][1483:1483] CHIP:FP: Validating NOC chain + [1657804100.257762][1483:1483] CHIP:FP: NOC chain validation successful + [1657804100.257921][1483:1483] CHIP:FP: Updated fabric at index: 0x2, Node ID: 0x000000000001B669 + [1657804100.257955][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.257978][1483:1483] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657804100.257998][1483:1483] CHIP:TS: Retaining current Last Known Good Time + [1657804100.260948][1483:1483] CHIP:FP: Metadata for Fabric 0x2 persisted to storage. + [1657804100.263784][1483:1483] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T12:47:52 + [1657804100.266433][1483:1483] CHIP:CTL: Joined the fabric at index 2. Compressed fabric ID is: 0x0000000000000000 + [1657804100.266491][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.266615][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.266641][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.266727][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.266766][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.266828][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.267811][1483:1483] CHIP:CTL: Generating NOC + [1657804100.268914][1483:1483] CHIP:FP: Validating NOC chain + [1657804100.270701][1483:1483] CHIP:FP: NOC chain validation successful + [1657804100.270859][1483:1483] CHIP:FP: Updated fabric at index: 0x3, Node ID: 0x000000000001B669 + [1657804100.270892][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.270914][1483:1483] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657804100.270935][1483:1483] CHIP:TS: Retaining current Last Known Good Time + [1657804100.273854][1483:1483] CHIP:FP: Metadata for Fabric 0x3 persisted to storage. + [1657804100.276610][1483:1483] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T12:47:52 + [1657804100.279350][1483:1483] CHIP:CTL: Joined the fabric at index 3. Compressed fabric ID is: 0x0000000000000000 + [1657804100.279411][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.279535][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.279560][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.315695][1483:1488] CHIP:DL: CHIP task running + [1657804100.315921][1483:1488] CHIP:DL: HandlePlatformSpecificBLEEvent 32784 + [1657804100.321174][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.321268][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.321299][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.321348][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.321373][1483:1483] CHIP:IN: Expiring all sessions for fabric 0x1!! + [1657804100.321396][1483:1483] CHIP:FP: Forgetting fabric 0x1 + [1657804100.321429][1483:1483] CHIP:TS: Pending Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.321597][1483:1483] CHIP:TS: Previous Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.321622][1483:1483] CHIP:TS: Reverted Last Known Good Time to previous value + [1657804100.321661][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.321718][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.321819][1483:1483] CHIP:IN: Expiring all sessions for fabric 0x2!! + [1657804100.321849][1483:1483] CHIP:FP: Forgetting fabric 0x2 + [1657804100.321875][1483:1483] CHIP:TS: Pending Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.321998][1483:1483] CHIP:TS: Previous Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.322022][1483:1483] CHIP:TS: Reverted Last Known Good Time to previous value + [1657804100.322056][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.322113][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.322136][1483:1483] CHIP:IN: Expiring all sessions for fabric 0x3!! + [1657804100.322156][1483:1483] CHIP:FP: Forgetting fabric 0x3 + [1657804100.322179][1483:1483] CHIP:TS: Pending Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.322314][1483:1483] CHIP:TS: Previous Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.322339][1483:1483] CHIP:TS: Reverted Last Known Good Time to previous value + [1657804100.322367][1483:1483] CHIP:CTL: Shutting down the System State, this will teardown the CHIP Stack + [1657804100.323278][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323318][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323341][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323362][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323384][1483:1483] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet + [1657804100.323455][1483:1483] CHIP:BLE: BleConnectionDelegate::CancelConnection is not implemented. + [1657804100.323744][1483:1483] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-wsLxnz) + [1657804100.324436][1483:1483] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1657804100.324498][1483:1483] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1657804100.324524][1483:1483] CHIP:DL: Inet Layer shutdown + [1657804100.324547][1483:1483] CHIP:DL: BLE shutdown + [1657804100.324569][1483:1483] CHIP:DL: System Layer shutdown disabled: true - label: @@ -111,11 +330,136 @@ tests: entries" PICS: OO.C.C00.Tx verification: | - ./chip-tool onoff on 0x0001 1 + ./chip-tool onoff off 0xffffffffffff0001 1 + + + [1657739317.292483][6861:6861] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs + [1657739317.293022][6861:6861] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_factory.ini + [1657739317.293191][6861:6861] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_config.ini + [1657739317.293302][6861:6861] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_counters.ini + [1657739317.293673][6861:6861] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-UkoNx7) + [1657739317.294307][6861:6861] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1657739317.294361][6861:6861] CHIP:DL: NVS set: chip-counters/reboot-count = 25 (0x19) + [1657739317.295264][6861:6861] CHIP:DL: Got Ethernet interface: eth0 + [1657739317.295842][6861:6861] CHIP:DL: Found the primary Ethernet interface:eth0 + [1657739317.296467][6861:6861] CHIP:DL: Got WiFi interface: wlan0 + [1657739317.298602][6861:6861] CHIP:DL: Found the primary WiFi interface:wlan0 + [1657739317.298722][6861:6861] CHIP:IN: UDP::Init bind&listen port=0 + [1657739317.298865][6861:6861] CHIP:IN: UDP::Init bound to port=42057 + [1657739317.298900][6861:6861] CHIP:IN: BLEBase::Init - setting/overriding transport + [1657739317.298922][6861:6861] CHIP:IN: TransportMgr initialized + [1657739317.298956][6861:6861] CHIP:FP: Initializing FabricTable from persistent storage + [1657739317.299178][6861:6861] CHIP:TS: Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.299800][6861:6861] CHIP:FP: Fabric index 0x1 was retrieved from storage. Compressed FabricId 0x44F31DDB31482396, FabricId 0x0000000000000001, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657739317.300326][6861:6861] CHIP:FP: Fabric index 0x2 was retrieved from storage. Compressed FabricId 0x9C5001245B9C6783, FabricId 0x0000000000000002, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657739317.300874][6861:6861] CHIP:FP: Fabric index 0x3 was retrieved from storage. Compressed FabricId 0x432BBBD1DDD12A2D, FabricId 0x0000000000000003, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657739317.304752][6861:6861] CHIP:ZCL: Using ZAP configuration... + [1657739317.310329][6861:6861] CHIP:DL: Avahi client registered + [1657739317.311785][6861:6861] CHIP:CTL: System State Initialized... + [1657739317.311916][6861:6861] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657739317.311958][6861:6861] CHIP:CTL: Setting attestation nonce to random value + [1657739317.312013][6861:6861] CHIP:CTL: Setting CSR nonce to random value + [1657739317.312124][6861:6861] CHIP:IN: UDP::Init bind&listen port=5550 + [1657739317.312276][6861:6861] CHIP:IN: UDP::Init bound to port=5550 + [1657739317.312304][6861:6861] CHIP:IN: TransportMgr initialized + [1657739317.312381][6861:6861] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657739317.312413][6861:6861] CHIP:CTL: Setting attestation nonce to random value + [1657739317.312468][6861:6861] CHIP:CTL: Setting CSR nonce to random value + [1657739317.315708][6861:6861] CHIP:CTL: Generating NOC + [1657739317.317118][6861:6861] CHIP:FP: Validating NOC chain + [1657739317.319143][6861:6861] CHIP:FP: NOC chain validation successful + [1657739317.319368][6861:6861] CHIP:FP: Updated fabric at index: 0x1, Node ID: 0x000000000001B669 + [1657739317.319406][6861:6861] CHIP:TS: Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.319433][6861:6861] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657739317.319458][6861:6861] CHIP:TS: Retaining current Last Known Good Time + [1657739317.322759][6861:6861] CHIP:FP: Metadata for Fabric 0x1 persisted to storage. + [1657739317.325707][6861:6861] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T10:35:47 + [1657739317.328626][6861:6861] CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x0000000000000000 + [1657739317.328691][6861:6861] CHIP:IN: UDP::Init bind&listen port=5550 + [1657739317.328824][6861:6861] CHIP:IN: UDP::Init bound to port=5550 + [1657739317.328852][6861:6861] CHIP:IN: TransportMgr initialized + [1657739317.328943][6861:6861] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657739317.328985][6861:6861] CHIP:CTL: Setting attestation nonce to random value + [1657739317.329053][6861:6861] CHIP:CTL: Setting CSR nonce to random value + [1657739317.330018][6861:6861] CHIP:CTL: Generating NOC + [1657739317.331537][6861:6861] CHIP:FP: Validating NOC chain + [1657739317.333367][6861:6861] CHIP:FP: NOC chain validation successful + [1657739317.333529][6861:6861] CHIP:FP: Updated fabric at index: 0x2, Node ID: 0x000000000001B669 + [1657739317.333562][6861:6861] CHIP:TS: Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.333585][6861:6861] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657739317.333607][6861:6861] CHIP:TS: Retaining current Last Known Good Time + [1657739317.336974][6861:6861] CHIP:FP: Metadata for Fabric 0x2 persisted to storage. + [1657739317.340429][6861:6861] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T10:35:47 + [1657739317.346545][6861:6861] CHIP:CTL: Joined the fabric at index 2. Compressed fabric ID is: 0x0000000000000000 + [1657739317.346610][6861:6861] CHIP:IN: UDP::Init bind&listen port=5550 + [1657739317.346740][6861:6861] CHIP:IN: UDP::Init bound to port=5550 + [1657739317.346784][6861:6861] CHIP:IN: TransportMgr initialized + [1657739317.346890][6861:6861] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657739317.346930][6861:6861] CHIP:CTL: Setting attestation nonce to random value + [1657739317.346993][6861:6861] CHIP:CTL: Setting CSR nonce to random value + [1657739317.347952][6861:6861] CHIP:CTL: Generating NOC + [1657739317.349141][6861:6861] CHIP:FP: Validating NOC chain + [1657739317.351073][6861:6861] CHIP:FP: NOC chain validation successful + [1657739317.351260][6861:6861] CHIP:FP: Updated fabric at index: 0x3, Node ID: 0x000000000001B669 + [1657739317.351297][6861:6861] CHIP:TS: Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.351322][6861:6861] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657739317.351344][6861:6861] CHIP:TS: Retaining current Last Known Good Time + [1657739317.354771][6861:6861] CHIP:FP: Metadata for Fabric 0x3 persisted to storage. + [1657739317.357885][6861:6861] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T10:35:47 + [1657739317.360916][6861:6861] CHIP:CTL: Joined the fabric at index 3. Compressed fabric ID is: 0x0000000000000000 + [1657739317.360982][6861:6861] CHIP:IN: UDP::Init bind&listen port=5550 + [1657739317.361127][6861:6861] CHIP:IN: UDP::Init bound to port=5550 + [1657739317.361176][6861:6861] CHIP:IN: TransportMgr initialized + [1657739317.404098][6861:6866] CHIP:DL: CHIP task running + [1657739317.404355][6861:6866] CHIP:DL: HandlePlatformSpecificBLEEvent 32784 + [1657739317.404400][6861:6866] CHIP:TOO: Sending command to group 0x1 + [1657739317.404425][6861:6866] CHIP:TOO: Sending cluster (0x00000006) command (0x00000000) on Group 1 + [1657739317.404474][6861:6866] CHIP:DMG: ICR moving to [AddingComm] + [1657739317.404580][6861:6866] CHIP:DMG: ICR moving to [AddedComma] + [1657739317.405348][6861:6861] CHIP:CTL: Shutting down the commissioner + [1657739317.405445][6861:6861] CHIP:CTL: Shutting down the controller + [1657739317.405477][6861:6861] CHIP:CTL: Shutting down the commissioner + [1657739317.405530][6861:6861] CHIP:CTL: Shutting down the controller + [1657739317.405569][6861:6861] CHIP:IN: Expiring all sessions for fabric 0x1!! + [1657739317.405593][6861:6861] CHIP:FP: Forgetting fabric 0x1 + [1657739317.405637][6861:6861] CHIP:TS: Pending Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.405823][6861:6861] CHIP:TS: Previous Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.405849][6861:6861] CHIP:TS: Reverted Last Known Good Time to previous value + [1657739317.405890][6861:6861] CHIP:CTL: Shutting down the commissioner + [1657739317.405950][6861:6861] CHIP:CTL: Shutting down the controller + [1657739317.405978][6861:6861] CHIP:IN: Expiring all sessions for fabric 0x2!! + [1657739317.406015][6861:6861] CHIP:FP: Forgetting fabric 0x2 + [1657739317.406046][6861:6861] CHIP:TS: Pending Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.406231][6861:6861] CHIP:TS: Previous Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.406261][6861:6861] CHIP:TS: Reverted Last Known Good Time to previous value + [1657739317.406299][6861:6861] CHIP:CTL: Shutting down the commissioner + [1657739317.406364][6861:6861] CHIP:CTL: Shutting down the controller + [1657739317.406407][6861:6861] CHIP:IN: Expiring all sessions for fabric 0x3!! + [1657739317.406469][6861:6861] CHIP:FP: Forgetting fabric 0x3 + [1657739317.406500][6861:6861] CHIP:TS: Pending Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.406684][6861:6861] CHIP:TS: Previous Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.406715][6861:6861] CHIP:TS: Reverted Last Known Good Time to previous value + [1657739317.406751][6861:6861] CHIP:CTL: Shutting down the System State, this will teardown the CHIP Stack + [1657739317.407843][6861:6861] CHIP:DMG: IM WH moving to [Uninitialized] + [1657739317.407889][6861:6861] CHIP:DMG: IM WH moving to [Uninitialized] + [1657739317.407914][6861:6861] CHIP:DMG: IM WH moving to [Uninitialized] + [1657739317.407938][6861:6861] CHIP:DMG: IM WH moving to [Uninitialized] + [1657739317.407965][6861:6861] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet + [1657739317.408046][6861:6861] CHIP:BLE: BleConnectionDelegate::CancelConnection is not implemented. + [1657739317.408378][6861:6861] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-c0r3tm) + [1657739317.409155][6861:6861] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1657739317.409228][6861:6861] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1657739317.409260][6861:6861] CHIP:DL: Inet Layer shutdown + [1657739317.409286][6861:6861] CHIP:DL: BLE shutdown + [1657739317.409313][6861:6861] CHIP:DL: System Layer shutdown + [1657739317.409437][6861:6861] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/transport/SessionManager.cpp:176: CHIP Error 0x000000AC: Internal error disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | ./chip-tool onoff read on-off 1 1 + + [1657719448.858149][4636:4641] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3526720174 + [1657719448.858183][4636:4641] CHIP:TOO: OnOff: TRUE disabled: true 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 e9fda6db810f28..2756ffad7d6405 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 @@ -29,11 +29,31 @@ tests: - name: "nodeId" value: nodeId - - label: "TH reads Location from the DUT." - command: "readAttribute" - attribute: "Location" - response: - saveAs: CountryCode + #not supported in YAML + - label: + "During Commissioning, TH Saves the CountryCode Information from + SetRegulatoryConfig command" + verification: | + While commissioning TH Saves the CountryCode Information from SetRegulatoryConfig command + + ./chip-tool pairing ble-wifi 1 GRLPrivate_EXT matter123 20202021 3840 + + TH END: + [1641381202.376419][5628:5633] CHIP:CTL: Received success response 0x3df8 + + sudo ./all-clusters-app --wifi + + DUT END: + [1641381202.306840][4431:4431] CHIP:DL: NVS set: chip-config/regulatory-location = 0 (0x0) + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH reads DataModelRevision from the DUT." PICS: BINFO.S.A0000 @@ -42,7 +62,7 @@ tests: response: saveAs: DataModelRevisionValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65534 @@ -69,7 +89,7 @@ tests: response: saveAs: VendorNameValue constraints: - type: string + type: char_string maxLength: 32 - label: "TH writes VendorName from the DUT." @@ -95,7 +115,7 @@ tests: response: saveAs: VendorIDValue constraints: - type: uint16 + type: vendor_id minValue: 1 maxValue: 65521 @@ -122,7 +142,7 @@ tests: response: saveAs: ProductNameValue constraints: - type: string + type: char_string maxLength: 32 - label: "TH writes ProductName from the DUT." @@ -148,7 +168,7 @@ tests: response: saveAs: ProductIDValue constraints: - type: uint16 + type: int16u minValue: 1 maxValue: 65534 @@ -175,7 +195,7 @@ tests: response: saveAs: NodeLabelValue constraints: - type: string + type: char_string maxLength: 32 - label: "TH writes NodeLabel from the DUT." @@ -197,11 +217,31 @@ tests: command: "readAttribute" attribute: "Location" response: - value: CountryCode constraints: - type: string + type: char_string maxLength: 16 + - label: + "Verify that the Location is same as CountryCode value saved from + step1" + verification: | + ./chip-tool basic read location 1 0 + + On TH, Verify that TH reads Location from the DUT successfully, the name should be string and length is less than or equal to 2 bytes. + [1656495999.760797][2249:2254] CHIP:DMG: } + [1656495999.761084][2249:2254] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 941124320 + [1656495999.761187][2249:2254] CHIP:TOO: Location: XX + [1656495999.761371][2249:2254] CHIP:EM: Sending Standalone Ack for MessageCounter:7663506 on exchange 28126i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && BINFO.S.A0006 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + - label: "TH write Location from the DUT" PICS: BINFO.S.A0006 command: "writeAttribute" @@ -223,7 +263,7 @@ tests: response: saveAs: HardwareVersionValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65534 @@ -250,7 +290,7 @@ tests: response: saveAs: HardwareVersionStringValue constraints: - type: string + type: char_string minLength: 1 maxLength: 64 @@ -317,7 +357,7 @@ tests: saveAs: SoftwareVersionStringValue constraints: minLength: 1 - maxLenght: 64 + maxLength: 64 - label: "TH writes SoftwareVersionString from the DUT." PICS: BINFO.S.A000a @@ -342,7 +382,7 @@ tests: response: saveAs: ManufacturingDateValue constraints: - type: string + type: char_string minLength: 8 maxLength: 16 @@ -382,7 +422,7 @@ tests: response: saveAs: PartNumberValue constraints: - type: string + type: char_string maxLength: 32 - label: "TH writes PartNumber from the DUT." @@ -408,7 +448,7 @@ tests: response: saveAs: ProductURLValue constraints: - type: string + type: long_char_string maxLength: 256 - label: @@ -447,7 +487,7 @@ tests: response: saveAs: ProductLabelValue constraints: - type: string + type: char_string maxLength: 64 - label: @@ -480,12 +520,13 @@ tests: value: ProductLabelValue - label: "TH reads SerialNumber from the DUT." + PICS: BINFO.S.A000f command: "readAttribute" attribute: "SerialNumber" response: saveAs: SerialNumberValue constraints: - type: string + type: char_string maxLength: 32 - label: "TH writes SerialNumber from the DUT." @@ -554,7 +595,7 @@ tests: response: saveAs: UniqueIDValue constraints: - type: string + type: char_string maxLength: 32 - label: "TH writes UniqueID from the DUT." diff --git a/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml index b473029dcf1a51..f6e1cc7ddd8ffd 100644 --- a/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml @@ -13,20 +13,22 @@ # 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: 11.2.2. [TC-BINFO-2.2] Events [DUT-Server] +name: "[TC-BINFO-2.2] Events [DUT - Server]" config: nodeId: 0x12344321 cluster: "Basic" endpoint: 0 - tests: - label: "Reboot the DUT TH reads the StartUp event from DUT" PICS: BINFO.S.E00 verification: | + On Raspi platform the event is triggered with this command, Pls use equivalent command on the respective DUT + + ./chip-tool basic read-event start-up 1 0 - Verify on the TH Log: + On TH verify that StartUp event has priority set as CRITICAL and software verision [1657193007.841105][5422:5427] CHIP:DMG: ], [1657193007.841137][5422:5427] CHIP:DMG: @@ -46,15 +48,18 @@ tests: - label: "TH subscribes to the ShutDown event on the DUT. Shutdown DUT." PICS: BINFO.S.E01 verification: | + On Raspi platform the event is triggered with this command, Pls use equivalent command on the respective DUT + + 1. Launch chip-tool into interactive mode with the command ./chip-tool interactive start basic subscribe-event shut-down 20 100 1 0 - 2. Turn down the DUT and run below command in interactive mode shell + 2. run below command in interactive mode shell and Turn down the DUT - Verify on the TH Log: + On TH verify that StartUp event has priority set as CRITICAL CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Event 0x0000_0001 [1653050528.900202][119367:119372] CHIP:TOO: Event number: 5 diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml index b01bea003704f0..cb8965e96d17c1 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml index 1d715f98b29ea2..79dac0d1a3e49e 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml @@ -34,4 +34,4 @@ tests: attribute: "StateValue" response: constraints: - type: bool + type: boolean diff --git a/src/app/tests/suites/certification/Test_TC_BR_1.yaml b/src/app/tests/suites/certification/Test_TC_BR_1.yaml index 11c5522188def4..ced5f99d29adf8 100644 --- a/src/app/tests/suites/certification/Test_TC_BR_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_1.yaml @@ -25,11 +25,10 @@ tests: "Read attribute DeviceTypeList of the Descriptor cluster on endpoint 0" PICS: MCORE.BRIDGE verification: | - Verify in TH Log - - ./chip-tool descriptor read device-list 1 0 + Verify in TH Log + [1657002174.323780][3885:3890] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3573910940 [1657002174.323838][3885:3890] CHIP:TOO: device list: 1 entries [1657002174.323919][3885:3890] CHIP:TOO: [1]: { @@ -41,10 +40,9 @@ tests: - label: "Read attribute PartsList of the Descriptor cluster on endpoint 0" PICS: MCORE.BRIDGE verification: | - Verify in TH Log - ./chip-tool descriptor read parts-list 1 0 + Verify in TH Log [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 @@ -67,19 +65,22 @@ tests: DeviceTypeList of the Descriptor cluster on that endpoint" PICS: MCORE.BRIDGE verification: | + ./chip-tool descriptor read device-list 1 1 + Verify in TH Log - ./chip-tool descriptor read device-list 1 1 [1657002313.871608][3977:3982] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3021853414 [1657002313.871680][3977:3982] CHIP:TOO: device list: 1 entries [1657002313.871740][3977:3982] CHIP:TOO: [1]: { [1657002313.871788][3977:3982] CHIP:TOO: Type: 14 [1657002313.871821][3977:3982] CHIP:TOO: Revision: 1 - [1657002313.871852][3977:3982] CHIP:TOO: } - + [1657002313.871852][3977:3982] :TOOCHIP: } ./chip-tool descriptor read device-list 1 3 + + Verify in TH Log + [1657002329.438065][3983:3988] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2452512872 [1657002329.438135][3983:3988] CHIP:TOO: device list: 2 entries [1657002329.438193][3983:3988] CHIP:TOO: [1]: { @@ -93,6 +94,9 @@ tests: ./chip-tool descriptor read device-list 1 4 + + Verify in TH Log + [1657002348.693948][3989:3994] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1398882309 [1657002348.694013][3989:3994] CHIP:TOO: device list: 2 entries [1657002348.694063][3989:3994] CHIP:TOO: [1]: { @@ -107,6 +111,9 @@ tests: ./chip-tool descriptor read device-list 1 5 + + Verify in TH Log + [1657002369.589492][3996:4001] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 130458766 [1657002369.589556][3996:4001] CHIP:TOO: device list: 2 entries [1657002369.589610][3996:4001] CHIP:TOO: [1]: { @@ -121,6 +128,10 @@ tests: ./chip-tool descriptor read device-list 1 6 + + Verify in TH Log + + [1657002386.484093][4002:4007] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 295450100 [1657002386.484155][4002:4007] CHIP:TOO: device list: 1 entries [1657002386.484255][4002:4007] CHIP:TOO: [1]: { @@ -131,6 +142,9 @@ tests: ./chip-tool descriptor read device-list 1 7 + + Verify in TH Log + [1657002413.721927][4015:4020] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2117104859 [1657002413.721981][4015:4020] CHIP:TOO: device list: 1 entries [1657002413.722028][4015:4020] CHIP:TOO: [1]: { @@ -141,6 +155,9 @@ tests: ./chip-tool descriptor read device-list 1 8 + + Verify in TH Log + [1657002436.415904][4034:4039] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2026786918 [1657002436.415972][4034:4039] CHIP:TOO: device list: 1 entries [1657002436.416033][4034:4039] CHIP:TOO: [1]: { @@ -151,6 +168,9 @@ tests: ./chip-tool descriptor read device-list 1 9 + + Verify in TH Log + [1657002455.445818][4040:4045] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 913116116 [1657002455.445883][4040:4045] CHIP:TOO: device list: 1 entries [1657002455.445944][4040:4045] CHIP:TOO: [1]: { @@ -161,6 +181,9 @@ tests: ./chip-tool descriptor read device-list 1 10 + + Verify in TH Log + [1657002473.100910][4047:4052] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 259205426 [1657002473.100967][4047:4052] CHIP:TOO: device list: 2 entries [1657002473.101013][4047:4052] CHIP:TOO: [1]: { @@ -173,8 +196,10 @@ tests: [1657002473.101192][4047:4052] CHIP:TOO: } - ./chip-tool descriptor read device-list 1 11 + + Verify in TH Log + [1657002495.856770][4061:4066] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4248421677 [1657002495.856836][4061:4066] CHIP:TOO: device list: 2 entries [1657002495.856893][4061:4066] CHIP:TOO: [1]: { @@ -189,6 +214,9 @@ tests: ./chip-tool descriptor read device-list 1 12 + + Verify in TH Log + [1657002515.862187][4073:4078] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2731599835 [1657002515.862249][4073:4078] CHIP:TOO: device list: 2 entries [1657002515.862302][4073:4078] CHIP:TOO: [1]: { @@ -203,6 +231,9 @@ tests: ./chip-tool descriptor read device-list 1 13 + + Verify in TH Log + [1657002538.134605][4097:4102] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3449178249 [1657002538.134700][4097:4102] CHIP:TOO: device list: 2 entries [1657002538.134784][4097:4102] CHIP:TOO: [1]: { @@ -215,15 +246,25 @@ tests: [1657002538.135166][4097:4102] CHIP:TOO: } disabled: true + - label: + "For each of the endpoints read in step 1b, read attribute + DeviceTypeList of the Descriptor cluster on that endpoint" + PICS: MCORE.BRIDGE + verification: | + Verify in step 1c list of endpoints is printed for aggregator i.e., 0x000e=14 + + Then in this case Endpoint is 1 + disabled: true + - label: "Read attribute PartsList of the Descriptor cluster on endpoint found in step 1c" PICS: MCORE.BRIDGE verification: | - Verify in TH Log - ./chip-tool descriptor read parts-list 1 1 + Verify in TH Log + [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.697312][4121:4126] CHIP:TOO: [1]: 3 @@ -246,10 +287,9 @@ tests: Bridged Node in their DeviceTypeList" PICS: MCORE.BRIDGE verification: | - Verify in TH Log - Verify device type has either Bridged node (0x0013), i.e., Type=19 + Verify in TH Log ./chip-tool descriptor read device-list 1 3 [1657002843.395988][4135:4140] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2452512872 @@ -264,6 +304,9 @@ tests: [1657002843.396342][4135:4140] CHIP:TOO: } ./chip-tool descriptor read device-list 1 4 + + Verify in TH Log + [1657002927.992247][4143:4148] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1398882309 [1657002927.992309][4143:4148] CHIP:TOO: device list: 2 entries [1657002927.992362][4143:4148] CHIP:TOO: [1]: { @@ -276,6 +319,9 @@ tests: [1657002927.992567][4143:4148] CHIP:TOO: } ./chip-tool descriptor read device-list 1 5 + + Verify in TH Log + [1657002949.332151][4156:4161] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 130458766 [1657002949.332245][4156:4161] CHIP:TOO: device list: 2 entries [1657002949.332294][4156:4161] CHIP:TOO: [1]: { @@ -288,6 +334,10 @@ tests: [1657002949.332470][4156:4161] CHIP:TOO: } ./chip-tool descriptor read device-list 1 6 + + Verify in TH Log + + [1657002965.947096][4163:4168] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 295450100 [1657002965.947150][4163:4168] CHIP:TOO: device list: 1 entries [1657002965.947196][4163:4168] CHIP:TOO: [1]: { @@ -296,6 +346,8 @@ tests: [1657002965.947278][4163:4168] CHIP:TOO: } ./chip-tool descriptor read device-list 1 7 + + Verify in TH Log [1657002981.963307][4176:4181] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2117104859 [1657002981.963371][4176:4181] CHIP:TOO: device list: 1 entries [1657002981.963429][4176:4181] CHIP:TOO: [1]: { @@ -304,6 +356,9 @@ tests: [1657002981.963533][4176:4181] CHIP:TOO: } ./chip-tool descriptor read device-list 1 8 + + Verify in TH Log + [1657003007.476575][4183:4188] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2026786918 [1657003007.476635][4183:4188] CHIP:TOO: device list: 1 entries [1657003007.476689][4183:4188] CHIP:TOO: [1]: { @@ -312,6 +367,9 @@ tests: [1657003007.476786][4183:4188] CHIP:TOO: } ./chip-tool descriptor read device-list 1 9 + + Verify in TH Log + [1657003023.263333][4191:4196] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 913116116 [1657003023.263391][4191:4196] CHIP:TOO: device list: 1 entries [1657003023.263443][4191:4196] CHIP:TOO: [1]: { @@ -320,6 +378,9 @@ tests: [1657003023.263538][4191:4196] CHIP:TOO: } ./chip-tool descriptor read device-list 1 10 + + Verify in TH Log + [1657003044.071972][4204:4209] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 259205426 [1657003044.072037][4204:4209] CHIP:TOO: device list: 2 entries [1657003044.072085][4204:4209] CHIP:TOO: [1]: { @@ -332,6 +393,9 @@ tests: [1657003044.072295][4204:4209] CHIP:TOO: } ./chip-tool descriptor read device-list 1 11 + + Verify in TH Log + [1657003082.358311][4217:4222] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4248421677 [1657003082.358379][4217:4222] CHIP:TOO: device list: 2 entries [1657003082.358432][4217:4222] CHIP:TOO: [1]: { @@ -344,6 +408,9 @@ tests: [1657003082.358646][4217:4222] CHIP:TOO: } ./chip-tool descriptor read device-list 1 12 + + Verify in TH Log + [1657003103.954911][4248:4253] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2731599835 [1657003103.954986][4248:4253] CHIP:TOO: device list: 2 entries [1657003103.955050][4248:4253] CHIP:TOO: [1]: { @@ -356,6 +423,9 @@ tests: [1657003103.955269][4248:4253] CHIP:TOO: } ./chip-tool descriptor read device-list 1 13 + + Verify in TH Log + [1657003125.905572][4261:4266] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3449178249 [1657003125.905638][4261:4266] CHIP:TOO: device list: 2 entries [1657003125.905687][4261:4266] CHIP:TOO: [1]: { @@ -373,15 +443,19 @@ tests: perform the tests for Bridged Device Basic Information cluster" PICS: MCORE.BRIDGE verification: | - Verify in TH Log - ref to test plan for Bridged Device Basic Information cluster(https://github.com/CHIP-Specifications/chip-test-plans/blob/master/src/cluster/bridged_device_basic_information.adoc) ./chip-tool bridgeddevicebasic read reachable 1 3 + + Verify in TH Log + [1657003614.269096][4564:4569] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_0011 DataVersion: 1897994097 [1657003614.269155][4564:4569] CHIP:TOO: Reachable: TRUE ./chip-tool bridgeddevicebasic read node-label 1 4 + + Verify in TH Log + [1657003598.573764][4552:4557] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_0039 Attribute 0x0000_0005 DataVersion: 3722118563 [1657003598.573811][4552:4557] CHIP:TOO: NodeLabel: Switch 1 disabled: true @@ -405,12 +479,13 @@ tests: type(s) of the bridged device" PICS: MCORE.BRIDGE verification: | - Verify in TH Log - Verify the Endpoint list has devicetype application 1.e, 0x0100 = 256(actuator), 0x0103=259(sensor) ./chip-tool descriptor read device-list 1 3 + + Verify in TH Log + [1657003925.553294][4664:4669] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2452512872 [1657003925.553368][4664:4669] CHIP:TOO: device list: 2 entries [1657003925.553430][4664:4669] CHIP:TOO: [1]: { @@ -425,6 +500,9 @@ tests: ./chip-tool descriptor read device-list 1 4 + + Verify in TH Log + [1657004014.927308][4678:4683] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1398882309 [1657004014.927387][4678:4683] CHIP:TOO: device list: 2 entries [1657004014.927460][4678:4683] CHIP:TOO: [1]: { @@ -438,6 +516,9 @@ tests: ./chip-tool descriptor read device-list 1 5 + + Verify in TH Log + [1657004035.789404][4690:4695] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 130458766 [1657004035.789470][4690:4695] CHIP:TOO: device list: 2 entries [1657004035.789526][4690:4695] CHIP:TOO: [1]: { @@ -451,6 +532,9 @@ tests: ./chip-tool descriptor read device-list 1 6 + + Verify in TH Log + [1657004053.597061][4698:4703] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 295450100 [1657004053.597116][4698:4703] CHIP:TOO: device list: 1 entries [1657004053.597164][4698:4703] CHIP:TOO: [1]: { @@ -460,6 +544,9 @@ tests: ./chip-tool descriptor read device-list 1 10 + + Verify in TH Log + [1657004074.939061][4704:4709] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 259205426 [1657004074.939126][4704:4709] CHIP:TOO: device list: 2 entries [1657004074.939178][4704:4709] CHIP:TOO: [1]: { @@ -473,6 +560,9 @@ tests: ./chip-tool descriptor read device-list 1 11 + + Verify in TH Log + [1657004114.075998][4725:4730] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4248421677 [1657004114.076073][4725:4730] CHIP:TOO: device list: 2 entries [1657004114.076130][4725:4730] CHIP:TOO: [1]: { @@ -486,6 +576,9 @@ tests: ./chip-tool descriptor read device-list 1 12 + + Verify in TH Log + [1657004134.659723][4737:4742] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2731599835 [1657004134.659785][4737:4742] CHIP:TOO: device list: 2 entries [1657004134.659835][4737:4742] CHIP:TOO: [1]: { @@ -499,6 +592,9 @@ tests: ./chip-tool descriptor read device-list 1 13 + + Verify in TH Log + [1657004152.758221][4749:4754] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3449178249 [1657004152.758277][4749:4754] CHIP:TOO: device list: 2 entries [1657004152.758323][4749:4754] CHIP:TOO: [1]: { @@ -524,10 +620,10 @@ tests: brightness" PICS: MCORE.BRIDGE verification: | - Verify in TH Log - ./chip-tool onoff read on-off 1 3 + Verify in TH Log + [1657004454.213279][4792:4798] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3808303315 [1657004454.213319][4792:4798] CHIP:TOO: OnOff: FALSE disabled: true @@ -535,7 +631,6 @@ tests: - label: "Change the state of this bridged device (through Matter), e.g. change its brightness or toggle its on/off state" - PICS: MCORE.BRIDGE verification: | ./chip-tool onoff toggle 1 3 On bridge-app @@ -548,6 +643,7 @@ tests: Verify in TH Log + [1657522278.539407][16698:16703] CHIP:DMG: { [1657522278.539447][16698:16703] CHIP:DMG: suppressResponse = false, [1657522278.539495][16698:16703] CHIP:DMG: InvokeResponseIBs = @@ -583,10 +679,9 @@ tests: - label: "Read the state of this bridged device (through Matter), as in 6b" PICS: MCORE.BRIDGE verification: | - Verify in TH Log - ./chip-tool onoff read on-off 1 3 + Verify in TH Log [1657004565.254591][4804:4809] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3808303316 [1657004565.254635][4804:4809] CHIP:TOO: OnOff: TRUE diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml index e0a2486c4420c2..94f6fdcfc0fcd5 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml @@ -14,8 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 24.1.1. [TC-CADMIN-1.1] Administrator Behavior using ECM [DUT - - Commissioner] + 3.1.1. [TC-CADMIN-1.1] Administrator Behavior using ECM [DUT - Commissioner] config: nodeId: 0x12344321 @@ -24,6 +23,7 @@ config: tests: - label: "TH_CR1 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | "1. Provision the device using 1st controller chip-tool on the raspi (use above instructions) " @@ -33,7 +33,7 @@ tests: "TH_CR1 sends command to TH_CE to open a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM (Enhanced Commissioning Method)" - PICS: CADMIN.C.C0000 + PICS: CADMIN.C.C00.Tx verification: | On 1st controller using chip tool, open commissioning window using ECM @@ -69,7 +69,8 @@ tests: ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507058 + Verify in DUT as client side log + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507058 [1649245801.244173][10091:10096] CHIP:TOO: Fabrics: 1 entries [1649245801.244305][10091:10096] CHIP:TOO: [1]: { [1649245801.244348][10091:10096] CHIP:TOO: RootPublicKey: 045541017FCEFD0D83963C9ED7F21380C6B789EB989B5D20DC318FAE92D60D0F685666505E9C4F86C49ADC71AB3A8B9B44FD43214CF9BE2B6D47DE01F28FE1544F @@ -83,12 +84,13 @@ tests: disabled: true - label: "DUT_CR2 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | On 2nd controller, using chip-tool connect using manual code. Below is the example when using chip tool as controller (considering 35998938564 as the manual code generated by 1st controller) ./chip-tool pairing code 2 35998938564 - Verify whether you got below message in the log of TH + Verify whether you got below message in the log of TH Device commissioning completed with success disabled: true @@ -324,7 +326,7 @@ tests: "DUT_CR2 sends command to TH_CE to open a commissioning window using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM (Enhanced Commissioning Method)" - PICS: CADMIN.C.C0000 + PICS: CADMIN.C.C00.Tx verification: | 1. Using your DUT controller open commissioning window using ECM @@ -344,7 +346,7 @@ tests: - label: "DUT_CR2 sends command to TH_CE to revoke the commissioning window using the Revoke Commissioning command" - PICS: CADMIN.C.C0002 + PICS: CADMIN.C.C02.Tx verification: | On your DUT controller, run revoke command @@ -388,6 +390,7 @@ tests: - label: "TH_CR3 attempts to execute a PASE to starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | On 3rd controller using chip-tool connect using manual code generated from 1st controller. This attempt should fail, i.e ./chip-tool pairing code 1 34995354639 @@ -447,7 +450,7 @@ tests: - label: "DUT_CR2 sends command to TH_CE to open a commissioning window using ECM" - PICS: CADMIN.C.C0000 + PICS: CADMIN.C.C00.Tx verification: | 1. Using your DUT controller open commissioning window using ECM @@ -473,7 +476,7 @@ tests: - label: "DUT_CR2 sends command to TH_CE to open a commissioning window using ECM" - PICS: CADMIN.C.C0000 + PICS: CADMIN.C.C00.Tx verification: | 1. Using your DUT controller open commissioning window using ECM @@ -493,6 +496,7 @@ tests: - label: "TH_CR1 starts a commissioning process with TH_CE before the timeout from step 15" + PICS: CADMIN.C verification: | On 1st controller, using chip-tool connect using manual code. Below is the example when using chip tool as controller (considering 34995354639 as the manual code generated by DUT) diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml index f2d209221b7a1a..e0f14bd09c0120 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml @@ -20,29 +20,30 @@ config: nodeId: 0x12344321 timeout: 700 nodeIdForDuplicateCommissioning: - type: NODE_ID + type: node_id defaultValue: 0x11 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE nodeId3: - type: NODE_ID + type: node_id defaultValue: 0xC00FEE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:0000000000I31506010" payload2: - type: CHAR_STRING + type: char_string defaultValue: "MT:0000000000I.0648G00" tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -51,7 +52,7 @@ tests: - label: "TH_CR1 opens a commissioning window on DUT_CE" cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C01.Rsp timedInteractionTimeoutMs: 10000 arguments: values: @@ -64,6 +65,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -79,6 +81,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -94,6 +97,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -109,6 +113,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -124,6 +129,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -139,6 +145,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -154,6 +161,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -169,6 +177,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -184,6 +193,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -214,6 +224,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -229,6 +240,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -244,6 +256,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -259,6 +272,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -274,6 +288,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -289,6 +304,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -304,6 +320,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -319,6 +336,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -334,6 +352,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -349,6 +368,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -359,11 +379,12 @@ tests: error: FAILURE - label: - "TH_CR2 starts a commissioning process with DUT_CE using valid setup - code" + "TH_CR2 attempts to do PASE to DUT_CE using the correct onboarding + payload" identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -372,16 +393,3 @@ tests: value: payload response: error: FAILURE - - - label: "TH_CR3 starts a commissioning process with DUT_CE" - identity: "gamma" - cluster: "CommissionerCommands" - command: "PairWithCode" - arguments: - values: - - name: "nodeId" - value: nodeId3 - - name: "payload" - value: payload - response: - error: FAILURE diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml index 8dc4eb53a8fff6..eb0e711bb0bbac 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 24.1.11. [TC-CADMIN-1.11] Open commissioning window on DUT twice using ECM - then BCM [DUT - Commissioner] + 3.1.11. [TC-CADMIN-1.11] Open commissioning window on DUT twice using ECM + then BCM [DUT - Commissionee] config: nodeId: 0x12344321 @@ -23,88 +23,428 @@ config: endpoint: 0 tests: - - label: "TH_CR2 starts a commissioning process with TH_CE" + - label: "TH_CR1 starts a commissioning process with DUT_CE" + PICS: CADMIN.S verification: | - "1. Provision the device using 2nd controller chip tool on the raspi (use above instructions)" + "1. Provision the device using 1st controller chip tool on the raspi (use above instructions) , + " disabled: true - label: - "TH_CR2 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.C.C0000 + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + PICS: CADMIN.S.C00.Rsp verification: | - On the 2nd controller using chip tool, open commissioning window using ECM + On the 1st controller using chip tool, open commissioning window using ECM - ./chip-tool pairing open-commissioning-window 2 1 400 2000 3840 - Controller: + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + + [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established + [1635874557.409553][4549:4554] CHIP:IN: New secure session created for device 0x0000000000000001, key 76!! + [1635874557.409649][4549:4554] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635874557.416929][4549:4554] CHIP:DMG: ICR moving to [AddingComm] + [1635874557.417092][4549:4554] CHIP:DMG: ICR moving to [AddedComma] + [1635874557.417215][4549:4554] CHIP:IN: Prepared encrypted message 0xaaaac5947d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 5541i with MessageCounter:0. + [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec + [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] + [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] + [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] + disabled: true + + - label: "DNS-SD records shows DUT_CE advertising" + verification: | + grl@grl-ThinkPad-L480:~/2nd_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterc._udp + + wlp5s0 IPv6 C326228BDB082BF4 _matterc._udp local + + wlp5s0 IPv6 7B6545A75C5330BE _matterc._udp local + = wlp5s0 IPv6 7B6545A75C5330BE _matterc._udp local + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2755] + port = [5540] + txt = ["PI=" "PH=33" "CM=1" "D=3841" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] + = wlp5s0 IPv6 C326228BDB082BF4 _matterc._udp local + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2755] + port = [5540] + txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] + grl@grl-ThinkPad-L480:~/2nd_cntrl/connectedhomeip/examples/chip-tool/out/debug$ + disabled: true + + - label: "TH_CR3 Commissions with DUT_CE" + PICS: CADMIN.S + verification: | + 1. On 3rd controller using chip tool connect using manual code + + ./chip-tool pairing code 3 35484132896 + + Verify you got below message + Device commissioning completed with success + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM and TH_CR2 + Commissions with DUT_CE" + PICS: CADMIN.S.C00.Rsp + verification: | + On the 1st controller using chip tool, open commissioning window using ECM + + + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + + [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established + [1635874557.409553][4549:4554] CHIP:IN: New secure session created for device 0x0000000000000001, key 76!! + [1635874557.409649][4549:4554] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635874557.416929][4549:4554] CHIP:DMG: ICR moving to [AddingComm] + [1635874557.417092][4549:4554] CHIP:DMG: ICR moving to [AddedComma] + [1635874557.417215][4549:4554] CHIP:IN: Prepared encrypted message 0xaaaac5947d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 5541i with MessageCounter:0. + [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec + [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] + [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] + [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] + + + 1. On 2nd controller using chip tool connect using manual code + + ./chip-tool pairing code 1 35484132896 + + Verify you got below message + Device commissioning completed with success + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + PICS: CADMIN.S.C00.Rsp + verification: | + On the 1st controller using chip tool, open commissioning window using ECM + + + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + + [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established + [1635874557.409553][4549:4554] CHIP:IN: New secure session created for device 0x0000000000000001, key 76!! + [1635874557.409649][4549:4554] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635874557.416929][4549:4554] CHIP:DMG: ICR moving to [AddingComm] + [1635874557.417092][4549:4554] CHIP:DMG: ICR moving to [AddedComma] + [1635874557.417215][4549:4554] CHIP:IN: Prepared encrypted message 0xaaaac5947d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 5541i with MessageCounter:0. + [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec + [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] + [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] + [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] + disabled: true + + - label: + "Before the expiration of PIXIT.CADMIN.CwDuration seconds which was + set in step 5, TH_CR1 opens a 2nd commissioning window on DUT_CE using + a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + PICS: CADMIN.S.C00.Rsp + verification: | + Before the timer expiry, on the 1st controller using chip tool, open commissioning window using ECM. Verify the General code return error 1 - CHIP:IN: Sending encrypted msg 0xaaaad3464d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5805157 msec - [1635691999.946536][3822:3827] CHIP:DMG: ICR moving to [CommandSen] - [1635691999.946586][3822:3827] CHIP:CTL: Manual pairing code: [35407541839] - [1635691999.946650][3822:3827] CHIP:CTL: SetupQRCode: [MT:00000CQM00G6V851H10] - [1635691999.946802][3822:3827] CHIP:EM: Sending Standalone Ack for MessageCounter:3234931243 on exchange 35324i - [1635691999.946850][3822:3827] CHIP:IN: Prepared plaintext message 0xffffaa58a960 to 0x0000000000000000 of type 0x10 and protocolId (0, 0) on exchange 35324i with MessageCounter:1726016118. - [1635691999.946895][3822:3827] CHIP:IN: Sending plaintext msg 0xffffaa58a960 with MessageCounter:1726016118 to 0x0000000000000000 at monotonic time: 5805158 msec - [1635691999.946983][3822:3827] CHIP:EM: Flushed pending ack for MessageCounter:3234931243 on exchange 35324i - Device: + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + + CHIP:DMG: InvokeResponseMessage = + [1650527291.952055][8566:8571] CHIP:DMG: { + [1650527291.952074][8566:8571] CHIP:DMG: suppressResponse = false, + [1650527291.952091][8566:8571] CHIP:DMG: InvokeResponseIBs = + [1650527291.952116][8566:8571] CHIP:DMG: [ + [1650527291.952134][8566:8571] CHIP:DMG: InvokeResponseIB = + [1650527291.952172][8566:8571] CHIP:DMG: { + [1650527291.952195][8566:8571] CHIP:DMG: CommandStatusIB = + [1650527291.952220][8566:8571] CHIP:DMG: { + [1650527291.952245][8566:8571] CHIP:DMG: CommandPathIB = + [1650527291.952276][8566:8571] CHIP:DMG: { + [1650527291.952303][8566:8571] CHIP:DMG: EndpointId = 0x0, + [1650527291.952334][8566:8571] CHIP:DMG: ClusterId = 0x3c, + [1650527291.952369][8566:8571] CHIP:DMG: CommandId = 0x0, + [1650527291.952394][8566:8571] CHIP:DMG: }, + [1650527291.952431][8566:8571] CHIP:DMG: + [1650527291.952458][8566:8571] CHIP:DMG: StatusIB = + [1650527291.952488][8566:8571] CHIP:DMG: { + [1650527291.952519][8566:8571] CHIP:DMG: status = 0x01 (FAILURE), + [1650527291.952555][8566:8571] CHIP:DMG: cluster-status = 0x1, + [1650527291.952578][8566:8571] CHIP:DMG: }, + [1650527291.952612][8566:8571] CHIP:DMG: + [1650527291.952634][8566:8571] CHIP:DMG: }, + [1650527291.952671][8566:8571] CHIP:DMG: + [1650527291.952694][8566:8571] CHIP:DMG: }, + [1650527291.952731][8566:8571] CHIP:DMG: + [1650527291.952751][8566:8571] CHIP:DMG: ], + [1650527291.952781][8566:8571] CHIP:DMG: + [1650527291.952795][8566:8571] CHIP:DMG: InteractionModelRevision = 1 + [1650527291.952807][8566:8571] CHIP:DMG: }, + [1650527291.952886][8566:8571] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x1 + [1650527291.952931][8566:8571] CHIP:CTL: Failed to open pairing window on the device. Status IM Error 0x00000601: Cluster-specific error: 0x01 + disabled: true - CHIP minimal mDNS started advertising. - [1635687658.683388][3792:3792] CHIP:DIS: Failed to find a valid admin pairing. Node ID unknown - [1635687658.683427][3792:3792] CHIP:DIS: Start dns-sd server - no current nodeId - [1635687658.683456][3792:3792] CHIP:DL: MAC is not known, using a default. - [1635687658.683522][3792:3792] CHIP:DIS: Advertise commission parameter vendorID=9050 productID=65279 discriminator=3840/00 - [1635687658.683597][3792:3792] CHIP:DIS: CHIP minimal mDNS configured as 'Commissionable node device'. - [1635687658.684345][3792:3792] CHIP:DIS: Broadcasting mDns reply for query from 192.168.0.225 - [1635687658.687201][3792:3792] CHIP:DIS: Broadcasting mDns reply for query from 192.168.0.225 + - label: "TH_CR1 reads the list of Fabrics on DUT_CE" + PICS: OPCREDS.S.A0001 + verification: | + On 1st controller using chip tool, read fabrics list + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - The setup pin code is extracted from the manual pairing code in the log and that will be used when pairing the 2nd admin controller. + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 + [1650527361.425870][15792:15797] CHIP:TOO: Fabrics: 3 entries + [1650527361.426777][15792:15797] CHIP:TOO: [1]: { + [1650527361.426859][15792:15797] CHIP:TOO: RootPublicKey: 0429A71383F336D80918C9EC655112513E428C073AF7FB44820EC793535302C6E3825C56EE6DD1A683EAA7B59E3F261B46FFA24A6D911E8D88839F4C1B3C84BA01 + [1650527361.426923][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.426979][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427033][15792:15797] CHIP:TOO: NodeId: 1 + [1650527361.427088][15792:15797] CHIP:TOO: Label: + [1650527361.427166][15792:15797] CHIP:TOO: FabricIndex: 1 + [1650527361.427376][15792:15797] CHIP:TOO: } + [1650527361.427464][15792:15797] CHIP:TOO: [2]: { + [1650527361.427532][15792:15797] CHIP:TOO: RootPublicKey: 04781BCEE70118049ED61DD5B4E401CF1A09D2F78AE7F5770BE5506AD24238E5E0777277DABAFD062659651C95CC2CA7DEAACE40DB579A946CC07CADB141BE05D7 + [1650527361.427595][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.427649][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427703][15792:15797] CHIP:TOO: NodeId: 3 + [1650527361.427756][15792:15797] CHIP:TOO: Label: + [1650527361.427811][15792:15797] CHIP:TOO: FabricIndex: 2 + [1650527361.427868][15792:15797] CHIP:TOO: } + [1650527361.427943][15792:15797] CHIP:TOO: [3]: { + [1650527361.428008][15792:15797] CHIP:TOO: RootPublicKey: 0403EDB5B461030A34EF7EA2F9DB0D46A36185E4755C365AF9344C4959F049EF21D55EAB903A2C7FBFC305EEFA42989250D7517A73E6156062390A60C0D4C41EBD + [1650527361.428067][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.428122][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.428176][15792:15797] CHIP:TOO: NodeId: 2 + [1650527361.428229][15792:15797] CHIP:TOO: Label: + [1650527361.428282][15792:15797] CHIP:TOO: FabricIndex: 3 + [1650527361.428335][15792:15797] CHIP:TOO: } disabled: true - label: - "Before the expiration of PIXIT.CADMIN.CwDuration set in step 2, set - up a DUT_CR1 to start attempting to do PASE to TH_CE and failing 20 - times. This can be done using a valid onboarding payload with an - incorrect setupcode" + "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was + set in step 6" verification: | - 1. On 2nd controller using chip-tool connect using wrong manual code. Repeat the step for 20 times. + Wait for the expiration of PIXIT_COMM_WIN seconds + disabled: true - ./chip-tool pairing code 1 36177160938 --timeout 3 (With wrong manual code) + - label: + "TH_CR1 re-opens a commissioning window on DUT_CE using a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + PICS: CADMIN.S.C01.Rsp + verification: | + On the 1st controller using chip tool, open commissioning window using BCM - verify you got the following message in the TH log - CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 - CHIP:TOO: Secure Pairing Failed - CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + + CHIP:DMG: InvokeResponseMessage = + [1650278416.248379][11064:11069] CHIP:DMG: { + [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, + [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = + [1650278416.248570][11064:11069] CHIP:DMG: [ + [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = + [1650278416.248718][11064:11069] CHIP:DMG: { + [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = + [1650278416.248860][11064:11069] CHIP:DMG: { + [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = + [1650278416.249011][11064:11069] CHIP:DMG: { + [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, + [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, + [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, + [1650278416.249347][11064:11069] CHIP:DMG: }, + [1650278416.249430][11064:11069] CHIP:DMG: + [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = + [1650278416.249581][11064:11069] CHIP:DMG: { + [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), + [1650278416.249738][11064:11069] CHIP:DMG: }, + [1650278416.249823][11064:11069] CHIP:DMG: + [1650278416.249889][11064:11069] CHIP:DMG: }, + [1650278416.249969][11064:11069] CHIP:DMG: + [1650278416.250035][11064:11069] CHIP:DMG: }, + [1650278416.250113][11064:11069] CHIP:DMG: + [1650278416.250169][11064:11069] CHIP:DMG: ], + [1650278416.250241][11064:11069] CHIP:DMG: + [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 + [1650278416.250355][11064:11069] CHIP:DMG: }, + [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] + disabled: true + + - label: "DNS-SD records shows DUT_CE advertising" + verification: | + ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterc._udp + + eth0 IPv6 2664ED6939FC373C _matterc._udp local + = eth0 IPv6 2664ED6939FC373C _matterc._udp local + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = ["PI=" "PH=36" "CM=1" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] + ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ disabled: true - label: - "Before the expiration of PIXIT.CADMIN.CwDuration set in step 2, - DUT_CR1 attempts to do PASE to DUT_CE using the correct onboarding - payload" + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set + in step 10, TH_CR3 opens a 2nd commissioning window on DUT_CE using a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + PICS: CADMIN.S.C01.Rsp verification: | - 1. On 2nd controller using chip tool connect using correct passcode. + On the 3rd controller using chip tool, open commissioning window using BCM before the timer expiry of the above step + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 3 0 --timedInteractionTimeoutMs 1000 + + CHIP:DMG: InvokeResponseMessage = + [1650527565.990404][24618:24623] CHIP:DMG: { + [1650527565.990476][24618:24623] CHIP:DMG: suppressResponse = false, + [1650527565.990528][24618:24623] CHIP:DMG: InvokeResponseIBs = + [1650527565.990615][24618:24623] CHIP:DMG: [ + [1650527565.990667][24618:24623] CHIP:DMG: InvokeResponseIB = + [1650527565.990755][24618:24623] CHIP:DMG: { + [1650527565.990816][24618:24623] CHIP:DMG: CommandStatusIB = + [1650527565.990900][24618:24623] CHIP:DMG: { + [1650527565.990967][24618:24623] CHIP:DMG: CommandPathIB = + [1650527565.991042][24618:24623] CHIP:DMG: { + [1650527565.991112][24618:24623] CHIP:DMG: EndpointId = 0x0, + [1650527565.991186][24618:24623] CHIP:DMG: ClusterId = 0x3c, + [1650527565.991257][24618:24623] CHIP:DMG: CommandId = 0x1, + [1650527565.991332][24618:24623] CHIP:DMG: }, + [1650527565.991441][24618:24623] CHIP:DMG: + [1650527565.991505][24618:24623] CHIP:DMG: StatusIB = + [1650527565.991574][24618:24623] CHIP:DMG: { + [1650527565.991645][24618:24623] CHIP:DMG: status = 0x01 (FAILURE), + [1650527565.991743][24618:24623] CHIP:DMG: cluster-status = 0x1, + [1650527565.991830][24618:24623] CHIP:DMG: }, + [1650527565.991918][24618:24623] CHIP:DMG: + [1650527565.991976][24618:24623] CHIP:DMG: }, + [1650527565.992061][24618:24623] CHIP:DMG: + [1650527565.992116][24618:24623] CHIP:DMG: }, + [1650527565.992202][24618:24623] CHIP:DMG: + [1650527565.992253][24618:24623] CHIP:DMG: ], + [1650527565.992316][24618:24623] CHIP:DMG: + [1650527565.992365][24618:24623] CHIP:DMG: InteractionModelRevision = 1 + [1650527565.992414][24618:24623] CHIP:DMG: }, + [1650527565.992535][24618:24623] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 + [1650527565.992601][24618:24623] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 + disabled: true + + - label: + "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was + set in step 11" + verification: | + Wait for the expiration of PIXIT_COMM_WIN seconds + disabled: true + + - label: "TH_CR1 reads the list of Fabrics on DUT_CE" + PICS: OPCREDS.S.A0001 + verification: | + On 1st controller using chip tool, read fabrics list + + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 + [1650527361.425870][15792:15797] CHIP:TOO: Fabrics: 3 entries + [1650527361.426777][15792:15797] CHIP:TOO: [1]: { + [1650527361.426859][15792:15797] CHIP:TOO: RootPublicKey: 0429A71383F336D80918C9EC655112513E428C073AF7FB44820EC793535302C6E3825C56EE6DD1A683EAA7B59E3F261B46FFA24A6D911E8D88839F4C1B3C84BA01 + [1650527361.426923][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.426979][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427033][15792:15797] CHIP:TOO: NodeId: 1 + [1650527361.427088][15792:15797] CHIP:TOO: Label: + [1650527361.427166][15792:15797] CHIP:TOO: FabricIndex: 1 + [1650527361.427376][15792:15797] CHIP:TOO: } + [1650527361.427464][15792:15797] CHIP:TOO: [2]: { + [1650527361.427532][15792:15797] CHIP:TOO: RootPublicKey: 04781BCEE70118049ED61DD5B4E401CF1A09D2F78AE7F5770BE5506AD24238E5E0777277DABAFD062659651C95CC2CA7DEAACE40DB579A946CC07CADB141BE05D7 + [1650527361.427595][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.427649][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427703][15792:15797] CHIP:TOO: NodeId: 3 + [1650527361.427756][15792:15797] CHIP:TOO: Label: + [1650527361.427811][15792:15797] CHIP:TOO: FabricIndex: 2 + [1650527361.427868][15792:15797] CHIP:TOO: } + [1650527361.427943][15792:15797] CHIP:TOO: [3]: { + [1650527361.428008][15792:15797] CHIP:TOO: RootPublicKey: 0403EDB5B461030A34EF7EA2F9DB0D46A36185E4755C365AF9344C4959F049EF21D55EAB903A2C7FBFC305EEFA42989250D7517A73E6156062390A60C0D4C41EBD + [1650527361.428067][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.428122][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.428176][15792:15797] CHIP:TOO: NodeId: 2 + [1650527361.428229][15792:15797] CHIP:TOO: Label: + [1650527361.428282][15792:15797] CHIP:TOO: FabricIndex: 3 + [1650527361.428335][15792:15797] CHIP:TOO: } + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + PICS: CADMIN.S.C01.Rsp + verification: | + On the 1st controller using chip tool, open commissioning window using BCM + + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 - ./chip-tool pairing code 1 36177160937 (correct passcode) - verify you got the following message in the TH log - CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 - CHIP:TOO: Secure Pairing Failed - CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout + CHIP:DMG: InvokeResponseMessage = + [1650278416.248379][11064:11069] CHIP:DMG: { + [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, + [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = + [1650278416.248570][11064:11069] CHIP:DMG: [ + [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = + [1650278416.248718][11064:11069] CHIP:DMG: { + [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = + [1650278416.248860][11064:11069] CHIP:DMG: { + [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = + [1650278416.249011][11064:11069] CHIP:DMG: { + [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, + [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, + [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, + [1650278416.249347][11064:11069] CHIP:DMG: }, + [1650278416.249430][11064:11069] CHIP:DMG: + [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = + [1650278416.249581][11064:11069] CHIP:DMG: { + [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), + [1650278416.249738][11064:11069] CHIP:DMG: }, + [1650278416.249823][11064:11069] CHIP:DMG: + [1650278416.249889][11064:11069] CHIP:DMG: }, + [1650278416.249969][11064:11069] CHIP:DMG: + [1650278416.250035][11064:11069] CHIP:DMG: }, + [1650278416.250113][11064:11069] CHIP:DMG: + [1650278416.250169][11064:11069] CHIP:DMG: ], + [1650278416.250241][11064:11069] CHIP:DMG: + [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 + [1650278416.250355][11064:11069] CHIP:DMG: }, + [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - label: - "TH_CR3 starts a commissioning process with TH_CE using the correct - PAKEVerifier" - PICS: CADMIN.C.C0000 + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set + in step 14, TH_CR2 opens a second commissioning window on DUT_CE using + a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + PICS: CADMIN.S.C01.Rsp verification: | - 1. On 3rdd controller using chip-tool connect using correct passcode + On the 2nd controller using chip tool, open commissioning window using BCM before timer expiry from above step - ./chip-tool pairing code 1 36177160938 (With wrong manual code) + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 - verify you got the following message in the TH log - CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 - CHIP:TOO: Secure Pairing Failed - CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout + CHIP:DMG: InvokeResponseMessage = + [1650527622.373450][15824:15829] CHIP:DMG: { + [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, + [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = + [1650527622.373734][15824:15829] CHIP:DMG: [ + [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = + [1650527622.373913][15824:15829] CHIP:DMG: { + [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = + [1650527622.374087][15824:15829] CHIP:DMG: { + [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = + [1650527622.374296][15824:15829] CHIP:DMG: { + [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, + [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, + [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, + [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.374799][15824:15829] CHIP:DMG: + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, + [1650527622.375320][15824:15829] CHIP:DMG: }, + [1650527622.375426][15824:15829] CHIP:DMG: + [1650527622.375527][15824:15829] CHIP:DMG: }, + [1650527622.375616][15824:15829] CHIP:DMG: + [1650527622.375704][15824:15829] CHIP:DMG: }, + [1650527622.375786][15824:15829] CHIP:DMG: + [1650527622.375864][15824:15829] CHIP:DMG: ], + [1650527622.375940][15824:15829] CHIP:DMG: + [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 + [1650527622.376058][15824:15829] CHIP:DMG: }, + [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 + [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml index e4052ba9353710..0e02604237b626 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 24.1.12. [TC-CADMIN-1.12] Open commissioning window on DUT twice using ECM + 25.1.12. [TC-CADMIN-1.12] Open commissioning window on DUT twice using ECM then BCM [DUT - Commissioner] config: @@ -23,19 +23,198 @@ config: endpoint: 0 tests: - - label: "TH_CR2 starts a commissioning process with TH_CE" + - label: "DUT_CR1 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | - "1. Provision the device using 2nd controller chip tool on the raspi (use above instructions) + "1. Provision the device using your DUT controller (use above instructions) , + " disabled: true - label: - "TH_CR2 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.C.C0001 + "DUT_CR1 sends command to TH_CE to open a commissioning window with a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM and + TH_CR3 Commissions with TH_CE" + PICS: CADMIN.C.C00.Tx verification: | - On the 2nd controller using chip tool, open commissioning window using BCM + On your DUT controller, open commissioning window using ECM + + Below is the example is using chip tool as controller + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + + [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established + [1635874557.409553][4549:4554] CHIP:IN: New secure session created for device 0x0000000000000001, key 76!! + [1635874557.409649][4549:4554] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635874557.416929][4549:4554] CHIP:DMG: ICR moving to [AddingComm] + [1635874557.417092][4549:4554] CHIP:DMG: ICR moving to [AddedComma] + [1635874557.417215][4549:4554] CHIP:IN: Prepared encrypted message 0xaaaac5947d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 5541i with MessageCounter:0. + [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec + [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] + [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] + [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] + + + + On 3rd controller using chip tool connect using manual code + + ./chip-tool pairing code 1 35484132896 + + Verify you got below message + Device commissioning completed with success + disabled: true + + - label: + "DUT_CR1 sends command to TH_CE to open a commissioning window with a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM and + TH_CR2 Commissions with TH_CE" + PICS: CADMIN.C.C00.Tx + verification: | + On your DUT controller, open commissioning window using ECM + + Below is the example is using chip tool as controller + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + + [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established + [1635874557.409553][4549:4554] CHIP:IN: New secure session created for device 0x0000000000000001, key 76!! + [1635874557.409649][4549:4554] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635874557.416929][4549:4554] CHIP:DMG: ICR moving to [AddingComm] + [1635874557.417092][4549:4554] CHIP:DMG: ICR moving to [AddedComma] + [1635874557.417215][4549:4554] CHIP:IN: Prepared encrypted message 0xaaaac5947d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 5541i with MessageCounter:0. + [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec + [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] + [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] + [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] + + + + On 2nd controller using chip tool connect using manual code + + ./chip-tool pairing code 1 35484132896 + + Verify you got below message + Device commissioning completed with success + disabled: true + + - label: + "DUT_CR1 sends command to TH_CE to open a commissioning window with a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + PICS: CADMIN.C.C00.Tx + verification: | + On your DUT controller, open commissioning window using ECM + + Below is the example is using chip tool as controller + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + + [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established + [1635874557.409553][4549:4554] CHIP:IN: New secure session created for device 0x0000000000000001, key 76!! + [1635874557.409649][4549:4554] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635874557.416929][4549:4554] CHIP:DMG: ICR moving to [AddingComm] + [1635874557.417092][4549:4554] CHIP:DMG: ICR moving to [AddedComma] + [1635874557.417215][4549:4554] CHIP:IN: Prepared encrypted message 0xaaaac5947d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 5541i with MessageCounter:0. + [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec + [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] + [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] + [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] + disabled: true + + - label: + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set + in step 4, DUT_CR1 sends command to TH_CE to open a 2nd commissioning + window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds + using ECM" + PICS: CADMIN.C.C00.Tx + verification: | + On your DUT controller, open commissioning window using ECM before the timer expiry from the above step + + Below is the example is using chip tool as controller + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + + CHIP:DMG: InvokeResponseMessage = + [1650527622.373450][15824:15829] CHIP:DMG: { + [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, + [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = + [1650527622.373734][15824:15829] CHIP:DMG: [ + [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = + [1650527622.373913][15824:15829] CHIP:DMG: { + [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = + [1650527622.374087][15824:15829] CHIP:DMG: { + [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = + [1650527622.374296][15824:15829] CHIP:DMG: { + [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, + [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, + [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, + [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.374799][15824:15829] CHIP:DMG: + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, + [1650527622.375320][15824:15829] CHIP:DMG: }, + [1650527622.375426][15824:15829] CHIP:DMG: + [1650527622.375527][15824:15829] CHIP:DMG: }, + [1650527622.375616][15824:15829] CHIP:DMG: + [1650527622.375704][15824:15829] CHIP:DMG: }, + [1650527622.375786][15824:15829] CHIP:DMG: + [1650527622.375864][15824:15829] CHIP:DMG: ], + [1650527622.375940][15824:15829] CHIP:DMG: + [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 + [1650527622.376058][15824:15829] CHIP:DMG: }, + [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 + [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 + disabled: true + + - label: "DUT_CR1 sends command to TH_CE to read the list of Fabrics" + PICS: OPCREDS.C.A0001 + verification: | + On 1st controller using chip tool, read fabrics list + + ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 + [1650527361.425870][15792:15797] CHIP:TOO: Fabrics: 3 entries + [1650527361.426777][15792:15797] CHIP:TOO: [1]: { + [1650527361.426859][15792:15797] CHIP:TOO: RootPublicKey: 0429A71383F336D80918C9EC655112513E428C073AF7FB44820EC793535302C6E3825C56EE6DD1A683EAA7B59E3F261B46FFA24A6D911E8D88839F4C1B3C84BA01 + [1650527361.426923][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.426979][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427033][15792:15797] CHIP:TOO: NodeId: 1 + [1650527361.427088][15792:15797] CHIP:TOO: Label: + [1650527361.427166][15792:15797] CHIP:TOO: FabricIndex: 1 + [1650527361.427376][15792:15797] CHIP:TOO: } + [1650527361.427464][15792:15797] CHIP:TOO: [2]: { + [1650527361.427532][15792:15797] CHIP:TOO: RootPublicKey: 04781BCEE70118049ED61DD5B4E401CF1A09D2F78AE7F5770BE5506AD24238E5E0777277DABAFD062659651C95CC2CA7DEAACE40DB579A946CC07CADB141BE05D7 + [1650527361.427595][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.427649][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427703][15792:15797] CHIP:TOO: NodeId: 3 + [1650527361.427756][15792:15797] CHIP:TOO: Label: + [1650527361.427811][15792:15797] CHIP:TOO: FabricIndex: 2 + [1650527361.427868][15792:15797] CHIP:TOO: } + [1650527361.427943][15792:15797] CHIP:TOO: [3]: { + [1650527361.428008][15792:15797] CHIP:TOO: RootPublicKey: 0403EDB5B461030A34EF7EA2F9DB0D46A36185E4755C365AF9344C4959F049EF21D55EAB903A2C7FBFC305EEFA42989250D7517A73E6156062390A60C0D4C41EBD + [1650527361.428067][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.428122][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.428176][15792:15797] CHIP:TOO: NodeId: 2 + [1650527361.428229][15792:15797] CHIP:TOO: Label: + [1650527361.428282][15792:15797] CHIP:TOO: FabricIndex: 3 + [1650527361.428335][15792:15797] CHIP:TOO: } + disabled: true + + - label: + "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was + set in step 5" + verification: | + Wait for the expiration of PIXIT_COMM_WIN seconds + disabled: true + + - label: + "DUT_CR1 sends command to TH_CE to re-opens a commissioning window + with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using + BCM" + PICS: CADMIN.C.C01.Tx + verification: | + On your DUT controller, open commissioning window using BCM + + Below is the example when using chip tool as controller + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 CHIP:DMG: InvokeResponseMessage = @@ -72,47 +251,182 @@ tests: disabled: true - label: - "Before the expiration of PIXIT.CADMIN.CwDuration set in step 2, set - up a DUT_CR1 to start attempting to do PASE to TH_CE and failing 20 - times. This can be done using a valid onboarding payload with an - incorrect setupcode" + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set + in step 8, TH_CR3 sends command to TH_CE to open a 2nd commissioning + window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds + using BCM" + PICS: CADMIN.C.C01.Tx verification: | - On 2nd controller, using chip-tool connect using wrong passcode. Repeat the step for 20 times. + On the 3rd controller using chip tool, open commissioning window using BCM before the timer expiry from above step + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + - ./chip-tool pairing onnetwork 1 20202019 --timeout 3 (With wrong passcode) - verify you got the following message in the TH log - CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 - CHIP:TOO: Secure Pairing Failed - CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout + + CHIP:DMG: InvokeResponseMessage = + [1650527622.373450][15824:15829] CHIP:DMG: { + [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, + [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = + [1650527622.373734][15824:15829] CHIP:DMG: [ + [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = + [1650527622.373913][15824:15829] CHIP:DMG: { + [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = + [1650527622.374087][15824:15829] CHIP:DMG: { + [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = + [1650527622.374296][15824:15829] CHIP:DMG: { + [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, + [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, + [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, + [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.374799][15824:15829] CHIP:DMG: + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, + [1650527622.375320][15824:15829] CHIP:DMG: }, + [1650527622.375426][15824:15829] CHIP:DMG: + [1650527622.375527][15824:15829] CHIP:DMG: }, + [1650527622.375616][15824:15829] CHIP:DMG: + [1650527622.375704][15824:15829] CHIP:DMG: }, + [1650527622.375786][15824:15829] CHIP:DMG: + [1650527622.375864][15824:15829] CHIP:DMG: ], + [1650527622.375940][15824:15829] CHIP:DMG: + [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 + [1650527622.376058][15824:15829] CHIP:DMG: }, + [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 + [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 disabled: true - label: - "Before the expiration of PIXIT.CADMIN.CwDuration set in step 2, - DUT_CR1 attempts to do PASE to DUT_CE using the correct onboarding - payload" + "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was + set in step 9" verification: | - On 2nd controller, using chip tool connect using correct passcode. + Wait for the expiration of PIXIT_COMM_WIN seconds + disabled: true - ./chip-tool pairing onnetwork 1 20202021 (correct passcode) + - label: "DUT_CR1 sends command to TH_CE to read the list of Fabrics" + PICS: OPCREDS.C.A0001 + verification: | + On 1st controller using chip tool, read fabrics list - verify you got the following message in the TH log - CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 - CHIP:TOO: Secure Pairing Failed - CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout + ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 + [1650527361.425870][15792:15797] CHIP:TOO: Fabrics: 3 entries + [1650527361.426777][15792:15797] CHIP:TOO: [1]: { + [1650527361.426859][15792:15797] CHIP:TOO: RootPublicKey: 0429A71383F336D80918C9EC655112513E428C073AF7FB44820EC793535302C6E3825C56EE6DD1A683EAA7B59E3F261B46FFA24A6D911E8D88839F4C1B3C84BA01 + [1650527361.426923][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.426979][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427033][15792:15797] CHIP:TOO: NodeId: 1 + [1650527361.427088][15792:15797] CHIP:TOO: Label: + [1650527361.427166][15792:15797] CHIP:TOO: FabricIndex: 1 + [1650527361.427376][15792:15797] CHIP:TOO: } + [1650527361.427464][15792:15797] CHIP:TOO: [2]: { + [1650527361.427532][15792:15797] CHIP:TOO: RootPublicKey: 04781BCEE70118049ED61DD5B4E401CF1A09D2F78AE7F5770BE5506AD24238E5E0777277DABAFD062659651C95CC2CA7DEAACE40DB579A946CC07CADB141BE05D7 + [1650527361.427595][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.427649][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427703][15792:15797] CHIP:TOO: NodeId: 3 + [1650527361.427756][15792:15797] CHIP:TOO: Label: + [1650527361.427811][15792:15797] CHIP:TOO: FabricIndex: 2 + [1650527361.427868][15792:15797] CHIP:TOO: } + [1650527361.427943][15792:15797] CHIP:TOO: [3]: { + [1650527361.428008][15792:15797] CHIP:TOO: RootPublicKey: 0403EDB5B461030A34EF7EA2F9DB0D46A36185E4755C365AF9344C4959F049EF21D55EAB903A2C7FBFC305EEFA42989250D7517A73E6156062390A60C0D4C41EBD + [1650527361.428067][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.428122][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.428176][15792:15797] CHIP:TOO: NodeId: 2 + [1650527361.428229][15792:15797] CHIP:TOO: Label: + [1650527361.428282][15792:15797] CHIP:TOO: FabricIndex: 3 + [1650527361.428335][15792:15797] CHIP:TOO: } disabled: true - label: - "TH_CR3 starts a commissioning process with TH_CE using the correct - PAKEVerifier" - PICS: CADMIN.C.C0001 + "DUT_CR1 sends command to TH_CE to open a commissioning window with a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + PICS: CADMIN.C.C01.Tx verification: | - 1. On 3rd controller using chip-tool connect using correct passcode + On your DUT controller, open commissioning window using BCM - ./chip-tool pairing onnetwork 1 20202021 + Below is the example when using chip tool as controller + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 - verify you got the following message in the TH log - CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 - CHIP:TOO: Secure Pairing Failed - CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout + CHIP:DMG: InvokeResponseMessage = + [1650278416.248379][11064:11069] CHIP:DMG: { + [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, + [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = + [1650278416.248570][11064:11069] CHIP:DMG: [ + [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = + [1650278416.248718][11064:11069] CHIP:DMG: { + [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = + [1650278416.248860][11064:11069] CHIP:DMG: { + [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = + [1650278416.249011][11064:11069] CHIP:DMG: { + [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, + [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, + [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, + [1650278416.249347][11064:11069] CHIP:DMG: }, + [1650278416.249430][11064:11069] CHIP:DMG: + [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = + [1650278416.249581][11064:11069] CHIP:DMG: { + [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), + [1650278416.249738][11064:11069] CHIP:DMG: }, + [1650278416.249823][11064:11069] CHIP:DMG: + [1650278416.249889][11064:11069] CHIP:DMG: }, + [1650278416.249969][11064:11069] CHIP:DMG: + [1650278416.250035][11064:11069] CHIP:DMG: }, + [1650278416.250113][11064:11069] CHIP:DMG: + [1650278416.250169][11064:11069] CHIP:DMG: ], + [1650278416.250241][11064:11069] CHIP:DMG: + [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 + [1650278416.250355][11064:11069] CHIP:DMG: }, + [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] + disabled: true + + - label: + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set + in step 12, TH_CR2 sends command to open a second commissioning window + on TH_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration + seconds using BCM" + PICS: CADMIN.C.C01.Tx + verification: | + On the 2nd controller using chip tool, open commissioning window using BCM before the timer expiry from above step + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + + + + + CHIP:DMG: InvokeResponseMessage = + [1650527622.373450][15824:15829] CHIP:DMG: { + [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, + [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = + [1650527622.373734][15824:15829] CHIP:DMG: [ + [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = + [1650527622.373913][15824:15829] CHIP:DMG: { + [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = + [1650527622.374087][15824:15829] CHIP:DMG: { + [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = + [1650527622.374296][15824:15829] CHIP:DMG: { + [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, + [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, + [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, + [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.374799][15824:15829] CHIP:DMG: + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, + [1650527622.375320][15824:15829] CHIP:DMG: }, + [1650527622.375426][15824:15829] CHIP:DMG: + [1650527622.375527][15824:15829] CHIP:DMG: }, + [1650527622.375616][15824:15829] CHIP:DMG: + [1650527622.375704][15824:15829] CHIP:DMG: }, + [1650527622.375786][15824:15829] CHIP:DMG: + [1650527622.375864][15824:15829] CHIP:DMG: ], + [1650527622.375940][15824:15829] CHIP:DMG: + [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 + [1650527622.376058][15824:15829] CHIP:DMG: }, + [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 + [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml index 662ba4083b4fb7..3607b092a20cc8 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml @@ -14,27 +14,27 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 24.1.13. [TC-CADMIN-1.15] Open commissioning window twice on DUT using BCM + 24.1.13. [TC-CADMIN-1.13] Open commissioning window twice on DUT using BCM then ECM [DUT - Commissionee] config: nodeId: 0x12344321 timeout: 500 nodeIdForDuplicateCommissioning: - type: NODE_ID + type: node_id defaultValue: 0x11 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE nodeId3: - type: NODE_ID + type: node_id defaultValue: 0xC00FEE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" tests: @@ -42,6 +42,7 @@ tests: identity: "alpha" cluster: "DelayCommands" command: "WaitForCommissionee" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -52,11 +53,13 @@ tests: cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C01.Rsp arguments: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "Commission from gamma" identity: "gamma" @@ -73,6 +76,7 @@ tests: identity: "gamma" cluster: "DelayCommands" command: "WaitForCommissionee" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -83,11 +87,13 @@ tests: cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C01.Rsp arguments: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "Commission from beta" identity: "beta" @@ -114,18 +120,20 @@ tests: cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C01.Rsp arguments: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "TH_CR1 opens a new commissioning window on DUT_CE" identity: "alpha" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp arguments: values: - name: "CommissioningTimeout" @@ -171,7 +179,7 @@ tests: cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp arguments: values: - name: "CommissioningTimeout" @@ -190,7 +198,7 @@ tests: cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp arguments: values: - name: "CommissioningTimeout" @@ -236,7 +244,7 @@ tests: cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp arguments: values: - name: "CommissioningTimeout" @@ -255,7 +263,7 @@ tests: cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp arguments: values: - name: "CommissioningTimeout" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml index 23dc545208f5f9..db9aab7da4dcc5 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 24.1.14. [TC-CADMIN-1.14] Open commissioning window twice on DUT using BCM + 3.1.14. [TC-CADMIN-1.14] Open commissioning window twice on DUT using BCM then ECM [DUT - Commissioner] config: @@ -24,6 +24,7 @@ config: tests: - label: "DUT_CR1 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | "1. Provision the device using your DUT controller (use above instructions) , " @@ -31,13 +32,13 @@ tests: - label: "DUT_CR1 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM and + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM and TH_CR3 Commissions with TH_CE" - PICS: CADMIN.C.C0000 + PICS: CADMIN.C.C01.Tx verification: | On your DUT controller, open commissioning window using ECM - Below is the example is using chip tool as controller + Below is the example while using chip tool as controller ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established @@ -52,7 +53,6 @@ tests: [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] - On 3rd controller using chip tool connect using manual code ./chip-tool pairing code 1 35484132896 @@ -63,13 +63,13 @@ tests: - label: "DUT_CR1 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM and + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM and TH_CR2 Commissions with TH_CE" - PICS: CADMIN.C.C0000 + PICS: CADMIN.C.C01.Tx verification: | On your DUT controller, open commissioning window using ECM - Below is the example is using chip tool as controller + Below is the example while using chip tool as controller ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established @@ -83,10 +83,7 @@ tests: [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] - - On 2nd controller using chip tool connect using manual code - ./chip-tool pairing code 1 35484132896 Verify you got below message @@ -95,36 +92,58 @@ tests: - label: "DUT_CR1 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.C.C0000 + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + PICS: CADMIN.C.C01.Tx verification: | - On your DUT controller, open commissioning window using ECM + On your DUT controller, open commissioning window using BCM - Below is the example is using chip tool as controller - ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + Below is the example while using chip tool as controller + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 - [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established - [1635874557.409553][4549:4554] CHIP:IN: New secure session created for device 0x0000000000000001, key 76!! - [1635874557.409649][4549:4554] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635874557.416929][4549:4554] CHIP:DMG: ICR moving to [AddingComm] - [1635874557.417092][4549:4554] CHIP:DMG: ICR moving to [AddedComma] - [1635874557.417215][4549:4554] CHIP:IN: Prepared encrypted message 0xaaaac5947d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 5541i with MessageCounter:0. - [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec - [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] - [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] - [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] + CHIP:DMG: InvokeResponseMessage = + [1650278416.248379][11064:11069] CHIP:DMG: { + [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, + [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = + [1650278416.248570][11064:11069] CHIP:DMG: [ + [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = + [1650278416.248718][11064:11069] CHIP:DMG: { + [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = + [1650278416.248860][11064:11069] CHIP:DMG: { + [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = + [1650278416.249011][11064:11069] CHIP:DMG: { + [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, + [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, + [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, + [1650278416.249347][11064:11069] CHIP:DMG: }, + [1650278416.249430][11064:11069] CHIP:DMG: + [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = + [1650278416.249581][11064:11069] CHIP:DMG: { + [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), + [1650278416.249738][11064:11069] CHIP:DMG: }, + [1650278416.249823][11064:11069] CHIP:DMG: + [1650278416.249889][11064:11069] CHIP:DMG: }, + [1650278416.249969][11064:11069] CHIP:DMG: + [1650278416.250035][11064:11069] CHIP:DMG: }, + [1650278416.250113][11064:11069] CHIP:DMG: + [1650278416.250169][11064:11069] CHIP:DMG: ], + [1650278416.250241][11064:11069] CHIP:DMG: + [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 + [1650278416.250355][11064:11069] CHIP:DMG: }, + [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - label: - "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set - in step 4, DUT_CR1 sends command to TH_CE to open a 2nd commissioning - window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds - using ECM" - PICS: CADMIN.C.C0000 + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that is set + in step 4, DUT_CR1 sends command to TH_CE to TH_CE to open a 2nd + commissioning window with a commissioning timeout of + PIXIT.CADMIN.CwDuration seconds using ECM" + PICS: CADMIN.C.C00.Tx verification: | - On your DUT controller, open commissioning window using ECM before the timer expiry from the above step + On your DUT controller, open commissioning window using ECM before the timer expiry of the above step + + Below is the example while using chip tool as controller - Below is the example is using chip tool as controller ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 CHIP:DMG: InvokeResponseMessage = @@ -197,7 +216,7 @@ tests: disabled: true - label: - "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was + "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 5" verification: | Wait for the expiration of PIXIT_COMM_WIN seconds @@ -206,104 +225,73 @@ tests: - label: "DUT_CR1 sends command to TH_CE to re-opens a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using - BCM" - PICS: CADMIN.C.C0001 + ECM" + PICS: CADMIN.C.C00.Tx verification: | - On your DUT controller, open commissioning window using BCM - - Below is the example when using chip tool as controller - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + On your DUT controller, open commissioning window using ECM + Below is the example while using chip tool as controller + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] + [1635926152.609542][10140:10145] CHIP:SC: Success status report received. Session was established + [1635926152.609582][10140:10145] CHIP:IN: New secure session created for device 0x0000000000000001, key 42!! + [1635926152.609695][10140:10145] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635926152.617050][10140:10145] CHIP:DMG: ICR moving to [AddingComm] + [1635926152.617103][10140:10145] CHIP:DMG: ICR moving to [AddedComma] + [1635926152.617228][10140:10145] CHIP:IN: Prepared encrypted message 0xaaab02ca7d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 6544i with MessageCounter:0. + [1635926152.617286][10140:10145] CHIP:IN: Sending encrypted msg 0xaaab02ca7d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13888103 msec + [1635926152.617454][10140:10145] CHIP:DMG: ICR moving to [CommandSen] + [1635926152.617523][10140:10145] CHIP:CTL: Manual pairing code: [35484132896] + [1635926152.617611][10140:10145] CHIP:CTL: SetupQRCode: [MT:00000CQM00QHQP0JG00] disabled: true - label: - "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 8, TH_CR3 sends command to TH_CE to open a 2nd commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds - using BCM" - PICS: CADMIN.C.C0001 + using ECM" + PICS: CADMIN.C.C00.Tx verification: | - On the 3rd controller using chip tool, open commissioning window using BCM before the timer expiry from above step - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 - + On the 3rd controller using chip tool, open commissioning window using ECM + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 CHIP:DMG: InvokeResponseMessage = [1650527622.373450][15824:15829] CHIP:DMG: { - [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, - [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = - [1650527622.373734][15824:15829] CHIP:DMG: [ - [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = - [1650527622.373913][15824:15829] CHIP:DMG: { - [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = - [1650527622.374087][15824:15829] CHIP:DMG: { - [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = - [1650527622.374296][15824:15829] CHIP:DMG: { - [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, - [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, - [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, - [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, + [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = + [1650527622.373734][15824:15829] CHIP:DMG: [ + [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = + [1650527622.373913][15824:15829] CHIP:DMG: { + [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = + [1650527622.374087][15824:15829] CHIP:DMG: { + [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = + [1650527622.374296][15824:15829] CHIP:DMG: { + [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, + [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, + [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, + [1650527622.374682][15824:15829] CHIP:DMG: }, [1650527622.374799][15824:15829] CHIP:DMG: - [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = - [1650527622.374979][15824:15829] CHIP:DMG: { - [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), - [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, - [1650527622.375320][15824:15829] CHIP:DMG: }, + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, + [1650527622.375320][15824:15829] CHIP:DMG: }, [1650527622.375426][15824:15829] CHIP:DMG: - [1650527622.375527][15824:15829] CHIP:DMG: }, + [1650527622.375527][15824:15829] CHIP:DMG: }, [1650527622.375616][15824:15829] CHIP:DMG: - [1650527622.375704][15824:15829] CHIP:DMG: }, + [1650527622.375704][15824:15829] CHIP:DMG: }, [1650527622.375786][15824:15829] CHIP:DMG: - [1650527622.375864][15824:15829] CHIP:DMG: ], + [1650527622.375864][15824:15829] CHIP:DMG: ], [1650527622.375940][15824:15829] CHIP:DMG: - [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 + [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 [1650527622.376058][15824:15829] CHIP:DMG: }, [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 disabled: true - - label: - "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was - set in step 9" - verification: | - Wait for the expiration of PIXIT_COMM_WIN seconds - disabled: true - - label: "DUT_CR1 sends command to TH_CE to read the list of Fabrics" PICS: OPCREDS.C.A0001 verification: | @@ -340,91 +328,75 @@ tests: disabled: true - label: - "DUT_CR1 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.C.C0001 + "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is + set in step 9" verification: | - On your DUT controller, open commissioning window using BCM - - Below is the example when using chip tool as controller - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 - - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] + Wait for the expiration of PIXIT_COMM_WIN seconds disabled: true - label: - "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set - in step 12, TH_CR2 sends command to open a second commissioning - window on TH_CE using a commissioning timeout of - PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.C.C0001 + "DUT_CR1 sends command to TH_CE to open a commissioning window with a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + PICS: CADMIN.C.C00.Tx verification: | - On the 2nd controller using chip tool, open commissioning window using BCM before the timer expiry from above step + On your DUT controller, open commissioning window using ECM - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + Below is the example while using chip tool as controller + + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + [1635926434.941379][10165:10170] CHIP:SC: Success status report received. Session was established + [1635926434.941428][10165:10170] CHIP:IN: New secure session created for device 0x0000000000000001, key 44!! + [1635926434.941515][10165:10170] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635926434.949324][10165:10170] CHIP:DMG: ICR moving to [AddingComm] + [1635926434.949381][10165:10170] CHIP:DMG: ICR moving to [AddedComma] + [1635926434.949532][10165:10170] CHIP:IN: Prepared encrypted message 0xaaaad95dbd10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 19421i with MessageCounter:0. + [1635926434.949592][10165:10170] CHIP:IN: Sending encrypted msg 0xaaaad95dbd10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 14170436 msec + [1635926434.949727][10165:10170] CHIP:DMG: ICR moving to [CommandSen] + [1635926434.949788][10165:10170] CHIP:CTL: Manual pairing code: [35484132896] + [1635926434.949865][10165:10170] CHIP:CTL: SetupQRCode: [MT:00000CQM00OAX.7RA00] + disabled: true + - label: + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that is set + in step 12, TH_CR2 sends command to TH_CE to open a second + commissioning window with a commissioning timeout of + PIXIT.CADMIN.CwDuration seconds using ECM" + PICS: CADMIN.C.C00.Tx + verification: | + On the 2nd controller using chip tool, open commissioning window using ECM + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 CHIP:DMG: InvokeResponseMessage = [1650527622.373450][15824:15829] CHIP:DMG: { - [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, - [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = - [1650527622.373734][15824:15829] CHIP:DMG: [ - [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = - [1650527622.373913][15824:15829] CHIP:DMG: { - [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = - [1650527622.374087][15824:15829] CHIP:DMG: { - [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = - [1650527622.374296][15824:15829] CHIP:DMG: { - [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, - [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, - [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, - [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, + [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = + [1650527622.373734][15824:15829] CHIP:DMG: [ + [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = + [1650527622.373913][15824:15829] CHIP:DMG: { + [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = + [1650527622.374087][15824:15829] CHIP:DMG: { + [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = + [1650527622.374296][15824:15829] CHIP:DMG: { + [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, + [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, + [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, + [1650527622.374682][15824:15829] CHIP:DMG: }, [1650527622.374799][15824:15829] CHIP:DMG: - [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = - [1650527622.374979][15824:15829] CHIP:DMG: { - [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), - [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, - [1650527622.375320][15824:15829] CHIP:DMG: }, + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, + [1650527622.375320][15824:15829] CHIP:DMG: }, [1650527622.375426][15824:15829] CHIP:DMG: - [1650527622.375527][15824:15829] CHIP:DMG: }, + [1650527622.375527][15824:15829] CHIP:DMG: }, [1650527622.375616][15824:15829] CHIP:DMG: - [1650527622.375704][15824:15829] CHIP:DMG: }, + [1650527622.375704][15824:15829] CHIP:DMG: }, [1650527622.375786][15824:15829] CHIP:DMG: - [1650527622.375864][15824:15829] CHIP:DMG: ], + [1650527622.375864][15824:15829] CHIP:DMG: ], [1650527622.375940][15824:15829] CHIP:DMG: - [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 + [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 [1650527622.376058][15824:15829] CHIP:DMG: }, [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml index 147d66f69a0535..d7e9d9370426fb 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml @@ -29,6 +29,7 @@ tests: disabled: true - label: "TH_CR1 starts a commissioning process with DUT_CE" + PICS: CADMIN.C verification: | "1. Provision the device using 1st controller chip tool(use above instructions) , " @@ -37,7 +38,7 @@ tests: - label: "TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp verification: | On 1st controller chip tool, open commissioning window @@ -57,6 +58,7 @@ tests: disabled: true - label: "TH_CR2 starts a commissioning process with DUT_CE" + PICS: CADMIN.S verification: | On 2nd controller using chip tool connect to the accessory @@ -70,7 +72,7 @@ tests: - label: "TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp verification: | On 1st controller chip tool, open commissioning window @@ -90,6 +92,7 @@ tests: disabled: true - label: "TH_CR3 starts a commissioning process with DUT_CE" + PICS: CADMIN.S verification: | On 3rd controller using chip tool connect to the accessory @@ -204,10 +207,29 @@ tests: [1647863260.287515][9294:9299] CHIP:EM: Sending Standalone Ack for MessageCounter:11301761 on exchange 13180i" disabled: true + - label: "TH_CR1 reads the list of Fabrics on DUT_CE" + verification: | + On 1st controller using chip tool, read fabrics list + grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + + wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local + + wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local + = wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = ["T=1" "SAI=300" "SII=5000"] + = wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = ["T=1" "SAI=300" "SII=5000"] + grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ + disabled: true + - label: "TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp verification: | On 1st controller chip tool, open commissioning window @@ -227,6 +249,7 @@ tests: disabled: true - label: "TH_CR2 starts a commissioning process with DUT_CE" + PICS: CADMIN.S verification: | On 2nd controller using chip tool connect to the accessory diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml index db6d5624d975b6..26d00ca40c8e07 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 24.1.16. [TC-CADMIN-1.16] Removing Fabrics from DUT and Fabric index + 3.1.16. [TC-CADMIN-1.16] Removing Fabrics from DUT and Fabric index enumeration using BCM [DUT - Commissionee] config: @@ -23,80 +23,77 @@ config: endpoint: 0 tests: - - label: "DUT_CR1 starts a commissioning process with TH_CE" + - label: "Reset DUT_CE to factory defaults" verification: | - "1. Provision the device using your DUT controller (use above instructions) , + + disabled: true + + - label: "TH_CR1 starts a commissioning process with DUT_CE" + PICS: CADMIN.S + verification: | + "1. Provision the device using 1st controller chip tool(use above instructions) , " disabled: true - label: - "DUT_CR1 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM and - TH_CR3 Commissions with TH_CE" - PICS: CADMIN.C.C0001 + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + PICS: CADMIN.S.C01.Rsp verification: | - On your DUT controller, open commissioning window using ECM - - Below is the example while using chip tool as controller - ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 - - [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established - [1635874557.409553][4549:4554] CHIP:IN: New secure session created for device 0x0000000000000001, key 76!! - [1635874557.409649][4549:4554] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635874557.416929][4549:4554] CHIP:DMG: ICR moving to [AddingComm] - [1635874557.417092][4549:4554] CHIP:DMG: ICR moving to [AddedComma] - [1635874557.417215][4549:4554] CHIP:IN: Prepared encrypted message 0xaaaac5947d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 5541i with MessageCounter:0. - [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec - [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] - [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] - [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] - + On 1st controller chip tool, open commissioning window + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 - On 3rd controller using chip tool connect using manual code - - ./chip-tool pairing code 1 35484132896 - - Verify you got below message - Device commissioning completed with success + CHIP:DMG: InvokeResponseMessage = + [1650278416.248379][11064:11069] CHIP:DMG: { + [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, + [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = + [1650278416.248570][11064:11069] CHIP:DMG: [ + [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = + [1650278416.248718][11064:11069] CHIP:DMG: { + [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = + [1650278416.248860][11064:11069] CHIP:DMG: { + [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = + [1650278416.249011][11064:11069] CHIP:DMG: { + [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, + [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, + [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, + [1650278416.249347][11064:11069] CHIP:DMG: }, + [1650278416.249430][11064:11069] CHIP:DMG: + [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = + [1650278416.249581][11064:11069] CHIP:DMG: { + [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), + [1650278416.249738][11064:11069] CHIP:DMG: }, + [1650278416.249823][11064:11069] CHIP:DMG: + [1650278416.249889][11064:11069] CHIP:DMG: }, + [1650278416.249969][11064:11069] CHIP:DMG: + [1650278416.250035][11064:11069] CHIP:DMG: }, + [1650278416.250113][11064:11069] CHIP:DMG: + [1650278416.250169][11064:11069] CHIP:DMG: ], + [1650278416.250241][11064:11069] CHIP:DMG: + [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 + [1650278416.250355][11064:11069] CHIP:DMG: }, + [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - - label: - "DUT_CR1 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM and - TH_CR2 Commissions with TH_CE" - PICS: CADMIN.C.C0001 + - label: "TH_CR2 starts a commissioning process with DUT_CE" + PICS: CADMIN.S verification: | - On your DUT controller, open commissioning window using ECM + On 2nd controller using chip tool connect to the accessory - Below is the example while using chip tool as controller - ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 - [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established - [1635874557.409553][4549:4554] CHIP:IN: New secure session created for device 0x0000000000000001, key 76!! - [1635874557.409649][4549:4554] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635874557.416929][4549:4554] CHIP:DMG: ICR moving to [AddingComm] - [1635874557.417092][4549:4554] CHIP:DMG: ICR moving to [AddedComma] - [1635874557.417215][4549:4554] CHIP:IN: Prepared encrypted message 0xaaaac5947d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 5541i with MessageCounter:0. - [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec - [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] - [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] - [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] - - On 2nd controller using chip tool connect using manual code - ./chip-tool pairing code 1 35484132896 + ./chip-tool pairing onnetwork 2 20202021 Verify you got below message Device commissioning completed with success disabled: true - label: - "DUT_CR1 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.C.C0001 + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + PICS: CADMIN.S.C01.Rsp verification: | - On your DUT controller, open commissioning window using BCM - - Below is the example while using chip tool as controller + On 1st controller chip tool, open commissioning window ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 CHIP:DMG: InvokeResponseMessage = @@ -132,270 +129,212 @@ tests: [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - - label: - "Before the expiration of PIXIT.CADMIN.CwDuration seconds that is set - in step 4, DUT_CR1 sends command to TH_CE to TH_CE to open a 2nd - commissioning window with a commissioning timeout of - PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.C.C0000 + - label: "TH_CR3 starts a commissioning process with DUT_CE" + PICS: CADMIN.S verification: | - On your DUT controller, open commissioning window using ECM before the timer expiry of the above step + On 3rd controller using chip tool connect to the accessory - Below is the example while using chip tool as controller - ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 - CHIP:DMG: InvokeResponseMessage = - [1650527622.373450][15824:15829] CHIP:DMG: { - [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, - [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = - [1650527622.373734][15824:15829] CHIP:DMG: [ - [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = - [1650527622.373913][15824:15829] CHIP:DMG: { - [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = - [1650527622.374087][15824:15829] CHIP:DMG: { - [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = - [1650527622.374296][15824:15829] CHIP:DMG: { - [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, - [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, - [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, - [1650527622.374682][15824:15829] CHIP:DMG: }, - [1650527622.374799][15824:15829] CHIP:DMG: - [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = - [1650527622.374979][15824:15829] CHIP:DMG: { - [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), - [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, - [1650527622.375320][15824:15829] CHIP:DMG: }, - [1650527622.375426][15824:15829] CHIP:DMG: - [1650527622.375527][15824:15829] CHIP:DMG: }, - [1650527622.375616][15824:15829] CHIP:DMG: - [1650527622.375704][15824:15829] CHIP:DMG: }, - [1650527622.375786][15824:15829] CHIP:DMG: - [1650527622.375864][15824:15829] CHIP:DMG: ], - [1650527622.375940][15824:15829] CHIP:DMG: - [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 - [1650527622.376058][15824:15829] CHIP:DMG: }, - [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 - [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 - disabled: true + ./chip-tool pairing onnetwork 1 20202021 - - label: "DUT_CR1 sends command to TH_CE to read the list of Fabrics" - PICS: OPCREDS.C.A0001 - verification: | - On 1st controller using chip tool, read fabrics list - - ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 - [1650527361.425870][15792:15797] CHIP:TOO: Fabrics: 3 entries - [1650527361.426777][15792:15797] CHIP:TOO: [1]: { - [1650527361.426859][15792:15797] CHIP:TOO: RootPublicKey: 0429A71383F336D80918C9EC655112513E428C073AF7FB44820EC793535302C6E3825C56EE6DD1A683EAA7B59E3F261B46FFA24A6D911E8D88839F4C1B3C84BA01 - [1650527361.426923][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.426979][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.427033][15792:15797] CHIP:TOO: NodeId: 1 - [1650527361.427088][15792:15797] CHIP:TOO: Label: - [1650527361.427166][15792:15797] CHIP:TOO: FabricIndex: 1 - [1650527361.427376][15792:15797] CHIP:TOO: } - [1650527361.427464][15792:15797] CHIP:TOO: [2]: { - [1650527361.427532][15792:15797] CHIP:TOO: RootPublicKey: 04781BCEE70118049ED61DD5B4E401CF1A09D2F78AE7F5770BE5506AD24238E5E0777277DABAFD062659651C95CC2CA7DEAACE40DB579A946CC07CADB141BE05D7 - [1650527361.427595][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.427649][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.427703][15792:15797] CHIP:TOO: NodeId: 3 - [1650527361.427756][15792:15797] CHIP:TOO: Label: - [1650527361.427811][15792:15797] CHIP:TOO: FabricIndex: 2 - [1650527361.427868][15792:15797] CHIP:TOO: } - [1650527361.427943][15792:15797] CHIP:TOO: [3]: { - [1650527361.428008][15792:15797] CHIP:TOO: RootPublicKey: 0403EDB5B461030A34EF7EA2F9DB0D46A36185E4755C365AF9344C4959F049EF21D55EAB903A2C7FBFC305EEFA42989250D7517A73E6156062390A60C0D4C41EBD - [1650527361.428067][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.428122][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.428176][15792:15797] CHIP:TOO: NodeId: 2 - [1650527361.428229][15792:15797] CHIP:TOO: Label: - [1650527361.428282][15792:15797] CHIP:TOO: FabricIndex: 3 - [1650527361.428335][15792:15797] CHIP:TOO: } + Verify you got below message + Device commissioning completed with success disabled: true - - label: - "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is - set in step 5" + - label: "TH_CR2 reads the list of Fabrics on DUT_CE" + PICS: OPCREDS.S.A0001 verification: | - Wait for the expiration of PIXIT_COMM_WIN seconds + On 2nd controller using chip tool, read fabrics list + + ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995193 + CHIP:TOO: Fabrics: 3 entries + CHIP:TOO: [1]: { + CHIP:TOO: RootPublicKey: 04656F56DBDB677DC957028DFC0ED76709C72753C9194B117A483BDC07386BFD9529B68EB4448FBBA3964EFF37A56A8F461D348B0DAF3B56A75F3B94BF8209D36F + CHIP:TOO: VendorId: 65521 + CHIP:TOO: FabricId: 1 + CHIP:TOO: NodeId: 1 + CHIP:TOO: Label: + CHIP:TOO: FabricIndex: 1 + CHIP:TOO: } + CHIP:TOO: [2]: { + CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 + CHIP:TOO: VendorId: 65521 + CHIP:TOO: FabricId: 1 + CHIP:TOO: NodeId: 2 + CHIP:TOO: Label: + CHIP:TOO: FabricIndex: 2 + CHIP:TOO: } + CHIP:TOO: [3]: { + CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 + CHIP:TOO: VendorId: 65521 + CHIP:TOO: FabricId: 1 + CHIP:TOO: NodeId: 3 + CHIP:TOO: Label: + CHIP:TOO: FabricIndex: 3 + CHIP:TOO: } + CHIP:EM: Sending Standalone Ack for MessageCounter:9143157 on exchange 1147i disabled: true - - label: - "DUT_CR1 sends command to TH_CE to re-opens a commissioning window - with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using - ECM" - PICS: CADMIN.C.C0000 + - label: "TH_CR2 sends RemoveFabric with FabricIndex = 2command to DUT_CE" + PICS: OPCREDS.S.C0a.Rsp verification: | - On your DUT controller, open commissioning window using ECM - - Below is the example while using chip tool as controller - - ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 - - [1635926152.609542][10140:10145] CHIP:SC: Success status report received. Session was established - [1635926152.609582][10140:10145] CHIP:IN: New secure session created for device 0x0000000000000001, key 42!! - [1635926152.609695][10140:10145] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635926152.617050][10140:10145] CHIP:DMG: ICR moving to [AddingComm] - [1635926152.617103][10140:10145] CHIP:DMG: ICR moving to [AddedComma] - [1635926152.617228][10140:10145] CHIP:IN: Prepared encrypted message 0xaaab02ca7d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 6544i with MessageCounter:0. - [1635926152.617286][10140:10145] CHIP:IN: Sending encrypted msg 0xaaab02ca7d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13888103 msec - [1635926152.617454][10140:10145] CHIP:DMG: ICR moving to [CommandSen] - [1635926152.617523][10140:10145] CHIP:CTL: Manual pairing code: [35484132896] - [1635926152.617611][10140:10145] CHIP:CTL: SetupQRCode: [MT:00000CQM00QHQP0JG00] + on 2nd controller using chip tool, remove fabric with FabricIndex=2 + + ./chip-tool operationalcredentials remove-fabric 2 2 0 + + CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 + CHIP:TOO: NOCResponse: { + CHIP:TOO: statusCode: 0 + CHIP:TOO: fabricIndex: 2 + CHIP:TOO: } + CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - label: - "Before the expiration of PIXIT.CADMIN.CwDuration seconds that is set - in step 8, TH_CR3 sends command to TH_CE to open a 2nd commissioning - window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds - using ECM" - PICS: CADMIN.C.C0000 + "TH_CR2 writes and reads the Basic Information Clusters NodeLabel + mandatory attribute of DUT_CE" + PICS: BINFO.S.A0005 verification: | - On the 3rd controller using chip tool, open commissioning window using ECM + Using your 2nd controller, write attribute and read attribute to and from TH_CE + Below is the example while using chip tool on second controller, + ./chip-tool basic write node-label te5new 2 0 - ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter + [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 + [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 - CHIP:DMG: InvokeResponseMessage = - [1650527622.373450][15824:15829] CHIP:DMG: { - [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, - [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = - [1650527622.373734][15824:15829] CHIP:DMG: [ - [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = - [1650527622.373913][15824:15829] CHIP:DMG: { - [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = - [1650527622.374087][15824:15829] CHIP:DMG: { - [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = - [1650527622.374296][15824:15829] CHIP:DMG: { - [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, - [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, - [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, - [1650527622.374682][15824:15829] CHIP:DMG: }, - [1650527622.374799][15824:15829] CHIP:DMG: - [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = - [1650527622.374979][15824:15829] CHIP:DMG: { - [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), - [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, - [1650527622.375320][15824:15829] CHIP:DMG: }, - [1650527622.375426][15824:15829] CHIP:DMG: - [1650527622.375527][15824:15829] CHIP:DMG: }, - [1650527622.375616][15824:15829] CHIP:DMG: - [1650527622.375704][15824:15829] CHIP:DMG: }, - [1650527622.375786][15824:15829] CHIP:DMG: - [1650527622.375864][15824:15829] CHIP:DMG: ], - [1650527622.375940][15824:15829] CHIP:DMG: - [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 - [1650527622.376058][15824:15829] CHIP:DMG: }, - [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 - [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 + ./chip-tool basic read node-label 2 0 + + Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter + [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 + [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 disabled: true - - label: "DUT_CR1 sends command to TH_CE to read the list of Fabrics" - PICS: OPCREDS.C.A0001 + - label: "TH_CR1 reads the list of Fabrics on DUT_CE" + PICS: OPCREDS.S.A0001 verification: | On 1st controller using chip tool, read fabrics list - ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 - [1650527361.425870][15792:15797] CHIP:TOO: Fabrics: 3 entries - [1650527361.426777][15792:15797] CHIP:TOO: [1]: { - [1650527361.426859][15792:15797] CHIP:TOO: RootPublicKey: 0429A71383F336D80918C9EC655112513E428C073AF7FB44820EC793535302C6E3825C56EE6DD1A683EAA7B59E3F261B46FFA24A6D911E8D88839F4C1B3C84BA01 - [1650527361.426923][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.426979][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.427033][15792:15797] CHIP:TOO: NodeId: 1 - [1650527361.427088][15792:15797] CHIP:TOO: Label: - [1650527361.427166][15792:15797] CHIP:TOO: FabricIndex: 1 - [1650527361.427376][15792:15797] CHIP:TOO: } - [1650527361.427464][15792:15797] CHIP:TOO: [2]: { - [1650527361.427532][15792:15797] CHIP:TOO: RootPublicKey: 04781BCEE70118049ED61DD5B4E401CF1A09D2F78AE7F5770BE5506AD24238E5E0777277DABAFD062659651C95CC2CA7DEAACE40DB579A946CC07CADB141BE05D7 - [1650527361.427595][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.427649][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.427703][15792:15797] CHIP:TOO: NodeId: 3 - [1650527361.427756][15792:15797] CHIP:TOO: Label: - [1650527361.427811][15792:15797] CHIP:TOO: FabricIndex: 2 - [1650527361.427868][15792:15797] CHIP:TOO: } - [1650527361.427943][15792:15797] CHIP:TOO: [3]: { - [1650527361.428008][15792:15797] CHIP:TOO: RootPublicKey: 0403EDB5B461030A34EF7EA2F9DB0D46A36185E4755C365AF9344C4959F049EF21D55EAB903A2C7FBFC305EEFA42989250D7517A73E6156062390A60C0D4C41EBD - [1650527361.428067][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.428122][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.428176][15792:15797] CHIP:TOO: NodeId: 2 - [1650527361.428229][15792:15797] CHIP:TOO: Label: - [1650527361.428282][15792:15797] CHIP:TOO: FabricIndex: 3 - [1650527361.428335][15792:15797] CHIP:TOO: } + Below is the command using chip tool controller + + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995219 + [1647863260.286772][9294:9299] CHIP:TOO: Fabrics: 2 entries + [1647863260.286908][9294:9299] CHIP:TOO: [1]: { + [1647863260.286947][9294:9299] CHIP:TOO: RootPublicKey: 04656F56DBDB677DC957028DFC0ED76709C72753C9194B117A483BDC07386BFD9529B68EB4448FBBA3964EFF37A56A8F461D348B0DAF3B56A75F3B94BF8209D36F + [1647863260.286995][9294:9299] CHIP:TOO: VendorId: 65521 + [1647863260.287026][9294:9299] CHIP:TOO: FabricId: 1 + [1647863260.287055][9294:9299] CHIP:TOO: NodeId: 1 + [1647863260.287084][9294:9299] CHIP:TOO: Label: + [1647863260.287113][9294:9299] CHIP:TOO: FabricIndex: 1 + [1647863260.287144][9294:9299] CHIP:TOO: } + [1647863260.287185][9294:9299] CHIP:TOO: [2]: { + [1647863260.287221][9294:9299] CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 + [1647863260.287253][9294:9299] CHIP:TOO: VendorId: 65521 + [1647863260.287282][9294:9299] CHIP:TOO: FabricId: 1 + [1647863260.287310][9294:9299] CHIP:TOO: NodeId: 3 + [1647863260.287339][9294:9299] CHIP:TOO: Label: + [1647863260.287368][9294:9299] CHIP:TOO: FabricIndex: 3 + [1647863260.287396][9294:9299] CHIP:TOO: } + [1647863260.287515][9294:9299] CHIP:EM: Sending Standalone Ack for MessageCounter:11301761 on exchange 13180i" disabled: true - label: - "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is - set in step 9" + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + PICS: CADMIN.S.C01.Rsp verification: | - Wait for the expiration of PIXIT_COMM_WIN seconds + On 1st controller chip tool, open commissioning window + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + + + CHIP:DMG: InvokeResponseMessage = + [1650278416.248379][11064:11069] CHIP:DMG: { + [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, + [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = + [1650278416.248570][11064:11069] CHIP:DMG: [ + [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = + [1650278416.248718][11064:11069] CHIP:DMG: { + [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = + [1650278416.248860][11064:11069] CHIP:DMG: { + [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = + [1650278416.249011][11064:11069] CHIP:DMG: { + [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, + [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, + [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, + [1650278416.249347][11064:11069] CHIP:DMG: }, + [1650278416.249430][11064:11069] CHIP:DMG: + [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = + [1650278416.249581][11064:11069] CHIP:DMG: { + [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), + [1650278416.249738][11064:11069] CHIP:DMG: }, + [1650278416.249823][11064:11069] CHIP:DMG: + [1650278416.249889][11064:11069] CHIP:DMG: }, + [1650278416.249969][11064:11069] CHIP:DMG: + [1650278416.250035][11064:11069] CHIP:DMG: }, + [1650278416.250113][11064:11069] CHIP:DMG: + [1650278416.250169][11064:11069] CHIP:DMG: ], + [1650278416.250241][11064:11069] CHIP:DMG: + [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 + [1650278416.250355][11064:11069] CHIP:DMG: }, + [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - - label: - "DUT_CR1 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + - label: "TH_CR2 starts a commissioning process with DUT_CE" + PICS: CADMIN.S verification: | - On your DUT controller, open commissioning window using ECM - - Below is the example while using chip tool as controller - - ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 - - [1635926434.941379][10165:10170] CHIP:SC: Success status report received. Session was established - [1635926434.941428][10165:10170] CHIP:IN: New secure session created for device 0x0000000000000001, key 44!! - [1635926434.941515][10165:10170] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635926434.949324][10165:10170] CHIP:DMG: ICR moving to [AddingComm] - [1635926434.949381][10165:10170] CHIP:DMG: ICR moving to [AddedComma] - [1635926434.949532][10165:10170] CHIP:IN: Prepared encrypted message 0xaaaad95dbd10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 19421i with MessageCounter:0. - [1635926434.949592][10165:10170] CHIP:IN: Sending encrypted msg 0xaaaad95dbd10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 14170436 msec - [1635926434.949727][10165:10170] CHIP:DMG: ICR moving to [CommandSen] - [1635926434.949788][10165:10170] CHIP:CTL: Manual pairing code: [35484132896] - [1635926434.949865][10165:10170] CHIP:CTL: SetupQRCode: [MT:00000CQM00OAX.7RA00] + On 2nd controller using chip tool connect to the accessory + + + ./chip-tool pairing onnetwork 1 20202021 + + Verify you got below message + Device commissioning completed with success disabled: true - - label: - "Before the expiration of PIXIT.CADMIN.CwDuration seconds that is set - in step 12, TH_CR2 sends command to TH_CE to open a second - commissioning window with a commissioning timeout of - PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.C.C0000 + - label: "TH_CR1 reads the list of Fabrics on DUT_CE" + PICS: OPCREDS.S.A0001 verification: | - On the 2nd controller using chip tool, open commissioning window using ECM + On 1st controller, read fabrics list - ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + Below is the command using chip tool controller - CHIP:DMG: InvokeResponseMessage = - [1650527622.373450][15824:15829] CHIP:DMG: { - [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, - [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = - [1650527622.373734][15824:15829] CHIP:DMG: [ - [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = - [1650527622.373913][15824:15829] CHIP:DMG: { - [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = - [1650527622.374087][15824:15829] CHIP:DMG: { - [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = - [1650527622.374296][15824:15829] CHIP:DMG: { - [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, - [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, - [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, - [1650527622.374682][15824:15829] CHIP:DMG: }, - [1650527622.374799][15824:15829] CHIP:DMG: - [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = - [1650527622.374979][15824:15829] CHIP:DMG: { - [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), - [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, - [1650527622.375320][15824:15829] CHIP:DMG: }, - [1650527622.375426][15824:15829] CHIP:DMG: - [1650527622.375527][15824:15829] CHIP:DMG: }, - [1650527622.375616][15824:15829] CHIP:DMG: - [1650527622.375704][15824:15829] CHIP:DMG: }, - [1650527622.375786][15824:15829] CHIP:DMG: - [1650527622.375864][15824:15829] CHIP:DMG: ], - [1650527622.375940][15824:15829] CHIP:DMG: - [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 - [1650527622.376058][15824:15829] CHIP:DMG: }, - [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 - [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 + ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995246 + [1647863342.980899][9309:9314] CHIP:TOO: Fabrics: 3 entries + [1647863342.981158][9309:9314] CHIP:TOO: [1]: { + [1647863342.981231][9309:9314] CHIP:TOO: RootPublicKey: 04656F56DBDB677DC957028DFC0ED76709C72753C9194B117A483BDC07386BFD9529B68EB4448FBBA3964EFF37A56A8F461D348B0DAF3B56A75F3B94BF8209D36F + [1647863342.981322][9309:9314] CHIP:TOO: VendorId: 65521 + [1647863342.981380][9309:9314] CHIP:TOO: FabricId: 1 + [1647863342.981434][9309:9314] CHIP:TOO: NodeId: 1 + [1647863342.981486][9309:9314] CHIP:TOO: Label: + [1647863342.981539][9309:9314] CHIP:TOO: FabricIndex: 1 + [1647863342.981594][9309:9314] CHIP:TOO: } + [1647863342.981671][9309:9314] CHIP:TOO: [2]: { + [1647863342.981737][9309:9314] CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 + [1647863342.981796][9309:9314] CHIP:TOO: VendorId: 65521 + [1647863342.981849][9309:9314] CHIP:TOO: FabricId: 1 + [1647863342.981901][9309:9314] CHIP:TOO: NodeId: 3 + [1647863342.981952][9309:9314] CHIP:TOO: Label: + [1647863342.982005][9309:9314] CHIP:TOO: FabricIndex: 3 + [1647863342.982057][9309:9314] CHIP:TOO: } + [1647863342.982131][9309:9314] CHIP:TOO: [3]: { + [1647863342.982195][9309:9314] CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 + [1647863342.982252][9309:9314] CHIP:TOO: VendorId: 65521 + [1647863342.982305][9309:9314] CHIP:TOO: FabricId: 1 + [1647863342.982357][9309:9314] CHIP:TOO: NodeId: 2 + [1647863342.982409][9309:9314] CHIP:TOO: Label: + [1647863342.982460][9309:9314] CHIP:TOO: FabricIndex: 4 + [1647863342.982512][9309:9314] CHIP:TOO: } + [1647863342.982738][9309:9314] CHIP:EM: Sending Standalone Ack for MessageCounter:5772016 on exchange 3310i disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml index 7066f59e26d452..c7cb40b8009db0 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 24.1.17. [TC-CADMIN-1.17] Removing Fabrics from DUT and Fabric index + 3.1.17. [TC-CADMIN-1.17] Removing Fabrics from DUT and Fabric index enumeration using ECM [DUT - Commissioner] config: @@ -23,25 +23,29 @@ config: endpoint: 0 tests: - - label: "Reset DUT_CE to factory defaults" + - label: "Reset DUT_CR1 to factory defaults" verification: | disabled: true - - label: "TH_CR1 starts a commissioning process with DUT_CE" + - label: "DUT_CR1 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | - "1. Provision the device using 1st controller chip tool(use above instructions) , + "1. Provision the device using DUT controller chip tool(use above instructions) , " disabled: true - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C0000 + "DUT_CR1 sends command to TH_CE to open a commissioning window with a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + PICS: CADMIN.C.C00.Tx verification: | - On 1st controller chip tool, open commissioning window + On your DUT controller chip tool, open commissioning window - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + Below is the example when using chip tool as controller + + + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! @@ -51,28 +55,46 @@ tests: [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] - [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [36217551633] + [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [35484132896] [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i + + + + + ./chip-tool payload parse-setup-payload 35484132896 + + CHIP:SPL: Parsing decimalRepresentation: 35484132896 + [1635692029.655951][3830:3830] CHIP:SPL: CommissioningFlow: 0 + [1635692029.655974][3830:3830] CHIP:SPL: VendorID: 0 + [1635692029.655994][3830:3830] CHIP:SPL: Version: 0 + [1635692029.656013][3830:3830] CHIP:SPL: ProductID: 0 + [1635692029.656032][3830:3830] CHIP:SPL: Discriminator: 3840 + [1635692029.656051][3830:3830] CHIP:SPL: SetUpPINCode: 68539195 + [1635692029.656070][3830:3830] CHIP:SPL: RendezvousInformation: 0 disabled: true - - label: "TH_CR2 starts a commissioning process with DUT_CE" + - label: "TH_CR2 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | On 2nd controller using chip tool connect to the accessory - ./chip-tool pairing code 1 36217551633 + ./chip-tool pairing code 1 35484132896 Verify you got below message Device commissioning completed with success disabled: true - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C0000 + "DUT_CR1 sends command to TH_CE to open a commissioning window with a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + PICS: CADMIN.C.C00.Tx verification: | - On 1st controller chip tool, open commissioning window + On your DUT controller chip tool, open commissioning window + + Below is the example when using chip tool as controller + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 @@ -84,29 +106,43 @@ tests: [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] - [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [36217551633] + [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [35484132896] [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i + + + + + ./chip-tool payload parse-setup-payload 35484132896 + + CHIP:SPL: Parsing decimalRepresentation: 35484132896 + [1635692029.655951][3830:3830] CHIP:SPL: CommissioningFlow: 0 + [1635692029.655974][3830:3830] CHIP:SPL: VendorID: 0 + [1635692029.655994][3830:3830] CHIP:SPL: Version: 0 + [1635692029.656013][3830:3830] CHIP:SPL: ProductID: 0 + [1635692029.656032][3830:3830] CHIP:SPL: Discriminator: 3840 + [1635692029.656051][3830:3830] CHIP:SPL: SetUpPINCode: 68539195 + [1635692029.656070][3830:3830] CHIP:SPL: RendezvousInformation: 0 disabled: true - - label: "TH_CR3 starts a commissioning process with DUT_CE" + - label: "TH_CR3 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | On 3rd controller using chip tool connect to the accessory - - ./chip-tool pairing code 1 36217551633 + ./chip-tool pairing code 1 35484132896 Verify you got below message Device commissioning completed with success disabled: true - - label: "TH_CR2 reads the list of Fabrics on DUT_CE" - PICS: OPCREDS.S.A0001 + - label: "TH_CR2 sends command to TH_CE to read the list of Fabrics" + PICS: OPCREDS.C.A0001 verification: | On 2nd controller using chip tool, read fabrics list - ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 + ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995193 CHIP:TOO: Fabrics: 3 entries @@ -137,12 +173,12 @@ tests: CHIP:EM: Sending Standalone Ack for MessageCounter:9143157 on exchange 1147i disabled: true - - label: "TH_CR2 sends RemoveFabric with FabricIndex = 2command to DUT_CE" - PICS: OPCREDS.S.C0a.Rsp + - label: "TH_CR2 sends RemoveFabric with FabricIndex = 2command to TH_CE" + PICS: OPCREDS.C.C0a.Tx verification: | on 2nd controller using chip tool, remove fabric with FabricIndex=2 - ./chip-tool operationalcredentials remove-fabric 2 2 0 + ./chip-tool operationalcredentials remove-fabric 2 1 0 CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 @@ -154,9 +190,9 @@ tests: disabled: true - label: - "TH_CR2 writes and reads the Basic Information Clusters NodeLabel - mandatory attribute of DUT_CE" - PICS: BINFO.S.A0005 + "TH_CR2 sends command to TH_CE to write and read the Basic Information + Clusters NodeLabel mandatory attribute" + PICS: BINFO.C.A0005 verification: | Using your 2nd controller, write attribute and read attribute to and from TH_CE @@ -174,14 +210,15 @@ tests: [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 disabled: true - - label: "TH_CR1 reads the list of Fabrics on DUT_CE" - PICS: OPCREDS.S.A0001 + - label: + "DUT_CR1 sends command to TH_CE to read the list of Fabrics on TH_CE" + PICS: OPCREDS.C.A0001 verification: | - On 1st controller using chip tool, read fabrics list + On DUT controller, read fabrics list Below is the command using chip tool controller - ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995219 [1647863260.286772][9294:9299] CHIP:TOO: Fabrics: 2 entries @@ -201,17 +238,39 @@ tests: [1647863260.287339][9294:9299] CHIP:TOO: Label: [1647863260.287368][9294:9299] CHIP:TOO: FabricIndex: 3 [1647863260.287396][9294:9299] CHIP:TOO: } - [1647863260.287515][9294:9299] CHIP:EM: Sending Standalone Ack for MessageCounter:11301761 on exchange 13180i" + [1647863260.287515][9294:9299] CHIP:EM: Sending Standalone Ack for MessageCounter:11301761 on exchange 13180i disabled: true - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C0000 + "DUT_CR1 sends command to TH_CE to read the list of Fabrics on TH_CE" + PICS: OPCREDS.C.A0001 verification: | - On 1st controller chip tool, open commissioning window + grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + + wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local + + wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local + = wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = ["T=1" "SAI=300" "SII=5000"] + = wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = ["T=1" "SAI=300" "SII=5000"] + grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ + disabled: true + + - label: + "DUT_CR1 sends command to TH_CE to open a commissioning window with a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + PICS: CADMIN.C.C00.Tx + verification: | + On DUT controller chip tool, open commissioning window - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + Below is the example when using chip tool as controller + + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! @@ -226,7 +285,8 @@ tests: [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i disabled: true - - label: "TH_CR2 starts a commissioning process with DUT_CE" + - label: "TH_CR2 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | On 2nd controller using chip tool connect to the accessory @@ -237,14 +297,15 @@ tests: Device commissioning completed with success disabled: true - - label: "TH_CR1 reads the list of Fabrics on DUT_CE" - PICS: OPCREDS.S.A0001 + - label: + "DUT_CR1 sends command to TH_CE to read the list of Fabrics on TH_CE" + PICS: OPCREDS.C.A0001 verification: | - On 1st controller, read fabrics list + On DUT controller, read fabrics list Below is the command using chip tool controller - ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995246 [1647863342.980899][9309:9314] CHIP:TOO: Fabrics: 3 entries diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml index bcbff956bb6429..ede13bb1619e5b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml @@ -37,7 +37,7 @@ tests: - label: "TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.S.C0001 + PICS: CADMIN.C.C01.Tx verification: | On 1st controller chip tool, open commissioning window ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 @@ -89,7 +89,7 @@ tests: - label: "TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.S.C0001 + PICS: CADMIN.C.C01.Tx verification: | On 1st controller chip tool, open commissioning window ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 @@ -246,7 +246,7 @@ tests: - label: "TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.S.C0001 + PICS: CADMIN.C.C01.Tx verification: | On 1st controller chip tool, open commissioning window diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml index 3bc1ab0c05bc1c..14a76861d4c60e 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml @@ -37,7 +37,7 @@ tests: - label: "DUT_CR1 sends command to TH_CE to open a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.C.C0000 + PICS: CADMIN.S.C00.Rsp verification: | On your DUT controller chip tool, open commissioning window @@ -87,7 +87,7 @@ tests: - label: "DUT_CR1 sends command to TH_CE to open a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.C.C0000 + PICS: CADMIN.S.C00.Rsp verification: | On your DUT controller chip tool, open commissioning window @@ -241,7 +241,7 @@ tests: - label: "DUT_CR1 sends command to TH_CE to open a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.C.C0000 + PICS: CADMIN.S.C00.Rsp verification: | On DUT controller chip tool, open commissioning window diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml index c774dc887224b1..56731fc238451f 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 24.1.2. [TC-CADMIN-1.2] Administrator Behavior using BCM [DUT - + 25.1.2. [TC-CADMIN-1.2] Administrator Behavior using BCM [DUT - Commissioner] config: @@ -24,6 +24,7 @@ config: tests: - label: "TH_CR1 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | Provision the device using chip tool on first controller disabled: true @@ -32,12 +33,14 @@ tests: "TH_CR1 sends command to TH_CE to open a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM (Basic Commissioning Method)" - PICS: CADMIN.C.C0001 + PICS: CADMIN.C.C01.Tx verification: | On first controller, usinadministratorcommissioningg chip tool open commissioning window. ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + + CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, @@ -93,6 +96,7 @@ tests: disabled: true - label: "DUT_CR2 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | Using your DUT Controller connect to the accessory. @@ -290,7 +294,7 @@ tests: "DUT_CR2 sends command to TH_CE to open a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM (Basic Commissioning Method)" - PICS: CADMIN.C.C0001 + PICS: CADMIN.C.C01.Tx verification: | On your DUT controller using chip-tool open commissioning widow using BCM. @@ -334,7 +338,7 @@ tests: - label: "DUT_CR2 sends command to TH_CE to revoke the commissioning window using the Revoke Commissioning command" - PICS: CADMIN.C.C0002 + PICS: CADMIN.C.C02.Tx verification: | On your DUT controller using chip-tool run revoke command @@ -378,6 +382,7 @@ tests: - label: "TH_CR3 attempts to execute a PASE to starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | 1. On third controller, using chip-tool connect to the accessory. Connect attempt should fail, i.e ./chip-tool pairing onnetwork 3 20202021 @@ -433,7 +438,7 @@ tests: - label: "DUT_CR2 sends command to TH_CE to open a commissioning window using BCM" - PICS: CADMIN.C.C0001 + PICS: CADMIN.C.C01.Tx verification: | On your DUT controller using chip-tool open commissioning widow using BCM. @@ -483,7 +488,7 @@ tests: - label: "DUT_CR2 sends command to TH_CE to open a commissioning window using BCM" - PICS: CADMIN.C.C0001 + PICS: CADMIN.C.C01.Tx verification: | On your DUT controller using chip-tool open commissioning widow using BCM. @@ -527,6 +532,7 @@ tests: - label: "TH_CR1 starts a commissioning process with TH_CE before the timeout from step 15" + PICS: CADMIN.C verification: | Using your 1st Controller connect to the accessory. diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml index 282d17dc5e8989..2893f6230f0f8f 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml @@ -37,7 +37,7 @@ tests: - label: "DUT_CR1 sends command to TH_CE to open a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.C.C0001 + PICS: CADMIN.C.C01.Tx verification: | On your DUT controller chip tool, open commissioning window @@ -91,7 +91,7 @@ tests: - label: "DUT_CR1 sends command to TH_CE to open a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.C.C0001 + PICS: CADMIN.C.C01.Tx verification: | On your DUT controller chip tool, open commissioning window @@ -252,7 +252,7 @@ tests: - label: "DUT_CR1 sends command to TH_CE to open a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.C.C0001 + PICS: CADMIN.C.C01.Tx verification: | On DUT controller chip tool, open commissioning window diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml index c8a91d79722cd0..7d141f30b62397 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml @@ -37,7 +37,7 @@ tests: - label: "TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp verification: | On 1st controller chip tool, open commissioning window @@ -72,7 +72,7 @@ tests: - label: "Repeat Step 3 and Step 4 an additional (SupportedFabrics - 2) times to reach an index value of SupportedFabrics on DUT_CE" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp verification: | Repeat step 3 until CommissionedFabrics=SupportedFabrics disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml index eb66242c6c7aa6..de4341f4c19b2b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml @@ -37,7 +37,7 @@ tests: - label: "TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C00.Rsp verification: | On 1st controller chip tool, open commissioning window @@ -92,7 +92,7 @@ tests: - label: "Repeat Step 3 and Step 4 an additional (SupportedFabrics - 2) times to reach an index value of SupportedFabrics on DUT_CE" - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C00.Rsp verification: | Repeat step 3 until CommissionedFabrics=SupportedFabrics disabled: true @@ -100,7 +100,7 @@ tests: - label: "THn starts a commissioning process and opens a commissioning window with DUT_CE" - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C00.Rsp verification: | On nth controller using chip tool connect to the accessory diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml index 93f5589d992d66..c56a8510ab8337 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml @@ -19,83 +19,81 @@ name: config: nodeId: 0x12344321 - cluster: "Basic" + timeout: 330 endpoint: 0 tests: - - label: "Reset DUT_CR1 to factory defaults" - verification: | - - disabled: true + - label: "Factory Reset the DUT_CE" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" - - label: "DUT_CR1 starts a commissioning process with TH_CE" + - label: "Factory Reset the DUT_CE" verification: | - "1. Provision the device using your DUT controller(use above instructions) , - " - disabled: true + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Please reboot the DUT and enter 'y' after DUT starts" + - name: "expectedValue" + value: "y" + + - label: "TH_CR1 starts a commissioning process with DUT_CE" + cluster: "DelayCommands" + command: "WaitForCommissionee" + PICS: CADMIN.S.C01.Rsp + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH_CR1 opens a commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + PICS: CADMIN.S.C01.Rsp + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + + - label: "Wait for commissioning Window to 301 seconds" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 181000 - label: - "DUT_CR1 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.C.C0000 - verification: | - On your DUT controller chip tool, open commissioning window - - Below is the example when using chip tool as controller - - ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 - - [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established - [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! - [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] - [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] - [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. - [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec - [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] - [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [36217551633] - [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] - [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i - disabled: true - - - label: "THn starts a commissioning process with TH_CE" - verification: | - On nth controller using chip tool connect to the accessory - - - ./chip-tool pairing code 1 36217551633 - - Verify you got below message - Device commissioning completed with success - disabled: true + "TH_CR1 reads the window status to verify the DUT_CE window is closed" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" + PICS: CADMIN.S.A0000 + response: + value: 0 + + - label: "TH_CR1 opens a commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + PICS: CADMIN.S.C01.Rsp + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 179 + response: + error: INVALID_COMMAND - label: - "Repeat Step 3 an additional (SupportedFabrics - 2) times to reach an - index value of SupportedFabrics on TH_CE" - PICS: CADMIN.C.C0000 - verification: | - Repeat Step 3 an additional (SupportedFabrics - 2) times to reach an index value of SupportedFabrics on TH_CE - disabled: true - - - label: "THn starts a commissioning process with TH_CE" - verification: | - On nth controller using chip tool connect to the accessory - - - ./chip-tool pairing code 1 36217551633 - - CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - [1649756670.402192][10794:10799] CHIP:CTL: Device returned status 5 on receiving the NOC - [1649756670.402221][10794:10799] CHIP:CTL: Add NOC failed with error ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1110: CHIP Error 0x0000000B: No memory - [1649756670.402241][10794:10799] CHIP:CTL: Failed to perform commissioning step 12 - disabled: true - - - label: "DUT_CR1 sends command to TH_CE to remove FabricIndex1" - PICS: OPCREDS.C.C0a.Tx - verification: | - on your DUT controller, remove fabric with FabricIndex=1 - - Below is the example when using chip tool as controller - - ./chip-tool operationalcredentials remove-fabric 1 1 0 - disabled: true + "TH_CR1 reads the window status to verify the DUT_CE window is closed" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" + PICS: CADMIN.S.A0000 + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml index 1d2290ba31dd9c..a4ae822ab055b1 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml @@ -19,104 +19,97 @@ name: config: nodeId: 0x12344321 - cluster: "Basic" + timeout: 330 endpoint: 0 tests: - - label: "Reset DUT_CR1 to factory defaults" - verification: | - - disabled: true + - label: "Factory Reset the DUT_CE" + cluster: "SystemCommands" + PICS: PICS_SDK_CI_ONLY + command: "FactoryReset" - - label: "DUT_CR1 starts a commissioning process with TH_CE" + - label: "Factory Reset the DUT_CE" verification: | - "1. Provision the device using your DUT controller(use above instructions) , - " - disabled: true + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Please reboot the DUT and enter 'y' after DUT starts" + - name: "expectedValue" + value: "y" + + - label: "TH_CR1 starts a commissioning process with DUT_CE" + cluster: "DelayCommands" + command: "WaitForCommissionee" + PICS: CADMIN.S.C00.Rsp + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH_CR1 opens a commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" + PICS: CADMIN.S.C00.Rsp + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "PAKEVerifier" + value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + - name: "discriminator" + value: 3840 + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" + + - label: "Wait for commissioning Window to 301 seconds" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 181000 - label: - "DUT_CR1 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.C.C0001 - verification: | - On your DUT controller chip tool, open commissioning window - - Below is the example when using chip tool as controller - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 - - - [CHIP:DMG: InvokeResponseMessage = - [1649756654.928453][3385:3390] CHIP:DMG: { - [1649756654.928511][3385:3390] CHIP:DMG: suppressResponse = false, - [1649756654.928571][3385:3390] CHIP:DMG: InvokeResponseIBs = - [1649756654.928647][3385:3390] CHIP:DMG: [ - [1649756654.928708][3385:3390] CHIP:DMG: InvokeResponseIB = - [1649756654.928794][3385:3390] CHIP:DMG: { - [1649756654.928864][3385:3390] CHIP:DMG: CommandStatusIB = - [1649756654.928948][3385:3390] CHIP:DMG: { - [1649756654.929021][3385:3390] CHIP:DMG: CommandPathIB = - [1649756654.929109][3385:3390] CHIP:DMG: { - [1649756654.929191][3385:3390] CHIP:DMG: EndpointId = 0x0, - [1649756654.929284][3385:3390] CHIP:DMG: ClusterId = 0x3c, - [1649756654.929376][3385:3390] CHIP:DMG: CommandId = 0x1, - [1649756654.929459][3385:3390] CHIP:DMG: }, - [1649756654.929551][3385:3390] CHIP:DMG: - [1649756654.929632][3385:3390] CHIP:DMG: StatusIB = - [1649756654.929720][3385:3390] CHIP:DMG: { - [1649756654.929804][3385:3390] CHIP:DMG: status = 0x00 (SUCCESS), - [1649756654.929878][3385:3390] CHIP:DMG: }, - [1649756654.929946][3385:3390] CHIP:DMG: - [1649756654.930017][3385:3390] CHIP:DMG: }, - [1649756654.930109][3385:3390] CHIP:DMG: - [1649756654.930176][3385:3390] CHIP:DMG: }, - [1649756654.930256][3385:3390] CHIP:DMG: - [1649756654.930314][3385:3390] CHIP:DMG: ], - [1649756654.930389][3385:3390] CHIP:DMG: - [1649756654.930448][3385:3390] CHIP:DMG: InteractionModelRevision = 1 - [1649756654.930555][3385:3390] CHIP:DMG: }, - [1649756654.930703][3385:3390] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1649756654.930801][3385:3390] CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true - - - label: "THn starts a commissioning process with TH_CE" - verification: | - On nth controller using chip tool connect to the accessory - - - ./chip-tool pairing onnetwork 1 20202021 - - Verify you got below message - Device commissioning completed with success - disabled: true + "TH_CR1 reads the window status to verify the DUT_CE window is closed" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" + PICS: CADMIN.S.A0000 + response: + value: 0 + + - label: "TH_CR1 opens a commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" + PICS: CADMIN.S.C00.Rsp + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 179 + - name: "PAKEVerifier" + value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + - name: "discriminator" + value: 3840 + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" + response: + error: INVALID_COMMAND - label: - "Repeat Step 3 an additional (SupportedFabrics - 2) times to reach an - index value of SupportedFabrics on TH_CE" - PICS: CADMIN.C.C0001 - verification: | - Repeat Step 3 an additional (SupportedFabrics - 2) times to reach an index value of SupportedFabrics on TH_CE - disabled: true - - - label: "THn starts a commissioning process with TH_CE" - verification: | - On nth controller using chip tool connect to the accessory - - - ./chip-tool pairing onnetwork 1 20202021 - - CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - [1649756670.402192][10794:10799] CHIP:CTL: Device returned status 5 on receiving the NOC - [1649756670.402221][10794:10799] CHIP:CTL: Add NOC failed with error ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1110: CHIP Error 0x0000000B: No memory - [1649756670.402241][10794:10799] CHIP:CTL: Failed to perform commissioning step 12 - disabled: true - - - label: "DUT_CR1 sends command to TH_CE to remove FabricIndex1" - PICS: OPCREDS.C.C0a.Tx - verification: | - on your DUT controller, remove fabric with FabricIndex=1 - - Below is the example when using chip tool as controller - - ./chip-tool operationalcredentials remove-fabric 1 1 0 - disabled: true + "TH_CR1 reads the window status to verify the DUT_CE window is closed" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" + PICS: CADMIN.S.A0000 + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml deleted file mode 100644 index cc8880bab94dd5..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml +++ /dev/null @@ -1,93 +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: - 24.1.25. [TC-CADMIN-1.25] Open commissioning window - durations min and - min-1 [BCM] [DUT - Commissionee] - -config: - nodeId: 0x12344321 - timeout: 330 - endpoint: 0 - -tests: - - label: "Factory Reset the DUT_CE" - PICS: PICS_SDK_CI_ONLY - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Factory Reset the DUT_CE" - verification: | - Not implemented in YAML - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Please reboot the DUT and enter 'y' after DUT starts" - - name: "expectedValue" - value: "y" - - - label: "TH_CR1 starts a commissioning process with DUT_CE" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "AdministratorCommissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - - label: "Wait for commissioning Window to 301 seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 181000 - - - label: - "TH_CR1 reads the window status to verify the DUT_CE window is closed" - cluster: "AdministratorCommissioning" - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "AdministratorCommissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 179 - response: - error: INVALID_COMMAND - - - label: - "TH_CR1 reads the window status to verify the DUT_CE window is closed" - cluster: "AdministratorCommissioning" - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml deleted file mode 100644 index 8d07ea020db918..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml +++ /dev/null @@ -1,108 +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: - 24.1.26. [TC-CADMIN-1.26] Open commissioning window - durations min and - min-1 [ECM] [DUT - Commissionee] - -config: - nodeId: 0x12344321 - timeout: 330 - endpoint: 0 - -tests: - - label: "Factory Reset the DUT_CE" - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Factory Reset the DUT_CE" - verification: | - Not implemented in YAML - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Please reboot the DUT and enter 'y' after DUT starts" - - name: "expectedValue" - value: "y" - - - label: "TH_CR1 starts a commissioning process with DUT_CE" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "AdministratorCommissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - - name: "discriminator" - value: 3840 - - name: "iterations" - value: 1000 - - name: "salt" - value: "SPAKE2P Key Salt" - - - label: "Wait for commissioning Window to 301 seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 181000 - - - label: - "TH_CR1 reads the window status to verify the DUT_CE window is closed" - cluster: "AdministratorCommissioning" - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "AdministratorCommissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 179 - - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - - name: "discriminator" - value: 3840 - - name: "iterations" - value: 1000 - - name: "salt" - value: "SPAKE2P Key Salt" - response: - error: INVALID_COMMAND - - - label: - "TH_CR1 reads the window status to verify the DUT_CE window is closed" - cluster: "AdministratorCommissioning" - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml index 25ab1b5377abb6..0bb6f302830de6 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml @@ -18,20 +18,21 @@ config: nodeId: 0x12344321 timeout: 300 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:0000000000I31506010" # This value needs to be generated automatically tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -40,7 +41,7 @@ tests: - label: "TH_CR1 opens a commissioning window on DUT_CE" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp timedInteractionTimeoutMs: 10000 arguments: values: @@ -75,11 +76,12 @@ tests: response: value: "chiptest" constraints: - type: string + type: char_string maxLength: 32 - - label: "Commission from beta" + - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" + PICS: CADMIN.S cluster: "CommissionerCommands" command: "PairWithCode" arguments: @@ -89,7 +91,8 @@ tests: - name: "payload" value: payload - - label: "TH_CR2 starts a commissioning process with DUT_CE" + - label: "DUT_CE is commissioned by TH_CR2 on Fabric ID2" + PICS: CADMIN.S identity: "beta" cluster: "DelayCommands" command: "WaitForCommissionee" @@ -98,7 +101,7 @@ tests: - name: "nodeId" value: nodeId2 - - label: "Query fabrics list" + - label: "TH_CR1 reads the list of Fabrics on DUT_CE" command: "readAttribute" cluster: "Operational Credentials" attribute: "Fabrics" @@ -108,7 +111,7 @@ tests: constraints: type: list - - label: "Query fabrics list" + - label: "TH_CR2 reads the list of Fabrics on DUT_CE" identity: "beta" command: "readAttribute" cluster: "Operational Credentials" @@ -140,7 +143,7 @@ tests: response: value: "chiptest1" constraints: - type: string + type: char_string maxLength: 32 - label: @@ -165,13 +168,13 @@ tests: response: value: "chiptest2" constraints: - type: string + type: char_string maxLength: 32 - - label: "TH_CR2 opens a commissioning window on DUT_CE" + - label: "TH_CR2 opens a commissioning window on DUT_CE using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp identity: "beta" timedInteractionTimeoutMs: 10000 arguments: @@ -204,10 +207,10 @@ tests: response: value: 0 - - label: "TH_CR2 opens a commissioning window on DUT_CE" + - label: "TH_CR2 opens a commissioning window on DUT_CE using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp identity: "beta" timedInteractionTimeoutMs: 10000 arguments: @@ -228,10 +231,11 @@ tests: from step 12" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" - value: nodeId2 + value: nodeId - name: "payload" value: payload response: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml index 129fb21fbb1c07..196fa479025ee9 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml @@ -18,34 +18,37 @@ config: nodeId: 0x12344321 timeout: 300 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING - defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" + PICS: CADMIN.S arguments: values: - name: "nodeId" value: nodeId - - label: "TH_CR1 opens a commissioning window on DUT_CE" + - label: "TH_CR1 opens a commissioning window on DUT_CE using BCM" cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C01.Rsp timedInteractionTimeoutMs: 10000 arguments: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory @@ -66,14 +69,14 @@ tests: PICS: BINFO.S.A0005 response: constraints: - type: string + type: char_string maxLength: 32 - value: "chiptest" - - label: "Commission from beta" + - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -81,16 +84,17 @@ tests: - name: "payload" value: payload - - label: "TH_CR2 starts a commissioning process with DUT_CE" + - label: "DUT_CE is commissioned by TH_CR2 on Fabric ID2 " identity: "beta" cluster: "DelayCommands" command: "WaitForCommissionee" + PICS: CADMIN.S arguments: values: - name: "nodeId" value: nodeId2 - - label: "Query fabrics list" + - label: "TH_CR1 reads the list of Fabrics on DUT_CE" command: "readAttribute" cluster: "Operational Credentials" PICS: OPCREDS.S.A0001 @@ -100,7 +104,7 @@ tests: constraints: type: list - - label: "Query fabrics list" + - label: "TH_CR2 reads the list of Fabrics on DUT_CE" identity: "beta" command: "readAttribute" cluster: "Operational Credentials" @@ -129,10 +133,10 @@ tests: attribute: "NodeLabel" PICS: BINFO.S.A0005 response: + value: "chiptest" constraints: - type: string + type: char_string maxLength: 32 - value: "chiptest" - label: "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory @@ -154,21 +158,23 @@ tests: attribute: "NodeLabel" PICS: BINFO.S.A0005 response: + value: "chiptest" constraints: - type: string + type: char_string maxLength: 32 - value: "chiptest" - - label: "TH_CR2 opens a commissioning window on DUT_CE" + - label: "TH_CR2 opens a commissioning window on DUT_CE using BCM" cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" identity: "beta" - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C01.Rsp timedInteractionTimeoutMs: 10000 arguments: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "Wait for the commissioning window in step 13 to timeout" cluster: "DelayCommands" @@ -187,26 +193,29 @@ tests: response: value: 0 - - label: "TH_CR2 opens a commissioning window on DUT_CE" + - label: "TH_CR2 opens a commissioning window on DUT_CE using BCM" cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" identity: "beta" - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C01.Rsp timedInteractionTimeoutMs: 10000 arguments: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "TH_CR1 starts a commissioning process with DUT_CE before the timeout from step 12" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" - value: nodeId2 + value: nodeId - name: "payload" value: payload response: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml index b069605158e986..ab1d4b0d236ed4 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml @@ -20,35 +20,36 @@ config: nodeId: 0x12344321 timeout: 300 nodeIdForDuplicateCommissioning: - type: NODE_ID + type: node_id defaultValue: 0x11 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE nodeId3: - type: NODE_ID + type: node_id defaultValue: 0xC00FEE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" + PICS: CADMIN.S arguments: values: - name: "nodeId" value: nodeId - - label: "TH_CR1 opens a new commissioning window on DUT_CE" + - label: "TH_CR1 opens a new commissioning window on DUT_CE using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp timedInteractionTimeoutMs: 10000 arguments: values: @@ -57,13 +58,13 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" value: "SPAKE2P Key Salt" - - label: "Wait for PIXIT_COMM_WIN(180) + 10 seconds" + - label: "Wait for PIXIT.CADMIN.CwDuration + 10 seconds" cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -74,7 +75,7 @@ tests: - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" cluster: "CommissionerCommands" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp command: "PairWithCode" arguments: values: @@ -85,10 +86,10 @@ tests: response: error: FAILURE - - label: "TH_CR1 opens a new commissioning window on DUT_CE" + - label: "TH_CR1 opens a new commissioning window on DUT_CE using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp timedInteractionTimeoutMs: 10000 arguments: values: @@ -97,7 +98,7 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" @@ -106,13 +107,14 @@ tests: - label: "TH_CR1 revokes the commissioning window on DUT_CE" cluster: "AdministratorCommissioning" command: "RevokeCommissioning" - PICS: CADMIN.S.C0002 + PICS: CADMIN.S.C02.Rsp timedInteractionTimeoutMs: 10000 - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -125,7 +127,7 @@ tests: - label: "TH_CR1 revokes the commissioning window on DUT_CE" cluster: "AdministratorCommissioning" command: "RevokeCommissioning" - PICS: CADMIN.S.C0002 + PICS: CADMIN.S.C02.Rsp timedInteractionTimeoutMs: 10000 response: error: FAILURE @@ -146,10 +148,12 @@ tests: response: value: "chiptest" - - label: "TH_CR1 opens a new commissioning window on DUT_CE" + - label: + "TH_CR1 opens a new commissioning window on DUT_CE using wrong + PakeVerifier value using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp timedInteractionTimeoutMs: 10000 arguments: values: @@ -158,7 +162,7 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" @@ -166,10 +170,10 @@ tests: response: error: FAILURE - - label: "TH_CR1 opens a new commissioning window on DUT_CE" + - label: "TH_CR1 opens a new commissioning window on DUT_CE using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp timedInteractionTimeoutMs: 10000 arguments: values: @@ -178,16 +182,16 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" value: "SPAKE2P Key Salt" - - label: "TH_CR1 opens a new commissioning window on DUT_CE" + - label: "TH_CR1 opens another commissioning window on DUT_CE using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp timedInteractionTimeoutMs: 10000 arguments: values: @@ -196,17 +200,17 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" value: "SPAKE2P Key Salt" response: - error: 1 + error: FAILURE #Disabled due to issue 17666 - label: "TH_CR2 starts a commissioning process with DUT_CE" - PICS: PICS_SKIP_SAMPLE_APP + PICS: CADMIN.S && PICS_SKIP_SAMPLE_APP identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" @@ -222,7 +226,7 @@ tests: RevokeCommissioning command" cluster: "AdministratorCommissioning" command: "RevokeCommissioning" - PICS: CADMIN.S.C0002 && PICS_SKIP_SAMPLE_APP + PICS: CADMIN.S.C02.Rsp && PICS_SKIP_SAMPLE_APP timedInteractionTimeoutMs: 10000 response: error: FAILURE @@ -231,6 +235,7 @@ tests: identity: "gamma" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml index 4d6cd686b22390..867f4df1a9deee 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml @@ -20,26 +20,27 @@ config: nodeId: 0x12344321 timeout: 300 nodeIdForDuplicateCommissioning: - type: NODE_ID + type: node_id defaultValue: 0x11 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE nodeId3: - type: NODE_ID + type: node_id defaultValue: 0xC00FEE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -50,13 +51,13 @@ tests: cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C01.Rsp arguments: values: - name: "CommissioningTimeout" value: 180 - - label: "Wait for PIXIT_COMM_WIN(180) + 10" + - label: "Wait for PIXIT.CADMIN.CwDuration + 10" cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -68,7 +69,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C01.Rsp arguments: values: - name: "nodeId" @@ -82,7 +83,7 @@ tests: cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C01.Rsp arguments: values: - name: "CommissioningTimeout" @@ -91,10 +92,10 @@ tests: - label: "TH_CR1 revokes the commissioning window on DUT_CE" cluster: "AdministratorCommissioning" command: "RevokeCommissioning" - PICS: CADMIN.S.C0002 + PICS: CADMIN.S.C02.Rsp timedInteractionTimeoutMs: 10000 - - label: "Commission from beta" + - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" @@ -111,7 +112,7 @@ tests: cluster: "AdministratorCommissioning" command: "RevokeCommissioning" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0002 + PICS: CADMIN.S.C02.Rsp response: error: FAILURE @@ -138,24 +139,24 @@ tests: cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C01.Rsp arguments: values: - name: "CommissioningTimeout" value: 180 - - label: "TH_CR1 opens a commissioning window on DUT_CE" + - label: "TH_CR1 opens another commissioning window on DUT_CE" identity: "alpha" cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0001 + PICS: CADMIN.S.C01.Rsp arguments: values: - name: "CommissioningTimeout" value: 180 response: - error: 1 + error: FAILURE - label: "Commission from beta" identity: "beta" @@ -172,6 +173,7 @@ tests: identity: "beta" cluster: "DelayCommands" command: "WaitForCommissionee" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -182,7 +184,7 @@ tests: RevokeCommissioning command" cluster: "AdministratorCommissioning" command: "RevokeCommissioning" - PICS: CADMIN.S.C0002 + PICS: CADMIN.S.C02.Rsp timedInteractionTimeoutMs: 10000 response: error: FAILURE @@ -191,6 +193,7 @@ tests: identity: "gamma" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml index b58d39cea641e1..9f2b4a023afec4 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 24.1.7. [TC-CADMIN-1.7] Commissioning window handling timeout and revocation + 3.1.7. [TC-CADMIN-1.7] Commissioning window handling timeout and revocation using ECM [DUT - Commissioner] config: @@ -24,6 +24,7 @@ config: tests: - label: "DUT_CR1 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | 1. Provision the device using DUT_CR1 controller on the raspi. disabled: true @@ -31,7 +32,7 @@ tests: - label: "DUT_CR1 sends command to TH_CE to open a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.C.C0000 + PICS: CADMIN.C.C00.Tx verification: | On your DUT controller open commissioning widow using ECM. @@ -77,6 +78,7 @@ tests: - label: "TH_CR2 starts a commissioning process with TH_CE after PIXIT.CADMIN.CwDuration (that was given in step 2) + 10 seconds" + PICS: CADMIN.C verification: | On the 2nd controller using chip-tool , connect using manual code generated by DUT Controller @@ -94,13 +96,29 @@ tests: "DUT_CR1 sends command to TH_CE to open a new commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.C.C0000 + PICS: CADMIN.C.C00.Tx verification: | + On your DUT controller open commissioning widow using ECM. + + Below is the example while using chip tool as controller, + + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + [1635871058.908790][4273:4278] CHIP:SC: Success status report received. Session was established + [1635871058.908827][4273:4278] CHIP:IN: New secure session created for device 0x0000000000000001, key 47!! + [1635871058.908924][4273:4278] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635871058.916166][4273:4278] CHIP:DMG: ICR moving to [AddingComm] + [1635871058.916223][4273:4278] CHIP:DMG: ICR moving to [AddedComma] + [1635871058.916362][4273:4278] CHIP:IN: Prepared encrypted message 0xaaaac41dfd10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 21937i with MessageCounter:0. + [1635871058.916421][4273:4278] CHIP:IN: Sending encrypted msg 0xaaaac41dfd10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 12630575 msec + [1635871058.916549][4273:4278] CHIP:DMG: ICR moving to [CommandSen] + [1635871058.916607][4273:4278] CHIP:CTL: Manual pairing code: [36366524220] + [1635871058.916679][4273:4278] CHIP:CTL: SetupQRCode: [MT:00000CQM0088GL3XV00] + [1635871058.916745][4273:4278] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714279 on exchange 21936i disabled: true - label: "DUT_CR1 sends command to TH_CE to revoke the commissioning window" - PICS: CADMIN.C.C0002 + PICS: CADMIN.C.C02.Tx verification: | On First controller revoke commissioning @@ -142,6 +160,7 @@ tests: disabled: true - label: "TH_CR2 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | On the 2nd controller using chip-tool , connect using manual code generated by DUT Controller @@ -156,7 +175,7 @@ tests: disabled: true - label: "DUT_CR1 sends command to TH_CE to revoke the commissioning window" - PICS: CADMIN.C.C0002 + PICS: CADMIN.C.C02.Tx verification: | On your DUT controller revoke commissioning @@ -243,7 +262,7 @@ tests: - label: "DUT_CR1 sends command to TH_CE to open a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.C.C0000 + PICS: CADMIN.C.C00.Tx verification: | On your DUT controller open commissioning widow using ECM. @@ -265,6 +284,7 @@ tests: disabled: true - label: "TH_CR2 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | On the 2nd controller using chip-tool , connect using manual code generated by DUT Controller @@ -277,6 +297,7 @@ tests: disabled: true - label: "TH_CR3 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | On the 3rd controller using chip-tool , connect using manual code generated by DUT Controller diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml index 05f839461ccb6f..0746cffb7e07a7 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 24.1.8. [TC-CADMIN-1.8] Commissioning window handling timeout and revocation + 3.1.8. [TC-CADMIN-1.8] Commissioning window handling timeout and revocation using BCM [DUT - Commissioner] config: @@ -24,6 +24,7 @@ config: tests: - label: "DUT_CR1 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | 1. Provision the device using DUT_CR1 controller on the raspi. disabled: true @@ -31,7 +32,7 @@ tests: - label: "DUT_CR1 sends command to TH_CE to open a commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.C.C0001 + PICS: CADMIN.C.C01.Tx verification: | On your DUT controller open commissioning widow using BCM. @@ -97,6 +98,7 @@ tests: - label: "TH_CR2 starts a commissioning process with TH_CE after PIXIT.CADMIN.CwDuration (that was given in step 2) + 10 seconds" + PICS: CADMIN.C verification: | On the 2nd controller using chip-tool , connect to the accessory @@ -112,7 +114,7 @@ tests: "DUT_CR1 sends command to TH_CE to open a new commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.C.C0001 + PICS: CADMIN.C.C01.Tx verification: | On your DUT controller open commissioning widow using BCM. @@ -155,7 +157,7 @@ tests: disabled: true - label: "DUT_CR1 sends command to TH_CE to revoke the commissioning window" - PICS: CADMIN.C.C0002 + PICS: CADMIN.C.C02.Tx verification: | On your DUT controller revoke commissioning @@ -196,6 +198,7 @@ tests: disabled: true - label: "TH_CR2 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | On the 2nd controller using chip-tool , connect to the accessory @@ -208,7 +211,7 @@ tests: disabled: true - label: "DUT_CR1 sends command to TH_CE to revoke the commissioning window" - PICS: CADMIN.C.C0002 + PICS: CADMIN.C.C02.Tx verification: | On your DUT controller revoke commissioning @@ -296,7 +299,7 @@ tests: "DUT_CR1 sends command to TH_CE to open a new commissioning window with a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.C.C0001 + PICS: CADMIN.C.C01.Tx verification: | On your DUT controller open commissioning widow using BCM. @@ -340,6 +343,7 @@ tests: disabled: true - label: "TH_CR2 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | On the 2nd controller using chip-tool , connect to the accessory @@ -350,6 +354,7 @@ tests: disabled: true - label: "TH_CR3 starts a commissioning process with TH_CE" + PICS: CADMIN.C verification: | On the 3rd controller using chip-tool , connect to the accessory diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml index 4c87005f5a9aed..5e0a0578b4d98b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml @@ -20,29 +20,30 @@ config: nodeId: 0x12344321 timeout: 700 nodeIdForDuplicateCommissioning: - type: NODE_ID + type: node_id defaultValue: 0x11 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE nodeId3: - type: NODE_ID + type: node_id defaultValue: 0xC00FEE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" payload2: - type: CHAR_STRING + type: char_string defaultValue: "MT:0000000000I.0648G00" tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -52,7 +53,7 @@ tests: cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C0000 + PICS: CADMIN.S.C00.Rsp arguments: values: - name: "CommissioningTimeout" @@ -72,6 +73,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -87,6 +89,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -102,6 +105,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -117,6 +121,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -132,6 +137,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -147,6 +153,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -162,6 +169,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -177,6 +185,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -192,6 +201,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -207,6 +217,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -222,6 +233,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -237,6 +249,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -252,6 +265,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -267,6 +281,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -282,6 +297,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -297,6 +313,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -312,6 +329,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -327,6 +345,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -342,6 +361,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -357,6 +377,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -372,6 +393,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -385,6 +407,7 @@ tests: identity: "gamma" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" 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 13105d1ff02910..e62e11283bfd57 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 @@ -34,7 +34,7 @@ tests: response: value: 5 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: (CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03) @@ -42,7 +42,7 @@ tests: attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 31 @@ -54,86 +54,13 @@ tests: type: list contains: [8, 15, 16385, 16394, 65528, 65529, 65531, 65532, 65533] - - label: "Read the feature dependent attribute(CC.S.F00) in AttributeList" - PICS: CC.S.F00 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 1] - - - label: "Read the feature dependent attribute(CC.S.F03) in AttributeList" - PICS: CC.S.F03 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [3, 4] - - - label: "Read the feature dependent attribute(CC.S.F04) in AttributeList" - PICS: CC.S.F04 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [7, 16395, 16396] - - - label: - "Read the feature dependent attribute(CC.S.F04) or - ColorTemperatureMireds in AttributeList" - PICS: CC.S.F04 && CC.S.A4010 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [16397, 16400] - - - label: "Read the feature dependent attribute(CC.S.F01) in AttributeList" - PICS: CC.S.F01 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [16384] - - - label: "Read the feature dependent attribute(CC.S.F02) in AttributeList" - PICS: CC.S.F02 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [16386, 16387, 16388, 16389, 16390] - - - label: "Read the feature dependent attribute(CC.S.F00) in AttributeList" - PICS: CC.S.F00 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [] - - - label: "Read the feature dependent attribute(CC.S.F00) in AttributeList" - PICS: CC.S.F00 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [] - - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list + contains: [] - label: "Read the global attribute: GeneratedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml index 88db602018f901..8dae8c05ea5ef5 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml @@ -29,22 +29,22 @@ tests: value: nodeId - label: "TH reads CurrentHue attribute from DUT" - PICS: CC.S.A0000 && CC.S.F00 + PICS: CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 - label: "TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.A0001 && CC.S.F00 + PICS: CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -54,27 +54,27 @@ tests: attribute: "RemainingTime" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "TH reads CurrentX attribute from DUT" - PICS: CC.S.A0003 && CC.S.F03 + PICS: CC.S.A0003 command: "readAttribute" attribute: "CurrentX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - label: "TH reads CurrentY attribute from DUT" - PICS: CC.S.A0004 && CC.S.F04 + PICS: CC.S.A0004 command: "readAttribute" attribute: "CurrentY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -94,16 +94,16 @@ tests: attribute: "CompensationText" response: constraints: - type: string + type: char_string maxLength: 254 - label: "TH reads ColorTemperatureMireds attribute from DUT" - PICS: CC.S.A0007 && CC.S.F04 + PICS: CC.S.A0007 command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -128,17 +128,17 @@ tests: maxValue: 4 - label: "TH reads EnhancedCurrentHue attribute from DUT" - PICS: CC.S.A4000 && CC.S.F01 + PICS: CC.S.A4000 command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "TH reads EnhancedColorMode attribute from DUT" - PICS: CC.S.F02 && CC.S.A4001 + PICS: CC.S.F02 command: "readAttribute" attribute: "EnhancedColorMode" response: @@ -148,52 +148,52 @@ tests: maxValue: 3 - label: "TH reads ColorLoopActive attribute from DUT" - PICS: CC.S.A4002 && CC.S.F02 + PICS: CC.S.A4002 command: "readAttribute" attribute: "ColorLoopActive" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 - label: "TH reads ColorLoopDirection attribute from DUT" - PICS: CC.S.A4003 && CC.S.F02 + PICS: CC.S.A4003 command: "readAttribute" attribute: "ColorLoopDirection" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 - label: "TH reads ColorLoopTime attribute from DUT" - PICS: CC.S.A4004 && CC.S.F02 + PICS: CC.S.A4004 command: "readAttribute" attribute: "ColorLoopTime" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "TH reads ColorLoopStartEnhancedHue attribute from DUT" - PICS: CC.S.A4005 && CC.S.F02 + PICS: CC.S.A4005 command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "TH reads ColorLoopStoredEnhancedHue attribute from DUT" - PICS: CC.S.A4006 && CC.S.F02 + PICS: CC.S.A4006 command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -210,47 +210,47 @@ tests: response: value: FeatureMapValue constraints: - type: map16 + type: bitmap16 minValue: 0 maxValue: 31 - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" - PICS: CC.S.A400b && CC.S.F04 + PICS: CC.S.A400b command: "readAttribute" attribute: "ColorTempPhysicalMinMireds" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - label: "TH reads ColorTempPhysicalMaxMireds attribute from DUT" - PICS: CC.S.A400c && CC.S.F04 + PICS: CC.S.A400c command: "readAttribute" attribute: "ColorTempPhysicalMaxMireds" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - label: "TH reads CoupleColorTempToLevelMinMireds attribute from DUT" - PICS: CC.S.A400d && CC.S.F04 + PICS: CC.S.A400d command: "readAttribute" attribute: "CoupleColorTempToLevelMinMireds" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - label: "TH reads StartUpColorTemperatureMireds attribute from DUT" - PICS: CC.S.A4010 && CC.S.F04 + PICS: CC.S.A4010 command: "readAttribute" attribute: "StartUpColorTemperatureMireds" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -261,190 +261,382 @@ tests: attribute: "NumberOfPrimaries" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 6 - - label: "TH reads Primary1X attribute from DUT" - PICS: CC.S.A0011 - command: "readAttribute" - attribute: "Primary1X" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65279 - - - label: "TH reads Primary1Y attribute from DUT" - PICS: CC.S.A0012 - command: "readAttribute" - attribute: "Primary1Y" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65279 - - - label: "TH reads Primary1Intensity attribute from DUT" - PICS: CC.S.A0013 - command: "readAttribute" - attribute: "Primary1Intensity" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 255 - - - label: "TH reads Primary2X attribute from DUT" - PICS: CC.S.A0015 - command: "readAttribute" - attribute: "Primary2X" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65279 - - - label: "TH reads Primary2Y attribute from DUT" - PICS: CC.S.A0016 - command: "readAttribute" - attribute: "Primary2Y" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65279 - - - label: "TH reads Primary2Intensity attribute from DUT" - PICS: CC.S.A0017 - command: "readAttribute" - attribute: "Primary2Intensity" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 255 - - - label: "TH reads Primary3X attribute from DUT" - PICS: CC.S.A0019 - command: "readAttribute" - attribute: "Primary3X" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65279 - - - label: "TH reads Primary3Y attribute from DUT" - PICS: CC.S.A001a - command: "readAttribute" - attribute: "Primary3Y" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65279 - - - label: "TH reads Primary3Intensity attribute from DUT" - PICS: CC.S.A001b - command: "readAttribute" - attribute: "Primary3Intensity" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 255 + - label: + "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" + verification: | + ./chip-tool colorcontrol read primary1x 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0011 DataVersion: 540305990 + [1651483665.109697][3245:3250] CHIP:TOO: primary 1 x: 0 + [1651483665.109797][3245:3250] CHIP:EM: Sending Standalone Ack for MessageCounter:12731123 on exchange 55053i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0011 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "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" + verification: | + ./chip-tool colorcontrol read primary1y 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0012 DataVersion: 540305990 + [1651483698.733322][3253:3259] CHIP:TOO: primary 1 y: 0 + [1651483698.733420][3253:3259] CHIP:EM: Sending Standalone Ack for MessageCounter:7863787 on exchange 13103i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0012 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH reads Primary1Intensity attribute from DUT and Verify that the DUT + response contains an uint8 if NumberOfPrimaries is 1 or more" + verification: | + ./chip-tool colorcontrol read primary1intensity 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0013 DataVersion: 540305990 + [1651483742.297459][3263:3268] CHIP:TOO: primary 1 intensity: 0 + [1651483742.297558][3263:3268] CHIP:EM: Sending Standalone Ack for MessageCounter:10210809 on exchange 7007i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0013 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "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" + verification: | + ./chip-tool colorcontrol read primary2x 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0015 DataVersion: 540305990 + [1651483777.233498][3270:3275] CHIP:TOO: primary 2 x: 0 + [1651483777.233614][3270:3275] CHIP:EM: Sending Standalone Ack for MessageCounter:1684573 on exchange 21377i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0015 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "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" + verification: | + ./chip-tool colorcontrol read primary2y 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0016 DataVersion: 540305990 + [1651483805.650796][3279:3284] CHIP:TOO: primary 2 y: 0 + [1651483805.650942][3279:3284] CHIP:EM: Sending Standalone Ack for MessageCounter:16277541 on exchange 10435i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0016 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH reads Primary2Intensity attribute from DUT and Verify that the DUT + response contains an uint8 if NumberOfPrimaries is 2 or more" + verification: | + ./chip-tool colorcontrol read primary2intensity 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0017 DataVersion: 540305990 + [1651483834.596380][3285:3290] CHIP:TOO: primary 2 intensity: 0 + [1651483834.596470][3285:3290] CHIP:EM: Sending Standalone Ack for MessageCounter:5986355 on exchange 855i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0017 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "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" + verification: | + ./chip-tool colorcontrol read primary3x 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0019 DataVersion: 540305990 + [1651483937.072323][3298:3303] CHIP:TOO: primary 3 x: 0 + [1651483937.072405][3298:3303] CHIP:EM: Sending Standalone Ack for MessageCounter:6092298 on exchange 12519i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0019 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "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" + verification: | + ./chip-tool colorcontrol read primary3y 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_001A DataVersion: 540305990 + [1651483967.386334][3305:3310] CHIP:TOO: primary 3 y: 0 + [1651483967.386427][3305:3310] CHIP:EM: Sending Standalone Ack for MessageCounter:3329418 on exchange 11657i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A001a + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH reads Primary3Intensity attribute from DUT and Verify that the DUT + response contains an uint8 if NumberOfPrimaries is 3 or more" + verification: | + ./chip-tool colorcontrol read primary3intensity 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_001B DataVersion: 540305990 + [1651484113.812178][3316:3321] CHIP:TOO: primary 3 intensity: 0 + [1651484113.812270][3316:3321] CHIP:EM: Sending Standalone Ack for MessageCounter:41658 on exchange 9618i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A001b + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" #Additional Defined Primaries Information Attribute Set - - label: "TH reads Primary4X attribute from DUT" - PICS: CC.S.A0020 - command: "readAttribute" - attribute: "Primary4X" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65279 - - - label: "TH reads Primary4Y attribute from DUT" - PICS: CC.S.A0021 - command: "readAttribute" - attribute: "Primary4Y" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65279 - - - label: "TH reads Primary4Intensity attribute from DUT" - PICS: CC.S.A0022 - command: "readAttribute" - attribute: "Primary4Intensity" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 255 - - - label: "TH reads Primary5X attribute from DUT" - PICS: CC.S.A0024 - command: "readAttribute" - attribute: "Primary5X" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65279 - - - label: "TH reads Primary5Y attribute from DUT" - PICS: CC.S.A0025 - command: "readAttribute" - attribute: "Primary5Y" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65279 - - - label: "TH reads Primary5Intensity attribute from DUT" - PICS: CC.S.A0026 - command: "readAttribute" - attribute: "Primary5Intensity" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 255 - - - label: "TH reads Primary6X attribute from DUT" - PICS: CC.S.A0028 - command: "readAttribute" - attribute: "Primary6X" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65279 - - - label: "TH reads Primary6Y attribute from DUT" - PICS: CC.S.A0029 - command: "readAttribute" - attribute: "Primary6Y" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65279 - - - label: "TH reads Primary6Intensity attribute from DUT" - PICS: CC.S.A002a - command: "readAttribute" - attribute: "Primary6Intensity" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 255 + - label: + "TH reads Primary4X attribute from DUT Verify that the DUT response + contains an uint16 [Min:0 Max:0xfeff] if NumberOfPrimaries is 4 or + more" + verification: | + ./chip-tool colorcontrol read primary4x 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0020 DataVersion: 540305990 + [1651484143.778301][3324:3329] CHIP:TOO: primary 4 x: 0 + [1651484143.778392][3324:3329] CHIP:EM: Sending Standalone Ack for MessageCounter:2094184 on exchange 50270i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0020 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "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" + verification: | + ./chip-tool colorcontrol read primary4y 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0021 DataVersion: 540305990 + [1651484171.921901][3334:3339] CHIP:TOO: primary 4 y: 0 + [1651484171.921984][3334:3339] CHIP:EM: Sending Standalone Ack for MessageCounter:3701827 on exchange 16726i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0021 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH reads Primary4Intensity attribute from DUT and Verify that the DUT + response contains an uint8 if NumberOfPrimaries is 4 or more" + verification: | + ./chip-tool colorcontrol read primary4intensity 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0022 DataVersion: 540305990 + [1651484198.443415][3341:3346] CHIP:TOO: primary 4 intensity: 0 + [1651484198.443528][3341:3346] CHIP:EM: Sending Standalone Ack for MessageCounter:1740063 on exchange 36245i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0022 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "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" + verification: | + ./chip-tool colorcontrol read primary5x 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0024 DataVersion: 540305990 + [1651484241.467661][3350:3355] CHIP:TOO: primary 5 x: 0 + [1651484241.467788][3350:3355] CHIP:EM: Sending Standalone Ack for MessageCounter:5350139 on exchange 63040i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0024 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "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" + verification: | + ./chip-tool colorcontrol read primary5y 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0025 DataVersion: 540305990 + [1651484286.709863][3358:3363] CHIP:TOO: primary 5 y: 0 + [1651484286.709964][3358:3363] CHIP:EM: Sending Standalone Ack for MessageCounter:7199124 on exchange 47604i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0025 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH reads Primary5Intensity attribute from DUT and Verify that the DUT + response contains an uint8 if NumberOfPrimaries is 5 or more" + verification: | + ./chip-tool colorcontrol read primary5intensity 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0026 DataVersion: 540305990 + [1651484304.715731][3365:3370] CHIP:TOO: primary 5 intensity: 0 + [1651484304.715829][3365:3370] CHIP:EM: Sending Standalone Ack for MessageCounter:8654922 on exchange 29272i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0026 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "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" + verification: | + ./chip-tool colorcontrol read primary6x 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0028 DataVersion: 540305990 + [1651484349.601181][3372:3377] CHIP:TOO: primary 6 x: 0 + [1651484349.601269][3372:3377] CHIP:EM: Sending Standalone Ack for MessageCounter:13704291 on exchange 30507i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0028 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "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" + verification: | + ./chip-tool colorcontrol read primary6y 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0028 DataVersion: 540305990 + [1651484349.601181][3372:3377] CHIP:TOO: primary 6 x: 0 + [1651484349.601269][3372:3377] CHIP:EM: Sending Standalone Ack for MessageCounter:13704291 on exchange 30507i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A0029 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH reads Primary6Intensity attribute from DUT and Verify that the DUT + response contains an uint8 if NumberOfPrimaries is 6 or more" + verification: | + ./chip-tool colorcontrol read primary6intensity 1 1 + + Verify in TH Logs: + CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_002A DataVersion: 540305990 + [1651484392.490974][3378:3383] CHIP:TOO: primary 6 intensity: 0 + [1651484392.491074][3378:3383] CHIP:EM: Sending Standalone Ack for MessageCounter:2427165 on exchange 17769i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && CC.S.A002a + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" #Defined Color Points Settings Attribute Set - label: "TH reads WhitePointX attribute from DUT" @@ -453,7 +645,7 @@ tests: attribute: "WhitePointX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -463,7 +655,7 @@ tests: attribute: "WhitePointY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -473,7 +665,7 @@ tests: attribute: "ColorPointRX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -483,7 +675,7 @@ tests: attribute: "ColorPointRY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -493,7 +685,7 @@ tests: attribute: "ColorPointRIntensity" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -503,7 +695,7 @@ tests: attribute: "ColorPointGX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -513,7 +705,7 @@ tests: attribute: "ColorPointGY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -523,7 +715,7 @@ tests: attribute: "ColorPointGIntensity" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -533,7 +725,7 @@ tests: attribute: "ColorPointBX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -543,7 +735,7 @@ tests: attribute: "ColorPointBY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -553,6 +745,6 @@ tests: attribute: "ColorPointBIntensity" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml index 6f5d019ae66bf1..802e6486d5a0e9 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml @@ -32,9 +32,33 @@ tests: PICS: CC.C.A0000 verification: | ./chip-tool colorcontrol read current-hue 1 1 - [1649661322.115302][7976:7981] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0000 DataVersion: 4087274515 - [1649661322.115376][7976:7981] CHIP:TOO: current hue: 0 - [1649661322.115473][7976:7981] CHIP:EM: Sending Standalone Ack for MessageCounter:14511861 on exchange 26516i + + Verify in DUT as client side log: + + [1657908705.581609][2861:2861] CHIP:IM: Received Read request + [1657908705.581752][2861:2861] CHIP:DMG: ReadRequestMessage = + [1657908705.581807][2861:2861] CHIP:DMG: { + [1657908705.581874][2861:2861] CHIP:DMG: AttributePathIBs = + [1657908705.581941][2861:2861] CHIP:DMG: [ + [1657908705.581993][2861:2861] CHIP:DMG: AttributePathIB = + [1657908705.582069][2861:2861] CHIP:DMG: { + [1657908705.582128][2861:2861] CHIP:DMG: Endpoint = 0x1, + [1657908705.582193][2861:2861] CHIP:DMG: Cluster = 0x300, + [1657908705.582279][2861:2861] CHIP:DMG: Attribute = 0x0000_0000, + [1657908705.582341][2861:2861] CHIP:DMG: } + [1657908705.582399][2861:2861] CHIP:DMG: + [1657908705.582456][2861:2861] CHIP:DMG: ], + [1657908705.582513][2861:2861] CHIP:DMG: + [1657908705.582569][2861:2861] CHIP:DMG: isFabricFiltered = true, + [1657908705.582622][2861:2861] CHIP:DMG: InteractionModelRevision = 1 + [1657908705.582671][2861:2861] CHIP:DMG: }, + [1657908705.582814][2861:2861] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657908705.582973][2861:2861] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657908705.583034][2861:2861] CHIP:DMG: Cluster 300, Attribute 0 is dirty + [1657908705.583079][2861:2861] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1657908705.583133][2861:2861] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657908705.583195][2861:2861] CHIP:DMG: AccessControl: allowed + [1657908705.583290][2861:2861] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: @@ -43,9 +67,29 @@ tests: PICS: CC.C.A0001 verification: | ./chip-tool colorcontrol read current-saturation 1 1 - [1649661322.558054][7982:7987] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0001 DataVersion: 4087274515 - [1649661322.558128][7982:7987] CHIP:TOO: current saturation: 0 - [1649661322.558225][7982:7987] CHIP:EM: Sending Standalone Ack for MessageCounter:13666860 on exchange 22550i + + Verify in DUT as client side log: + [1657908593.710273][2861:2861] CHIP:IM: Received Read request + [1657908593.710359][2861:2861] CHIP:DMG: ReadRequestMessage = + [1657908593.710389][2861:2861] CHIP:DMG: { + [1657908593.710438][2861:2861] CHIP:DMG: AttributePathIBs = + [1657908593.710469][2861:2861] CHIP:DMG: [ + [1657908593.710496][2861:2861] CHIP:DMG: AttributePathIB = + [1657908593.710540][2861:2861] CHIP:DMG: { + [1657908593.710572][2861:2861] CHIP:DMG: Endpoint = 0x1, + [1657908593.710607][2861:2861] CHIP:DMG: Cluster = 0x300, + [1657908593.710653][2861:2861] CHIP:DMG: Attribute = 0x0000_0001, + [1657908593.710686][2861:2861] CHIP:DMG: } + [1657908593.710718][2861:2861] CHIP:DMG: + [1657908593.710757][2861:2861] CHIP:DMG: ], + [1657908593.710790][2861:2861] CHIP:DMG: + [1657908593.710820][2861:2861] CHIP:DMG: isFabricFiltered = true, + [1657908593.710861][2861:2861] CHIP:DMG: InteractionModelRevision = 1 + [1657908593.710888][2861:2861] CHIP:DMG: }, + [1657908593.710983][2861:2861] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657908593.711095][2861:2861] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657908593.711129][2861:2861] CHIP:DMG: Cluster 300, Attribute 1 is dirty + [1657908593.711154][2861:2861] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 disabled: true - label: @@ -54,9 +98,31 @@ tests: verification: | ./chip-tool colorcontrol read remaining-time 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0002 DataVersion: 540305990 - [1651485342.420726][3496:3501] CHIP:TOO: remaining time: 0 - [1651485342.420816][3496:3501] CHIP:EM: Sending Standalone Ack for MessageCounter:6536290 on exchange 31520i + Verify in DUT as client side log: + [1657908803.102070][2933:2933] CHIP:IM: Received Read request + [1657908803.102154][2933:2933] CHIP:DMG: ReadRequestMessage = + [1657908803.102182][2933:2933] CHIP:DMG: { + [1657908803.102204][2933:2933] CHIP:DMG: AttributePathIBs = + [1657908803.102230][2933:2933] CHIP:DMG: [ + [1657908803.102254][2933:2933] CHIP:DMG: AttributePathIB = + [1657908803.102282][2933:2933] CHIP:DMG: { + [1657908803.102310][2933:2933] CHIP:DMG: Endpoint = 0x1, + [1657908803.102344][2933:2933] CHIP:DMG: Cluster = 0x300, + [1657908803.102376][2933:2933] CHIP:DMG: Attribute = 0x0000_0002, + [1657908803.102405][2933:2933] CHIP:DMG: } + [1657908803.102433][2933:2933] CHIP:DMG: + [1657908803.102459][2933:2933] CHIP:DMG: ], + [1657908803.102493][2933:2933] CHIP:DMG: + [1657908803.102521][2933:2933] CHIP:DMG: isFabricFiltered = true, + [1657908803.102546][2933:2933] CHIP:DMG: InteractionModelRevision = 1 + [1657908803.102568][2933:2933] CHIP:DMG: }, + [1657908803.102647][2933:2933] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657908803.102755][2933:2933] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657908803.102790][2933:2933] CHIP:DMG: Cluster 300, Attribute 2 is dirty + [1657908803.102812][2933:2933] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0002 (expanded=0) + [1657908803.102841][2933:2933] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657908803.102875][2933:2933] CHIP:DMG: AccessControl: allowed + [1657908803.102936][2933:2933] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: @@ -65,9 +131,32 @@ tests: PICS: CC.C.A0003 verification: | ./chip-tool colorcontrol read current-x 1 1 - [1649661322.994696][7988:7993] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0003 DataVersion: 4087274515 - [1649661322.994764][7988:7993] CHIP:TOO: current x: 24939 - [1649661322.994850][7988:7993] CHIP:EM: Sending Standalone Ack for MessageCounter:15274073 on exchange 48270i + + Verify in DUT as client side log: + [1657908856.780574][2933:2933] CHIP:IM: Received Read request + [1657908856.780702][2933:2933] CHIP:DMG: ReadRequestMessage = + [1657908856.780750][2933:2933] CHIP:DMG: { + [1657908856.780790][2933:2933] CHIP:DMG: AttributePathIBs = + [1657908856.780837][2933:2933] CHIP:DMG: [ + [1657908856.780881][2933:2933] CHIP:DMG: AttributePathIB = + [1657908856.780930][2933:2933] CHIP:DMG: { + [1657908856.780981][2933:2933] CHIP:DMG: Endpoint = 0x1, + [1657908856.781112][2933:2933] CHIP:DMG: Cluster = 0x300, + [1657908856.781177][2933:2933] CHIP:DMG: Attribute = 0x0000_0003, + [1657908856.781230][2933:2933] CHIP:DMG: } + [1657908856.781283][2933:2933] CHIP:DMG: + [1657908856.781330][2933:2933] CHIP:DMG: ], + [1657908856.781441][2933:2933] CHIP:DMG: + [1657908856.781492][2933:2933] CHIP:DMG: isFabricFiltered = true, + [1657908856.781539][2933:2933] CHIP:DMG: InteractionModelRevision = 1 + [1657908856.781581][2933:2933] CHIP:DMG: }, + [1657908856.781710][2933:2933] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657908856.781911][2933:2933] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657908856.781965][2933:2933] CHIP:DMG: Cluster 300, Attribute 3 is dirty + [1657908856.782004][2933:2933] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0003 (expanded=0) + [1657908856.782053][2933:2933] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657908856.782108][2933:2933] CHIP:DMG: AccessControl: allowed + [1657908856.782247][2933:2933] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: @@ -76,9 +165,32 @@ tests: PICS: CC.C.A0004 verification: | ./chip-tool colorcontrol read current-y 1 1 - [1649661323.433317][7994:7999] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0004 DataVersion: 4087274515 - [1649661323.433391][7994:7999] CHIP:TOO: current y: 24701 - [1649661323.433490][7994:7999] CHIP:EM: Sending Standalone Ack for MessageCounter:12384629 on exchange 18947i + + Verify in DUT as client side log: + [1657909305.413625][2933:2933] CHIP:IM: Received Read request + [1657909305.413743][2933:2933] CHIP:DMG: ReadRequestMessage = + [1657909305.413786][2933:2933] CHIP:DMG: { + [1657909305.413822][2933:2933] CHIP:DMG: AttributePathIBs = + [1657909305.413864][2933:2933] CHIP:DMG: [ + [1657909305.413903][2933:2933] CHIP:DMG: AttributePathIB = + [1657909305.413946][2933:2933] CHIP:DMG: { + [1657909305.413991][2933:2933] CHIP:DMG: Endpoint = 0x1, + [1657909305.414039][2933:2933] CHIP:DMG: Cluster = 0x300, + [1657909305.414089][2933:2933] CHIP:DMG: Attribute = 0x0000_0004, + [1657909305.414136][2933:2933] CHIP:DMG: } + [1657909305.414181][2933:2933] CHIP:DMG: + [1657909305.414223][2933:2933] CHIP:DMG: ], + [1657909305.414268][2933:2933] CHIP:DMG: + [1657909305.414311][2933:2933] CHIP:DMG: isFabricFiltered = true, + [1657909305.414352][2933:2933] CHIP:DMG: InteractionModelRevision = 1 + [1657909305.414387][2933:2933] CHIP:DMG: }, + [1657909305.414502][2933:2933] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657909305.414634][2933:2933] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657909305.414682][2933:2933] CHIP:DMG: Cluster 300, Attribute 4 is dirty + [1657909305.414717][2933:2933] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0004 (expanded=0) + [1657909305.414761][2933:2933] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657909305.414812][2933:2933] CHIP:DMG: AccessControl: allowed + [1657909305.414892][2933:2933] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: @@ -88,9 +200,31 @@ tests: verification: | ./chip-tool colorcontrol read drift-compensation 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0005 DataVersion: 540305990 - [1651485386.691700][3506:3511] CHIP:TOO: drift compensation: 0 - [1651485386.691805][3506:3511] CHIP:EM: Sending Standalone Ack for MessageCounter:12144117 on exchange 57338i + Verify in DUT as client side log: + [1657909433.948649][2933:2933] CHIP:IM: Received Read request + [1657909433.948766][2933:2933] CHIP:DMG: ReadRequestMessage = + [1657909433.948809][2933:2933] CHIP:DMG: { + [1657909433.948844][2933:2933] CHIP:DMG: AttributePathIBs = + [1657909433.948885][2933:2933] CHIP:DMG: [ + [1657909433.948923][2933:2933] CHIP:DMG: AttributePathIB = + [1657909433.948966][2933:2933] CHIP:DMG: { + [1657909433.949010][2933:2933] CHIP:DMG: Endpoint = 0x1, + [1657909433.949063][2933:2933] CHIP:DMG: Cluster = 0x300, + [1657909433.949113][2933:2933] CHIP:DMG: Attribute = 0x0000_0005, + [1657909433.949158][2933:2933] CHIP:DMG: } + [1657909433.949207][2933:2933] CHIP:DMG: + [1657909433.949248][2933:2933] CHIP:DMG: ], + [1657909433.949292][2933:2933] CHIP:DMG: + [1657909433.949334][2933:2933] CHIP:DMG: isFabricFiltered = true, + [1657909433.949375][2933:2933] CHIP:DMG: InteractionModelRevision = 1 + [1657909433.949413][2933:2933] CHIP:DMG: }, + [1657909433.949528][2933:2933] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657909433.949656][2933:2933] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657909433.949702][2933:2933] CHIP:DMG: Cluster 300, Attribute 5 is dirty + [1657909433.949738][2933:2933] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0005 (expanded=0) + [1657909433.949786][2933:2933] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657909433.949836][2933:2933] CHIP:DMG: AccessControl: allowed + [1657909433.949917][2933:2933] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: @@ -100,9 +234,31 @@ tests: verification: | ./chip-tool colorcontrol read compensation-text 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0006 DataVersion: 540305990 - [1651485417.552058][3512:3517] CHIP:TOO: compensation text: - [1651485417.552171][3512:3517] CHIP:EM: Sending Standalone Ack for MessageCounter:354764 on exchange 31359i + Verify in DUT as client side log: + [1657909470.827379][2933:2933] CHIP:IM: Received Read request + [1657909470.827505][2933:2933] CHIP:DMG: ReadRequestMessage = + [1657909470.827553][2933:2933] CHIP:DMG: { + [1657909470.827593][2933:2933] CHIP:DMG: AttributePathIBs = + [1657909470.827639][2933:2933] CHIP:DMG: [ + [1657909470.827683][2933:2933] CHIP:DMG: AttributePathIB = + [1657909470.827732][2933:2933] CHIP:DMG: { + [1657909470.827782][2933:2933] CHIP:DMG: Endpoint = 0x1, + [1657909470.827834][2933:2933] CHIP:DMG: Cluster = 0x300, + [1657909470.827904][2933:2933] CHIP:DMG: Attribute = 0x0000_0006, + [1657909470.827956][2933:2933] CHIP:DMG: } + [1657909470.828008][2933:2933] CHIP:DMG: + [1657909470.828088][2933:2933] CHIP:DMG: ], + [1657909470.828145][2933:2933] CHIP:DMG: + [1657909470.828192][2933:2933] CHIP:DMG: isFabricFiltered = true, + [1657909470.828238][2933:2933] CHIP:DMG: InteractionModelRevision = 1 + [1657909470.828280][2933:2933] CHIP:DMG: }, + [1657909470.828411][2933:2933] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657909470.828560][2933:2933] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657909470.828614][2933:2933] CHIP:DMG: Cluster 300, Attribute 6 is dirty + [1657909470.828654][2933:2933] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0006 (expanded=0) + [1657909470.828703][2933:2933] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657909470.828757][2933:2933] CHIP:DMG: AccessControl: allowed + [1657909470.828845][2933:2933] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: @@ -111,27 +267,97 @@ tests: PICS: CC.C.A0007 verification: | ./chip-tool colorcontrol read color-temperature 1 1 - [1649661323.873246][8000:8005] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087274515 - [1649661323.873316][8000:8005] CHIP:TOO: color temperature: 0 - [1649661323.873405][8000:8005] CHIP:EM: Sending Standalone Ack for MessageCounter:16436117 on exchange 33080i + + Verify in DUT as client side log: + + [1657909522.420348][2977:2977] CHIP:IM: Received Read request + [1657909522.420471][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657909522.420518][2977:2977] CHIP:DMG: { + [1657909522.420579][2977:2977] CHIP:DMG: AttributePathIBs = + [1657909522.420627][2977:2977] CHIP:DMG: [ + [1657909522.420670][2977:2977] CHIP:DMG: AttributePathIB = + [1657909522.420726][2977:2977] CHIP:DMG: { + [1657909522.420806][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657909522.420872][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657909522.420931][2977:2977] CHIP:DMG: Attribute = 0x0000_0007, + [1657909522.420984][2977:2977] CHIP:DMG: } + [1657909522.421051][2977:2977] CHIP:DMG: + [1657909522.421104][2977:2977] CHIP:DMG: ], + [1657909522.421156][2977:2977] CHIP:DMG: + [1657909522.421204][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657909522.421266][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657909522.421310][2977:2977] CHIP:DMG: }, + [1657909522.421455][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657909522.421605][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657909522.421674][2977:2977] CHIP:DMG: Cluster 300, Attribute 7 is dirty + [1657909522.421714][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0007 (expanded=0) + [1657909522.421762][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657909522.421816][2977:2977] CHIP:DMG: AccessControl: allowed + [1657909522.421923][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT reads from the TH the (0x0008) ColorMode attribute" PICS: CC.C.A0008 verification: | ./chip-tool colorcontrol read color-mode 1 1 - [1649661324.315688][8006:8011] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0008 DataVersion: 4087274515 - [1649661324.315767][8006:8011] CHIP:TOO: color mode: 2 - [1649661324.315877][8006:8011] CHIP:EM: Sending Standalone Ack for MessageCounter:15003063 on exchange 8273i + + Verify in DUT as client side log: + [1657909555.028998][2977:2977] CHIP:IM: Received Read request + [1657909555.029124][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657909555.029171][2977:2977] CHIP:DMG: { + [1657909555.029227][2977:2977] CHIP:DMG: AttributePathIBs = + [1657909555.029278][2977:2977] CHIP:DMG: [ + [1657909555.029322][2977:2977] CHIP:DMG: AttributePathIB = + [1657909555.029392][2977:2977] CHIP:DMG: { + [1657909555.029445][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657909555.029502][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657909555.029575][2977:2977] CHIP:DMG: Attribute = 0x0000_0008, + [1657909555.029631][2977:2977] CHIP:DMG: } + [1657909555.029682][2977:2977] CHIP:DMG: + [1657909555.029744][2977:2977] CHIP:DMG: ], + [1657909555.029797][2977:2977] CHIP:DMG: + [1657909555.029844][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657909555.029890][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657909555.029949][2977:2977] CHIP:DMG: }, + [1657909555.030093][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657909555.030253][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657909555.030306][2977:2977] CHIP:DMG: Cluster 300, Attribute 8 is dirty + [1657909555.030346][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0008 (expanded=0) + [1657909555.030394][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657909555.030465][2977:2977] CHIP:DMG: AccessControl: allowed + [1657909555.030553][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT reads from the TH the (0x000f) Options attribute" PICS: CC.C.A000f verification: | ./chip-tool colorcontrol read options 1 1 - [1649661324.748577][8012:8017] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_000F DataVersion: 4087274515 - [1649661324.748641][8012:8017] CHIP:TOO: Options: 0 - [1649661324.748719][8012:8017] CHIP:EM: Sending Standalone Ack for MessageCounter:4617498 on exchange 9590i + + Verify in DUT as client side log: + [1657909576.774655][2977:2977] CHIP:IM: Received Read request + [1657909576.774796][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657909576.774850][2977:2977] CHIP:DMG: { + [1657909576.774915][2977:2977] CHIP:DMG: AttributePathIBs = + [1657909576.774968][2977:2977] CHIP:DMG: [ + [1657909576.775017][2977:2977] CHIP:DMG: AttributePathIB = + [1657909576.775094][2977:2977] CHIP:DMG: { + [1657909576.775151][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657909576.775237][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657909576.775303][2977:2977] CHIP:DMG: Attribute = 0x0000_000F, + [1657909576.775362][2977:2977] CHIP:DMG: } + [1657909576.775443][2977:2977] CHIP:DMG: + [1657909576.775502][2977:2977] CHIP:DMG: ], + [1657909576.775560][2977:2977] CHIP:DMG: + [1657909576.775615][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657909576.775687][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657909576.775735][2977:2977] CHIP:DMG: }, + [1657909576.775896][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657909576.776099][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657909576.776178][2977:2977] CHIP:DMG: Cluster 300, Attribute f is dirty + [1657909576.776223][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_000F (expanded=0) + [1657909576.776273][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657909576.776352][2977:2977] CHIP:DMG: AccessControl: allowed + [1657909576.776452][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: @@ -140,9 +366,32 @@ tests: PICS: CC.C.A4000 verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - [1649661325.207404][8018:8023] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4000 DataVersion: 4087274515 - [1649661325.207486][8018:8023] CHIP:TOO: enhanced current hue: 0 - [1649661325.207590][8018:8023] CHIP:EM: Sending Standalone Ack for MessageCounter:2630939 on exchange 50255i + + Verify in DUT as client side log: + [1657909627.086489][2977:2977] CHIP:IM: Received Read request + [1657909627.086602][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657909627.086641][2977:2977] CHIP:DMG: { + [1657909627.086671][2977:2977] CHIP:DMG: AttributePathIBs = + [1657909627.086706][2977:2977] CHIP:DMG: [ + [1657909627.086753][2977:2977] CHIP:DMG: AttributePathIB = + [1657909627.086800][2977:2977] CHIP:DMG: { + [1657909627.086842][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657909627.086898][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657909627.086948][2977:2977] CHIP:DMG: Attribute = 0x0000_4000, + [1657909627.086994][2977:2977] CHIP:DMG: } + [1657909627.087049][2977:2977] CHIP:DMG: + [1657909627.087085][2977:2977] CHIP:DMG: ], + [1657909627.087118][2977:2977] CHIP:DMG: + [1657909627.087181][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657909627.087217][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657909627.087248][2977:2977] CHIP:DMG: }, + [1657909627.087363][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657909627.087508][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657909627.087569][2977:2977] CHIP:DMG: Cluster 300, Attribute 4000 is dirty + [1657909627.087601][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4000 (expanded=0) + [1657909627.087639][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657909627.087694][2977:2977] CHIP:DMG: AccessControl: allowed + [1657909627.087768][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: @@ -151,9 +400,32 @@ tests: PICS: CC.C.A4001 verification: | ./chip-tool colorcontrol read enhanced-color-mode 1 1 - [1649661325.650176][8024:8029] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4001 DataVersion: 4087274515 - [1649661325.650248][8024:8029] CHIP:TOO: enhanced color mode: 2 - [1649661325.650343][8024:8029] CHIP:EM: Sending Standalone Ack for MessageCounter:11538460 on exchange 62879i + + Verify in DUT as client side log: + [1657909652.217887][2977:2977] CHIP:IM: Received Read request + [1657909652.218015][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657909652.218064][2977:2977] CHIP:DMG: { + [1657909652.218104][2977:2977] CHIP:DMG: AttributePathIBs = + [1657909652.218173][2977:2977] CHIP:DMG: [ + [1657909652.218219][2977:2977] CHIP:DMG: AttributePathIB = + [1657909652.218269][2977:2977] CHIP:DMG: { + [1657909652.218320][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657909652.218399][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657909652.218456][2977:2977] CHIP:DMG: Attribute = 0x0000_4001, + [1657909652.218509][2977:2977] CHIP:DMG: } + [1657909652.218578][2977:2977] CHIP:DMG: + [1657909652.218629][2977:2977] CHIP:DMG: ], + [1657909652.218680][2977:2977] CHIP:DMG: + [1657909652.218744][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657909652.218791][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657909652.218832][2977:2977] CHIP:DMG: }, + [1657909652.218978][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657909652.219145][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657909652.219198][2977:2977] CHIP:DMG: Cluster 300, Attribute 4001 is dirty + [1657909652.219254][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4001 (expanded=0) + [1657909652.219305][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657909652.219360][2977:2977] CHIP:DMG: AccessControl: allowed + [1657909652.219467][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: @@ -162,9 +434,32 @@ tests: PICS: CC.C.A4002 verification: | ./chip-tool colorcontrol read color-loop-active 1 1 - [1649661326.093373][8030:8035] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4002 DataVersion: 4087274515 - [1649661326.093437][8030:8035] CHIP:TOO: color loop active: 0 - [1649661326.093510][8030:8035] CHIP:EM: Sending Standalone Ack for MessageCounter:16553834 on exchange 42935i + + Verify in DUT as client side log: + [1657909711.352753][2977:2977] CHIP:IM: Received Read request + [1657909711.352915][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657909711.352973][2977:2977] CHIP:DMG: { + [1657909711.353019][2977:2977] CHIP:DMG: AttributePathIBs = + [1657909711.353095][2977:2977] CHIP:DMG: [ + [1657909711.353146][2977:2977] CHIP:DMG: AttributePathIB = + [1657909711.353209][2977:2977] CHIP:DMG: { + [1657909711.353285][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657909711.353354][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657909711.353419][2977:2977] CHIP:DMG: Attribute = 0x0000_4002, + [1657909711.353497][2977:2977] CHIP:DMG: } + [1657909711.353558][2977:2977] CHIP:DMG: + [1657909711.353616][2977:2977] CHIP:DMG: ], + [1657909711.353692][2977:2977] CHIP:DMG: + [1657909711.353749][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657909711.353801][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657909711.353849][2977:2977] CHIP:DMG: }, + [1657909711.354014][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657909711.354197][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657909711.354275][2977:2977] CHIP:DMG: Cluster 300, Attribute 4002 is dirty + [1657909711.354321][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4002 (expanded=0) + [1657909711.354371][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657909711.354448][2977:2977] CHIP:DMG: AccessControl: allowed + [1657909711.354550][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: @@ -173,9 +468,32 @@ tests: PICS: CC.C.A4003 verification: | ./chip-tool colorcontrol read color-loop-direction 1 1 - [1649661326.532413][8036:8041] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4003 DataVersion: 4087274515 - [1649661326.532493][8036:8041] CHIP:TOO: color loop direction: 0 - [1649661326.532584][8036:8041] CHIP:EM: Sending Standalone Ack for MessageCounter:11662576 on exchange 8707i + + Verify in DUT as client side log: + [1657909741.232136][2977:2977] CHIP:IM: Received Read request + [1657909741.232261][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657909741.232310][2977:2977] CHIP:DMG: { + [1657909741.232367][2977:2977] CHIP:DMG: AttributePathIBs = + [1657909741.232416][2977:2977] CHIP:DMG: [ + [1657909741.232460][2977:2977] CHIP:DMG: AttributePathIB = + [1657909741.232509][2977:2977] CHIP:DMG: { + [1657909741.232578][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657909741.232632][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657909741.232705][2977:2977] CHIP:DMG: Attribute = 0x0000_4003, + [1657909741.232775][2977:2977] CHIP:DMG: } + [1657909741.232827][2977:2977] CHIP:DMG: + [1657909741.232878][2977:2977] CHIP:DMG: ], + [1657909741.232947][2977:2977] CHIP:DMG: + [1657909741.232995][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657909741.233041][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657909741.233105][2977:2977] CHIP:DMG: }, + [1657909741.233240][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657909741.233409][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657909741.233463][2977:2977] CHIP:DMG: Cluster 300, Attribute 4003 is dirty + [1657909741.233502][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4003 (expanded=0) + [1657909741.233552][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657909741.233623][2977:2977] CHIP:DMG: AccessControl: allowed + [1657909741.233711][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: @@ -184,9 +502,32 @@ tests: PICS: CC.C.A4004 verification: | ./chip-tool colorcontrol read color-loop-time 1 1 - [1649661326.969567][8042:8047] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4004 DataVersion: 4087274515 - [1649661326.969644][8042:8047] CHIP:TOO: color loop time: 25 - [1649661326.969727][8042:8047] CHIP:EM: Sending Standalone Ack for MessageCounter:4589470 on exchange 61174i + + Verify in DUT as client side log: + [1657909771.649273][2977:2977] CHIP:IM: Received Read request + [1657909771.649413][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657909771.649468][2977:2977] CHIP:DMG: { + [1657909771.649542][2977:2977] CHIP:DMG: AttributePathIBs = + [1657909771.649600][2977:2977] CHIP:DMG: [ + [1657909771.649650][2977:2977] CHIP:DMG: AttributePathIB = + [1657909771.649725][2977:2977] CHIP:DMG: { + [1657909771.649784][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657909771.649853][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657909771.649936][2977:2977] CHIP:DMG: Attribute = 0x0000_4004, + [1657909771.649997][2977:2977] CHIP:DMG: } + [1657909771.650055][2977:2977] CHIP:DMG: + [1657909771.650128][2977:2977] CHIP:DMG: ], + [1657909771.650188][2977:2977] CHIP:DMG: + [1657909771.650243][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657909771.650316][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657909771.650365][2977:2977] CHIP:DMG: }, + [1657909771.650530][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657909771.650710][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657909771.650770][2977:2977] CHIP:DMG: Cluster 300, Attribute 4004 is dirty + [1657909771.650814][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4004 (expanded=0) + [1657909771.650888][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657909771.650954][2977:2977] CHIP:DMG: AccessControl: allowed + [1657909771.651052][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: @@ -195,9 +536,32 @@ tests: PICS: CC.C.A4005 verification: | ./chip-tool colorcontrol read color-loop-start-enhanced-hue 1 1 - [1649661327.720397][8049:8054] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4005 DataVersion: 4087274515 - [1649661327.720479][8049:8054] CHIP:TOO: color loop start enhanced hue: 8960 - [1649661327.720572][8049:8054] CHIP:EM: Sending Standalone Ack for MessageCounter:14858381 on exchange 47470i + + Verify in DUT as client side log: + [1657909997.529812][2977:2977] CHIP:IM: Received Read request + [1657909997.530002][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657909997.530053][2977:2977] CHIP:DMG: { + [1657909997.530093][2977:2977] CHIP:DMG: AttributePathIBs = + [1657909997.530145][2977:2977] CHIP:DMG: [ + [1657909997.530189][2977:2977] CHIP:DMG: AttributePathIB = + [1657909997.530243][2977:2977] CHIP:DMG: { + [1657909997.530298][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657909997.530358][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657909997.530416][2977:2977] CHIP:DMG: Attribute = 0x0000_4005, + [1657909997.530470][2977:2977] CHIP:DMG: } + [1657909997.530521][2977:2977] CHIP:DMG: + [1657909997.530571][2977:2977] CHIP:DMG: ], + [1657909997.530677][2977:2977] CHIP:DMG: + [1657909997.530708][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657909997.530737][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657909997.530821][2977:2977] CHIP:DMG: }, + [1657909997.530943][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657909997.531048][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657909997.531081][2977:2977] CHIP:DMG: Cluster 300, Attribute 4005 is dirty + [1657909997.531105][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4005 (expanded=0) + [1657909997.531139][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657909997.531175][2977:2977] CHIP:DMG: AccessControl: allowed + [1657909997.531238][2977:2977] CHIP:DMG: Sending report (payload has 39 bytes)... disabled: true - label: @@ -206,18 +570,64 @@ tests: PICS: CC.C.A4006 verification: | ./chip-tool colorcontrol read color-loop-stored-enhanced-hue 1 1 - [1649661328.161450][8055:8060] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4006 DataVersion: 4087274515 - [1649661328.161530][8055:8060] CHIP:TOO: color loop stored enhanced hue: 0 - [1649661328.161618][8055:8060] CHIP:EM: Sending Standalone Ack for MessageCounter:10650326 on exchange 16955i + + Verify in DUT as client side log: + [1657910020.977065][2977:2977] CHIP:IM: Received Read request + [1657910020.977155][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910020.977187][2977:2977] CHIP:DMG: { + [1657910020.977213][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910020.977249][2977:2977] CHIP:DMG: [ + [1657910020.977277][2977:2977] CHIP:DMG: AttributePathIB = + [1657910020.977313][2977:2977] CHIP:DMG: { + [1657910020.977349][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910020.977390][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910020.977432][2977:2977] CHIP:DMG: Attribute = 0x0000_4006, + [1657910020.977470][2977:2977] CHIP:DMG: } + [1657910020.977499][2977:2977] CHIP:DMG: + [1657910020.977524][2977:2977] CHIP:DMG: ], + [1657910020.977556][2977:2977] CHIP:DMG: + [1657910020.977587][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910020.977619][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910020.977646][2977:2977] CHIP:DMG: }, + [1657910020.977738][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910020.977852][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910020.977889][2977:2977] CHIP:DMG: Cluster 300, Attribute 4006 is dirty + [1657910020.977913][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4006 (expanded=0) + [1657910020.977947][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910020.977985][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910020.978052][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT reads from the TH the (0x400a) ColorCapabilities attribute" PICS: CC.C.A400a verification: | ./chip-tool colorcontrol read color-capabilities 1 1 - [1649661328.603843][8061:8066] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_400A DataVersion: 4087274515 - [1649661328.603925][8061:8066] CHIP:TOO: color capabilities: 0 - [1649661328.604011][8061:8066] CHIP:EM: Sending Standalone Ack for MessageCounter:9437585 on exchange 42028i + + Verify in DUT as client side log: + [1657910072.897195][2977:2977] CHIP:IM: Received Read request + [1657910072.897323][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910072.897371][2977:2977] CHIP:DMG: { + [1657910072.897411][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910072.897459][2977:2977] CHIP:DMG: [ + [1657910072.897502][2977:2977] CHIP:DMG: AttributePathIB = + [1657910072.897552][2977:2977] CHIP:DMG: { + [1657910072.897604][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910072.897662][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910072.897718][2977:2977] CHIP:DMG: Attribute = 0x0000_400A, + [1657910072.897766][2977:2977] CHIP:DMG: } + [1657910072.897818][2977:2977] CHIP:DMG: + [1657910072.897865][2977:2977] CHIP:DMG: ], + [1657910072.897916][2977:2977] CHIP:DMG: + [1657910072.897963][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910072.898010][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910072.898053][2977:2977] CHIP:DMG: }, + [1657910072.898187][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910072.898330][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910072.898381][2977:2977] CHIP:DMG: Cluster 300, Attribute 400a is dirty + [1657910072.898420][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_400A (expanded=0) + [1657910072.898470][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910072.898525][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910072.898615][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: @@ -226,10 +636,32 @@ tests: PICS: CC.C.A400b verification: | ./chip-tool colorcontrol read color-temp-physical-min-mireds 1 1 - [1649661329.039107][8067:8072] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_400B DataVersion: 4087274515 - [1649661329.039188][8067:8072] CHIP:TOO: ColorTempPhysicalMinMireds: 0 - [1649661329.039388][8067:8072] CHIP:EM: Sending Standalone Ack for MessageCounter:511360 on exchange 35476i + Verify in DUT as client side log: + [1657910109.902989][2977:2977] CHIP:IM: Received Read request + [1657910109.903095][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910109.903134][2977:2977] CHIP:DMG: { + [1657910109.903161][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910109.903199][2977:2977] CHIP:DMG: [ + [1657910109.903234][2977:2977] CHIP:DMG: AttributePathIB = + [1657910109.903274][2977:2977] CHIP:DMG: { + [1657910109.903315][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910109.903367][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910109.903413][2977:2977] CHIP:DMG: Attribute = 0x0000_400B, + [1657910109.903455][2977:2977] CHIP:DMG: } + [1657910109.903496][2977:2977] CHIP:DMG: + [1657910109.903533][2977:2977] CHIP:DMG: ], + [1657910109.903574][2977:2977] CHIP:DMG: + [1657910109.903612][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910109.903649][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910109.903683][2977:2977] CHIP:DMG: }, + [1657910109.903792][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910109.903912][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910109.903956][2977:2977] CHIP:DMG: Cluster 300, Attribute 400b is dirty + [1657910109.903989][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_400B (expanded=0) + [1657910109.904030][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910109.904110][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910109.904190][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: @@ -239,11 +671,31 @@ tests: verification: | ./chip-tool colorcontrol read color-temp-physical-max-mireds 1 1 - - [1649661329.475308][8073:8078] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_400C DataVersion: 4087274515 - [1649661329.475388][8073:8078] CHIP:TOO: ColorTempPhysicalMaxMireds: 65279 - - [1649661329.475476][8073:8078] CHIP:EM: Sending Standalone Ack for MessageCounter:14879622 on exchange 59016i + Verify in DUT as client side log: + [1657910176.514563][2977:2977] CHIP:IM: Received Read request + [1657910176.514690][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910176.514738][2977:2977] CHIP:DMG: { + [1657910176.514779][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910176.514826][2977:2977] CHIP:DMG: [ + [1657910176.514869][2977:2977] CHIP:DMG: AttributePathIB = + [1657910176.514919][2977:2977] CHIP:DMG: { + [1657910176.514970][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910176.515028][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910176.515084][2977:2977] CHIP:DMG: Attribute = 0x0000_400C, + [1657910176.515137][2977:2977] CHIP:DMG: } + [1657910176.515188][2977:2977] CHIP:DMG: + [1657910176.515238][2977:2977] CHIP:DMG: ], + [1657910176.515289][2977:2977] CHIP:DMG: + [1657910176.515336][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910176.515382][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910176.515418][2977:2977] CHIP:DMG: }, + [1657910176.515548][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910176.515692][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910176.515743][2977:2977] CHIP:DMG: Cluster 300, Attribute 400c is dirty + [1657910176.515782][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_400C (expanded=0) + [1657910176.515828][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910176.515881][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910176.515971][2977:2977] CHIP:DMG: Sending report (payload has 39 bytes)... disabled: true - label: @@ -252,9 +704,32 @@ tests: PICS: CC.C.A400d verification: | ./chip-tool colorcontrol read couple-color-temp-to-level-min-mireds 1 1 - [1649661329.915861][8079:8084] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_400D DataVersion: 4087274515 - [1649661329.915947][8079:8084] CHIP:TOO: couple color temp to level min-mireds: 0 - [1649661329.916065][8079:8084] CHIP:EM: Sending Standalone Ack for MessageCounter:1722601 on exchange 3570i + + Verify in DUT as client side log: + [1657910205.278279][2977:2977] CHIP:IM: Received Read request + [1657910205.278421][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910205.278474][2977:2977] CHIP:DMG: { + [1657910205.278520][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910205.278578][2977:2977] CHIP:DMG: [ + [1657910205.278628][2977:2977] CHIP:DMG: AttributePathIB = + [1657910205.278684][2977:2977] CHIP:DMG: { + [1657910205.278743][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910205.278809][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910205.278874][2977:2977] CHIP:DMG: Attribute = 0x0000_400D, + [1657910205.279008][2977:2977] CHIP:DMG: } + [1657910205.279068][2977:2977] CHIP:DMG: + [1657910205.279122][2977:2977] CHIP:DMG: ], + [1657910205.279180][2977:2977] CHIP:DMG: + [1657910205.279234][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910205.279328][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910205.279380][2977:2977] CHIP:DMG: }, + [1657910205.279527][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910205.279685][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910205.279920][2977:2977] CHIP:DMG: Cluster 300, Attribute 400d is dirty + [1657910205.279968][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_400D (expanded=0) + [1657910205.280139][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910205.280211][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910205.280314][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: @@ -263,18 +738,64 @@ tests: PICS: CC.C.A4010 verification: | ./chip-tool colorcontrol read start-up-color-temperature-mireds 1 1 - [1649661330.348224][8085:8090] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4010 DataVersion: 4087274515 - [1649661330.348301][8085:8090] CHIP:TOO: start up color temperature mireds: 0 - [1649661330.348390][8085:8090] CHIP:EM: Sending Standalone Ack for MessageCounter:15367381 on exchange 8592i + + Verify in DUT as client side log: + [1657910246.097315][2977:2977] CHIP:IM: Received Read request + [1657910246.097460][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910246.097516][2977:2977] CHIP:DMG: { + [1657910246.097562][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910246.097616][2977:2977] CHIP:DMG: [ + [1657910246.097666][2977:2977] CHIP:DMG: AttributePathIB = + [1657910246.097728][2977:2977] CHIP:DMG: { + [1657910246.097790][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910246.097852][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910246.097916][2977:2977] CHIP:DMG: Attribute = 0x0000_4010, + [1657910246.097982][2977:2977] CHIP:DMG: } + [1657910246.098045][2977:2977] CHIP:DMG: + [1657910246.098099][2977:2977] CHIP:DMG: ], + [1657910246.098158][2977:2977] CHIP:DMG: + [1657910246.098213][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910246.098266][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910246.098315][2977:2977] CHIP:DMG: }, + [1657910246.098461][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910246.098624][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910246.098684][2977:2977] CHIP:DMG: Cluster 300, Attribute 4010 is dirty + [1657910246.098728][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4010 (expanded=0) + [1657910246.098785][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910246.098846][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910246.098946][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT reads from the TH the (0x0010) NumberOfPrimaries attribute" PICS: CC.C.A0010 verification: | ./chip-tool colorcontrol read number-of-primaries 1 1 - [1649661330.790716][8091:8096] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0010 DataVersion: 4087274515 - [1649661330.790792][8091:8096] CHIP:TOO: number of primaries: 0 - [1649661330.790894][8091:8096] CHIP:EM: Sending Standalone Ack for MessageCounter:4700740 on exchange 8440i + + Verify in DUT as client side log: + [1657910445.890552][2977:2977] CHIP:IM: Received Read request + [1657910445.890635][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910445.890664][2977:2977] CHIP:DMG: { + [1657910445.890686][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910445.890713][2977:2977] CHIP:DMG: [ + [1657910445.890737][2977:2977] CHIP:DMG: AttributePathIB = + [1657910445.890764][2977:2977] CHIP:DMG: { + [1657910445.890792][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910445.890830][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910445.890867][2977:2977] CHIP:DMG: Attribute = 0x0000_0010, + [1657910445.890896][2977:2977] CHIP:DMG: } + [1657910445.890924][2977:2977] CHIP:DMG: + [1657910445.890950][2977:2977] CHIP:DMG: ], + [1657910445.890978][2977:2977] CHIP:DMG: + [1657910445.891006][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910445.891031][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910445.891054][2977:2977] CHIP:DMG: }, + [1657910445.891135][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910445.891242][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910445.891275][2977:2977] CHIP:DMG: Cluster 300, Attribute 10 is dirty + [1657910445.891297][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0010 (expanded=0) + [1657910445.891327][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910445.891361][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910445.891422][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT reads from the TH the (0x0011) Primary1X attribute" @@ -282,10 +803,31 @@ tests: verification: | ./chip-tool colorcontrol read primary1x 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0011 DataVersion: 540305990 - [1651483665.109697][3245:3250] CHIP:TOO: primary 1 x: 0 - [1651483665.109797][3245:3250] CHIP:EM: Sending Standalone Ack for MessageCounter:12731123 on exchange 55053i + Verify in DUT as client side log: + [1657910568.808716][2977:2977] CHIP:IM: Received Read request + [1657910568.808876][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910568.809073][2977:2977] CHIP:DMG: { + [1657910568.809131][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910568.809193][2977:2977] CHIP:DMG: [ + [1657910568.809243][2977:2977] CHIP:DMG: AttributePathIB = + [1657910568.809308][2977:2977] CHIP:DMG: { + [1657910568.809375][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910568.809461][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910568.809539][2977:2977] CHIP:DMG: Attribute = 0x0000_0011, + [1657910568.809621][2977:2977] CHIP:DMG: } + [1657910568.809691][2977:2977] CHIP:DMG: + [1657910568.809754][2977:2977] CHIP:DMG: ], + [1657910568.809823][2977:2977] CHIP:DMG: + [1657910568.809886][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910568.809950][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910568.810007][2977:2977] CHIP:DMG: }, + [1657910568.810175][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910568.810365][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910568.810433][2977:2977] CHIP:DMG: Cluster 300, Attribute 11 is dirty + [1657910568.810484][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0011 (expanded=0) + [1657910568.810548][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910568.810618][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910568.810719][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT reads from the TH the (0x0012) Primary1Y attribute" @@ -293,9 +835,31 @@ tests: verification: | ./chip-tool colorcontrol read primary1y 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0012 DataVersion: 540305990 - [1651483698.733322][3253:3259] CHIP:TOO: primary 1 y: 0 - [1651483698.733420][3253:3259] CHIP:EM: Sending Standalone Ack for MessageCounter:7863787 on exchange 13103i + Verify in DUT as client side log: + [1657910588.961223][2977:2977] CHIP:IM: Received Read request + [1657910588.961366][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910588.961422][2977:2977] CHIP:DMG: { + [1657910588.961468][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910588.961522][2977:2977] CHIP:DMG: [ + [1657910588.961572][2977:2977] CHIP:DMG: AttributePathIB = + [1657910588.961633][2977:2977] CHIP:DMG: { + [1657910588.961692][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910588.961757][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910588.961828][2977:2977] CHIP:DMG: Attribute = 0x0000_0012, + [1657910588.961895][2977:2977] CHIP:DMG: } + [1657910588.961955][2977:2977] CHIP:DMG: + [1657910588.962012][2977:2977] CHIP:DMG: ], + [1657910588.962070][2977:2977] CHIP:DMG: + [1657910588.962125][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910588.962177][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910588.962226][2977:2977] CHIP:DMG: }, + [1657910588.962370][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910588.962529][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910588.962715][2977:2977] CHIP:DMG: Cluster 300, Attribute 12 is dirty + [1657910588.962764][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0012 (expanded=0) + [1657910588.962822][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910588.962885][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910588.962985][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT reads from the TH the (0x0013) Primary1Intensity attribute" @@ -303,10 +867,31 @@ tests: verification: | ./chip-tool colorcontrol read primary1intensity 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0013 DataVersion: 540305990 - [1651483742.297459][3263:3268] CHIP:TOO: primary 1 intensity: 0 - [1651483742.297558][3263:3268] CHIP:EM: Sending Standalone Ack for MessageCounter:10210809 on exchange 7007i + Verify in DUT as client side log: + [1657910622.925613][2977:2977] CHIP:IM: Received Read request + [1657910622.925739][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910622.925788][2977:2977] CHIP:DMG: { + [1657910622.925827][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910622.925874][2977:2977] CHIP:DMG: [ + [1657910622.925918][2977:2977] CHIP:DMG: AttributePathIB = + [1657910622.925973][2977:2977] CHIP:DMG: { + [1657910622.926028][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910622.926088][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910622.926144][2977:2977] CHIP:DMG: Attribute = 0x0000_0013, + [1657910622.926197][2977:2977] CHIP:DMG: } + [1657910622.926249][2977:2977] CHIP:DMG: + [1657910622.926359][2977:2977] CHIP:DMG: ], + [1657910622.926413][2977:2977] CHIP:DMG: + [1657910622.926572][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910622.926623][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910622.926718][2977:2977] CHIP:DMG: }, + [1657910622.926850][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910622.926998][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910622.927049][2977:2977] CHIP:DMG: Cluster 300, Attribute 13 is dirty + [1657910622.927137][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0013 (expanded=0) + [1657910622.927192][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910622.927246][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910622.927384][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT reads from the TH the (0x0015) Primary2X attribute" @@ -314,9 +899,31 @@ tests: verification: | ./chip-tool colorcontrol read primary2x 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0015 DataVersion: 540305990 - [1651483777.233498][3270:3275] CHIP:TOO: primary 2 x: 0 - [1651483777.233614][3270:3275] CHIP:EM: Sending Standalone Ack for MessageCounter:1684573 on exchange 21377i + Verify in DUT as client side log: + [1657910659.885682][2977:2977] CHIP:IM: Received Read request + [1657910659.885821][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910659.885876][2977:2977] CHIP:DMG: { + [1657910659.885922][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910659.885976][2977:2977] CHIP:DMG: [ + [1657910659.886027][2977:2977] CHIP:DMG: AttributePathIB = + [1657910659.886089][2977:2977] CHIP:DMG: { + [1657910659.886151][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910659.886215][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910659.886287][2977:2977] CHIP:DMG: Attribute = 0x0000_0015, + [1657910659.886354][2977:2977] CHIP:DMG: } + [1657910659.886414][2977:2977] CHIP:DMG: + [1657910659.886467][2977:2977] CHIP:DMG: ], + [1657910659.886526][2977:2977] CHIP:DMG: + [1657910659.886581][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910659.886633][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910659.886803][2977:2977] CHIP:DMG: }, + [1657910659.886955][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910659.887119][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910659.887178][2977:2977] CHIP:DMG: Cluster 300, Attribute 15 is dirty + [1657910659.887222][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0015 (expanded=0) + [1657910659.887278][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910659.887339][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910659.887439][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT reads from the TH the (0x0016) Primary2Y attribute" @@ -324,10 +931,31 @@ tests: verification: | ./chip-tool colorcontrol read primary2y 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0016 DataVersion: 540305990 - [1651483805.650796][3279:3284] CHIP:TOO: primary 2 y: 0 - [1651483805.650942][3279:3284] CHIP:EM: Sending Standalone Ack for MessageCounter:16277541 on exchange 10435i + Verify in DUT as client side log: + [1657910687.168648][2977:2977] CHIP:IM: Received Read request + [1657910687.168754][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910687.168793][2977:2977] CHIP:DMG: { + [1657910687.168825][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910687.168863][2977:2977] CHIP:DMG: [ + [1657910687.168898][2977:2977] CHIP:DMG: AttributePathIB = + [1657910687.168937][2977:2977] CHIP:DMG: { + [1657910687.168979][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910687.169032][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910687.169078][2977:2977] CHIP:DMG: Attribute = 0x0000_0016, + [1657910687.169114][2977:2977] CHIP:DMG: } + [1657910687.169157][2977:2977] CHIP:DMG: + [1657910687.169196][2977:2977] CHIP:DMG: ], + [1657910687.169237][2977:2977] CHIP:DMG: + [1657910687.169275][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910687.169312][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910687.169346][2977:2977] CHIP:DMG: }, + [1657910687.169453][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910687.169572][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910687.169613][2977:2977] CHIP:DMG: Cluster 300, Attribute 16 is dirty + [1657910687.169645][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0016 (expanded=0) + [1657910687.169685][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910687.169731][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910687.169804][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT reads from the TH the (0x0017) Primary2Intensity attribute" @@ -335,10 +963,31 @@ tests: verification: | ./chip-tool colorcontrol read primary2intensity 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0017 DataVersion: 540305990 - [1651483834.596380][3285:3290] CHIP:TOO: primary 2 intensity: 0 - [1651483834.596470][3285:3290] CHIP:EM: Sending Standalone Ack for MessageCounter:5986355 on exchange 855i + Verify in DUT as client side log: + [1657910837.125032][2977:2977] CHIP:IM: Received Read request + [1657910837.125157][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657910837.125206][2977:2977] CHIP:DMG: { + [1657910837.125246][2977:2977] CHIP:DMG: AttributePathIBs = + [1657910837.125293][2977:2977] CHIP:DMG: [ + [1657910837.125337][2977:2977] CHIP:DMG: AttributePathIB = + [1657910837.125387][2977:2977] CHIP:DMG: { + [1657910837.125438][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657910837.125502][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657910837.125559][2977:2977] CHIP:DMG: Attribute = 0x0000_0017, + [1657910837.125613][2977:2977] CHIP:DMG: } + [1657910837.125664][2977:2977] CHIP:DMG: + [1657910837.125711][2977:2977] CHIP:DMG: ], + [1657910837.125762][2977:2977] CHIP:DMG: + [1657910837.125810][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657910837.125856][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657910837.125898][2977:2977] CHIP:DMG: }, + [1657910837.126026][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657910837.126169][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657910837.126221][2977:2977] CHIP:DMG: Cluster 300, Attribute 17 is dirty + [1657910837.126259][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0017 (expanded=0) + [1657910837.126309][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657910837.126365][2977:2977] CHIP:DMG: AccessControl: allowed + [1657910837.126452][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT reads from the TH the (0x0019) Primary3X attribute" @@ -346,10 +995,24 @@ tests: verification: | ./chip-tool colorcontrol read primary3x 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0019 DataVersion: 540305990 - [1651483937.072323][3298:3303] CHIP:TOO: primary 3 x: 0 - [1651483937.072405][3298:3303] CHIP:EM: Sending Standalone Ack for MessageCounter:6092298 on exchange 12519i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0019, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the (0x001a) Primary3Y attribute" @@ -357,9 +1020,24 @@ tests: verification: | ./chip-tool colorcontrol read primary3y 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_001A DataVersion: 540305990 - [1651483967.386334][3305:3310] CHIP:TOO: primary 3 y: 0 - [1651483967.386427][3305:3310] CHIP:EM: Sending Standalone Ack for MessageCounter:3329418 on exchange 11657i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300 + CHIP:DMG: Attribute = 0x0000_001A, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the (0x001b) Primary3Intensity attribute" @@ -367,9 +1045,24 @@ tests: verification: | ./chip-tool colorcontrol read primary3intensity 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_001B DataVersion: 540305990 - [1651484113.812178][3316:3321] CHIP:TOO: primary 3 intensity: 0 - [1651484113.812270][3316:3321] CHIP:EM: Sending Standalone Ack for MessageCounter:41658 on exchange 9618i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_001B, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the (0x0020) Primary4X attribute" @@ -377,9 +1070,24 @@ tests: verification: | ./chip-tool colorcontrol read primary4x 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0020 DataVersion: 540305990 - [1651484143.778301][3324:3329] CHIP:TOO: primary 4 x: 0 - [1651484143.778392][3324:3329] CHIP:EM: Sending Standalone Ack for MessageCounter:2094184 on exchange 50270i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0020, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the (0x0021) Primary4Y attribute" @@ -387,9 +1095,24 @@ tests: verification: | ./chip-tool colorcontrol read primary4y 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0021 DataVersion: 540305990 - [1651484171.921901][3334:3339] CHIP:TOO: primary 4 y: 0 - [1651484171.921984][3334:3339] CHIP:EM: Sending Standalone Ack for MessageCounter:3701827 on exchange 16726i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0021, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the (0x0022) Primary4Intensity attribute" @@ -397,9 +1120,24 @@ tests: verification: | ./chip-tool colorcontrol read primary4intensity 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0022 DataVersion: 540305990 - [1651484198.443415][3341:3346] CHIP:TOO: primary 4 intensity: 0 - [1651484198.443528][3341:3346] CHIP:EM: Sending Standalone Ack for MessageCounter:1740063 on exchange 36245i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0022, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the (0x0024) Primary5X attribute" @@ -407,9 +1145,24 @@ tests: verification: | ./chip-tool colorcontrol read primary5x 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0024 DataVersion: 540305990 - [1651484241.467661][3350:3355] CHIP:TOO: primary 5 x: 0 - [1651484241.467788][3350:3355] CHIP:EM: Sending Standalone Ack for MessageCounter:5350139 on exchange 63040i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0024, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the (0x0025) Primary5Y attribute" @@ -417,10 +1170,24 @@ tests: verification: | ./chip-tool colorcontrol read primary5y 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0025 DataVersion: 540305990 - [1651484286.709863][3358:3363] CHIP:TOO: primary 5 y: 0 - [1651484286.709964][3358:3363] CHIP:EM: Sending Standalone Ack for MessageCounter:7199124 on exchange 47604i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0025, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the (0x0026) Primary5Intensity attribute" @@ -428,10 +1195,24 @@ tests: verification: | ./chip-tool colorcontrol read primary5intensity 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0026 DataVersion: 540305990 - [1651484304.715731][3365:3370] CHIP:TOO: primary 5 intensity: 0 - [1651484304.715829][3365:3370] CHIP:EM: Sending Standalone Ack for MessageCounter:8654922 on exchange 29272i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0026, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the (0x0028) Primary6X attribute" @@ -439,10 +1220,24 @@ tests: verification: | ./chip-tool colorcontrol read primary6x 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0028 DataVersion: 540305990 - [1651484349.601181][3372:3377] CHIP:TOO: primary 6 x: 0 - [1651484349.601269][3372:3377] CHIP:EM: Sending Standalone Ack for MessageCounter:13704291 on exchange 30507i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0028, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the (0x0029) Primary6Y attribute" @@ -450,9 +1245,24 @@ tests: verification: | ./chip-tool colorcontrol read primary6y 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0028 DataVersion: 540305990 - [1651484349.601181][3372:3377] CHIP:TOO: primary 6 x: 0 - [1651484349.601269][3372:3377] CHIP:EM: Sending Standalone Ack for MessageCounter:13704291 on exchange 30507i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0029, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the (0x002a) Primary6Intensity attribute" @@ -460,9 +1270,24 @@ tests: verification: | ./chip-tool colorcontrol read primary6intensity 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_002A DataVersion: 540305990 - [1651484392.490974][3378:3383] CHIP:TOO: primary 6 intensity: 0 - [1651484392.491074][3378:3383] CHIP:EM: Sending Standalone Ack for MessageCounter:2427165 on exchange 17769i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_002a, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the Optional (0x0030) WhitePointX attribute" @@ -470,10 +1295,24 @@ tests: verification: | ./chip-tool colorcontrol read white-point-x 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0030 DataVersion: 540305990 - [1651484447.853097][3389:3394] CHIP:TOO: white point x: 0 - [1651484447.853201][3389:3394] CHIP:EM: Sending Standalone Ack for MessageCounter:2187963 on exchange 39418i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0030, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: "DUT reads from the TH the Optional (0x0031) WhitePointY attribute" @@ -481,9 +1320,24 @@ tests: verification: | ./chip-tool colorcontrol read white-point-y 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0031 DataVersion: 540305990 - [1651484493.098722][3397:3402] CHIP:TOO: white point y: 0 - [1651484493.098838][3397:3402] CHIP:EM: Sending Standalone Ack for MessageCounter:13416692 on exchange 58975i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0031, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: @@ -492,10 +1346,24 @@ tests: verification: | ./chip-tool colorcontrol read color-point-rx 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0032 DataVersion: 540305990 - [1651484549.019811][3407:3412] CHIP:TOO: color point r x: 0 - [1651484549.019946][3407:3412] CHIP:EM: Sending Standalone Ack for MessageCounter:3393967 on exchange 29393i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0032, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: @@ -504,10 +1372,24 @@ tests: verification: | ./chip-tool colorcontrol read color-point-ry 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0033 DataVersion: 540305990 - [1651484569.809289][3413:3418] CHIP:TOO: color point r y: 0 - [1651484569.809368][3413:3418] CHIP:EM: Sending Standalone Ack for MessageCounter:5190611 on exchange 55680i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0033, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: @@ -517,10 +1399,24 @@ tests: verification: | ./chip-tool colorcontrol read color-point-rintensity 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0034 DataVersion: 540305990 - [1651484618.450366][3424:3429] CHIP:TOO: color point r intensity: 0 - [1651484618.450496][3424:3429] CHIP:EM: Sending Standalone Ack for MessageCounter:7795217 on exchange 46127i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0034, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: @@ -529,10 +1425,24 @@ tests: verification: | ./chip-tool colorcontrol read color-point-gx 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0036 DataVersion: 540305990 - [1651484661.163449][3438:3443] CHIP:TOO: color point g x: 0 - [1651484661.163534][3438:3443] CHIP:EM: Sending Standalone Ack for MessageCounter:8020365 on exchange 14427i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0036, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: @@ -541,10 +1451,24 @@ tests: verification: | ./chip-tool colorcontrol read color-point-gy 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0037 DataVersion: 540305990 - [1651484675.995507][3444:3449] CHIP:TOO: color point g y: 0 - [1651484675.995585][3444:3449] CHIP:EM: Sending Standalone Ack for MessageCounter:5358119 on exchange 45686i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0037, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: @@ -554,10 +1478,24 @@ tests: verification: | ./chip-tool colorcontrol read color-point-gintensity 1 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0038 DataVersion: 540305990 - [1651484700.811165][3451:3456] CHIP:TOO: color point g intensity: 0 - [1651484700.811283][3451:3456] CHIP:EM: Sending Standalone Ack for MessageCounter:3831934 on exchange 46053i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_0038, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: @@ -566,9 +1504,24 @@ tests: verification: | ./chip-tool colorcontrol read color-point-bx 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_003A DataVersion: 540305990 - [1651484728.014850][3459:3464] CHIP:TOO: color point b x: 0 - [1651484728.014978][3459:3464] CHIP:EM: Sending Standalone Ack for MessageCounter:16345213 on exchange 13i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_003a, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: @@ -577,9 +1530,24 @@ tests: verification: | ./chip-tool colorcontrol read color-point-by 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_003B DataVersion: 540305990 - [1651484766.975812][3469:3474] CHIP:TOO: color point b y: 0 - [1651484766.975908][3469:3474] CHIP:EM: Sending Standalone Ack for MessageCounter:13904476 on exchange 17909i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_003b, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true - label: @@ -589,7 +1557,22 @@ tests: verification: | ./chip-tool colorcontrol read color-point-bintensity 1 1 - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_003B DataVersion: 540305990 - [1651484766.975812][3469:3474] CHIP:TOO: color point b y: 0 - [1651484766.975908][3469:3474] CHIP:EM: Sending Standalone Ack for MessageCounter:13904476 on exchange 17909i + Verify in DUT as client side log: + CHIP:IM: Received Read request + CHIP:DMG: ReadRequestMessage = + CHIP:DMG: { + CHIP:DMG: AttributePathIBs = + CHIP:DMG: [ + CHIP:DMG: AttributePathIB = + CHIP:DMG: { + CHIP:DMG: Endpoint = 0x1, + CHIP:DMG: Cluster = 0x300, + CHIP:DMG: Attribute = 0x0000_003c, + CHIP:DMG: } + CHIP:DMG: + CHIP:DMG: ], + CHIP:DMG: + CHIP:DMG: isFabricFiltered = true, + CHIP:DMG: InteractionModelRevision = 1 + CHIP:DMG: }, disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml index 4872048e0a3c34..fefa5d3edce2c6 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml @@ -18,6 +18,19 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + timeout: 150 + hueShortestDistance: + type: int8u + defaultValue: 150 + hueLongestDistance: + type: int8u + defaultValue: 200 + hueDirectionUp: + type: int8u + defaultValue: 250 + hueDirectionDown: + type: int8u + defaultValue: 170 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,23 +52,32 @@ tests: response: value: 1 - - label: "Reads CurrentHue attribute from DUT" - PICS: CC.S.A0000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move to hue shortest distance command" - PICS: CC.S.C00.Rsp + - label: + "TH sends MoveToHue command to DUT another Hue with Direction Shortest + distance and TransitionTime 300" + PICS: CC.S.F00 && CC.S.C00.Rsp command: "MoveToHue" arguments: values: - name: "hue" - value: 150 + value: hueShortestDistance - name: "Direction" value: 0 - name: "TransitionTime" @@ -65,73 +87,66 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 290ms" + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 290 + value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 295ms" + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 295 + value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 300ms" + - label: "Wait 20s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 300 + value: 20000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 + value: hueShortestDistance - - label: "Move to hue longest distance command" + - label: + "TH sends MoveToHue command to DUT another Hue with Direction Longest + distance and TransitionTime 300" command: "MoveToHue" - PICS: CC.S.C00.Rsp + PICS: CC.S.F00 && CC.S.C00.Rsp arguments: values: - name: "hue" - value: 200 + value: hueLongestDistance - name: "Direction" value: 1 - name: "TransitionTime" @@ -141,73 +156,66 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 290ms" + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 290 + value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT." + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 295ms" + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 295 + value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT." + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 300ms" + - label: "Wait 20s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 300 + value: 20000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT." + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 + value: hueLongestDistance - - label: "Move to hue up command" + - label: + "TH sends MoveToHue command to DUT another Hue with Direction Up and + TransitionTime 300" command: "MoveToHue" - PICS: CC.S.C00.Rsp + PICS: CC.S.F00 && CC.S.C00.Rsp arguments: values: - name: "hue" - value: 250 + value: hueDirectionUp - name: "Direction" value: 2 - name: "TransitionTime" @@ -217,73 +225,66 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 290ms" + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 290 + value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 295ms" + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 295 + value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 300ms" + - label: "Wait 20s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 300 + value: 20000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 + value: hueDirectionUp - - label: "Move to hue down command" + - label: + "TH sends MoveToHue command to DUT another Hue with Direction Down and + TransitionTime 300" command: "MoveToHue" - PICS: CC.S.C00.Rsp + PICS: CC.S.F00 && CC.S.C00.Rsp arguments: values: - name: "hue" - value: 225 + value: hueDirectionDown - name: "Direction" value: 3 - name: "TransitionTime" @@ -293,65 +294,56 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 290ms" + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 290 + value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 295ms" + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 295 + value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 300ms" + - label: "Wait 20s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 300 + value: 20000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 + value: hueDirectionDown - label: "Turn off light that we turned on" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml index 051fdd936354c3..9295e1d7282cab 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateConfigValue: + type: enum8 + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,311 +42,254 @@ tests: response: value: 1 - - label: "Reads CurrentHue attribute from DUT" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentHue attribute from DUT" command: "readAttribute" - PICS: CC.S.A0000 + PICS: CC.S.F00 && CC.S.A0000 attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move hue up command" - PICS: CC.S.C01.Rsp + - label: "TH sends MoveHue command to DUT with MoveMode Up" + PICS: CC.S.F00 && CC.S.C01.Rsp command: "MoveHue" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 140ms" + - label: "Wait 3000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 140 + value: 3000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 145ms" + - label: "Wait 2000" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 145 + value: 2000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 150ms" + - label: "Wait 3000" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 150 + value: 3000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move hue stop command" - PICS: CC.S.C01.Rsp + - label: "TH sends MoveHue command to DUT with MoveMode Stop" + PICS: CC.S.F00 && CC.S.C01.Rsp command: "MoveHue" arguments: values: - name: "MoveMode" value: 0 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 140ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 140 + value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: + saveAs: CurrentHueValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 145ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 145 + value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Wait 150ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 150 + value: CurrentHueValue - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 - command: "readAttribute" - attribute: "CurrentHue" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Move hue down command" - PICS: CC.S.C01.Rsp + - label: "TH sends MoveHue command to DUT with MoveMode Down" + PICS: CC.S.F00 && CC.S.C01.Rsp command: "MoveHue" arguments: values: - name: "MoveMode" value: 3 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 140ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 140 + value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 145ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 145 + value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 150ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 150 + value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move hue stop command" - PICS: CC.S.C01.Rsp + - label: "TH sends MoveHue command to DUT with MoveMode Stop" + PICS: CC.S.F00 && CC.S.C01.Rsp command: "MoveHue" arguments: values: - name: "MoveMode" value: 0 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 140ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 140 + value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: + saveAs: CurrentHueValueAfterStopmode constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 145ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 145 + value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Wait 150ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 150 - - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 - command: "readAttribute" - attribute: "CurrentHue" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 + value: CurrentHueValueAfterStopmode - label: "Turn off light that we turned on" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml index 482b5bbaf86843..0dbfc5efd24bf4 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + StepSizeConfigValue: + type: int8u + defaultValue: 5 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,25 +42,32 @@ tests: response: value: 1 - - label: "Reads CurrentHue attribute from DUT" - PICS: CC.S.A0000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Step hue up command" - PICS: CC.S.C02.Rsp + - label: "TH sends StepHue command to DUT with StepMode Up" + PICS: CC.S.F00 && CC.S.C02.Rsp command: "StepHue" arguments: values: - name: "StepMode" value: 1 - name: "StepSize" - value: 5 + value: StepSizeConfigValue - name: "TransitionTime" value: 5 - name: "OptionsMask" @@ -65,7 +75,7 @@ tests: - name: "OptionsOverride" value: 0 - #delay step is necessary to let the attribute value change over time + #Delay step is necessary to let the attribute value change over time - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" @@ -74,25 +84,25 @@ tests: - name: "ms" value: 1000 - - label: "Over TransitionTime,Read CurrentHue attribute from DUT" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 5 maxValue: 254 - - label: "Step hue down command" - PICS: CC.S.C02.Rsp + - label: "TH sends StepHue command to DUT with StepMode Down" + PICS: CC.S.F00 && CC.S.C02.Rsp command: "StepHue" arguments: values: - name: "StepMode" value: 3 - name: "StepSize" - value: 5 + value: StepSizeConfigValue - name: "TransitionTime" value: 5 - name: "OptionsMask" @@ -108,13 +118,13 @@ tests: - name: "ms" value: 1000 - - label: "Over TransitionTime,Read CurrentHue attribute from DUT" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 249 diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml index 9647c697a195e4..c8f36ee2425085 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml @@ -25,35 +25,41 @@ tests: PICS: CC.C.C00.Rsp verification: | ./chip-tool colorcontrol move-to-hue 1 0 300 0 0 1 1 - [1646210342.550556][2190:2190] CHIP:DMG: InvokeRequestMessage = - [1646210342.550627][2190:2190] CHIP:DMG: { - [1646210342.550679][2190:2190] CHIP:DMG: suppressResponse = false, - [1646210342.550714][2190:2190] CHIP:DMG: timedRequest = false, - [1646210342.550744][2190:2190] CHIP:DMG: InvokeRequests = - [1646210342.550784][2190:2190] CHIP:DMG: [ - [1646210342.550813][2190:2190] CHIP:DMG: CommandDataIB = - [1646210342.550852][2190:2190] CHIP:DMG: { - [1646210342.550883][2190:2190] CHIP:DMG: CommandPathIB = - [1646210342.550922][2190:2190] CHIP:DMG: { - [1646210342.550961][2190:2190] CHIP:DMG: EndpointId = 0x1, - [1646210342.551004][2190:2190] CHIP:DMG: ClusterId = 0x300, - [1646210342.551048][2190:2190] CHIP:DMG: CommandId = 0x0, - [1646210342.551085][2190:2190] CHIP:DMG: }, - [1646210342.551124][2190:2190] CHIP:DMG: - [1646210342.551158][2190:2190] CHIP:DMG: CommandData = - [1646210342.551195][2190:2190] CHIP:DMG: { - [1646210342.551234][2190:2190] CHIP:DMG: 0x0 = 1, - [1646210342.551275][2190:2190] CHIP:DMG: 0x1 = 0, - [1646210342.551315][2190:2190] CHIP:DMG: 0x2 = 200, - [1646210342.551356][2190:2190] CHIP:DMG: 0x3 = 0, - [1646210342.551396][2190:2190] CHIP:DMG: 0x4 = 0, - [1646210342.551434][2190:2190] CHIP:DMG: }, - [1646210342.551469][2190:2190] CHIP:DMG: }, - [1646210342.551508][2190:2190] CHIP:DMG: - [1646210342.551537][2190:2190] CHIP:DMG: ], - [1646210342.551575][2190:2190] CHIP:DMG: - [1646210342.551604][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646210342.551632][2190:2190] CHIP:DMG: }, + + Verify in DUT as client side log: + + [1657911287.814194][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911287.814246][2977:2977] CHIP:DMG: { + [1657911287.814289][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911287.814340][2977:2977] CHIP:DMG: timedRequest = false, + [1657911287.814385][2977:2977] CHIP:DMG: InvokeRequests = + [1657911287.814445][2977:2977] CHIP:DMG: [ + [1657911287.814491][2977:2977] CHIP:DMG: CommandDataIB = + [1657911287.814543][2977:2977] CHIP:DMG: { + [1657911287.814591][2977:2977] CHIP:DMG: CommandPathIB = + [1657911287.814644][2977:2977] CHIP:DMG: { + [1657911287.814698][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911287.814756][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911287.814811][2977:2977] CHIP:DMG: CommandId = 0x0, + [1657911287.814863][2977:2977] CHIP:DMG: }, + [1657911287.814918][2977:2977] CHIP:DMG: + [1657911287.814969][2977:2977] CHIP:DMG: CommandFields = + [1657911287.815021][2977:2977] CHIP:DMG: { + [1657911287.815062][2977:2977] CHIP:DMG: 0x0 = 1, + [1657911287.815092][2977:2977] CHIP:DMG: 0x1 = 0, + [1657911287.815123][2977:2977] CHIP:DMG: 0x2 = 300, + [1657911287.815221][2977:2977] CHIP:DMG: 0x3 = 0, + [1657911287.815256][2977:2977] CHIP:DMG: 0x4 = 0, + [1657911287.815285][2977:2977] CHIP:DMG: }, + [1657911287.815311][2977:2977] CHIP:DMG: }, + [1657911287.815342][2977:2977] CHIP:DMG: + [1657911287.815366][2977:2977] CHIP:DMG: ], + [1657911287.815397][2977:2977] CHIP:DMG: + [1657911287.815420][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911287.815443][2977:2977] CHIP:DMG: }, + [1657911287.815520][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911287.815562][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911287.815590][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0000 disabled: true - label: @@ -62,166 +68,212 @@ tests: PICS: CC.C.A0000 verification: | ./chip-tool colorcontrol read current-hue 1 1 - [1646210292.985313][2190:2190] CHIP:DMG: ReadRequestMessage = - [1646210292.985373][2190:2190] CHIP:DMG: { - [1646210292.985402][2190:2190] CHIP:DMG: AttributePathIBs = - [1646210292.985436][2190:2190] CHIP:DMG: [ - [1646210292.985467][2190:2190] CHIP:DMG: AttributePathIB = - [1646210292.985657][2190:2190] CHIP:DMG: { - [1646210292.985849][2190:2190] CHIP:DMG: Endpoint = 0x1, - [1646210292.985935][2190:2190] CHIP:DMG: Cluster = 0x300, - [1646210292.986063][2190:2190] CHIP:DMG: Attribute = 0x0000_0000, - [1646210292.986124][2190:2190] CHIP:DMG: } - [1646210292.986183][2190:2190] CHIP:DMG: - [1646210292.986219][2190:2190] CHIP:DMG: ], - [1646210292.986257][2190:2190] CHIP:DMG: - [1646210292.986291][2190:2190] CHIP:DMG: isFabricFiltered = false, - [1646210292.986324][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646210292.986355][2190:2190] CHIP:DMG: }, + + Verify in DUT as client side log: + + [1657911327.184763][2977:2977] CHIP:IM: Received Read request + [1657911327.184901][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911327.184952][2977:2977] CHIP:DMG: { + [1657911327.184993][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911327.185041][2977:2977] CHIP:DMG: [ + [1657911327.185084][2977:2977] CHIP:DMG: AttributePathIB = + [1657911327.185133][2977:2977] CHIP:DMG: { + [1657911327.185185][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911327.185243][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911327.185301][2977:2977] CHIP:DMG: Attribute = 0x0000_0000, + [1657911327.185355][2977:2977] CHIP:DMG: } + [1657911327.185407][2977:2977] CHIP:DMG: + [1657911327.185455][2977:2977] CHIP:DMG: ], + [1657911327.185506][2977:2977] CHIP:DMG: + [1657911327.185553][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911327.185599][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911327.185642][2977:2977] CHIP:DMG: }, + [1657911327.185770][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911327.185916][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911327.185968][2977:2977] CHIP:DMG: Cluster 300, Attribute 0 is dirty + [1657911327.186007][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1657911327.186056][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911327.186111][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911327.186199][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT sends MoveHue command to TH" PICS: CC.C.C01.Rsp verification: | ./chip-tool colorcontrol move-hue 1 10 0 0 1 1 - [1646210493.976737][2190:2190] CHIP:EM: Handling via exchange: 36870r, Delegate: 0xaaaad04530c8 - [1646210493.976986][2190:2190] CHIP:DMG: InvokeRequestMessage = - [1646210493.977019][2190:2190] CHIP:DMG: { - [1646210493.977047][2190:2190] CHIP:DMG: suppressResponse = false, - [1646210493.977079][2190:2190] CHIP:DMG: timedRequest = false, - [1646210493.977109][2190:2190] CHIP:DMG: InvokeRequests = - [1646210493.977147][2190:2190] CHIP:DMG: [ - [1646210493.977173][2190:2190] CHIP:DMG: CommandDataIB = - [1646210493.977222][2190:2190] CHIP:DMG: { - [1646210493.977267][2190:2190] CHIP:DMG: CommandPathIB = - [1646210493.977320][2190:2190] CHIP:DMG: { - [1646210493.977376][2190:2190] CHIP:DMG: EndpointId = 0x1, - [1646210493.977443][2190:2190] CHIP:DMG: ClusterId = 0x300, - [1646210493.977478][2190:2190] CHIP:DMG: CommandId = 0x1, - [1646210493.977536][2190:2190] CHIP:DMG: }, - [1646210493.977572][2190:2190] CHIP:DMG: - [1646210493.977628][2190:2190] CHIP:DMG: CommandData = - [1646210493.977671][2190:2190] CHIP:DMG: { - [1646210493.977711][2190:2190] CHIP:DMG: 0x0 = 1, - [1646210493.977755][2190:2190] CHIP:DMG: 0x1 = 10, - [1646210493.978098][2190:2190] CHIP:DMG: 0x2 = 0, - [1646210493.978286][2190:2190] CHIP:DMG: 0x3 = 0, - [1646210493.978369][2190:2190] CHIP:DMG: }, - [1646210493.978405][2190:2190] CHIP:DMG: }, - [1646210493.978469][2190:2190] CHIP:DMG: - [1646210493.978499][2190:2190] CHIP:DMG: ], - [1646210493.978536][2190:2190] CHIP:DMG: - [1646210493.978565][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646210493.978595][2190:2190] CHIP:DMG: }, + Verify in DUT as client side log: + + [1657911357.567908][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911357.567957][2977:2977] CHIP:DMG: { + [1657911357.567999][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911357.568048][2977:2977] CHIP:DMG: timedRequest = false, + [1657911357.568129][2977:2977] CHIP:DMG: InvokeRequests = + [1657911357.568189][2977:2977] CHIP:DMG: [ + [1657911357.568234][2977:2977] CHIP:DMG: CommandDataIB = + [1657911357.568289][2977:2977] CHIP:DMG: { + [1657911357.568335][2977:2977] CHIP:DMG: CommandPathIB = + [1657911357.568390][2977:2977] CHIP:DMG: { + [1657911357.568454][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911357.568520][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911357.568580][2977:2977] CHIP:DMG: CommandId = 0x1, + [1657911357.568636][2977:2977] CHIP:DMG: }, + [1657911357.568695][2977:2977] CHIP:DMG: + [1657911357.568746][2977:2977] CHIP:DMG: CommandFields = + [1657911357.568807][2977:2977] CHIP:DMG: { + [1657911357.568868][2977:2977] CHIP:DMG: 0x0 = 1, + [1657911357.568929][2977:2977] CHIP:DMG: 0x1 = 10, + [1657911357.569006][2977:2977] CHIP:DMG: 0x2 = 0, + [1657911357.569071][2977:2977] CHIP:DMG: 0x3 = 0, + [1657911357.569131][2977:2977] CHIP:DMG: }, + [1657911357.569189][2977:2977] CHIP:DMG: }, + [1657911357.569244][2977:2977] CHIP:DMG: + [1657911357.569288][2977:2977] CHIP:DMG: ], + [1657911357.569344][2977:2977] CHIP:DMG: + [1657911357.569387][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911357.569433][2977:2977] CHIP:DMG: }, + [1657911357.569549][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911357.569610][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911357.569659][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0001 disabled: true - label: "DUT reads CurrentHue attribute from TH several Times." PICS: CC.C.A0000 verification: | ./chip-tool colorcontrol read current-hue 1 1 - [1646210292.985313][2190:2190] CHIP:DMG: ReadRequestMessage = - [1646210292.985373][2190:2190] CHIP:DMG: { - [1646210292.985402][2190:2190] CHIP:DMG: AttributePathIBs = - [1646210292.985436][2190:2190] CHIP:DMG: [ - [1646210292.985467][2190:2190] CHIP:DMG: AttributePathIB = - [1646210292.985657][2190:2190] CHIP:DMG: { - [1646210292.985849][2190:2190] CHIP:DMG: Endpoint = 0x1, - [1646210292.985935][2190:2190] CHIP:DMG: Cluster = 0x300, - [1646210292.986063][2190:2190] CHIP:DMG: Attribute = 0x0000_0000, - [1646210292.986124][2190:2190] CHIP:DMG: } - [1646210292.986183][2190:2190] CHIP:DMG: - [1646210292.986219][2190:2190] CHIP:DMG: ], - [1646210292.986257][2190:2190] CHIP:DMG: - [1646210292.986291][2190:2190] CHIP:DMG: isFabricFiltered = false, - [1646210292.986324][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646210292.986355][2190:2190] CHIP:DMG: }, + + Verify in DUT as client side log: + [1657911381.312873][2977:2977] CHIP:IM: Received Read request + [1657911381.312995][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911381.313043][2977:2977] CHIP:DMG: { + [1657911381.313082][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911381.313172][2977:2977] CHIP:DMG: [ + [1657911381.313224][2977:2977] CHIP:DMG: AttributePathIB = + [1657911381.313274][2977:2977] CHIP:DMG: { + [1657911381.313325][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911381.313390][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911381.313449][2977:2977] CHIP:DMG: Attribute = 0x0000_0000, + [1657911381.313549][2977:2977] CHIP:DMG: } + [1657911381.313607][2977:2977] CHIP:DMG: + [1657911381.313657][2977:2977] CHIP:DMG: ], + [1657911381.313703][2977:2977] CHIP:DMG: + [1657911381.313730][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911381.313756][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911381.313782][2977:2977] CHIP:DMG: }, + [1657911381.313945][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911381.314046][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911381.314077][2977:2977] CHIP:DMG: Cluster 300, Attribute 0 is dirty + [1657911381.314100][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1657911381.314129][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911381.314164][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911381.314224][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT sends StepHue command to TH" PICS: CC.C.C02.Rsp verification: | ./chip-tool colorcontrol step-hue 1 10 200 0 0 1 1 - [1646210571.683401][2190:2190] CHIP:DMG: InvokeRequestMessage = - [1646210571.683444][2190:2190] CHIP:DMG: { - [1646210571.683475][2190:2190] CHIP:DMG: suppressResponse = false, - [1646210571.683530][2190:2190] CHIP:DMG: timedRequest = false, - [1646210571.683565][2190:2190] CHIP:DMG: InvokeRequests = - [1646210571.683608][2190:2190] CHIP:DMG: [ - [1646210571.683641][2190:2190] CHIP:DMG: CommandDataIB = - [1646210571.683726][2190:2190] CHIP:DMG: { - [1646210571.683799][2190:2190] CHIP:DMG: CommandPathIB = - [1646210571.683908][2190:2190] CHIP:DMG: { - [1646210571.683953][2190:2190] CHIP:DMG: EndpointId = 0x1, - [1646210571.684011][2190:2190] CHIP:DMG: ClusterId = 0x300, - [1646210571.684058][2190:2190] CHIP:DMG: CommandId = 0x2, - [1646210571.684102][2190:2190] CHIP:DMG: }, - [1646210571.684146][2190:2190] CHIP:DMG: - [1646210571.684183][2190:2190] CHIP:DMG: CommandData = - [1646210571.684228][2190:2190] CHIP:DMG: { - [1646210571.684275][2190:2190] CHIP:DMG: 0x0 = 1, - [1646210571.684323][2190:2190] CHIP:DMG: 0x1 = 10, - [1646210571.684370][2190:2190] CHIP:DMG: 0x2 = 200, - [1646210571.684414][2190:2190] CHIP:DMG: 0x3 = 0, - [1646210571.684458][2190:2190] CHIP:DMG: 0x4 = 0, - [1646210571.684501][2190:2190] CHIP:DMG: }, - [1646210571.684539][2190:2190] CHIP:DMG: }, - [1646210571.684582][2190:2190] CHIP:DMG: - [1646210571.684613][2190:2190] CHIP:DMG: ], - [1646210571.684653][2190:2190] CHIP:DMG: - [1646210571.684684][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646210571.684715][2190:2190] CHIP:DMG: }, + + Verify in DUT as client side log: + + [1657911412.480684][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911412.480741][2977:2977] CHIP:DMG: { + [1657911412.480788][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911412.480843][2977:2977] CHIP:DMG: timedRequest = false, + [1657911412.480894][2977:2977] CHIP:DMG: InvokeRequests = + [1657911412.480960][2977:2977] CHIP:DMG: [ + [1657911412.481011][2977:2977] CHIP:DMG: CommandDataIB = + [1657911412.481067][2977:2977] CHIP:DMG: { + [1657911412.481120][2977:2977] CHIP:DMG: CommandPathIB = + [1657911412.481199][2977:2977] CHIP:DMG: { + [1657911412.481329][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911412.481400][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911412.481468][2977:2977] CHIP:DMG: CommandId = 0x2, + [1657911412.481532][2977:2977] CHIP:DMG: }, + [1657911412.481647][2977:2977] CHIP:DMG: + [1657911412.481707][2977:2977] CHIP:DMG: CommandFields = + [1657911412.481769][2977:2977] CHIP:DMG: { + [1657911412.481958][2977:2977] CHIP:DMG: 0x0 = 1, + [1657911412.482101][2977:2977] CHIP:DMG: 0x1 = 10, + [1657911412.482173][2977:2977] CHIP:DMG: 0x2 = 200, + [1657911412.482243][2977:2977] CHIP:DMG: 0x3 = 0, + [1657911412.482313][2977:2977] CHIP:DMG: 0x4 = 0, + [1657911412.482379][2977:2977] CHIP:DMG: }, + [1657911412.482438][2977:2977] CHIP:DMG: }, + [1657911412.482506][2977:2977] CHIP:DMG: + [1657911412.482556][2977:2977] CHIP:DMG: ], + [1657911412.482621][2977:2977] CHIP:DMG: + [1657911412.482670][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911412.482718][2977:2977] CHIP:DMG: }, + [1657911412.482850][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911412.482919][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911412.482974][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0002 disabled: true - label: "Over TransitionTime, DUT reads CurrentHue attribute from TH." PICS: CC.C.A0000 verification: | ./chip-tool colorcontrol read current-hue 1 1 - [1646210292.985313][2190:2190] CHIP:DMG: ReadRequestMessage = - [1646210292.985373][2190:2190] CHIP:DMG: { - [1646210292.985402][2190:2190] CHIP:DMG: AttributePathIBs = - [1646210292.985436][2190:2190] CHIP:DMG: [ - [1646210292.985467][2190:2190] CHIP:DMG: AttributePathIB = - [1646210292.985657][2190:2190] CHIP:DMG: { - [1646210292.985849][2190:2190] CHIP:DMG: Endpoint = 0x1, - [1646210292.985935][2190:2190] CHIP:DMG: Cluster = 0x300, - [1646210292.986063][2190:2190] CHIP:DMG: Attribute = 0x0000_0000, - [1646210292.986124][2190:2190] CHIP:DMG: } - [1646210292.986183][2190:2190] CHIP:DMG: - [1646210292.986219][2190:2190] CHIP:DMG: ], - [1646210292.986257][2190:2190] CHIP:DMG: - [1646210292.986291][2190:2190] CHIP:DMG: isFabricFiltered = false, - [1646210292.986324][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646210292.986355][2190:2190] CHIP:DMG: }, + Verify in DUT as client side log: + + [1657911437.116353][2977:2977] CHIP:IM: Received Read request + [1657911437.116480][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911437.116528][2977:2977] CHIP:DMG: { + [1657911437.116568][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911437.116615][2977:2977] CHIP:DMG: [ + [1657911437.116658][2977:2977] CHIP:DMG: AttributePathIB = + [1657911437.116707][2977:2977] CHIP:DMG: { + [1657911437.116758][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911437.116823][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911437.116882][2977:2977] CHIP:DMG: Attribute = 0x0000_0000, + [1657911437.116933][2977:2977] CHIP:DMG: } + [1657911437.116988][2977:2977] CHIP:DMG: + [1657911437.117038][2977:2977] CHIP:DMG: ], + [1657911437.117090][2977:2977] CHIP:DMG: + [1657911437.117130][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911437.117175][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911437.117218][2977:2977] CHIP:DMG: }, + [1657911437.117344][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911437.117488][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911437.117541][2977:2977] CHIP:DMG: Cluster 300, Attribute 0 is dirty + [1657911437.117580][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1657911437.117629][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911437.117684][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911437.117773][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT sends StopMoveStep command to TH." PICS: CC.C.C47.Rsp verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 - [1646210677.870562][2190:2190] CHIP:DMG: InvokeRequestMessage = - [1646210677.870594][2190:2190] CHIP:DMG: { - [1646210677.870618][2190:2190] CHIP:DMG: suppressResponse = false, - [1646210677.870666][2190:2190] CHIP:DMG: timedRequest = false, - [1646210677.870696][2190:2190] CHIP:DMG: InvokeRequests = - [1646210677.870728][2190:2190] CHIP:DMG: [ - [1646210677.870754][2190:2190] CHIP:DMG: CommandDataIB = - [1646210677.870792][2190:2190] CHIP:DMG: { - [1646210677.870820][2190:2190] CHIP:DMG: CommandPathIB = - [1646210677.870854][2190:2190] CHIP:DMG: { - [1646210677.870889][2190:2190] CHIP:DMG: EndpointId = 0x1, - [1646210677.870926][2190:2190] CHIP:DMG: ClusterId = 0x300, - [1646210677.870960][2190:2190] CHIP:DMG: CommandId = 0x47, - [1646210677.870992][2190:2190] CHIP:DMG: }, - [1646210677.871027][2190:2190] CHIP:DMG: - [1646210677.871056][2190:2190] CHIP:DMG: CommandData = - [1646210677.871088][2190:2190] CHIP:DMG: { - [1646210677.871124][2190:2190] CHIP:DMG: 0x0 = 0, - [1646210677.871159][2190:2190] CHIP:DMG: 0x1 = 0, - [1646210677.871196][2190:2190] CHIP:DMG: }, - [1646210677.871225][2190:2190] CHIP:DMG: }, - [1646210677.871259][2190:2190] CHIP:DMG: - [1646210677.871286][2190:2190] CHIP:DMG: ], - [1646210677.871317][2190:2190] CHIP:DMG: - [1646210677.871342][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646210677.871368][2190:2190] CHIP:DMG: }, + Verify in DUT as client side log: + + [1657911457.334435][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911457.334464][2977:2977] CHIP:DMG: { + [1657911457.334487][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911457.334514][2977:2977] CHIP:DMG: timedRequest = false, + [1657911457.334535][2977:2977] CHIP:DMG: InvokeRequests = + [1657911457.334568][2977:2977] CHIP:DMG: [ + [1657911457.334593][2977:2977] CHIP:DMG: CommandDataIB = + [1657911457.334622][2977:2977] CHIP:DMG: { + [1657911457.334648][2977:2977] CHIP:DMG: CommandPathIB = + [1657911457.334674][2977:2977] CHIP:DMG: { + [1657911457.334700][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911457.334733][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911457.334766][2977:2977] CHIP:DMG: CommandId = 0x47, + [1657911457.334797][2977:2977] CHIP:DMG: }, + [1657911457.334830][2977:2977] CHIP:DMG: + [1657911457.334857][2977:2977] CHIP:DMG: CommandFields = + [1657911457.334887][2977:2977] CHIP:DMG: { + [1657911457.334920][2977:2977] CHIP:DMG: 0x0 = 0, + [1657911457.334954][2977:2977] CHIP:DMG: 0x1 = 0, + [1657911457.334986][2977:2977] CHIP:DMG: }, + [1657911457.335015][2977:2977] CHIP:DMG: }, + [1657911457.335046][2977:2977] CHIP:DMG: + [1657911457.335071][2977:2977] CHIP:DMG: ], + [1657911457.335102][2977:2977] CHIP:DMG: + [1657911457.335125][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911457.335148][2977:2977] CHIP:DMG: }, + [1657911457.335218][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911457.335258][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911457.335287][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0047 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml index 5f11a375b09f5f..fdbcdb8420c353 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + SaturationConfigValue: + type: int8u + defaultValue: 90 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,23 +42,30 @@ tests: response: value: 1 - - label: "Check Saturation attribute value matched before any change" - PICS: CC.S.A0001 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move to saturation command" - PICS: CC.S.C03.Rsp + - label: "TH sends MoveToSaturation command to DUT" + PICS: CC.S.F00 && CC.S.C03.Rsp command: "MoveToSaturation" arguments: values: - name: "Saturation" - value: 90 + value: SaturationConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -63,63 +73,23 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 6ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 6 - - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Wait 8ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 8 - - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Wait 10ms" + - label: "Wait 1500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 10 + value: 1500 - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + "Over TransitionTime, TH reads CurrentSaturation attribute from DUT." + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: + value: SaturationConfigValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml index 2a41688e9785d2..bfca64ef26b3e1 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateConfigValue: + type: int8u + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,461 +42,345 @@ tests: response: value: 1 - - label: - "Check Saturation attribute value matched the value sent by the last - command" - PICS: CC.S.A0001 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move saturation up command" + - label: "TH sends MoveSaturation command to DUT with MoveMode Up" command: "MoveSaturation" - PICS: CC.S.C04.Rsp + PICS: CC.S.F00 && CC.S.C04.Rsp arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 5 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 40ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 40 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 45ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 45 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 50ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 50 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move saturation down command" - PICS: CC.S.C04.Rsp + - label: "TH sends MoveSaturation command to DUT with MoveMode Down" + PICS: CC.S.F00 && CC.S.C04.Rsp command: "MoveSaturation" arguments: values: - name: "MoveMode" value: 3 - name: "Rate" - value: 5 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 40ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 40 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT several times." + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 45ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 45 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT several times." + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 50ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 50 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT several times." + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move saturation up command" - PICS: CC.S.C04.Rsp + - label: + "TH sends MoveSaturation command to DUT with MoveMode Up to the + Maximum allowed Saturation" + PICS: CC.S.F00 && CC.S.C04.Rsp command: "MoveSaturation" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 5 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 40ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 40 - - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Wait 45ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 45 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 50ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 50 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Move saturation stop command" + "TH sends MoveSaturation command to DUT with MoveMode Stop before + Saturation reaches the Maximum allowed." command: "MoveSaturation" - PICS: CC.S.C04.Rsp + PICS: CC.S.F00 && CC.S.C04.Rsp arguments: values: - name: "MoveMode" value: 0 - name: "Rate" - value: 5 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 40ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 40 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT." + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: + saveAs: CurrentSaturationStep4d constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 45ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 45 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "CurrentSaturation value Stops incrementing" + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Wait 50ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 50 + value: CurrentSaturationStep4d - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Move saturation down command" - PICS: CC.S.C04.Rsp + "TH sends MoveSaturation command to DUT with MoveMode Down to the + Minimum allowed Saturation" + PICS: CC.S.F00 && CC.S.C04.Rsp command: "MoveSaturation" arguments: values: - name: "MoveMode" value: 3 - name: "Rate" - value: 5 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 40ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 40 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT several times." + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: + saveAs: CurrentSaturationStep5b constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 45ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 45 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT several times." + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 - maxValue: 254 - - - label: "Wait 50ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 50 + maxValue: CurrentSaturationStep5b - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Move saturation stop command" - PICS: CC.S.C04.Rsp + "TH sends MoveSaturation command to DUT with MoveMode Stop before + Saturation reaches the Minimum allowed" + PICS: CC.S.F00 && CC.S.C04.Rsp command: "MoveSaturation" arguments: values: - name: "MoveMode" value: 0 - name: "Rate" - value: 5 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 40ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 40 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: + saveAs: CurrentSaturationStep5d constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 45ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 45 + value: 1000 - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + - label: "CurrentSaturation value Stops decrementing" + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Wait 50ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 50 - - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 + value: CurrentSaturationStep5d - label: "Turn off light that we turned on" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml index 6f15689de049eb..c7243596ba8be1 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + StepSizeConfigValue: + type: int8u + defaultValue: 15 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,25 +42,32 @@ tests: response: value: 1 - - label: "Reads CurrentSaturation attribute from DUT" - PICS: CC.S.A0001 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Step saturation up command" - PICS: CC.S.C05.Rsp + - label: "TH sends StepSaturation command to DUT with StepMode Up" + PICS: CC.S.F00 && CC.S.C05.Rsp command: "StepSaturation" arguments: values: - name: "StepMode" value: 1 - name: "StepSize" - value: 15 + value: StepSizeConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -66,33 +76,33 @@ tests: value: 0 #delay step is necessary to let the attribute value change over time - - label: "Wait 10ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 10 + value: 1000 - - label: "Over TransitionTime,Read CurrentSaturation attribute from DUT" - PICS: CC.S.A0001 + - label: "Over TransitionTime,TH read CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Step saturation down command" - PICS: CC.S.C05.Rsp + - label: "TH sends StepSaturation command to DUT with StepMode Down" + PICS: CC.S.F00 && CC.S.C05.Rsp command: "StepSaturation" arguments: values: - name: "StepMode" value: 3 - name: "StepSize" - value: 20 + value: StepSizeConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -100,21 +110,21 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 10ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 10 + value: 1000 - - label: "Over TransitionTime,Reads CurrentSaturation attribute from DUT" - PICS: CC.S.A0001 + - label: "Over TransitionTime,TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml index 1f76c3db369c18..30b6bc80f66f58 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml @@ -19,6 +19,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + hueConfigValue: + type: int8u + defaultValue: 40 + SaturationConfigValue: + type: int8u + defaultValue: 160 tests: - label: "Wait for the commissioned device to be retrieved" @@ -40,35 +46,42 @@ tests: response: value: 1 - - label: "Check current hue attribute value matched before any change" - PICS: CC.S.A0000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentHue attribute from DUT." + PICS: CC.S.F01 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Check Saturation attribute value matched before any change" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F01 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move To current hue and saturation command" - PICS: CC.S.C06.Rsp + - label: "TH sends MoveToHueAndSaturation command to DUT." + PICS: CC.S.F01 && CC.S.C06.Rsp command: "MoveToHueAndSaturation" arguments: values: - name: "hue" - value: 40 + value: hueConfigValue - name: "Saturation" - value: 160 + value: SaturationConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -76,35 +89,34 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 10ms" + - label: "Wait 1500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 10 + value: 1500 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp command: "readAttribute" attribute: "CurrentHue" response: + value: hueConfigValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.A0001 + "Over TransitionTime, TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F01 && CC.S.A0001 && CC.S.C06.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: + value: SaturationConfigValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_5.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_5.yaml index ab7cdedc7b71ba..89c03f32a44a0f 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_5.yaml @@ -28,38 +28,39 @@ tests: verification: | ./chip-tool colorcontrol move-to-saturation 200 300 0 0 1 1 - [1648101474.910794][2480:2480] CHIP:EM: Handling via exchange: 53143r, Delegate: 0xaaaab8814368 - [1648101474.910970][2480:2480] CHIP:DMG: InvokeRequestMessage = - [1648101474.911016][2480:2480] CHIP:DMG: { - [1648101474.911055][2480:2480] CHIP:DMG: suppressResponse = false, - [1648101474.911099][2480:2480] CHIP:DMG: timedRequest = false, - [1648101474.911140][2480:2480] CHIP:DMG: InvokeRequests = - [1648101474.911191][2480:2480] CHIP:DMG: [ - [1648101474.911232][2480:2480] CHIP:DMG: CommandDataIB = - [1648101474.911287][2480:2480] CHIP:DMG: { - [1648101474.911330][2480:2480] CHIP:DMG: CommandPathIB = - [1648101474.911412][2480:2480] CHIP:DMG: { - [1648101474.911467][2480:2480] CHIP:DMG: EndpointId = 0x1, - [1648101474.911523][2480:2480] CHIP:DMG: ClusterId = 0x300, - [1648101474.911577][2480:2480] CHIP:DMG: CommandId = 0x3, - [1648101474.911628][2480:2480] CHIP:DMG: }, - [1648101474.911681][2480:2480] CHIP:DMG: - [1648101474.911728][2480:2480] CHIP:DMG: CommandData = - [1648101474.911783][2480:2480] CHIP:DMG: { - [1648101474.911837][2480:2480] CHIP:DMG: 0x0 = 200, - [1648101474.911897][2480:2480] CHIP:DMG: 0x1 = 300, - [1648101474.911952][2480:2480] CHIP:DMG: 0x2 = 0, - [1648101474.912012][2480:2480] CHIP:DMG: 0x3 = 0, - [1648101474.912069][2480:2480] CHIP:DMG: }, - [1648101474.912117][2480:2480] CHIP:DMG: }, - [1648101474.912172][2480:2480] CHIP:DMG: - [1648101474.912211][2480:2480] CHIP:DMG: ], - [1648101474.912263][2480:2480] CHIP:DMG: - [1648101474.912302][2480:2480] CHIP:DMG: InteractionModelRevision = 1 - [1648101474.912341][2480:2480] CHIP:DMG: }, - [1648101474.912442][2480:2480] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o - [1648101474.912507][2480:2480] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0003 - [1648101474.912605][2480:2480] CHIP:DMG: Endpoint 1, Cluster 0x0000_0300 update version to 6143bba0 + Verify in DUT as client side log: + + [1657911500.672151][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911500.672204][2977:2977] CHIP:DMG: { + [1657911500.672246][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911500.672295][2977:2977] CHIP:DMG: timedRequest = false, + [1657911500.672357][2977:2977] CHIP:DMG: InvokeRequests = + [1657911500.672417][2977:2977] CHIP:DMG: [ + [1657911500.672465][2977:2977] CHIP:DMG: CommandDataIB = + [1657911500.672534][2977:2977] CHIP:DMG: { + [1657911500.672583][2977:2977] CHIP:DMG: CommandPathIB = + [1657911500.672768][2977:2977] CHIP:DMG: { + [1657911500.672831][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911500.672916][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911500.672976][2977:2977] CHIP:DMG: CommandId = 0x3, + [1657911500.673044][2977:2977] CHIP:DMG: }, + [1657911500.673103][2977:2977] CHIP:DMG: + [1657911500.673155][2977:2977] CHIP:DMG: CommandFields = + [1657911500.673223][2977:2977] CHIP:DMG: { + [1657911500.673283][2977:2977] CHIP:DMG: 0x0 = 200, + [1657911500.673360][2977:2977] CHIP:DMG: 0x1 = 300, + [1657911500.673427][2977:2977] CHIP:DMG: 0x2 = 0, + [1657911500.673488][2977:2977] CHIP:DMG: 0x3 = 0, + [1657911500.673563][2977:2977] CHIP:DMG: }, + [1657911500.673612][2977:2977] CHIP:DMG: }, + [1657911500.673668][2977:2977] CHIP:DMG: + [1657911500.673727][2977:2977] CHIP:DMG: ], + [1657911500.673785][2977:2977] CHIP:DMG: + [1657911500.673828][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911500.673888][2977:2977] CHIP:DMG: }, + [1657911500.674003][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911500.674082][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911500.674119][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0003 disabled: true - label: @@ -68,116 +69,147 @@ tests: PICS: CC.C.A0001 verification: | ./chip-tool colorcontrol read current-saturation 1 1 - [1646210970.309403][2190:2190] CHIP:IM: Received Read request - [1646210970.309465][2190:2190] CHIP:DMG: ReadRequestMessage = - [1646210970.309495][2190:2190] CHIP:DMG: { - [1646210970.309514][2190:2190] CHIP:DMG: AttributePathIBs = - [1646210970.309541][2190:2190] CHIP:DMG: [ - [1646210970.309567][2190:2190] CHIP:DMG: AttributePathIB = - [1646210970.309599][2190:2190] CHIP:DMG: { - [1646210970.309629][2190:2190] CHIP:DMG: Endpoint = 0x1, - [1646210970.309664][2190:2190] CHIP:DMG: Cluster = 0x300, - [1646210970.309691][2190:2190] CHIP:DMG: Attribute = 0x0000_0001, - [1646210970.309720][2190:2190] CHIP:DMG: } - [1646210970.309750][2190:2190] CHIP:DMG: - [1646210970.309779][2190:2190] CHIP:DMG: ], - [1646210970.309815][2190:2190] CHIP:DMG: - [1646210970.309844][2190:2190] CHIP:DMG: isFabricFiltered = false, - [1646210970.309871][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646210970.309892][2190:2190] CHIP:DMG: }, + + Verify in DUT as client side log: + + [1657911521.672771][2977:2977] CHIP:IM: Received Read request + [1657911521.672849][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911521.672876][2977:2977] CHIP:DMG: { + [1657911521.672898][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911521.672924][2977:2977] CHIP:DMG: [ + [1657911521.672947][2977:2977] CHIP:DMG: AttributePathIB = + [1657911521.672974][2977:2977] CHIP:DMG: { + [1657911521.673001][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911521.673038][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911521.673069][2977:2977] CHIP:DMG: Attribute = 0x0000_0001, + [1657911521.673098][2977:2977] CHIP:DMG: } + [1657911521.673125][2977:2977] CHIP:DMG: + [1657911521.673151][2977:2977] CHIP:DMG: ], + [1657911521.673179][2977:2977] CHIP:DMG: + [1657911521.673204][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911521.673228][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911521.673251][2977:2977] CHIP:DMG: }, + [1657911521.673327][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911521.673419][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911521.673448][2977:2977] CHIP:DMG: Cluster 300, Attribute 1 is dirty + [1657911521.673469][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) + [1657911521.673497][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911521.673529][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911521.673585][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT sends MoveSaturation command to TH" PICS: CC.C.C04.Rsp verification: | ./chip-tool colorcontrol move-saturation 1 10 0 0 1 1 + Verify in DUT as client side log: + - [1646211062.545513][2190:2190] CHIP:DMG: InvokeRequestMessage = - [1646211062.545543][2190:2190] CHIP:DMG: { - [1646211062.545565][2190:2190] CHIP:DMG: suppressResponse = false, - [1646211062.545596][2190:2190] CHIP:DMG: timedRequest = false, - [1646211062.545625][2190:2190] CHIP:DMG: InvokeRequests = - [1646211062.545657][2190:2190] CHIP:DMG: [ - [1646211062.545681][2190:2190] CHIP:DMG: CommandDataIB = - [1646211062.545711][2190:2190] CHIP:DMG: { - [1646211062.545737][2190:2190] CHIP:DMG: CommandPathIB = - [1646211062.545771][2190:2190] CHIP:DMG: { - [1646211062.545806][2190:2190] CHIP:DMG: EndpointId = 0x1, - [1646211062.545840][2190:2190] CHIP:DMG: ClusterId = 0x300, - [1646211062.545872][2190:2190] CHIP:DMG: CommandId = 0x4, - [1646211062.545902][2190:2190] CHIP:DMG: }, - [1646211062.545933][2190:2190] CHIP:DMG: - [1646211062.545960][2190:2190] CHIP:DMG: CommandData = - [1646211062.545991][2190:2190] CHIP:DMG: { - [1646211062.546025][2190:2190] CHIP:DMG: 0x0 = 1, - [1646211062.546060][2190:2190] CHIP:DMG: 0x1 = 10, - [1646211062.546095][2190:2190] CHIP:DMG: 0x2 = 0, - [1646211062.546126][2190:2190] CHIP:DMG: 0x3 = 0, - [1646211062.546158][2190:2190] CHIP:DMG: }, - [1646211062.546185][2190:2190] CHIP:DMG: }, - [1646211062.546218][2190:2190] CHIP:DMG: - [1646211062.546243][2190:2190] CHIP:DMG: ], - [1646211062.546274][2190:2190] CHIP:DMG: - [1646211062.546297][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646211062.546320][2190:2190] CHIP:DMG: }, + [1657911543.960120][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911543.960161][2977:2977] CHIP:DMG: { + [1657911543.960184][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911543.960211][2977:2977] CHIP:DMG: timedRequest = false, + [1657911543.960236][2977:2977] CHIP:DMG: InvokeRequests = + [1657911543.960276][2977:2977] CHIP:DMG: [ + [1657911543.960300][2977:2977] CHIP:DMG: CommandDataIB = + [1657911543.960363][2977:2977] CHIP:DMG: { + [1657911543.960393][2977:2977] CHIP:DMG: CommandPathIB = + [1657911543.960422][2977:2977] CHIP:DMG: { + [1657911543.960452][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911543.960483][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911543.960513][2977:2977] CHIP:DMG: CommandId = 0x4, + [1657911543.960541][2977:2977] CHIP:DMG: }, + [1657911543.960571][2977:2977] CHIP:DMG: + [1657911543.960598][2977:2977] CHIP:DMG: CommandFields = + [1657911543.960626][2977:2977] CHIP:DMG: { + [1657911543.960682][2977:2977] CHIP:DMG: 0x0 = 1, + [1657911543.960719][2977:2977] CHIP:DMG: 0x1 = 10, + [1657911543.960749][2977:2977] CHIP:DMG: 0x2 = 0, + [1657911543.960779][2977:2977] CHIP:DMG: 0x3 = 0, + [1657911543.960809][2977:2977] CHIP:DMG: }, + [1657911543.960836][2977:2977] CHIP:DMG: }, + [1657911543.960866][2977:2977] CHIP:DMG: + [1657911543.960890][2977:2977] CHIP:DMG: ], + [1657911543.960921][2977:2977] CHIP:DMG: + [1657911543.960945][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911543.960968][2977:2977] CHIP:DMG: }, + [1657911543.961080][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911543.961124][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911543.961152][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0004 disabled: true - label: "DUT reads CurrentSaturation attribute from TH several Times." PICS: CC.C.A0001 verification: | ./chip-tool colorcontrol read current-saturation 1 1 - [1646210970.309403][2190:2190] CHIP:IM: Received Read request - [1646210970.309465][2190:2190] CHIP:DMG: ReadRequestMessage = - [1646210970.309495][2190:2190] CHIP:DMG: { - [1646210970.309514][2190:2190] CHIP:DMG: AttributePathIBs = - [1646210970.309541][2190:2190] CHIP:DMG: [ - [1646210970.309567][2190:2190] CHIP:DMG: AttributePathIB = - [1646210970.309599][2190:2190] CHIP:DMG: { - [1646210970.309629][2190:2190] CHIP:DMG: Endpoint = 0x1, - [1646210970.309664][2190:2190] CHIP:DMG: Cluster = 0x300, - [1646210970.309691][2190:2190] CHIP:DMG: Attribute = 0x0000_0001, - [1646210970.309720][2190:2190] CHIP:DMG: } - [1646210970.309750][2190:2190] CHIP:DMG: - [1646210970.309779][2190:2190] CHIP:DMG: ], - [1646210970.309815][2190:2190] CHIP:DMG: - [1646210970.309844][2190:2190] CHIP:DMG: isFabricFiltered = false, - [1646210970.309871][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646210970.309892][2190:2190] CHIP:DMG: }, + + Verify in DUT as client side log: + + [1657911563.694872][2977:2977] CHIP:IM: Received Read request + [1657911563.694955][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911563.694985][2977:2977] CHIP:DMG: { + [1657911563.695007][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911563.695033][2977:2977] CHIP:DMG: [ + [1657911563.695057][2977:2977] CHIP:DMG: AttributePathIB = + [1657911563.695091][2977:2977] CHIP:DMG: { + [1657911563.695119][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911563.695151][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911563.695183][2977:2977] CHIP:DMG: Attribute = 0x0000_0001, + [1657911563.695213][2977:2977] CHIP:DMG: } + [1657911563.695241][2977:2977] CHIP:DMG: + [1657911563.695270][2977:2977] CHIP:DMG: ], + [1657911563.695298][2977:2977] CHIP:DMG: + [1657911563.695325][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911563.695350][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911563.695373][2977:2977] CHIP:DMG: }, + [1657911563.695452][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911563.695560][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911563.695595][2977:2977] CHIP:DMG: Cluster 300, Attribute 1 is dirty + [1657911563.695617][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) + [1657911563.695646][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911563.695681][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911563.695741][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT sends StepSaturation command to TH" PICS: CC.C.C05.Rsp verification: | ./chip-tool colorcontrol step-saturation 1 10 200 0 0 1 1 - [1646211149.169696][2190:2190] CHIP:DMG: InvokeRequestMessage = - [1646211149.169731][2190:2190] CHIP:DMG: { - [1646211149.169757][2190:2190] CHIP:DMG: suppressResponse = false, - [1646211149.169788][2190:2190] CHIP:DMG: timedRequest = false, - [1646211149.169816][2190:2190] CHIP:DMG: InvokeRequests = - [1646211149.169852][2190:2190] CHIP:DMG: [ - [1646211149.169879][2190:2190] CHIP:DMG: CommandDataIB = - [1646211149.169914][2190:2190] CHIP:DMG: { - [1646211149.169943][2190:2190] CHIP:DMG: CommandPathIB = - [1646211149.169979][2190:2190] CHIP:DMG: { - [1646211149.170014][2190:2190] CHIP:DMG: EndpointId = 0x1, - [1646211149.170055][2190:2190] CHIP:DMG: ClusterId = 0x300, - [1646211149.170095][2190:2190] CHIP:DMG: CommandId = 0x5, - [1646211149.170129][2190:2190] CHIP:DMG: }, - [1646211149.170165][2190:2190] CHIP:DMG: - [1646211149.170196][2190:2190] CHIP:DMG: CommandData = - [1646211149.170234][2190:2190] CHIP:DMG: { - [1646211149.170269][2190:2190] CHIP:DMG: 0x0 = 1, - [1646211149.170310][2190:2190] CHIP:DMG: 0x1 = 10, - [1646211149.170344][2190:2190] CHIP:DMG: 0x2 = 200, - [1646211149.170379][2190:2190] CHIP:DMG: 0x3 = 0, - [1646211149.170409][2190:2190] CHIP:DMG: 0x4 = 0, - [1646211149.170451][2190:2190] CHIP:DMG: }, - [1646211149.170481][2190:2190] CHIP:DMG: }, - [1646211149.170516][2190:2190] CHIP:DMG: - [1646211149.170542][2190:2190] CHIP:DMG: ], - [1646211149.170576][2190:2190] CHIP:DMG: - [1646211149.170603][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646211149.170629][2190:2190] CHIP:DMG: }, + + Verify in DUT as client side log: + + [1657911581.077515][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911581.077553][2977:2977] CHIP:DMG: { + [1657911581.077584][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911581.077621][2977:2977] CHIP:DMG: timedRequest = false, + [1657911581.077654][2977:2977] CHIP:DMG: InvokeRequests = + [1657911581.077698][2977:2977] CHIP:DMG: [ + [1657911581.077731][2977:2977] CHIP:DMG: CommandDataIB = + [1657911581.077768][2977:2977] CHIP:DMG: { + [1657911581.077802][2977:2977] CHIP:DMG: CommandPathIB = + [1657911581.077845][2977:2977] CHIP:DMG: { + [1657911581.077888][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911581.077932][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911581.077976][2977:2977] CHIP:DMG: CommandId = 0x5, + [1657911581.078018][2977:2977] CHIP:DMG: }, + [1657911581.078061][2977:2977] CHIP:DMG: + [1657911581.078098][2977:2977] CHIP:DMG: CommandFields = + [1657911581.078140][2977:2977] CHIP:DMG: { + [1657911581.078182][2977:2977] CHIP:DMG: 0x0 = 1, + [1657911581.078227][2977:2977] CHIP:DMG: 0x1 = 10, + [1657911581.078272][2977:2977] CHIP:DMG: 0x2 = 200, + [1657911581.078317][2977:2977] CHIP:DMG: 0x3 = 0, + [1657911581.078361][2977:2977] CHIP:DMG: 0x4 = 0, + [1657911581.078408][2977:2977] CHIP:DMG: }, + [1657911581.078446][2977:2977] CHIP:DMG: }, + [1657911581.078487][2977:2977] CHIP:DMG: + [1657911581.078519][2977:2977] CHIP:DMG: ], + [1657911581.078560][2977:2977] CHIP:DMG: + [1657911581.078592][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911581.078623][2977:2977] CHIP:DMG: }, + [1657911581.078710][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911581.078757][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911581.078794][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0005 disabled: true - label: @@ -185,23 +217,32 @@ tests: PICS: CC.C.A0001 verification: | ./chip-tool colorcontrol read current-saturation 1 1 - [1646210970.309403][2190:2190] CHIP:IM: Received Read request - [1646210970.309465][2190:2190] CHIP:DMG: ReadRequestMessage = - [1646210970.309495][2190:2190] CHIP:DMG: { - [1646210970.309514][2190:2190] CHIP:DMG: AttributePathIBs = - [1646210970.309541][2190:2190] CHIP:DMG: [ - [1646210970.309567][2190:2190] CHIP:DMG: AttributePathIB = - [1646210970.309599][2190:2190] CHIP:DMG: { - [1646210970.309629][2190:2190] CHIP:DMG: Endpoint = 0x1, - [1646210970.309664][2190:2190] CHIP:DMG: Cluster = 0x300, - [1646210970.309691][2190:2190] CHIP:DMG: Attribute = 0x0000_0001, - [1646210970.309720][2190:2190] CHIP:DMG: } - [1646210970.309750][2190:2190] CHIP:DMG: - [1646210970.309779][2190:2190] CHIP:DMG: ], - [1646210970.309815][2190:2190] CHIP:DMG: - [1646210970.309844][2190:2190] CHIP:DMG: isFabricFiltered = false, - [1646210970.309871][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646210970.309892][2190:2190] CHIP:DMG: }, + + Verify in DUT as client side log: + [1657911602.223413][2977:2977] CHIP:IM: Received Read request + [1657911602.223554][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911602.223609][2977:2977] CHIP:DMG: { + [1657911602.223655][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911602.223708][2977:2977] CHIP:DMG: [ + [1657911602.223758][2977:2977] CHIP:DMG: AttributePathIB = + [1657911602.223828][2977:2977] CHIP:DMG: { + [1657911602.223884][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911602.223949][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911602.224000][2977:2977] CHIP:DMG: Attribute = 0x0000_0001, + [1657911602.224027][2977:2977] CHIP:DMG: } + [1657911602.224078][2977:2977] CHIP:DMG: + [1657911602.224162][2977:2977] CHIP:DMG: ], + [1657911602.224193][2977:2977] CHIP:DMG: + [1657911602.224219][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911602.224244][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911602.224267][2977:2977] CHIP:DMG: }, + [1657911602.224346][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911602.224442][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911602.224471][2977:2977] CHIP:DMG: Cluster 300, Attribute 1 is dirty + [1657911602.224492][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) + [1657911602.224520][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911602.224553][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911602.224608][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT sends MoveToHueAndSaturation command to TH." @@ -209,20 +250,72 @@ tests: verification: | ./chip-tool colorcontrol move-to-hue-and-saturation 100 200 200 0 0 1 1 - [1649664783.987760][8866:8871] CHIP:DMG: StatusIB = - [1649664783.987823][8866:8871] CHIP:DMG: { - [1649664783.987888][8866:8871] CHIP:DMG: status = 0x00 (SUCCESS), - [1649664783.987943][8866:8871] CHIP:DMG: }, + Verify in DUT as client side log: + + [1657911631.586168][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911631.586198][2977:2977] CHIP:DMG: { + [1657911631.586222][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911631.586252][2977:2977] CHIP:DMG: timedRequest = false, + [1657911631.586278][2977:2977] CHIP:DMG: InvokeRequests = + [1657911631.586312][2977:2977] CHIP:DMG: [ + [1657911631.586338][2977:2977] CHIP:DMG: CommandDataIB = + [1657911631.586370][2977:2977] CHIP:DMG: { + [1657911631.586399][2977:2977] CHIP:DMG: CommandPathIB = + [1657911631.586433][2977:2977] CHIP:DMG: { + [1657911631.586466][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911631.586502][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911631.586539][2977:2977] CHIP:DMG: CommandId = 0x6, + [1657911631.586570][2977:2977] CHIP:DMG: }, + [1657911631.586605][2977:2977] CHIP:DMG: + [1657911631.586634][2977:2977] CHIP:DMG: CommandFields = + [1657911631.586667][2977:2977] CHIP:DMG: { + [1657911631.586701][2977:2977] CHIP:DMG: 0x0 = 100, + [1657911631.586736][2977:2977] CHIP:DMG: 0x1 = 200, + [1657911631.586775][2977:2977] CHIP:DMG: 0x2 = 200, + [1657911631.586809][2977:2977] CHIP:DMG: 0x3 = 0, + [1657911631.586844][2977:2977] CHIP:DMG: 0x4 = 0, + [1657911631.586874][2977:2977] CHIP:DMG: }, + [1657911631.586903][2977:2977] CHIP:DMG: }, + [1657911631.586938][2977:2977] CHIP:DMG: + [1657911631.586962][2977:2977] CHIP:DMG: ], + [1657911631.586995][2977:2977] CHIP:DMG: + [1657911631.587021][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911631.587045][2977:2977] CHIP:DMG: }, + [1657911631.587119][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911631.587158][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911631.587186][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0006 disabled: true - label: "Over TransitionTime, DUT reads CurrentHue attribute from TH." PICS: CC.C.A0000 verification: | ./chip-tool colorcontrol read current-hue 1 1 + Verify in DUT as client side log: - [1649664795.474974][8872:8877] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0000 DataVersion: 4087328778 - [1649664795.475051][8872:8877] CHIP:TOO: CurrentHue: 29 - [1649664795.475150][8872:8877] CHIP:EM: Sending Standalone Ack for MessageCounter:4578193 on exchange 26597i + [1657911655.180421][2977:2977] CHIP:IM: Received Read request + [1657911655.180507][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911655.180535][2977:2977] CHIP:DMG: { + [1657911655.180568][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911655.180595][2977:2977] CHIP:DMG: [ + [1657911655.180619][2977:2977] CHIP:DMG: AttributePathIB = + [1657911655.180646][2977:2977] CHIP:DMG: { + [1657911655.180687][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911655.180726][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911655.180762][2977:2977] CHIP:DMG: Attribute = 0x0000_0000, + [1657911655.180792][2977:2977] CHIP:DMG: } + [1657911655.180830][2977:2977] CHIP:DMG: + [1657911655.180855][2977:2977] CHIP:DMG: ], + [1657911655.180885][2977:2977] CHIP:DMG: + [1657911655.180924][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911655.180950][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911655.180973][2977:2977] CHIP:DMG: }, + [1657911655.181063][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911655.181190][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911655.181223][2977:2977] CHIP:DMG: Cluster 300, Attribute 0 is dirty + [1657911655.181255][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1657911655.181284][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911655.181318][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911655.181390][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: @@ -230,53 +323,68 @@ tests: PICS: CC.C.A0001 verification: | ./chip-tool colorcontrol read current-saturation 1 1 - [1646210970.309403][2190:2190] CHIP:IM: Received Read request - [1646210970.309465][2190:2190] CHIP:DMG: ReadRequestMessage = - [1646210970.309495][2190:2190] CHIP:DMG: { - [1646210970.309514][2190:2190] CHIP:DMG: AttributePathIBs = - [1646210970.309541][2190:2190] CHIP:DMG: [ - [1646210970.309567][2190:2190] CHIP:DMG: AttributePathIB = - [1646210970.309599][2190:2190] CHIP:DMG: { - [1646210970.309629][2190:2190] CHIP:DMG: Endpoint = 0x1, - [1646210970.309664][2190:2190] CHIP:DMG: Cluster = 0x300, - [1646210970.309691][2190:2190] CHIP:DMG: Attribute = 0x0000_0001, - [1646210970.309720][2190:2190] CHIP:DMG: } - [1646210970.309750][2190:2190] CHIP:DMG: - [1646210970.309779][2190:2190] CHIP:DMG: ], - [1646210970.309815][2190:2190] CHIP:DMG: - [1646210970.309844][2190:2190] CHIP:DMG: isFabricFiltered = false, - [1646210970.309871][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646210970.309892][2190:2190] CHIP:DMG: }, + + Verify in DUT as client side log: + + [1657911674.594218][2977:2977] CHIP:IM: Received Read request + [1657911674.594301][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911674.594329][2977:2977] CHIP:DMG: { + [1657911674.594352][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911674.594379][2977:2977] CHIP:DMG: [ + [1657911674.594403][2977:2977] CHIP:DMG: AttributePathIB = + [1657911674.594460][2977:2977] CHIP:DMG: { + [1657911674.594491][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911674.594529][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911674.594562][2977:2977] CHIP:DMG: Attribute = 0x0000_0001, + [1657911674.594593][2977:2977] CHIP:DMG: } + [1657911674.594626][2977:2977] CHIP:DMG: + [1657911674.594653][2977:2977] CHIP:DMG: ], + [1657911674.594682][2977:2977] CHIP:DMG: + [1657911674.594710][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911674.594736][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911674.594760][2977:2977] CHIP:DMG: }, + [1657911674.594840][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911674.594955][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911674.594988][2977:2977] CHIP:DMG: Cluster 300, Attribute 1 is dirty + [1657911674.595010][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) + [1657911674.595039][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911674.595073][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911674.595133][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT sends StopMoveStep command to TH." PICS: CC.C.C47.Rsp verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 - [1646211221.659999][2190:2190] CHIP:DMG: InvokeRequestMessage = - [1646211221.660038][2190:2190] CHIP:DMG: { - [1646211221.660076][2190:2190] CHIP:DMG: suppressResponse = false, - [1646211221.660110][2190:2190] CHIP:DMG: timedRequest = false, - [1646211221.660138][2190:2190] CHIP:DMG: InvokeRequests = - [1646211221.660174][2190:2190] CHIP:DMG: [ - [1646211221.660199][2190:2190] CHIP:DMG: CommandDataIB = - [1646211221.660234][2190:2190] CHIP:DMG: { - [1646211221.660266][2190:2190] CHIP:DMG: CommandPathIB = - [1646211221.660301][2190:2190] CHIP:DMG: { - [1646211221.660342][2190:2190] CHIP:DMG: EndpointId = 0x1, - [1646211221.660381][2190:2190] CHIP:DMG: ClusterId = 0x300, - [1646211221.660420][2190:2190] CHIP:DMG: CommandId = 0x47, - [1646211221.660460][2190:2190] CHIP:DMG: }, - [1646211221.660502][2190:2190] CHIP:DMG: - [1646211221.660535][2190:2190] CHIP:DMG: CommandData = - [1646211221.660572][2190:2190] CHIP:DMG: { - [1646211221.660612][2190:2190] CHIP:DMG: 0x0 = 0, - [1646211221.660652][2190:2190] CHIP:DMG: 0x1 = 0, - [1646211221.660691][2190:2190] CHIP:DMG: }, - [1646211221.660724][2190:2190] CHIP:DMG: }, - [1646211221.660759][2190:2190] CHIP:DMG: - [1646211221.660788][2190:2190] CHIP:DMG: ], - [1646211221.660823][2190:2190] CHIP:DMG: - [1646211221.660849][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646211221.660877][2190:2190] CHIP:DMG: }, + + Verify in DUT as client side log: + [1657911698.270231][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911698.270280][2977:2977] CHIP:DMG: { + [1657911698.270321][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911698.270370][2977:2977] CHIP:DMG: timedRequest = false, + [1657911698.270414][2977:2977] CHIP:DMG: InvokeRequests = + [1657911698.270470][2977:2977] CHIP:DMG: [ + [1657911698.270554][2977:2977] CHIP:DMG: CommandDataIB = + [1657911698.270583][2977:2977] CHIP:DMG: { + [1657911698.270607][2977:2977] CHIP:DMG: CommandPathIB = + [1657911698.270638][2977:2977] CHIP:DMG: { + [1657911698.270732][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911698.270765][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911698.270797][2977:2977] CHIP:DMG: CommandId = 0x47, + [1657911698.270852][2977:2977] CHIP:DMG: }, + [1657911698.270888][2977:2977] CHIP:DMG: + [1657911698.270916][2977:2977] CHIP:DMG: CommandFields = + [1657911698.270947][2977:2977] CHIP:DMG: { + [1657911698.270979][2977:2977] CHIP:DMG: 0x0 = 0, + [1657911698.271012][2977:2977] CHIP:DMG: 0x1 = 0, + [1657911698.271044][2977:2977] CHIP:DMG: }, + [1657911698.271071][2977:2977] CHIP:DMG: }, + [1657911698.271103][2977:2977] CHIP:DMG: + [1657911698.271126][2977:2977] CHIP:DMG: ], + [1657911698.271156][2977:2977] CHIP:DMG: + [1657911698.271180][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911698.271203][2977:2977] CHIP:DMG: }, + [1657911698.271270][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911698.271337][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911698.271365][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0047 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml index 5860464466d61a..ff63e1a898d9bf 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml @@ -18,6 +18,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + colorXConfigValue: + type: int16u + defaultValue: 400 + colorYConfigValue: + type: int16u + defaultValue: 500 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,71 +45,76 @@ tests: response: value: 1 - - label: "Check current x attribute value matched before any change" - PICS: CC.S.A0003 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F03 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentX attribute from DUT" + PICS: CC.S.F03 && CC.S.A0003 command: "readAttribute" attribute: "CurrentX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Check current y attribute value matched before any change" - PICS: CC.S.A0004 + - label: "TH reads CurrentY attribute from DUT" + PICS: CC.S.F03 && CC.S.A0004 command: "readAttribute" attribute: "CurrentY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Move to Color command" - PICS: CC.S.C07.Rsp + - label: "TH sends MoveToColor command to DUT" + PICS: CC.S.F03 && CC.S.C07.Rsp command: "MoveToColor" arguments: values: - name: "colorX" - value: 200 + value: colorXConfigValue - name: "colorY" - value: 300 + value: colorYConfigValue - name: "TransitionTime" - value: 20 + value: 10 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 20ms" + - label: "Wait 1500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 20 + value: 1500 - - label: - "Check current x attribute value matched the value sent by the last - command" - PICS: CC.S.A0003 + - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentX" response: + value: colorXConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: - "Check current y attribute value matched the value sent by the last - command" - PICS: CC.S.A0004 + - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: + value: colorYConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml index f49b03ecf7ffd4..d7c6f283e0658b 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml @@ -18,6 +18,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateXValue: + type: int16s + defaultValue: 50 + RateYValue: + type: int16s + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,74 +45,81 @@ tests: response: value: 1 - - label: "Check current x attribute value matched before any change" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F03 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentX attribute from DUT" command: "readAttribute" - PICS: CC.S.A0003 + PICS: CC.S.F03 && CC.S.A0003 attribute: "CurrentX" response: + saveAs: CurrentXValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Check current y attribute value matched before any change" + - label: "TH reads CurrentY attribute from DUT" command: "readAttribute" - PICS: CC.S.A0004 + PICS: CC.S.F03 && CC.S.A0004 attribute: "CurrentY" response: + saveAs: CurrentYValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Move Color command" + - label: "TH sends MoveColor command to DUT" command: "MoveColor" - PICS: CC.S.C08.Rsp + PICS: CC.S.F03 && CC.S.C08.Rsp arguments: values: - name: "rateX" - value: 15 + value: RateXValue - name: "rateY" - value: 20 + value: RateYValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 150ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 150 + value: 1000 - - label: - "Check current x attribute value matched the value sent by the last - command" - PICS: CC.S.A0003 + - label: "TH reads CurrentX attribute from DUT" + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp command: "readAttribute" attribute: "CurrentX" response: + saveAs: CurrentXBeforeStopCommand constraints: - type: uint16 - minValue: 0 + type: int16u + minValue: CurrentXValue maxValue: 65279 - - label: - "Check current y attribute value matched the value sent by the last - command" - PICS: CC.S.A0004 + - label: "TH reads CurrentY attribute from DUT" + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp command: "readAttribute" attribute: "CurrentY" response: + saveAs: CurrentYBeforeStopCommand constraints: - type: uint16 - minValue: 0 + type: int16u + minValue: CurrentYValue maxValue: 65279 - - label: "Stop Move Step command" - PICS: CC.S.C47.Rsp + - label: "TH sends StopMoveStep command to DUT" + PICS: CC.S.F03 && CC.S.C47.Rsp command: "StopMoveStep" arguments: values: @@ -115,28 +128,24 @@ tests: - name: "OptionsOverride" value: 0 - - label: - "Check current x attribute value matched the value sent by the last - command" - PICS: CC.S.A0003 + - label: "TH reads CurrentX attribute from DUT" + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C47.Rsp command: "readAttribute" attribute: "CurrentX" response: constraints: - type: uint16 - minValue: 0 + type: int16u + minValue: CurrentXBeforeStopCommand maxValue: 65279 - - label: - "Check current y attribute value matched the value sent by the last - command" - PICS: CC.S.A0004 + - label: "TH reads CurrentY attribute from DUT" + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C47.Rsp command: "readAttribute" attribute: "CurrentY" response: constraints: - type: uint16 - minValue: 0 + type: int16u + minValue: CurrentYBeforeStopCommand maxValue: 65279 - label: "Turn off light that we turned on" diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml index 0a7b2fe7027b09..a4b3141553f63f 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml @@ -18,6 +18,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + StepXConfigValue: + type: int16s + defaultValue: 100 + StepYConfigValue: + type: int16s + defaultValue: 100 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,72 +45,77 @@ tests: response: value: 1 - - label: "Check current x attribute value matched before any change" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F03 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentX attribute from DUT" command: "readAttribute" - PICS: CC.S.A0003 + PICS: CC.S.F03 && CC.S.A0003 attribute: "CurrentX" response: + saveAs: CurrentXValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Check current y attribute value matched before any change" + - label: "TH reads CurrentY attribute from DUT" command: "readAttribute" - PICS: CC.S.A0004 + PICS: CC.S.F03 && CC.S.A0004 attribute: "CurrentY" response: + saveAs: CurrentYValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Step Color command" + - label: "TH sends StepColor command to DUT" command: "StepColor" - PICS: CC.S.C09.Rsp + PICS: CC.S.F03 && CC.S.C09.Rsp arguments: values: - name: "stepX" - value: 15 + value: StepXConfigValue - name: "stepY" - value: 20 + value: StepYConfigValue - name: "TransitionTime" - value: 50 + value: 10 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 50ms" + - label: "Wait 1500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 50 + value: 1500 - - label: - "Check current x attribute value matched the value sent by the last - command" - PICS: CC.S.A0003 + - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C09.Rsp command: "readAttribute" attribute: "CurrentX" response: constraints: - type: uint16 - minValue: 0 + type: int16u + minValue: CurrentXValue maxValue: 65279 - - label: - "Check current y attribute value matched the value sent by the last - command" - PICS: CC.S.A0004 + - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C09.Rsp command: "readAttribute" attribute: "CurrentY" response: constraints: - type: uint16 - minValue: 0 + type: int16u + minValue: CurrentYValue maxValue: 65279 - label: "Turn off light that we turned on" diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_4.yaml index 7fb9f03d87129d..d56918da179840 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_4.yaml @@ -27,39 +27,39 @@ tests: verification: | ./chip-tool colorcontrol move-to-color 400 500 300 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657099701.285127][4162:4167] CHIP:DMG: InvokeResponseMessage = - [1657099701.285157][4162:4167] CHIP:DMG: { - [1657099701.285185][4162:4167] CHIP:DMG: suppressResponse = false, - [1657099701.285213][4162:4167] CHIP:DMG: InvokeResponseIBs = - [1657099701.285249][4162:4167] CHIP:DMG: [ - [1657099701.285277][4162:4167] CHIP:DMG: InvokeResponseIB = - [1657099701.285314][4162:4167] CHIP:DMG: { - [1657099701.285343][4162:4167] CHIP:DMG: CommandStatusIB = - [1657099701.285383][4162:4167] CHIP:DMG: { - [1657099701.285418][4162:4167] CHIP:DMG: CommandPathIB = - [1657099701.285456][4162:4167] CHIP:DMG: { - [1657099701.285499][4162:4167] CHIP:DMG: EndpointId = 0x1, - [1657099701.285540][4162:4167] CHIP:DMG: ClusterId = 0x300, - [1657099701.285579][4162:4167] CHIP:DMG: CommandId = 0x7, - [1657099701.285617][4162:4167] CHIP:DMG: }, - [1657099701.285659][4162:4167] CHIP:DMG: - [1657099701.285693][4162:4167] CHIP:DMG: StatusIB = - [1657099701.285731][4162:4167] CHIP:DMG: { - [1657099701.285769][4162:4167] CHIP:DMG: status = 0x00 (SUCCESS), - [1657099701.285811][4162:4167] CHIP:DMG: }, - [1657099701.285848][4162:4167] CHIP:DMG: - [1657099701.285880][4162:4167] CHIP:DMG: }, - [1657099701.285922][4162:4167] CHIP:DMG: - [1657099701.285952][4162:4167] CHIP:DMG: }, - [1657099701.285987][4162:4167] CHIP:DMG: - [1657099701.286013][4162:4167] CHIP:DMG: ], - [1657099701.286047][4162:4167] CHIP:DMG: - [1657099701.286074][4162:4167] CHIP:DMG: InteractionModelRevision = 1 - [1657099701.286100][4162:4167] CHIP:DMG: }, - [1657099701.286166][4162:4167] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0007 Status=0x0 - [1657099701.286211][4162:4167] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + [1657911753.687856][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911753.687913][2977:2977] CHIP:DMG: { + [1657911753.687961][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911753.688017][2977:2977] CHIP:DMG: timedRequest = false, + [1657911753.688115][2977:2977] CHIP:DMG: InvokeRequests = + [1657911753.688185][2977:2977] CHIP:DMG: [ + [1657911753.688236][2977:2977] CHIP:DMG: CommandDataIB = + [1657911753.688294][2977:2977] CHIP:DMG: { + [1657911753.688347][2977:2977] CHIP:DMG: CommandPathIB = + [1657911753.688414][2977:2977] CHIP:DMG: { + [1657911753.688479][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911753.688544][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911753.688610][2977:2977] CHIP:DMG: CommandId = 0x7, + [1657911753.688673][2977:2977] CHIP:DMG: }, + [1657911753.688740][2977:2977] CHIP:DMG: + [1657911753.688800][2977:2977] CHIP:DMG: CommandFields = + [1657911753.688858][2977:2977] CHIP:DMG: { + [1657911753.688925][2977:2977] CHIP:DMG: 0x0 = 400, + [1657911753.688995][2977:2977] CHIP:DMG: 0x1 = 500, + [1657911753.689048][2977:2977] CHIP:DMG: 0x2 = 300, + [1657911753.689080][2977:2977] CHIP:DMG: 0x3 = 0, + [1657911753.689113][2977:2977] CHIP:DMG: 0x4 = 0, + [1657911753.689198][2977:2977] CHIP:DMG: }, + [1657911753.689228][2977:2977] CHIP:DMG: }, + [1657911753.689262][2977:2977] CHIP:DMG: + [1657911753.689285][2977:2977] CHIP:DMG: ], + [1657911753.689316][2977:2977] CHIP:DMG: + [1657911753.689339][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911753.689362][2977:2977] CHIP:DMG: }, + [1657911753.689432][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911753.689469][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911753.689496][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0007 disabled: true - label: "Over TransitionTime, DUT reads CurrentX attribute from TH." @@ -67,10 +67,31 @@ tests: verification: | ./chip-tool colorcontrol read current-x 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657099727.553289][4170:4175] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0003 DataVersion: 1806818891 - [1657099727.553359][4170:4175] CHIP:TOO: CurrentX: 3590 + Verify in DUT as client side log: + [1657911771.965429][2977:2977] CHIP:IM: Received Read request + [1657911771.965509][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911771.965536][2977:2977] CHIP:DMG: { + [1657911771.965557][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911771.965583][2977:2977] CHIP:DMG: [ + [1657911771.965606][2977:2977] CHIP:DMG: AttributePathIB = + [1657911771.965631][2977:2977] CHIP:DMG: { + [1657911771.965657][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911771.965695][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911771.965726][2977:2977] CHIP:DMG: Attribute = 0x0000_0003, + [1657911771.965758][2977:2977] CHIP:DMG: } + [1657911771.965786][2977:2977] CHIP:DMG: + [1657911771.965811][2977:2977] CHIP:DMG: ], + [1657911771.965838][2977:2977] CHIP:DMG: + [1657911771.965864][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911771.965889][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911771.965912][2977:2977] CHIP:DMG: }, + [1657911771.965989][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911771.966084][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911771.966114][2977:2977] CHIP:DMG: Cluster 300, Attribute 3 is dirty + [1657911771.966136][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0003 (expanded=0) + [1657911771.966164][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911771.966196][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911771.966254][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "Over TransitionTime, DUT reads CurrentY attribute from TH." @@ -78,10 +99,31 @@ tests: verification: | ./chip-tool colorcontrol read current-y 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657099748.490709][4176:4181] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0004 DataVersion: 1806819047 - [1657099748.490778][4176:4181] CHIP:TOO: CurrentY: 500 + Verify in DUT as client side log: + [1657911790.232595][2977:2977] CHIP:IM: Received Read request + [1657911790.232674][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911790.232700][2977:2977] CHIP:DMG: { + [1657911790.232723][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911790.232756][2977:2977] CHIP:DMG: [ + [1657911790.232780][2977:2977] CHIP:DMG: AttributePathIB = + [1657911790.232807][2977:2977] CHIP:DMG: { + [1657911790.232834][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911790.232865][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911790.232898][2977:2977] CHIP:DMG: Attribute = 0x0000_0004, + [1657911790.232931][2977:2977] CHIP:DMG: } + [1657911790.232960][2977:2977] CHIP:DMG: + [1657911790.232985][2977:2977] CHIP:DMG: ], + [1657911790.233012][2977:2977] CHIP:DMG: + [1657911790.233038][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911790.233063][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911790.233086][2977:2977] CHIP:DMG: }, + [1657911790.233162][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911790.233249][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911790.233279][2977:2977] CHIP:DMG: Cluster 300, Attribute 4 is dirty + [1657911790.233300][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0004 (expanded=0) + [1657911790.233328][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911790.233360][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911790.233415][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT sends MoveColor command to TH" @@ -89,39 +131,39 @@ tests: verification: | ./chip-tool colorcontrol move-color 10 20 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657099771.368436][4184:4189] CHIP:DMG: InvokeResponseMessage = - [1657099771.368464][4184:4189] CHIP:DMG: { - [1657099771.368491][4184:4189] CHIP:DMG: suppressResponse = false, - [1657099771.368519][4184:4189] CHIP:DMG: InvokeResponseIBs = - [1657099771.368555][4184:4189] CHIP:DMG: [ - [1657099771.368583][4184:4189] CHIP:DMG: InvokeResponseIB = - [1657099771.368620][4184:4189] CHIP:DMG: { - [1657099771.368649][4184:4189] CHIP:DMG: CommandStatusIB = - [1657099771.368688][4184:4189] CHIP:DMG: { - [1657099771.368722][4184:4189] CHIP:DMG: CommandPathIB = - [1657099771.368763][4184:4189] CHIP:DMG: { - [1657099771.368803][4184:4189] CHIP:DMG: EndpointId = 0x1, - [1657099771.368843][4184:4189] CHIP:DMG: ClusterId = 0x300, - [1657099771.368885][4184:4189] CHIP:DMG: CommandId = 0x8, - [1657099771.368922][4184:4189] CHIP:DMG: }, - [1657099771.368965][4184:4189] CHIP:DMG: - [1657099771.369003][4184:4189] CHIP:DMG: StatusIB = - [1657099771.369041][4184:4189] CHIP:DMG: { - [1657099771.369079][4184:4189] CHIP:DMG: status = 0x00 (SUCCESS), - [1657099771.369115][4184:4189] CHIP:DMG: }, - [1657099771.369154][4184:4189] CHIP:DMG: - [1657099771.369187][4184:4189] CHIP:DMG: }, - [1657099771.369225][4184:4189] CHIP:DMG: - [1657099771.369254][4184:4189] CHIP:DMG: }, - [1657099771.369288][4184:4189] CHIP:DMG: - [1657099771.369315][4184:4189] CHIP:DMG: ], - [1657099771.369349][4184:4189] CHIP:DMG: - [1657099771.369376][4184:4189] CHIP:DMG: InteractionModelRevision = 1 - [1657099771.369403][4184:4189] CHIP:DMG: }, - [1657099771.369469][4184:4189] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0008 Status=0x0 - [1657099771.369514][4184:4189] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + + [1657911814.839535][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911814.839586][2977:2977] CHIP:DMG: { + [1657911814.839611][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911814.839640][2977:2977] CHIP:DMG: timedRequest = false, + [1657911814.839666][2977:2977] CHIP:DMG: InvokeRequests = + [1657911814.839762][2977:2977] CHIP:DMG: [ + [1657911814.839792][2977:2977] CHIP:DMG: CommandDataIB = + [1657911814.839822][2977:2977] CHIP:DMG: { + [1657911814.839849][2977:2977] CHIP:DMG: CommandPathIB = + [1657911814.839882][2977:2977] CHIP:DMG: { + [1657911814.839914][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911814.839952][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911814.839987][2977:2977] CHIP:DMG: CommandId = 0x8, + [1657911814.840019][2977:2977] CHIP:DMG: }, + [1657911814.840074][2977:2977] CHIP:DMG: + [1657911814.840105][2977:2977] CHIP:DMG: CommandFields = + [1657911814.840136][2977:2977] CHIP:DMG: { + [1657911814.840172][2977:2977] CHIP:DMG: 0x0 = 10, + [1657911814.840207][2977:2977] CHIP:DMG: 0x1 = 20, + [1657911814.840239][2977:2977] CHIP:DMG: 0x2 = 0, + [1657911814.840273][2977:2977] CHIP:DMG: 0x3 = 0, + [1657911814.840310][2977:2977] CHIP:DMG: }, + [1657911814.840340][2977:2977] CHIP:DMG: }, + [1657911814.840374][2977:2977] CHIP:DMG: + [1657911814.840399][2977:2977] CHIP:DMG: ], + [1657911814.840432][2977:2977] CHIP:DMG: + [1657911814.840457][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911814.840482][2977:2977] CHIP:DMG: }, + [1657911814.840556][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911814.840596][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911814.840624][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0008 disabled: true - label: "DUT reads CurrentX attribute from TH." @@ -129,10 +171,31 @@ tests: verification: | ./chip-tool colorcontrol read current-x 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657099796.765576][4191:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0003 DataVersion: 1806820056 - [1657099796.765663][4191:4196] CHIP:TOO: CurrentX: 652 + Verify in DUT as client side log: + [1657911771.965429][2977:2977] CHIP:IM: Received Read request + [1657911771.965509][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911771.965536][2977:2977] CHIP:DMG: { + [1657911771.965557][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911771.965583][2977:2977] CHIP:DMG: [ + [1657911771.965606][2977:2977] CHIP:DMG: AttributePathIB = + [1657911771.965631][2977:2977] CHIP:DMG: { + [1657911771.965657][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911771.965695][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911771.965726][2977:2977] CHIP:DMG: Attribute = 0x0000_0003, + [1657911771.965758][2977:2977] CHIP:DMG: } + [1657911771.965786][2977:2977] CHIP:DMG: + [1657911771.965811][2977:2977] CHIP:DMG: ], + [1657911771.965838][2977:2977] CHIP:DMG: + [1657911771.965864][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911771.965889][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911771.965912][2977:2977] CHIP:DMG: }, + [1657911771.965989][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911771.966084][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911771.966114][2977:2977] CHIP:DMG: Cluster 300, Attribute 3 is dirty + [1657911771.966136][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0003 (expanded=0) + [1657911771.966164][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911771.966196][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911771.966254][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT reads CurrentY attribute from TH." @@ -140,10 +203,31 @@ tests: verification: | ./chip-tool colorcontrol read current-y 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657099818.536813][4199:4204] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0004 DataVersion: 1806820924 - [1657099818.536886][4199:4204] CHIP:TOO: CurrentY: 1439 + Verify in DUT as client side log: + [1657911790.232595][2977:2977] CHIP:IM: Received Read request + [1657911790.232674][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911790.232700][2977:2977] CHIP:DMG: { + [1657911790.232723][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911790.232756][2977:2977] CHIP:DMG: [ + [1657911790.232780][2977:2977] CHIP:DMG: AttributePathIB = + [1657911790.232807][2977:2977] CHIP:DMG: { + [1657911790.232834][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911790.232865][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911790.232898][2977:2977] CHIP:DMG: Attribute = 0x0000_0004, + [1657911790.232931][2977:2977] CHIP:DMG: } + [1657911790.232960][2977:2977] CHIP:DMG: + [1657911790.232985][2977:2977] CHIP:DMG: ], + [1657911790.233012][2977:2977] CHIP:DMG: + [1657911790.233038][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911790.233063][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911790.233086][2977:2977] CHIP:DMG: }, + [1657911790.233162][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911790.233249][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911790.233279][2977:2977] CHIP:DMG: Cluster 300, Attribute 4 is dirty + [1657911790.233300][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0004 (expanded=0) + [1657911790.233328][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911790.233360][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911790.233415][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT sends StepColor command to TH" @@ -151,40 +235,39 @@ tests: verification: | ./chip-tool colorcontrol step-color 100 100 200 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - - [1657099841.988019][4205:4210] CHIP:DMG: InvokeResponseMessage = - [1657099841.988053][4205:4210] CHIP:DMG: { - [1657099841.988084][4205:4210] CHIP:DMG: suppressResponse = false, - [1657099841.988115][4205:4210] CHIP:DMG: InvokeResponseIBs = - [1657099841.988154][4205:4210] CHIP:DMG: [ - [1657099841.988184][4205:4210] CHIP:DMG: InvokeResponseIB = - [1657099841.988225][4205:4210] CHIP:DMG: { - [1657099841.988257][4205:4210] CHIP:DMG: CommandStatusIB = - [1657099841.988300][4205:4210] CHIP:DMG: { - [1657099841.988337][4205:4210] CHIP:DMG: CommandPathIB = - [1657099841.988382][4205:4210] CHIP:DMG: { - [1657099841.988424][4205:4210] CHIP:DMG: EndpointId = 0x1, - [1657099841.988468][4205:4210] CHIP:DMG: ClusterId = 0x300, - [1657099841.988510][4205:4210] CHIP:DMG: CommandId = 0x9, - [1657099841.988549][4205:4210] CHIP:DMG: }, - [1657099841.988592][4205:4210] CHIP:DMG: - [1657099841.988628][4205:4210] CHIP:DMG: StatusIB = - [1657099841.988672][4205:4210] CHIP:DMG: { - [1657099841.988714][4205:4210] CHIP:DMG: status = 0x00 (SUCCESS), - [1657099841.988757][4205:4210] CHIP:DMG: }, - [1657099841.988798][4205:4210] CHIP:DMG: - [1657099841.988833][4205:4210] CHIP:DMG: }, - [1657099841.988872][4205:4210] CHIP:DMG: - [1657099841.988906][4205:4210] CHIP:DMG: }, - [1657099841.988942][4205:4210] CHIP:DMG: - [1657099841.988972][4205:4210] CHIP:DMG: ], - [1657099841.989008][4205:4210] CHIP:DMG: - [1657099841.989037][4205:4210] CHIP:DMG: InteractionModelRevision = 1 - [1657099841.989068][4205:4210] CHIP:DMG: }, - [1657099841.989137][4205:4210] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0009 Status=0x0 - [1657099841.989186][4205:4210] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + [1657911853.249758][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911853.249810][2977:2977] CHIP:DMG: { + [1657911853.249851][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911853.249932][2977:2977] CHIP:DMG: timedRequest = false, + [1657911853.249980][2977:2977] CHIP:DMG: InvokeRequests = + [1657911853.250039][2977:2977] CHIP:DMG: [ + [1657911853.250083][2977:2977] CHIP:DMG: CommandDataIB = + [1657911853.250150][2977:2977] CHIP:DMG: { + [1657911853.250200][2977:2977] CHIP:DMG: CommandPathIB = + [1657911853.250258][2977:2977] CHIP:DMG: { + [1657911853.250335][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911853.250395][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911853.250473][2977:2977] CHIP:DMG: CommandId = 0x9, + [1657911853.250529][2977:2977] CHIP:DMG: }, + [1657911853.250588][2977:2977] CHIP:DMG: + [1657911853.250655][2977:2977] CHIP:DMG: CommandFields = + [1657911853.250717][2977:2977] CHIP:DMG: { + [1657911853.250784][2977:2977] CHIP:DMG: 0x0 = 100, + [1657911853.250857][2977:2977] CHIP:DMG: 0x1 = 100, + [1657911853.250901][2977:2977] CHIP:DMG: 0x2 = 200, + [1657911853.250943][2977:2977] CHIP:DMG: 0x3 = 0, + [1657911853.250976][2977:2977] CHIP:DMG: 0x4 = 0, + [1657911853.251011][2977:2977] CHIP:DMG: }, + [1657911853.251039][2977:2977] CHIP:DMG: }, + [1657911853.251071][2977:2977] CHIP:DMG: + [1657911853.251103][2977:2977] CHIP:DMG: ], + [1657911853.251135][2977:2977] CHIP:DMG: + [1657911853.251159][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911853.251182][2977:2977] CHIP:DMG: }, + [1657911853.251262][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911853.251311][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911853.251340][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0009 disabled: true - label: "Over TransitionTime, DUT reads CurrentX attribute from TH." @@ -192,10 +275,31 @@ tests: verification: | ./chip-tool colorcontrol read current-x 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657099868.222275][4211:4216] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0003 DataVersion: 1806822657 - [1657099868.222338][4211:4216] CHIP:TOO: CurrentX: 1202 + Verify in DUT as client side log: + [1657911771.965429][2977:2977] CHIP:IM: Received Read request + [1657911771.965509][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911771.965536][2977:2977] CHIP:DMG: { + [1657911771.965557][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911771.965583][2977:2977] CHIP:DMG: [ + [1657911771.965606][2977:2977] CHIP:DMG: AttributePathIB = + [1657911771.965631][2977:2977] CHIP:DMG: { + [1657911771.965657][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911771.965695][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911771.965726][2977:2977] CHIP:DMG: Attribute = 0x0000_0003, + [1657911771.965758][2977:2977] CHIP:DMG: } + [1657911771.965786][2977:2977] CHIP:DMG: + [1657911771.965811][2977:2977] CHIP:DMG: ], + [1657911771.965838][2977:2977] CHIP:DMG: + [1657911771.965864][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911771.965889][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911771.965912][2977:2977] CHIP:DMG: }, + [1657911771.965989][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911771.966084][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911771.966114][2977:2977] CHIP:DMG: Cluster 300, Attribute 3 is dirty + [1657911771.966136][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0003 (expanded=0) + [1657911771.966164][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911771.966196][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911771.966254][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "Over TransitionTime, DUT reads CurrentY attribute from TH." @@ -203,10 +307,31 @@ tests: verification: | ./chip-tool colorcontrol read current-y 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657099888.236645][4219:4224] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0004 DataVersion: 1806822657 - [1657099888.236717][4219:4224] CHIP:TOO: CurrentY: 2005 + Verify in DUT as client side log: + [1657911790.232595][2977:2977] CHIP:IM: Received Read request + [1657911790.232674][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911790.232700][2977:2977] CHIP:DMG: { + [1657911790.232723][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911790.232756][2977:2977] CHIP:DMG: [ + [1657911790.232780][2977:2977] CHIP:DMG: AttributePathIB = + [1657911790.232807][2977:2977] CHIP:DMG: { + [1657911790.232834][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911790.232865][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911790.232898][2977:2977] CHIP:DMG: Attribute = 0x0000_0004, + [1657911790.232931][2977:2977] CHIP:DMG: } + [1657911790.232960][2977:2977] CHIP:DMG: + [1657911790.232985][2977:2977] CHIP:DMG: ], + [1657911790.233012][2977:2977] CHIP:DMG: + [1657911790.233038][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911790.233063][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911790.233086][2977:2977] CHIP:DMG: }, + [1657911790.233162][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911790.233249][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911790.233279][2977:2977] CHIP:DMG: Cluster 300, Attribute 4 is dirty + [1657911790.233300][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0004 (expanded=0) + [1657911790.233328][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911790.233360][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911790.233415][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT sends StopMoveStep command to TH." @@ -214,37 +339,35 @@ tests: verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657099908.880877][4226:4231] CHIP:DMG: InvokeResponseMessage = - [1657099908.880917][4226:4231] CHIP:DMG: { - [1657099908.880956][4226:4231] CHIP:DMG: suppressResponse = false, - [1657099908.880996][4226:4231] CHIP:DMG: InvokeResponseIBs = - [1657099908.881046][4226:4231] CHIP:DMG: [ - [1657099908.881086][4226:4231] CHIP:DMG: InvokeResponseIB = - [1657099908.881138][4226:4231] CHIP:DMG: { - [1657099908.881180][4226:4231] CHIP:DMG: CommandStatusIB = - [1657099908.881234][4226:4231] CHIP:DMG: { - [1657099908.881282][4226:4231] CHIP:DMG: CommandPathIB = - [1657099908.881336][4226:4231] CHIP:DMG: { - [1657099908.881391][4226:4231] CHIP:DMG: EndpointId = 0x1, - [1657099908.881448][4226:4231] CHIP:DMG: ClusterId = 0x300, - [1657099908.881509][4226:4231] CHIP:DMG: CommandId = 0x47, - [1657099908.881561][4226:4231] CHIP:DMG: }, - [1657099908.881618][4226:4231] CHIP:DMG: - [1657099908.881666][4226:4231] CHIP:DMG: StatusIB = - [1657099908.881720][4226:4231] CHIP:DMG: { - [1657099908.881775][4226:4231] CHIP:DMG: status = 0x00 (SUCCESS), - [1657099908.881828][4226:4231] CHIP:DMG: }, - [1657099908.881880][4226:4231] CHIP:DMG: - [1657099908.881926][4226:4231] CHIP:DMG: }, - [1657099908.881966][4226:4231] CHIP:DMG: - [1657099908.882000][4226:4231] CHIP:DMG: }, - [1657099908.882039][4226:4231] CHIP:DMG: - [1657099908.882068][4226:4231] CHIP:DMG: ], - [1657099908.882104][4226:4231] CHIP:DMG: - [1657099908.882133][4226:4231] CHIP:DMG: InteractionModelRevision = 1 - [1657099908.882162][4226:4231] CHIP:DMG: }, - [1657099908.882230][4226:4231] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0047 Status=0x0 - [1657099908.882278][4226:4231] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + + [1657911876.005800][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911876.005828][2977:2977] CHIP:DMG: { + [1657911876.005852][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911876.005881][2977:2977] CHIP:DMG: timedRequest = false, + [1657911876.005907][2977:2977] CHIP:DMG: InvokeRequests = + [1657911876.005940][2977:2977] CHIP:DMG: [ + [1657911876.005966][2977:2977] CHIP:DMG: CommandDataIB = + [1657911876.005998][2977:2977] CHIP:DMG: { + [1657911876.006027][2977:2977] CHIP:DMG: CommandPathIB = + [1657911876.006061][2977:2977] CHIP:DMG: { + [1657911876.006094][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911876.006128][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911876.006166][2977:2977] CHIP:DMG: CommandId = 0x47, + [1657911876.006197][2977:2977] CHIP:DMG: }, + [1657911876.006231][2977:2977] CHIP:DMG: + [1657911876.006261][2977:2977] CHIP:DMG: CommandFields = + [1657911876.006296][2977:2977] CHIP:DMG: { + [1657911876.006330][2977:2977] CHIP:DMG: 0x0 = 0, + [1657911876.006366][2977:2977] CHIP:DMG: 0x1 = 0, + [1657911876.006399][2977:2977] CHIP:DMG: }, + [1657911876.006428][2977:2977] CHIP:DMG: }, + [1657911876.006462][2977:2977] CHIP:DMG: + [1657911876.006487][2977:2977] CHIP:DMG: ], + [1657911876.006519][2977:2977] CHIP:DMG: + [1657911876.006543][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911876.006568][2977:2977] CHIP:DMG: }, + [1657911876.006639][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911876.006676][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911876.006706][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0047 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml index 83c20933c71c9d..1dd9eeba179f02 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml @@ -41,48 +41,77 @@ tests: response: value: 1 - - label: "Read current color temprature" - PICS: CC.S.A0007 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F04 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" + PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" - attribute: "ColorTemperature" + attribute: "ColorTempPhysicalMinMireds" + response: + saveAs: ColorTempPhysicalMinMiredsValue + constraints: + type: int16u + minValue: 0 + maxValue: 65279 + + - label: "TH reads ColorTempPhysicalMaxMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A400c + command: "readAttribute" + attribute: "ColorTempPhysicalMaxMireds" response: + saveAs: ColorTempPhysicalMaxMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 + - label: "TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 + command: "readAttribute" + attribute: "ColorTemperature" + response: + constraints: + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue + - label: "Move To Color Temperature command" - PICS: CC.S.C0A.Rsp + PICS: CC.S.F04 && CC.S.C0A.Rsp command: "MoveToColorTemperature" arguments: values: - name: "colorTemperature" - value: 100 + value: ColorTempPhysicalMaxMiredsValue - name: "TransitionTime" - value: 5 + value: 10 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 700ms" + - label: "Wait 1500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 700 + value: 1500 - label: "Read current color temprature" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 command: "readAttribute" attribute: "ColorTemperature" response: - value: 100 + value: ColorTempPhysicalMaxMiredsValue constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - label: "Turn off light that we turned on" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml index 0e06aca06cb7eb..d9d49ab601542e 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml @@ -40,90 +40,119 @@ tests: response: value: 1 - - label: "Read current color temprature" - PICS: CC.S.A0007 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F04 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" + PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" - attribute: "ColorTemperature" + attribute: "ColorTempPhysicalMinMireds" response: + saveAs: ColorTempPhysicalMinMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Move up color temperature command" - PICS: CC.S.C4B.Rsp + - label: "TH reads ColorTempPhysicalMaxMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A400c + command: "readAttribute" + attribute: "ColorTempPhysicalMaxMireds" + response: + saveAs: ColorTempPhysicalMaxMiredsValue + constraints: + type: int16u + minValue: 0 + maxValue: 65279 + + - label: "TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 + command: "readAttribute" + attribute: "ColorTemperature" + response: + constraints: + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue + + - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Up" + PICS: CC.S.F04 && CC.S.C4B.Rsp command: "MoveColorTemperature" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 10 + value: 20 - name: "ColorTemperatureMinimumMireds" - value: 1 + value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" - value: 255 + value: ColorTempPhysicalMaxMiredsValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 90ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 90 + value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - - label: "Wait 95ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 95 + value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - - label: "Wait 100ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - - label: "Move down color temperature command" - PICS: CC.S.C4B.Rsp + - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Down" + PICS: CC.S.F04 && CC.S.C4B.Rsp command: "MoveColorTemperature" arguments: values: @@ -132,160 +161,163 @@ tests: - name: "Rate" value: 20 - name: "ColorTemperatureMinimumMireds" - value: 1 + value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" - value: 255 + value: ColorTempPhysicalMaxMiredsValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 190ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 190 + value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - - label: "Wait 195ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 195 + value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - - label: "Wait 200ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 200 + value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - - label: "Move up color temperature command" - PICS: CC.S.C4B.Rsp + - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Up" + PICS: CC.S.F04 && CC.S.C4B.Rsp command: "MoveColorTemperature" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 10 + value: 20 - name: "ColorTemperatureMinimumMireds" - value: 1 + value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" - value: 255 + value: ColorTempPhysicalMaxMiredsValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Stop Color Temperature command" - PICS: CC.S.C4B.Rsp + - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Stop" + PICS: CC.S.F04 && CC.S.C4B.Rsp command: "MoveColorTemperature" arguments: values: - name: "MoveMode" value: 0 - name: "Rate" - value: 10 + value: 20 - name: "ColorTemperatureMinimumMireds" - value: 1 + value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" - value: 255 + value: ColorTempPhysicalMaxMiredsValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 90ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 90 + value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: + saveAs: ColorTemperatureValue constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - - label: "Wait 95ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 95 + value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: + value: ColorTemperatureValue constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - - label: "Wait 100ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: + value: ColorTemperatureValue constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - - label: "Move down color temperature command" - PICS: CC.S.C4B.Rsp + - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Down" + PICS: CC.S.F04 && CC.S.C4B.Rsp command: "MoveColorTemperature" arguments: values: @@ -294,85 +326,88 @@ tests: - name: "Rate" value: 20 - name: "ColorTemperatureMinimumMireds" - value: 1 + value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" - value: 255 + value: ColorTempPhysicalMaxMiredsValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Stop Color Temperature command" - PICS: CC.S.C4B.Rsp + - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Stop" + PICS: CC.S.F04 && CC.S.C4B.Rsp command: "MoveColorTemperature" arguments: values: - name: "MoveMode" value: 0 - name: "Rate" - value: 10 + value: 20 - name: "ColorTemperatureMinimumMireds" - value: 1 + value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" - value: 255 + value: ColorTempPhysicalMaxMiredsValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 140ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 140 + value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: + saveAs: ColorTemperatureMoveModeStop constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - - label: "Wait 145ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 145 + value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: + value: ColorTemperatureMoveModeStop constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - - label: "Wait 150ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 150 + value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: + value: ColorTemperatureValue constraints: - type: uint16 - minValue: 0 - maxValue: 65279 + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - label: "Turn off light that we turned on" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml index 2404ac2e550e22..b68517cdfbe6f9 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml @@ -40,161 +40,190 @@ tests: response: value: 1 - - label: "Read current color temprature" - PICS: CC.S.A0007 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F04 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" + PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" - attribute: "ColorTemperature" + attribute: "ColorTempPhysicalMinMireds" + response: + saveAs: ColorTempPhysicalMinMiredsValue + constraints: + type: int16u + minValue: 0 + maxValue: 65279 + + - label: "TH reads ColorTempPhysicalMaxMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A400c + command: "readAttribute" + attribute: "ColorTempPhysicalMaxMireds" response: + saveAs: ColorTempPhysicalMaxMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Step up color temperature command" - PICS: CC.S.C4C.Rsp + - label: "TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 + command: "readAttribute" + attribute: "ColorTemperature" + response: + constraints: + type: int16u + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue + + - label: "TH sends StepColorTemperature command to DUT with MoveMode = Up" + PICS: CC.S.F04 && CC.S.C4C.Rsp command: "StepColorTemperature" arguments: values: - name: "StepMode" value: 1 - name: "StepSize" - value: 5 + value: 100 - name: "TransitionTime" - value: 50 + value: 15 - name: "ColorTemperatureMinimumMireds" - value: 5 + value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" - value: 100 + value: ColorTempPhysicalMaxMiredsValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 40ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 40 + value: 500 - - label: "Read current color temprature" - PICS: CC.S.A0007 + - label: "TH reads ColorTemperatureMireds attribute from DUT several times" + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Wait 45ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 45 + value: 500 - - label: "Read current color temprature" - PICS: CC.S.A0007 + - label: "TH reads ColorTemperatureMireds attribute from DUT several times" + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Wait 50ms" + - label: "Wait 700ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 50 + value: 700 - - label: "Read current color temprature" - PICS: CC.S.A0007 + - label: "TH reads ColorTemperatureMireds attribute from DUT several times" + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Step down color temperature command" - PICS: CC.S.C4C.Rsp + - label: "TH sends StepColorTemperature command to DUT with MoveMode = Down" + PICS: CC.S.F04 && CC.S.C4C.Rsp command: "StepColorTemperature" arguments: values: - name: "StepMode" value: 3 - name: "StepSize" - value: 5 + value: 100 - name: "TransitionTime" - value: 50 + value: 10 - name: "ColorTemperatureMinimumMireds" - value: 5 + value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" - value: 100 + value: ColorTempPhysicalMaxMiredsValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 40ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 40 + value: 500 - - label: "Read current color temprature" - PICS: CC.S.A0007 + - label: "TH reads ColorTemperatureMireds attribute from DUT several times" + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Wait 45ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 45 + value: 500 - - label: "Read current color temprature" - PICS: CC.S.A0007 + - label: "TH reads ColorTemperatureMireds attribute from DUT several times" + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Wait 50ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 50 + value: 500 - - label: "Read current color temprature" - PICS: CC.S.A0007 + - label: "TH reads ColorTemperatureMireds attribute from DUT several times" + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml index 1c15250f5ffdaa..df482f27a21cb9 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml @@ -22,151 +22,223 @@ config: tests: - label: - "DUT sends MoveToColorTemperature command to TH an - ColorTemperatureMireds with TransitionTime 300." - PICS: CC.C.C0A.Rsp + "* TH provides a server implementation of Color Control with + F04(CT)=true and reasonable values of ColorTempPhysicalMinMireds, + ColorTempPhysicalMaxMireds * DUT might read attributes like + ColorTempPhysicalMinMireds, ColorTempPhysicalMaxMireds from TH (now or + in later steps) to use those." verification: | - ./chip-tool colorcontrol move-to-color-temperature 150 300 0 0 1 1 + ./chip-tool colorcontrol read color-temp-physical-min-mireds 1 1 + + Verify in DUT as client side log: + [1658215472.478274][3413:3413] CHIP:IM: Received Read request + [1658215472.478456][3413:3413] CHIP:DMG: ReadRequestMessage = + [1658215472.478527][3413:3413] CHIP:DMG: { + [1658215472.478579][3413:3413] CHIP:DMG: AttributePathIBs = + [1658215472.478641][3413:3413] CHIP:DMG: [ + [1658215472.478698][3413:3413] CHIP:DMG: AttributePathIB = + [1658215472.478763][3413:3413] CHIP:DMG: { + [1658215472.478843][3413:3413] CHIP:DMG: Endpoint = 0x1, + [1658215472.478921][3413:3413] CHIP:DMG: Cluster = 0x300, + [1658215472.479000][3413:3413] CHIP:DMG: Attribute = 0x0000_400B, + [1658215472.479071][3413:3413] CHIP:DMG: } + [1658215472.479140][3413:3413] CHIP:DMG: + [1658215472.479202][3413:3413] CHIP:DMG: ], + [1658215472.479271][3413:3413] CHIP:DMG: + [1658215472.479335][3413:3413] CHIP:DMG: isFabricFiltered = true, + [1658215472.479397][3413:3413] CHIP:DMG: InteractionModelRevision = 1 + [1658215472.479453][3413:3413] CHIP:DMG: }, + [1658215472.479633][3413:3413] CHIP:DMG: IM RH moving to [GeneratingReports] + [1658215472.479850][3413:3413] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1658215472.479924][3413:3413] CHIP:DMG: Cluster 300, Attribute 400b is dirty + [1658215472.479976][3413:3413] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_400B (expanded=0) + [1658215472.480044][3413:3413] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1658215472.480118][3413:3413] CHIP:DMG: AccessControl: allowed + - verify on Reference app receives the right response for the data sent in the above commands - - [1657100029.310604][4236:4241] CHIP:DMG: InvokeResponseMessage = - [1657100029.310635][4236:4241] CHIP:DMG: { - [1657100029.310664][4236:4241] CHIP:DMG: suppressResponse = false, - [1657100029.310695][4236:4241] CHIP:DMG: InvokeResponseIBs = - [1657100029.310733][4236:4241] CHIP:DMG: [ - [1657100029.310764][4236:4241] CHIP:DMG: InvokeResponseIB = - [1657100029.310803][4236:4241] CHIP:DMG: { - [1657100029.310836][4236:4241] CHIP:DMG: CommandStatusIB = - [1657100029.310874][4236:4241] CHIP:DMG: { - [1657100029.310910][4236:4241] CHIP:DMG: CommandPathIB = - [1657100029.310954][4236:4241] CHIP:DMG: { - [1657100029.310997][4236:4241] CHIP:DMG: EndpointId = 0x1, - [1657100029.311041][4236:4241] CHIP:DMG: ClusterId = 0x300, - [1657100029.311083][4236:4241] CHIP:DMG: CommandId = 0xa, - [1657100029.311122][4236:4241] CHIP:DMG: }, - [1657100029.311167][4236:4241] CHIP:DMG: - [1657100029.311204][4236:4241] CHIP:DMG: StatusIB = - [1657100029.311244][4236:4241] CHIP:DMG: { - [1657100029.311286][4236:4241] CHIP:DMG: status = 0x00 (SUCCESS), - [1657100029.311327][4236:4241] CHIP:DMG: }, - [1657100029.311368][4236:4241] CHIP:DMG: - [1657100029.311404][4236:4241] CHIP:DMG: }, - [1657100029.311444][4236:4241] CHIP:DMG: - [1657100029.311476][4236:4241] CHIP:DMG: }, - [1657100029.311512][4236:4241] CHIP:DMG: - [1657100029.311541][4236:4241] CHIP:DMG: ], - [1657100029.311577][4236:4241] CHIP:DMG: - [1657100029.311606][4236:4241] CHIP:DMG: InteractionModelRevision = 1 - [1657100029.311635][4236:4241] CHIP:DMG: }, - [1657100029.311705][4236:4241] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_000A Status=0x0 - [1657100029.311754][4236:4241] CHIP:DMG: ICR moving to [AwaitingDe] + ./chip-tool colorcontrol read color-temp-physical-max-mireds 1 1 + + Verify in DUT as client side log: + [1658215497.166720][3413:3413] CHIP:IM: Received Read request + [1658215497.166886][3413:3413] CHIP:DMG: ReadRequestMessage = + [1658215497.166949][3413:3413] CHIP:DMG: { + [1658215497.167001][3413:3413] CHIP:DMG: AttributePathIBs = + [1658215497.167062][3413:3413] CHIP:DMG: [ + [1658215497.167120][3413:3413] CHIP:DMG: AttributePathIB = + [1658215497.167205][3413:3413] CHIP:DMG: { + [1658215497.167273][3413:3413] CHIP:DMG: Endpoint = 0x1, + [1658215497.167349][3413:3413] CHIP:DMG: Cluster = 0x300, + [1658215497.167418][3413:3413] CHIP:DMG: Attribute = 0x0000_400C, + [1658215497.167488][3413:3413] CHIP:DMG: } + [1658215497.167559][3413:3413] CHIP:DMG: + [1658215497.167621][3413:3413] CHIP:DMG: ], + [1658215497.167687][3413:3413] CHIP:DMG: + [1658215497.167750][3413:3413] CHIP:DMG: isFabricFiltered = true, + [1658215497.167810][3413:3413] CHIP:DMG: InteractionModelRevision = 1 + [1658215497.167866][3413:3413] CHIP:DMG: }, + [1658215497.168046][3413:3413] CHIP:DMG: IM RH moving to [GeneratingReports] + [1658215497.168296][3413:3413] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1658215497.168369][3413:3413] CHIP:DMG: Cluster 300, Attribute 400c is dirty + [1658215497.168422][3413:3413] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_400C (expanded=0) + [1658215497.168491][3413:3413] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1658215497.168570][3413:3413] CHIP:DMG: AccessControl: allowed disabled: true - - label: - "Over TransitionTime, DUT reads CurrentColorTemperatureMireds - attribute from TH periodically." - PICS: CC.C.A0007 + - label: "DUT sends MoveToColorTemperature command to TH" + PICS: CC.C.C0A.Rsp verification: | - ./chip-tool colorcontrol read color-temperature 1 1 - - verify on Reference app receives the right response for the data sent in the above commands + ./chip-tool colorcontrol move-to-color-temperature 150 300 0 0 1 1 - [1657100053.392386][4243:4248] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 1806823137 - [1657100053.392464][4243:4248] CHIP:TOO: ColorTemperature: 120 + Verify in DUT as client side log: + [1657911906.102478][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911906.102603][2977:2977] CHIP:DMG: { + [1657911906.102633][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911906.102674][2977:2977] CHIP:DMG: timedRequest = false, + [1657911906.102703][2977:2977] CHIP:DMG: InvokeRequests = + [1657911906.102744][2977:2977] CHIP:DMG: [ + [1657911906.102814][2977:2977] CHIP:DMG: CommandDataIB = + [1657911906.102853][2977:2977] CHIP:DMG: { + [1657911906.102885][2977:2977] CHIP:DMG: CommandPathIB = + [1657911906.102923][2977:2977] CHIP:DMG: { + [1657911906.102964][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911906.103007][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911906.103049][2977:2977] CHIP:DMG: CommandId = 0xa, + [1657911906.103088][2977:2977] CHIP:DMG: }, + [1657911906.103129][2977:2977] CHIP:DMG: + [1657911906.103166][2977:2977] CHIP:DMG: CommandFields = + [1657911906.103205][2977:2977] CHIP:DMG: { + [1657911906.103243][2977:2977] CHIP:DMG: 0x0 = 150, + [1657911906.103285][2977:2977] CHIP:DMG: 0x1 = 300, + [1657911906.103327][2977:2977] CHIP:DMG: 0x2 = 0, + [1657911906.103369][2977:2977] CHIP:DMG: 0x3 = 0, + [1657911906.103406][2977:2977] CHIP:DMG: }, + [1657911906.103440][2977:2977] CHIP:DMG: }, + [1657911906.103479][2977:2977] CHIP:DMG: + [1657911906.103506][2977:2977] CHIP:DMG: ], + [1657911906.103543][2977:2977] CHIP:DMG: + [1657911906.103570][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911906.103600][2977:2977] CHIP:DMG: }, + [1657911906.103683][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911906.103726][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911906.103757][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_000A disabled: true - - label: "DUT sends MoveColorTemperatureMireds command to TH" + - label: "DUT sends MoveColorTemperature command to TH" PICS: CC.C.C4B.Rsp verification: | ./chip-tool colorcontrol move-color-temperature 1 10 5 250 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657100088.128957][4250:4255] CHIP:DMG: InvokeResponseMessage = - [1657100088.128993][4250:4255] CHIP:DMG: { - [1657100088.129028][4250:4255] CHIP:DMG: suppressResponse = false, - [1657100088.129073][4250:4255] CHIP:DMG: InvokeResponseIBs = - [1657100088.129119][4250:4255] CHIP:DMG: [ - [1657100088.129155][4250:4255] CHIP:DMG: InvokeResponseIB = - [1657100088.129202][4250:4255] CHIP:DMG: { - [1657100088.129240][4250:4255] CHIP:DMG: CommandStatusIB = - [1657100088.129284][4250:4255] CHIP:DMG: { - [1657100088.129329][4250:4255] CHIP:DMG: CommandPathIB = - [1657100088.129378][4250:4255] CHIP:DMG: { - [1657100088.129428][4250:4255] CHIP:DMG: EndpointId = 0x1, - [1657100088.129481][4250:4255] CHIP:DMG: ClusterId = 0x300, - [1657100088.129533][4250:4255] CHIP:DMG: CommandId = 0x4b, - [1657100088.129587][4250:4255] CHIP:DMG: }, - [1657100088.129640][4250:4255] CHIP:DMG: - [1657100088.129683][4250:4255] CHIP:DMG: StatusIB = - [1657100088.129732][4250:4255] CHIP:DMG: { - [1657100088.129782][4250:4255] CHIP:DMG: status = 0x00 (SUCCESS), - [1657100088.129831][4250:4255] CHIP:DMG: }, - [1657100088.129970][4250:4255] CHIP:DMG: - [1657100088.130016][4250:4255] CHIP:DMG: }, - [1657100088.130070][4250:4255] CHIP:DMG: - [1657100088.130110][4250:4255] CHIP:DMG: }, - [1657100088.130155][4250:4255] CHIP:DMG: - [1657100088.130190][4250:4255] CHIP:DMG: ], - [1657100088.130233][4250:4255] CHIP:DMG: - [1657100088.130269][4250:4255] CHIP:DMG: InteractionModelRevision = 1 - [1657100088.130304][4250:4255] CHIP:DMG: }, - [1657100088.130415][4250:4255] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_004B Status=0x0 - [1657100088.130476][4250:4255] CHIP:DMG: ICR moving to [AwaitingDe] + + Verify in DUT as client side log: + [1657911964.250866][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911964.250894][2977:2977] CHIP:DMG: { + [1657911964.250917][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911964.250952][2977:2977] CHIP:DMG: timedRequest = false, + [1657911964.250991][2977:2977] CHIP:DMG: InvokeRequests = + [1657911964.251026][2977:2977] CHIP:DMG: [ + [1657911964.251050][2977:2977] CHIP:DMG: CommandDataIB = + [1657911964.251090][2977:2977] CHIP:DMG: { + [1657911964.251120][2977:2977] CHIP:DMG: CommandPathIB = + [1657911964.251156][2977:2977] CHIP:DMG: { + [1657911964.251192][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911964.251230][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911964.251260][2977:2977] CHIP:DMG: CommandId = 0x4b, + [1657911964.251283][2977:2977] CHIP:DMG: }, + [1657911964.251328][2977:2977] CHIP:DMG: + [1657911964.251359][2977:2977] CHIP:DMG: CommandFields = + [1657911964.251394][2977:2977] CHIP:DMG: { + [1657911964.251430][2977:2977] CHIP:DMG: 0x0 = 1, + [1657911964.251477][2977:2977] CHIP:DMG: 0x1 = 10, + [1657911964.251516][2977:2977] CHIP:DMG: 0x2 = 5, + [1657911964.251553][2977:2977] CHIP:DMG: 0x3 = 250, + [1657911964.251600][2977:2977] CHIP:DMG: 0x4 = 0, + [1657911964.251639][2977:2977] CHIP:DMG: 0x5 = 0, + [1657911964.251675][2977:2977] CHIP:DMG: }, + [1657911964.251713][2977:2977] CHIP:DMG: }, + [1657911964.251748][2977:2977] CHIP:DMG: + [1657911964.251772][2977:2977] CHIP:DMG: ], + [1657911964.251812][2977:2977] CHIP:DMG: + [1657911964.251838][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911964.251861][2977:2977] CHIP:DMG: }, + [1657911964.251947][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911964.252028][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911964.252083][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_004B disabled: true - - label: - "DUT reads CurrentColorTemperatureMireds attribute from TH several - Times." - PICS: CC.C.A0007 + - label: "DUT sends StepColorTemperature command to TH" + PICS: CC.C.C4C.Rsp verification: | - ./chip-tool colorcontrol read color-temperature 1 1 + ./chip-tool colorcontrol step-color-temperature 1 10 200 5 250 0 0 1 1 + - verify on Reference app receives the right response for the data sent in the above commands + Verify in DUT as client side log: - [1657100106.171543][4257:4262] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 1806823460 - [1657100106.171613][4257:4262] CHIP:TOO: ColorTemperature: 250 + [1657911996.200187][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657911996.200216][2977:2977] CHIP:DMG: { + [1657911996.200238][2977:2977] CHIP:DMG: suppressResponse = false, + [1657911996.200265][2977:2977] CHIP:DMG: timedRequest = false, + [1657911996.200304][2977:2977] CHIP:DMG: InvokeRequests = + [1657911996.200337][2977:2977] CHIP:DMG: [ + [1657911996.200361][2977:2977] CHIP:DMG: CommandDataIB = + [1657911996.200389][2977:2977] CHIP:DMG: { + [1657911996.200424][2977:2977] CHIP:DMG: CommandPathIB = + [1657911996.200465][2977:2977] CHIP:DMG: { + [1657911996.200507][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657911996.200543][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657911996.200592][2977:2977] CHIP:DMG: CommandId = 0x4c, + [1657911996.200626][2977:2977] CHIP:DMG: }, + [1657911996.200659][2977:2977] CHIP:DMG: + [1657911996.200701][2977:2977] CHIP:DMG: CommandFields = + [1657911996.200735][2977:2977] CHIP:DMG: { + [1657911996.200768][2977:2977] CHIP:DMG: 0x0 = 1, + [1657911996.200816][2977:2977] CHIP:DMG: 0x1 = 10, + [1657911996.200850][2977:2977] CHIP:DMG: 0x2 = 200, + [1657911996.200893][2977:2977] CHIP:DMG: 0x3 = 5, + [1657911996.200931][2977:2977] CHIP:DMG: 0x4 = 250, + [1657911996.200967][2977:2977] CHIP:DMG: 0x5 = 0, + [1657911996.201010][2977:2977] CHIP:DMG: 0x6 = 0, + [1657911996.201046][2977:2977] CHIP:DMG: }, + [1657911996.201075][2977:2977] CHIP:DMG: }, + [1657911996.201119][2977:2977] CHIP:DMG: + [1657911996.201144][2977:2977] CHIP:DMG: ], + [1657911996.201176][2977:2977] CHIP:DMG: + [1657911996.201200][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911996.201237][2977:2977] CHIP:DMG: }, + [1657911996.201314][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657911996.201367][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911996.201395][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_004C disabled: true - - label: "DUT sends StepColorTemperature command to TH" - PICS: CC.C.C4C.Rsp + - label: "DUT sends StopMoveStep command to TH." + PICS: CC.C.C47.Rsp verification: | - ./chip-tool colorcontrol step-color-temperature 1 10 200 5 250 0 0 1 1 + ./chip-tool colorcontrol read color-temperature 1 1 + Verify in DUT as client side log: - verify on Reference app receives the right response for the data sent in the above commands - - [1657100128.589195][4265:4270] CHIP:DMG: InvokeResponseMessage = - [1657100128.589219][4265:4270] CHIP:DMG: { - [1657100128.589243][4265:4270] CHIP:DMG: suppressResponse = false, - [1657100128.589275][4265:4270] CHIP:DMG: InvokeResponseIBs = - [1657100128.589305][4265:4270] CHIP:DMG: [ - [1657100128.589329][4265:4270] CHIP:DMG: InvokeResponseIB = - [1657100128.589361][4265:4270] CHIP:DMG: { - [1657100128.589387][4265:4270] CHIP:DMG: CommandStatusIB = - [1657100128.589419][4265:4270] CHIP:DMG: { - [1657100128.589447][4265:4270] CHIP:DMG: CommandPathIB = - [1657100128.589480][4265:4270] CHIP:DMG: { - [1657100128.589514][4265:4270] CHIP:DMG: EndpointId = 0x1, - [1657100128.589552][4265:4270] CHIP:DMG: ClusterId = 0x300, - [1657100128.589588][4265:4270] CHIP:DMG: CommandId = 0x4c, - [1657100128.589621][4265:4270] CHIP:DMG: }, - [1657100128.589657][4265:4270] CHIP:DMG: - [1657100128.589686][4265:4270] CHIP:DMG: StatusIB = - [1657100128.589719][4265:4270] CHIP:DMG: { - [1657100128.589752][4265:4270] CHIP:DMG: status = 0x00 (SUCCESS), - [1657100128.589787][4265:4270] CHIP:DMG: }, - [1657100128.589819][4265:4270] CHIP:DMG: - [1657100128.589851][4265:4270] CHIP:DMG: }, - [1657100128.589883][4265:4270] CHIP:DMG: - [1657100128.589910][4265:4270] CHIP:DMG: }, - [1657100128.589942][4265:4270] CHIP:DMG: - [1657100128.589964][4265:4270] CHIP:DMG: ], - [1657100128.589993][4265:4270] CHIP:DMG: - [1657100128.590016][4265:4270] CHIP:DMG: InteractionModelRevision = 1 - [1657100128.590039][4265:4270] CHIP:DMG: }, - [1657100128.590096][4265:4270] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_004C Status=0x0 - [1657100128.590136][4265:4270] CHIP:DMG: ICR moving to [AwaitingDe] + [1657911929.678926][2977:2977] CHIP:IM: Received Read request + [1657911929.679006][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911929.679032][2977:2977] CHIP:DMG: { + [1657911929.679066][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911929.679092][2977:2977] CHIP:DMG: [ + [1657911929.679116][2977:2977] CHIP:DMG: AttributePathIB = + [1657911929.679154][2977:2977] CHIP:DMG: { + [1657911929.679182][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911929.679213][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911929.679252][2977:2977] CHIP:DMG: Attribute = 0x0000_0007, + [1657911929.679281][2977:2977] CHIP:DMG: } + [1657911929.679308][2977:2977] CHIP:DMG: + [1657911929.679333][2977:2977] CHIP:DMG: ], + [1657911929.679370][2977:2977] CHIP:DMG: + [1657911929.679397][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911929.679422][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911929.679453][2977:2977] CHIP:DMG: }, + [1657911929.679531][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911929.679637][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911929.679677][2977:2977] CHIP:DMG: Cluster 300, Attribute 7 is dirty + [1657911929.679698][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0007 (expanded=0) + [1657911929.679726][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911929.679768][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911929.679827][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: @@ -176,10 +248,32 @@ tests: verification: | ./chip-tool colorcontrol read color-temperature 1 1 - verify on Reference app receives the right response for the data sent in the above commands + Verify in DUT as client side log: - [1657100144.703637][4271:4276] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 1806823781 - [1657100144.703701][4271:4276] CHIP:TOO: ColorTemperature: 250 + [1657911929.678926][2977:2977] CHIP:IM: Received Read request + [1657911929.679006][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657911929.679032][2977:2977] CHIP:DMG: { + [1657911929.679066][2977:2977] CHIP:DMG: AttributePathIBs = + [1657911929.679092][2977:2977] CHIP:DMG: [ + [1657911929.679116][2977:2977] CHIP:DMG: AttributePathIB = + [1657911929.679154][2977:2977] CHIP:DMG: { + [1657911929.679182][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657911929.679213][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657911929.679252][2977:2977] CHIP:DMG: Attribute = 0x0000_0007, + [1657911929.679281][2977:2977] CHIP:DMG: } + [1657911929.679308][2977:2977] CHIP:DMG: + [1657911929.679333][2977:2977] CHIP:DMG: ], + [1657911929.679370][2977:2977] CHIP:DMG: + [1657911929.679397][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657911929.679422][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657911929.679453][2977:2977] CHIP:DMG: }, + [1657911929.679531][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657911929.679637][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657911929.679677][2977:2977] CHIP:DMG: Cluster 300, Attribute 7 is dirty + [1657911929.679698][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_0007 (expanded=0) + [1657911929.679726][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657911929.679768][2977:2977] CHIP:DMG: AccessControl: allowed + [1657911929.679827][2977:2977] CHIP:DMG: Sending report (payload has 37 bytes)... disabled: true - label: "DUT sends StopMoveStep command to TH." @@ -187,37 +281,34 @@ tests: verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657100165.298276][4277:4282] CHIP:DMG: InvokeResponseMessage = - [1657100165.298307][4277:4282] CHIP:DMG: { - [1657100165.298337][4277:4282] CHIP:DMG: suppressResponse = false, - [1657100165.298395][4277:4282] CHIP:DMG: InvokeResponseIBs = - [1657100165.298439][4277:4282] CHIP:DMG: [ - [1657100165.298470][4277:4282] CHIP:DMG: InvokeResponseIB = - [1657100165.298510][4277:4282] CHIP:DMG: { - [1657100165.298543][4277:4282] CHIP:DMG: CommandStatusIB = - [1657100165.298581][4277:4282] CHIP:DMG: { - [1657100165.298618][4277:4282] CHIP:DMG: CommandPathIB = - [1657100165.298664][4277:4282] CHIP:DMG: { - [1657100165.298707][4277:4282] CHIP:DMG: EndpointId = 0x1, - [1657100165.298750][4277:4282] CHIP:DMG: ClusterId = 0x300, - [1657100165.298796][4277:4282] CHIP:DMG: CommandId = 0x47, - [1657100165.298836][4277:4282] CHIP:DMG: }, - [1657100165.298881][4277:4282] CHIP:DMG: - [1657100165.298917][4277:4282] CHIP:DMG: StatusIB = - [1657100165.298961][4277:4282] CHIP:DMG: { - [1657100165.299004][4277:4282] CHIP:DMG: status = 0x00 (SUCCESS), - [1657100165.299045][4277:4282] CHIP:DMG: }, - [1657100165.299086][4277:4282] CHIP:DMG: - [1657100165.299122][4277:4282] CHIP:DMG: }, - [1657100165.299164][4277:4282] CHIP:DMG: - [1657100165.299197][4277:4282] CHIP:DMG: }, - [1657100165.299237][4277:4282] CHIP:DMG: - [1657100165.299267][4277:4282] CHIP:DMG: ], - [1657100165.299304][4277:4282] CHIP:DMG: - [1657100165.299333][4277:4282] CHIP:DMG: InteractionModelRevision = 1 - [1657100165.299362][4277:4282] CHIP:DMG: }, - [1657100165.299430][4277:4282] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0047 Status=0x0 - [1657100165.299480][4277:4282] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + [1657912016.927414][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657912016.927442][2977:2977] CHIP:DMG: { + [1657912016.927464][2977:2977] CHIP:DMG: suppressResponse = false, + [1657912016.927490][2977:2977] CHIP:DMG: timedRequest = false, + [1657912016.927514][2977:2977] CHIP:DMG: InvokeRequests = + [1657912016.927557][2977:2977] CHIP:DMG: [ + [1657912016.927581][2977:2977] CHIP:DMG: CommandDataIB = + [1657912016.927608][2977:2977] CHIP:DMG: { + [1657912016.927642][2977:2977] CHIP:DMG: CommandPathIB = + [1657912016.927675][2977:2977] CHIP:DMG: { + [1657912016.927705][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657912016.927739][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657912016.927770][2977:2977] CHIP:DMG: CommandId = 0x47, + [1657912016.927809][2977:2977] CHIP:DMG: }, + [1657912016.927841][2977:2977] CHIP:DMG: + [1657912016.927866][2977:2977] CHIP:DMG: CommandFields = + [1657912016.927905][2977:2977] CHIP:DMG: { + [1657912016.927935][2977:2977] CHIP:DMG: 0x0 = 0, + [1657912016.927976][2977:2977] CHIP:DMG: 0x1 = 0, + [1657912016.928008][2977:2977] CHIP:DMG: }, + [1657912016.928035][2977:2977] CHIP:DMG: }, + [1657912016.928090][2977:2977] CHIP:DMG: + [1657912016.928124][2977:2977] CHIP:DMG: ], + [1657912016.928154][2977:2977] CHIP:DMG: + [1657912016.928178][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657912016.928201][2977:2977] CHIP:DMG: }, + [1657912016.928282][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657912016.928328][2977:2977] CHIP:DMG: AccessControl: allowed + [1657912016.928356][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0047 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml index 68504be09001ab..67fea5a4dd70dc 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml @@ -18,6 +18,22 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + timeout: 150 + EnhancedHueConfigValue: + type: int16u + defaultValue: 1025 + EnhancedHueShortestDistanceConfigValue: + type: int16u + defaultValue: 1050 + EnhancedHueLongestDistanceConfigValue: + type: int16u + defaultValue: 1200 + EnhancedHueDirectionUpConfigValue: + type: int16u + defaultValue: 1300 + EnhancedHueDirectionDownConfigValue: + type: int16u + defaultValue: 1100 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,41 +55,47 @@ tests: response: value: 1 - - label: "Enhanced Move To Hue command" - PICS: CC.S.C40.Rsp + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F01 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH sends EnhancedMoveToHue command to DUT" + PICS: CC.S.F01 && CC.S.C40.Rsp command: "EnhancedMoveToHue" arguments: values: - name: "EnhancedHue" - value: 1025 + value: EnhancedHueConfigValue - name: "Direction" value: 0 - name: "TransitionTime" - value: 1 + value: 0 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: + value: EnhancedHueConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Enhanced Move To Hue command" - PICS: CC.S.C40.Rsp + - label: "TH sends EnhancedMoveToHue command to DUT" + PICS: CC.S.F01 && CC.S.C40.Rsp command: "EnhancedMoveToHue" arguments: values: - name: "EnhancedHue" - value: 1100 + value: EnhancedHueShortestDistanceConfigValue - name: "Direction" value: 0 - name: "TransitionTime" @@ -83,73 +105,68 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 290ms" + - label: "Wait 5500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 290 + value: 5500 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 295ms" + - label: "Wait 5500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 295 + value: 5500 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 300ms" + - label: "Wait 20s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 300 + value: 20000 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: + value: EnhancedHueShortestDistanceConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Enhanced Move To Hue command" - PICS: CC.S.C40.Rsp + - label: "TH sends EnhancedMoveToHue command to DUT" + PICS: CC.S.F01 && CC.S.C40.Rsp command: "EnhancedMoveToHue" arguments: values: - name: "EnhancedHue" - value: 1150 + value: EnhancedHueLongestDistanceConfigValue - name: "Direction" value: 1 - name: "TransitionTime" @@ -159,73 +176,68 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 290ms" + - label: "Wait 5500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 290 + value: 5500 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 295ms" + - label: "Wait 5500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 295 + value: 5500 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 300ms" + - label: "Wait 20s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 300 + value: 20000 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: + value: EnhancedHueLongestDistanceConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Enhanced Move To Hue command" - PICS: CC.S.C40.Rsp + - label: "TH sends EnhancedMoveToHue command to DUT" + PICS: CC.S.F01 && CC.S.C40.Rsp command: "EnhancedMoveToHue" arguments: values: - name: "EnhancedHue" - value: 1200 + value: EnhancedHueDirectionUpConfigValue - name: "Direction" value: 2 - name: "TransitionTime" @@ -235,73 +247,68 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 290ms" + - label: "Wait 5500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 290 + value: 5500 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 295ms" + - label: "Wait 5500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 295 + value: 5500 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 300ms" + - label: "Wait 20s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 300 + value: 20000 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: + value: EnhancedHueDirectionUpConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Enhanced Move To Hue command" - PICS: CC.S.C40.Rsp + - label: "TH sends EnhancedMoveToHue command to DUT " + PICS: CC.S.F01 && CC.S.C40.Rsp command: "EnhancedMoveToHue" arguments: values: - name: "EnhancedHue" - value: 1300 + value: EnhancedHueDirectionDownConfigValue - name: "Direction" value: 3 - name: "TransitionTime" @@ -311,63 +318,58 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 290ms" + - label: "Wait 5500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 290 + value: 5500 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 295ms" + - label: "Wait 5500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 295 + value: 5500 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 300ms" + - label: "Wait 20s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 300 + value: 20000 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: + value: EnhancedHueDirectionDownConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml index fd6d6e68c164c5..dc0ddd96cd6f9a 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateConfigValue: + type: int16u + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,92 +42,93 @@ tests: response: value: 1 - - label: "Check EnhancedCurrentHue attribute from DUT" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F01 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Enhanced Move Hue Up command" - PICS: CC.S.C41.Rsp + - label: "TH sends EnhancedMoveHue command to DUT with MoveMode Up" + PICS: CC.S.F01 && CC.S.C41.Rsp command: "EnhancedMoveHue" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 290ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 290 + value: 1000 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT several times." + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 295ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 295 + value: 1000 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT several times." + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 300ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 300 + value: 1000 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT several times." + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Enhanced Move Hue Stop command" - PICS: CC.S.C41.Rsp + - label: "TH sends EnhancedMoveHue command to DUT with MoveMode Stop" + PICS: CC.S.F01 && CC.S.C41.Rsp command: "EnhancedMoveHue" arguments: values: @@ -137,94 +141,106 @@ tests: - name: "OptionsOverride" value: 0 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT several times" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: + saveAs: EnhancedCurrentHueStep3b constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Enhanced Move Hue Down command" - PICS: CC.S.C41.Rsp + - label: "Wait 1000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT several times." + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + command: "readAttribute" + attribute: "EnhancedCurrentHue" + response: + value: EnhancedCurrentHueStep3b + constraints: + type: int16u + minValue: 0 + maxValue: 65535 + + - label: "TH sends EnhancedMoveHue command to DUT with MoveMode Down" + PICS: CC.S.F01 && CC.S.C41.Rsp command: "EnhancedMoveHue" arguments: values: - name: "MoveMode" value: 3 - name: "Rate" - value: 5 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 40ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 40 + value: 500 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT several times" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 45ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 45 + value: 500 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT several times" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 50ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 50 + value: 500 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT several times" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Enhanced Move Hue Stop command" - PICS: CC.S.C41.Rsp + - label: "TH sends EnhancedMoveHue command to DUT with MoveMode Stop" + PICS: CC.S.F01 && CC.S.C41.Rsp command: "EnhancedMoveHue" arguments: values: @@ -237,15 +253,33 @@ tests: - name: "OptionsOverride" value: 0 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT several times." + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + command: "readAttribute" + attribute: "EnhancedCurrentHue" + response: + saveAs: EnhancedCurrentHueStep5b + constraints: + type: int16u + minValue: 0 + maxValue: 65535 + + - label: "Wait 1000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT several times." + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: + value: EnhancedCurrentHueStep5b constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml index 1193fcd9845039..d76467b3616b92 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + StepSizeConfigValue: + type: int16u + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,81 +42,88 @@ tests: response: value: 1 - - label: "Reads EnhancedCurrentHue attribute from DUT" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F01 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Enhanced Step Hue Up command" - PICS: CC.S.C42.Rsp + - label: "TH sends EnhancedStepHue command to DUT with StepMode Up" + PICS: CC.S.F01 && CC.S.C42.Rsp command: "EnhancedStepHue" arguments: values: - name: "StepMode" value: 0 - name: "StepSize" - value: 50 + value: StepSizeConfigValue - name: "TransitionTime" - value: 1 + value: 10 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 10ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 10 + value: 1000 - label: "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Enhanced Step Hue Down command" - PICS: CC.S.C42.Rsp + - label: "TH sends EnhancedStepHue command to DUT with StepMode Down" + PICS: CC.S.F01 && CC.S.C42.Rsp command: "EnhancedStepHue" arguments: values: - name: "StepMode" value: 1 - name: "StepSize" - value: 75 + value: StepSizeConfigValue - name: "TransitionTime" - value: 1 + value: 10 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 10ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 10 + value: 1000 - label: "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml index b1ae246fee41d2..5d6f66ba87aaaf 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml @@ -20,6 +20,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + EnhancedHueConfigValue: + type: int16u + defaultValue: 1200 + SaturationConfigValue: + type: int8u + defaultValue: 90 tests: - label: "Wait for the commissioned device to be retrieved" @@ -41,25 +47,32 @@ tests: response: value: 1 - - label: "Reads EnhancedCurrentHue attribute from DUT" - PICS: CC.S.A4000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F01 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" + PICS: CC.S.F01 && CC.S.A4000 command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Enhanced move to hue and saturation command" - PICS: CC.S.C43.Rsp + - label: "TH sends EnhancedMoveToHueAndSaturation command to DUT" + PICS: CC.S.F01 && CC.S.C43.Rsp command: "EnhancedMoveToHueAndSaturation" arguments: values: - name: "EnhancedHue" - value: 1200 + value: EnhancedHueConfigValue - name: "Saturation" - value: 90 + value: SaturationConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -67,23 +80,24 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 10ms" + - label: "Wait 1500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 10 + value: 1500 - label: "Check EnhancedCurrentHue attribute value matched the value sent by the last command" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C43.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: + value: EnhancedHueConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml index 75b366d538c255..bbf281de9e5372 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml @@ -27,39 +27,39 @@ tests: PICS: CC.C.C40.Rsp verification: | ./chip-tool colorcontrol enhanced-move-to-hue 1000 3 200 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657100403.798306][4293:4298] CHIP:DMG: InvokeResponseMessage = - [1657100403.798342][4293:4298] CHIP:DMG: { - [1657100403.798398][4293:4298] CHIP:DMG: suppressResponse = false, - [1657100403.798437][4293:4298] CHIP:DMG: InvokeResponseIBs = - [1657100403.798482][4293:4298] CHIP:DMG: [ - [1657100403.798518][4293:4298] CHIP:DMG: InvokeResponseIB = - [1657100403.798574][4293:4298] CHIP:DMG: { - [1657100403.798613][4293:4298] CHIP:DMG: CommandStatusIB = - [1657100403.798739][4293:4298] CHIP:DMG: { - [1657100403.798783][4293:4298] CHIP:DMG: CommandPathIB = - [1657100403.798834][4293:4298] CHIP:DMG: { - [1657100403.798880][4293:4298] CHIP:DMG: EndpointId = 0x1, - [1657100403.798931][4293:4298] CHIP:DMG: ClusterId = 0x300, - [1657100403.798977][4293:4298] CHIP:DMG: CommandId = 0x40, - [1657100403.799025][4293:4298] CHIP:DMG: }, - [1657100403.799073][4293:4298] CHIP:DMG: - [1657100403.799117][4293:4298] CHIP:DMG: StatusIB = - [1657100403.799165][4293:4298] CHIP:DMG: { - [1657100403.799214][4293:4298] CHIP:DMG: status = 0x00 (SUCCESS), - [1657100403.799267][4293:4298] CHIP:DMG: }, - [1657100403.799315][4293:4298] CHIP:DMG: - [1657100403.799357][4293:4298] CHIP:DMG: }, - [1657100403.799411][4293:4298] CHIP:DMG: - [1657100403.799451][4293:4298] CHIP:DMG: }, - [1657100403.799495][4293:4298] CHIP:DMG: - [1657100403.799530][4293:4298] CHIP:DMG: ], - [1657100403.799573][4293:4298] CHIP:DMG: - [1657100403.799608][4293:4298] CHIP:DMG: InteractionModelRevision = 1 - [1657100403.799643][4293:4298] CHIP:DMG: }, - [1657100403.799724][4293:4298] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0040 Status=0x0 - [1657100403.799782][4293:4298] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + [1657912045.703432][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657912045.703462][2977:2977] CHIP:DMG: { + [1657912045.703485][2977:2977] CHIP:DMG: suppressResponse = false, + [1657912045.703511][2977:2977] CHIP:DMG: timedRequest = false, + [1657912045.703548][2977:2977] CHIP:DMG: InvokeRequests = + [1657912045.703583][2977:2977] CHIP:DMG: [ + [1657912045.703608][2977:2977] CHIP:DMG: CommandDataIB = + [1657912045.703635][2977:2977] CHIP:DMG: { + [1657912045.703670][2977:2977] CHIP:DMG: CommandPathIB = + [1657912045.703709][2977:2977] CHIP:DMG: { + [1657912045.703737][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657912045.703791][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657912045.703830][2977:2977] CHIP:DMG: CommandId = 0x40, + [1657912045.703864][2977:2977] CHIP:DMG: }, + [1657912045.703908][2977:2977] CHIP:DMG: + [1657912045.703936][2977:2977] CHIP:DMG: CommandFields = + [1657912045.703967][2977:2977] CHIP:DMG: { + [1657912045.704009][2977:2977] CHIP:DMG: 0x0 = 1000, + [1657912045.704048][2977:2977] CHIP:DMG: 0x1 = 3, + [1657912045.704121][2977:2977] CHIP:DMG: 0x2 = 200, + [1657912045.704164][2977:2977] CHIP:DMG: 0x3 = 0, + [1657912045.704202][2977:2977] CHIP:DMG: 0x4 = 0, + [1657912045.704238][2977:2977] CHIP:DMG: }, + [1657912045.704277][2977:2977] CHIP:DMG: }, + [1657912045.704309][2977:2977] CHIP:DMG: + [1657912045.704333][2977:2977] CHIP:DMG: ], + [1657912045.704374][2977:2977] CHIP:DMG: + [1657912045.704399][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657912045.704423][2977:2977] CHIP:DMG: }, + [1657912045.704511][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657912045.704551][2977:2977] CHIP:DMG: AccessControl: allowed + [1657912045.704580][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0040 disabled: true - label: @@ -69,10 +69,31 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657100425.785217][4301:4306] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4000 DataVersion: 1806824664 - [1657100425.785286][4301:4306] CHIP:TOO: EnhancedCurrentHue: 1000 + Verify in DUT as client side log: + [1657912064.296156][2977:2977] CHIP:IM: Received Read request + [1657912064.296261][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657912064.296295][2977:2977] CHIP:DMG: { + [1657912064.296322][2977:2977] CHIP:DMG: AttributePathIBs = + [1657912064.296378][2977:2977] CHIP:DMG: [ + [1657912064.296409][2977:2977] CHIP:DMG: AttributePathIB = + [1657912064.296448][2977:2977] CHIP:DMG: { + [1657912064.296497][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657912064.296538][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657912064.296578][2977:2977] CHIP:DMG: Attribute = 0x0000_4000, + [1657912064.296621][2977:2977] CHIP:DMG: } + [1657912064.296660][2977:2977] CHIP:DMG: + [1657912064.296694][2977:2977] CHIP:DMG: ], + [1657912064.296729][2977:2977] CHIP:DMG: + [1657912064.296774][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657912064.296808][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657912064.296837][2977:2977] CHIP:DMG: }, + [1657912064.296942][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912064.297059][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912064.297109][2977:2977] CHIP:DMG: Cluster 300, Attribute 4000 is dirty + [1657912064.297136][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4000 (expanded=0) + [1657912064.297171][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657912064.297210][2977:2977] CHIP:DMG: AccessControl: allowed + [1657912064.297288][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT sends MoveEnhanced Hue command to TH" @@ -80,39 +101,39 @@ tests: verification: | ./chip-tool colorcontrol enhanced-move-hue 0 100 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657100446.581854][4307:4312] CHIP:DMG: InvokeResponseMessage = - [1657100446.581878][4307:4312] CHIP:DMG: { - [1657100446.581902][4307:4312] CHIP:DMG: suppressResponse = false, - [1657100446.581927][4307:4312] CHIP:DMG: InvokeResponseIBs = - [1657100446.581957][4307:4312] CHIP:DMG: [ - [1657100446.581981][4307:4312] CHIP:DMG: InvokeResponseIB = - [1657100446.582013][4307:4312] CHIP:DMG: { - [1657100446.582038][4307:4312] CHIP:DMG: CommandStatusIB = - [1657100446.582069][4307:4312] CHIP:DMG: { - [1657100446.582097][4307:4312] CHIP:DMG: CommandPathIB = - [1657100446.582133][4307:4312] CHIP:DMG: { - [1657100446.582166][4307:4312] CHIP:DMG: EndpointId = 0x1, - [1657100446.582201][4307:4312] CHIP:DMG: ClusterId = 0x300, - [1657100446.582235][4307:4312] CHIP:DMG: CommandId = 0x41, - [1657100446.582267][4307:4312] CHIP:DMG: }, - [1657100446.582302][4307:4312] CHIP:DMG: - [1657100446.582331][4307:4312] CHIP:DMG: StatusIB = - [1657100446.582364][4307:4312] CHIP:DMG: { - [1657100446.582434][4307:4312] CHIP:DMG: status = 0x00 (SUCCESS), - [1657100446.582466][4307:4312] CHIP:DMG: }, - [1657100446.582498][4307:4312] CHIP:DMG: - [1657100446.582527][4307:4312] CHIP:DMG: }, - [1657100446.582559][4307:4312] CHIP:DMG: - [1657100446.582584][4307:4312] CHIP:DMG: }, - [1657100446.582613][4307:4312] CHIP:DMG: - [1657100446.582636][4307:4312] CHIP:DMG: ], - [1657100446.582664][4307:4312] CHIP:DMG: - [1657100446.582687][4307:4312] CHIP:DMG: InteractionModelRevision = 1 - [1657100446.582710][4307:4312] CHIP:DMG: }, - [1657100446.582768][4307:4312] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0041 Status=0x0 - [1657100446.582808][4307:4312] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + + [1657912085.345044][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657912085.345072][2977:2977] CHIP:DMG: { + [1657912085.345094][2977:2977] CHIP:DMG: suppressResponse = false, + [1657912085.345120][2977:2977] CHIP:DMG: timedRequest = false, + [1657912085.345144][2977:2977] CHIP:DMG: InvokeRequests = + [1657912085.345175][2977:2977] CHIP:DMG: [ + [1657912085.345199][2977:2977] CHIP:DMG: CommandDataIB = + [1657912085.345228][2977:2977] CHIP:DMG: { + [1657912085.345256][2977:2977] CHIP:DMG: CommandPathIB = + [1657912085.345290][2977:2977] CHIP:DMG: { + [1657912085.345320][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657912085.345355][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657912085.345388][2977:2977] CHIP:DMG: CommandId = 0x41, + [1657912085.345418][2977:2977] CHIP:DMG: }, + [1657912085.345451][2977:2977] CHIP:DMG: + [1657912085.345479][2977:2977] CHIP:DMG: CommandFields = + [1657912085.345510][2977:2977] CHIP:DMG: { + [1657912085.345542][2977:2977] CHIP:DMG: 0x0 = 0, + [1657912085.345574][2977:2977] CHIP:DMG: 0x1 = 100, + [1657912085.345607][2977:2977] CHIP:DMG: 0x2 = 0, + [1657912085.345639][2977:2977] CHIP:DMG: 0x3 = 0, + [1657912085.345671][2977:2977] CHIP:DMG: }, + [1657912085.345698][2977:2977] CHIP:DMG: }, + [1657912085.345730][2977:2977] CHIP:DMG: + [1657912085.345753][2977:2977] CHIP:DMG: ], + [1657912085.345784][2977:2977] CHIP:DMG: + [1657912085.345807][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657912085.345829][2977:2977] CHIP:DMG: }, + [1657912085.345899][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657912085.345935][2977:2977] CHIP:DMG: AccessControl: allowed + [1657912085.345962][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0041 disabled: true - label: "DUT reads CurrentEnhanced Hue attribute from TH several Times." @@ -120,10 +141,31 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657100425.785217][4301:4306] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4000 DataVersion: 1806824664 - [1657100425.785286][4301:4306] CHIP:TOO: EnhancedCurrentHue: 1000 + Verify in DUT as client side log: + [1657912064.296156][2977:2977] CHIP:IM: Received Read request + [1657912064.296261][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657912064.296295][2977:2977] CHIP:DMG: { + [1657912064.296322][2977:2977] CHIP:DMG: AttributePathIBs = + [1657912064.296378][2977:2977] CHIP:DMG: [ + [1657912064.296409][2977:2977] CHIP:DMG: AttributePathIB = + [1657912064.296448][2977:2977] CHIP:DMG: { + [1657912064.296497][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657912064.296538][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657912064.296578][2977:2977] CHIP:DMG: Attribute = 0x0000_4000, + [1657912064.296621][2977:2977] CHIP:DMG: } + [1657912064.296660][2977:2977] CHIP:DMG: + [1657912064.296694][2977:2977] CHIP:DMG: ], + [1657912064.296729][2977:2977] CHIP:DMG: + [1657912064.296774][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657912064.296808][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657912064.296837][2977:2977] CHIP:DMG: }, + [1657912064.296942][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912064.297059][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912064.297109][2977:2977] CHIP:DMG: Cluster 300, Attribute 4000 is dirty + [1657912064.297136][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4000 (expanded=0) + [1657912064.297171][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657912064.297210][2977:2977] CHIP:DMG: AccessControl: allowed + [1657912064.297288][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT sends StepEnhanced Hue command to TH" @@ -131,39 +173,39 @@ tests: verification: | ./chip-tool colorcontrol enhanced-step-hue 1 1000 200 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657100579.604087][4383:4388] CHIP:DMG: InvokeResponseMessage = - [1657100579.604116][4383:4388] CHIP:DMG: { - [1657100579.604145][4383:4388] CHIP:DMG: suppressResponse = false, - [1657100579.604173][4383:4388] CHIP:DMG: InvokeResponseIBs = - [1657100579.604209][4383:4388] CHIP:DMG: [ - [1657100579.604237][4383:4388] CHIP:DMG: InvokeResponseIB = - [1657100579.604274][4383:4388] CHIP:DMG: { - [1657100579.604303][4383:4388] CHIP:DMG: CommandStatusIB = - [1657100579.604356][4383:4388] CHIP:DMG: { - [1657100579.604396][4383:4388] CHIP:DMG: CommandPathIB = - [1657100579.604437][4383:4388] CHIP:DMG: { - [1657100579.604477][4383:4388] CHIP:DMG: EndpointId = 0x1, - [1657100579.604517][4383:4388] CHIP:DMG: ClusterId = 0x300, - [1657100579.604556][4383:4388] CHIP:DMG: CommandId = 0x42, - [1657100579.604593][4383:4388] CHIP:DMG: }, - [1657100579.604635][4383:4388] CHIP:DMG: - [1657100579.604669][4383:4388] CHIP:DMG: StatusIB = - [1657100579.604708][4383:4388] CHIP:DMG: { - [1657100579.604749][4383:4388] CHIP:DMG: status = 0x00 (SUCCESS), - [1657100579.604787][4383:4388] CHIP:DMG: }, - [1657100579.604824][4383:4388] CHIP:DMG: - [1657100579.604858][4383:4388] CHIP:DMG: }, - [1657100579.604896][4383:4388] CHIP:DMG: - [1657100579.604924][4383:4388] CHIP:DMG: }, - [1657100579.604958][4383:4388] CHIP:DMG: - [1657100579.604985][4383:4388] CHIP:DMG: ], - [1657100579.605018][4383:4388] CHIP:DMG: - [1657100579.605045][4383:4388] CHIP:DMG: InteractionModelRevision = 1 - [1657100579.605071][4383:4388] CHIP:DMG: }, - [1657100579.605137][4383:4388] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0042 Status=0x0 - [1657100579.605184][4383:4388] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + [1657912123.677693][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657912123.677720][2977:2977] CHIP:DMG: { + [1657912123.677742][2977:2977] CHIP:DMG: suppressResponse = false, + [1657912123.677769][2977:2977] CHIP:DMG: timedRequest = false, + [1657912123.677802][2977:2977] CHIP:DMG: InvokeRequests = + [1657912123.677836][2977:2977] CHIP:DMG: [ + [1657912123.677860][2977:2977] CHIP:DMG: CommandDataIB = + [1657912123.677901][2977:2977] CHIP:DMG: { + [1657912123.677926][2977:2977] CHIP:DMG: CommandPathIB = + [1657912123.677957][2977:2977] CHIP:DMG: { + [1657912123.677996][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657912123.678030][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657912123.678061][2977:2977] CHIP:DMG: CommandId = 0x42, + [1657912123.678097][2977:2977] CHIP:DMG: }, + [1657912123.678130][2977:2977] CHIP:DMG: + [1657912123.678158][2977:2977] CHIP:DMG: CommandFields = + [1657912123.678188][2977:2977] CHIP:DMG: { + [1657912123.678229][2977:2977] CHIP:DMG: 0x0 = 1, + [1657912123.678304][2977:2977] CHIP:DMG: 0x1 = 1000, + [1657912123.678339][2977:2977] CHIP:DMG: 0x2 = 200, + [1657912123.678372][2977:2977] CHIP:DMG: 0x3 = 0, + [1657912123.678413][2977:2977] CHIP:DMG: 0x4 = 0, + [1657912123.678443][2977:2977] CHIP:DMG: }, + [1657912123.678484][2977:2977] CHIP:DMG: }, + [1657912123.678515][2977:2977] CHIP:DMG: + [1657912123.678538][2977:2977] CHIP:DMG: ], + [1657912123.678578][2977:2977] CHIP:DMG: + [1657912123.678602][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657912123.678625][2977:2977] CHIP:DMG: }, + [1657912123.678704][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657912123.678741][2977:2977] CHIP:DMG: AccessControl: allowed + [1657912123.678778][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0042 disabled: true - label: @@ -172,22 +214,70 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657100597.877581][4390:4396] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4000 DataVersion: 1806826991 - [1657100597.877653][4390:4396] CHIP:TOO: EnhancedCurrentHue: 1905 + Verify in DUT as client side log: + [1657912064.296156][2977:2977] CHIP:IM: Received Read request + [1657912064.296261][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657912064.296295][2977:2977] CHIP:DMG: { + [1657912064.296322][2977:2977] CHIP:DMG: AttributePathIBs = + [1657912064.296378][2977:2977] CHIP:DMG: [ + [1657912064.296409][2977:2977] CHIP:DMG: AttributePathIB = + [1657912064.296448][2977:2977] CHIP:DMG: { + [1657912064.296497][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657912064.296538][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657912064.296578][2977:2977] CHIP:DMG: Attribute = 0x0000_4000, + [1657912064.296621][2977:2977] CHIP:DMG: } + [1657912064.296660][2977:2977] CHIP:DMG: + [1657912064.296694][2977:2977] CHIP:DMG: ], + [1657912064.296729][2977:2977] CHIP:DMG: + [1657912064.296774][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657912064.296808][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657912064.296837][2977:2977] CHIP:DMG: }, + [1657912064.296942][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912064.297059][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912064.297109][2977:2977] CHIP:DMG: Cluster 300, Attribute 4000 is dirty + [1657912064.297136][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4000 (expanded=0) + [1657912064.297171][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657912064.297210][2977:2977] CHIP:DMG: AccessControl: allowed + [1657912064.297288][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT sends EnhancedMoveToHueAndSaturation command to TH." PICS: CC.C.C43.Rsp verification: | ./chip-tool colorcontrol enhanced-move-to-hue-and-saturation 2500 100 200 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1649667723.974929][9413:9418] CHIP:DMG: StatusIB = - [1649667723.974986][9413:9418] CHIP:DMG: { - [1649667723.975047][9413:9418] CHIP:DMG: status = 0x00 (SUCCESS), - [1649667723.975096][9413:9418] CHIP:DMG: }, + Verify in DUT as client side log: + [1657912153.500024][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657912153.500080][2977:2977] CHIP:DMG: { + [1657912153.500108][2977:2977] CHIP:DMG: suppressResponse = false, + [1657912153.500139][2977:2977] CHIP:DMG: timedRequest = false, + [1657912153.500180][2977:2977] CHIP:DMG: InvokeRequests = + [1657912153.500217][2977:2977] CHIP:DMG: [ + [1657912153.500244][2977:2977] CHIP:DMG: CommandDataIB = + [1657912153.500288][2977:2977] CHIP:DMG: { + [1657912153.500317][2977:2977] CHIP:DMG: CommandPathIB = + [1657912153.500352][2977:2977] CHIP:DMG: { + [1657912153.500398][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657912153.500437][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657912153.500472][2977:2977] CHIP:DMG: CommandId = 0x43, + [1657912153.500512][2977:2977] CHIP:DMG: }, + [1657912153.500550][2977:2977] CHIP:DMG: + [1657912153.500579][2977:2977] CHIP:DMG: CommandFields = + [1657912153.500610][2977:2977] CHIP:DMG: { + [1657912153.500656][2977:2977] CHIP:DMG: 0x0 = 2500, + [1657912153.500694][2977:2977] CHIP:DMG: 0x1 = 100, + [1657912153.500731][2977:2977] CHIP:DMG: 0x2 = 200, + [1657912153.500779][2977:2977] CHIP:DMG: 0x3 = 0, + [1657912153.500815][2977:2977] CHIP:DMG: 0x4 = 0, + [1657912153.500861][2977:2977] CHIP:DMG: }, + [1657912153.500893][2977:2977] CHIP:DMG: }, + [1657912153.500928][2977:2977] CHIP:DMG: + [1657912153.500964][2977:2977] CHIP:DMG: ], + [1657912153.501001][2977:2977] CHIP:DMG: + [1657912153.501028][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657912153.501054][2977:2977] CHIP:DMG: }, + [1657912153.501143][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657912153.501195][2977:2977] CHIP:DMG: AccessControl: allowed + [1657912153.501227][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0043 disabled: true - label: @@ -196,10 +286,31 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657100626.671635][4405:4410] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4000 DataVersion: 1806827373 - [1657100626.671707][4405:4410] CHIP:TOO: EnhancedCurrentHue: 2153 + Verify in DUT as client side log: + [1657912064.296156][2977:2977] CHIP:IM: Received Read request + [1657912064.296261][2977:2977] CHIP:DMG: ReadRequestMessage = + [1657912064.296295][2977:2977] CHIP:DMG: { + [1657912064.296322][2977:2977] CHIP:DMG: AttributePathIBs = + [1657912064.296378][2977:2977] CHIP:DMG: [ + [1657912064.296409][2977:2977] CHIP:DMG: AttributePathIB = + [1657912064.296448][2977:2977] CHIP:DMG: { + [1657912064.296497][2977:2977] CHIP:DMG: Endpoint = 0x1, + [1657912064.296538][2977:2977] CHIP:DMG: Cluster = 0x300, + [1657912064.296578][2977:2977] CHIP:DMG: Attribute = 0x0000_4000, + [1657912064.296621][2977:2977] CHIP:DMG: } + [1657912064.296660][2977:2977] CHIP:DMG: + [1657912064.296694][2977:2977] CHIP:DMG: ], + [1657912064.296729][2977:2977] CHIP:DMG: + [1657912064.296774][2977:2977] CHIP:DMG: isFabricFiltered = true, + [1657912064.296808][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657912064.296837][2977:2977] CHIP:DMG: }, + [1657912064.296942][2977:2977] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912064.297059][2977:2977] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912064.297109][2977:2977] CHIP:DMG: Cluster 300, Attribute 4000 is dirty + [1657912064.297136][2977:2977] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4000 (expanded=0) + [1657912064.297171][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657912064.297210][2977:2977] CHIP:DMG: AccessControl: allowed + [1657912064.297288][2977:2977] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT sends StopMoveStep command to TH." @@ -207,37 +318,34 @@ tests: verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657100646.786860][4412:4417] CHIP:DMG: InvokeResponseMessage = - [1657100646.786904][4412:4417] CHIP:DMG: { - [1657100646.786948][4412:4417] CHIP:DMG: suppressResponse = false, - [1657100646.786993][4412:4417] CHIP:DMG: InvokeResponseIBs = - [1657100646.787048][4412:4417] CHIP:DMG: [ - [1657100646.787092][4412:4417] CHIP:DMG: InvokeResponseIB = - [1657100646.787150][4412:4417] CHIP:DMG: { - [1657100646.787197][4412:4417] CHIP:DMG: CommandStatusIB = - [1657100646.787261][4412:4417] CHIP:DMG: { - [1657100646.787315][4412:4417] CHIP:DMG: CommandPathIB = - [1657100646.787376][4412:4417] CHIP:DMG: { - [1657100646.787438][4412:4417] CHIP:DMG: EndpointId = 0x1, - [1657100646.787502][4412:4417] CHIP:DMG: ClusterId = 0x300, - [1657100646.787565][4412:4417] CHIP:DMG: CommandId = 0x47, - [1657100646.787625][4412:4417] CHIP:DMG: }, - [1657100646.787691][4412:4417] CHIP:DMG: - [1657100646.787744][4412:4417] CHIP:DMG: StatusIB = - [1657100646.787804][4412:4417] CHIP:DMG: { - [1657100646.787854][4412:4417] CHIP:DMG: status = 0x00 (SUCCESS), - [1657100646.787894][4412:4417] CHIP:DMG: }, - [1657100646.787934][4412:4417] CHIP:DMG: - [1657100646.787974][4412:4417] CHIP:DMG: }, - [1657100646.788021][4412:4417] CHIP:DMG: - [1657100646.788056][4412:4417] CHIP:DMG: }, - [1657100646.788093][4412:4417] CHIP:DMG: - [1657100646.788121][4412:4417] CHIP:DMG: ], - [1657100646.788157][4412:4417] CHIP:DMG: - [1657100646.788186][4412:4417] CHIP:DMG: InteractionModelRevision = 1 - [1657100646.788214][4412:4417] CHIP:DMG: }, - [1657100646.788283][4412:4417] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0047 Status=0x0 - [1657100646.788331][4412:4417] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + [1657912172.988756][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657912172.988782][2977:2977] CHIP:DMG: { + [1657912172.988805][2977:2977] CHIP:DMG: suppressResponse = false, + [1657912172.988840][2977:2977] CHIP:DMG: timedRequest = false, + [1657912172.988864][2977:2977] CHIP:DMG: InvokeRequests = + [1657912172.988895][2977:2977] CHIP:DMG: [ + [1657912172.988919][2977:2977] CHIP:DMG: CommandDataIB = + [1657912172.988957][2977:2977] CHIP:DMG: { + [1657912172.988982][2977:2977] CHIP:DMG: CommandPathIB = + [1657912172.989014][2977:2977] CHIP:DMG: { + [1657912172.989054][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657912172.989088][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657912172.989120][2977:2977] CHIP:DMG: CommandId = 0x47, + [1657912172.989161][2977:2977] CHIP:DMG: }, + [1657912172.989193][2977:2977] CHIP:DMG: + [1657912172.989221][2977:2977] CHIP:DMG: CommandFields = + [1657912172.989250][2977:2977] CHIP:DMG: { + [1657912172.989290][2977:2977] CHIP:DMG: 0x0 = 0, + [1657912172.989323][2977:2977] CHIP:DMG: 0x1 = 0, + [1657912172.989354][2977:2977] CHIP:DMG: }, + [1657912172.989390][2977:2977] CHIP:DMG: }, + [1657912172.989420][2977:2977] CHIP:DMG: + [1657912172.989443][2977:2977] CHIP:DMG: ], + [1657912172.989483][2977:2977] CHIP:DMG: + [1657912172.989508][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657912172.989530][2977:2977] CHIP:DMG: }, + [1657912172.989608][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657912172.989646][2977:2977] CHIP:DMG: AccessControl: allowed + [1657912172.989682][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0047 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml index 9a97a89609648d..87e6c8a8aa22ad 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml @@ -18,6 +18,21 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateConfigValue: + type: int8u + defaultValue: 50 + RateXConfigValue: + type: int16s + defaultValue: 50 + RateYConfigValue: + type: int16s + defaultValue: 50 + ColorTemperatureMinMiredsConfigValue: + type: int16u + defaultValue: 1 + ColorTemperatureMaxMiredsConfigValue: + type: int16u + defaultValue: 255 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,32 +54,39 @@ tests: response: value: 1 - - label: "Move hue up command" - PICS: CC.S.C01.Rsp + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH sends MoveHue command to DUT" + PICS: CC.S.C01.Rsp && CC.S.F00 command: "MoveHue" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Reads CurrentHue attribute from DUT" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Stop Move Step command" - PICS: CC.S.C47.Rsp + - label: "TH sends StopMoveStep command to DUT" + PICS: CC.S.C47.Rsp && CC.S.F00 command: "StopMoveStep" arguments: values: @@ -73,13 +95,14 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Reads CurrentHue attribute from DUT" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00 command: "readAttribute" attribute: "CurrentHue" response: + saveAs: CurrentHueValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -91,46 +114,43 @@ tests: - name: "ms" value: 100 - - label: - "Check current hue attribute value matched the value sent by the last - attribute" - PICS: CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00 command: "readAttribute" attribute: "CurrentHue" response: + value: CurrentHueValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move saturation up command" - PICS: CC.S.C04.Rsp + - label: "TH sends MoveSaturation command to DUT" + PICS: CC.S.C04.Rsp && CC.S.F00 command: "MoveSaturation" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 5 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: - "Check Saturation attribute value matched the value sent by the last - command" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.A0001 && CC.S.C04.Rsp && CC.S.F00 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Stop Move Step command" - PICS: CC.S.C47.Rsp + - label: "TH sends StopMoveStep command to DUT" + PICS: CC.S.C47.Rsp && CC.S.F00 command: "StopMoveStep" arguments: values: @@ -139,13 +159,14 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Reads CurrentSaturation attribute from DUT." + - label: "TH reads CurrentSaturation attribute from DUT" command: "readAttribute" - PICS: CC.S.A0001 + PICS: CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00 attribute: "CurrentSaturation" response: + saveAs: CurrentSaturationValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -157,54 +178,61 @@ tests: - name: "ms" value: 100 - - label: - "Check Saturation attribute value matched the value sent by the last - attribute" - PICS: CC.S.A0001 + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00 command: "readAttribute" attribute: "CurrentSaturation" response: + value: CurrentSaturationValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move Color command" - PICS: CC.S.C08.Rsp + - label: "TH sends MoveColor command to DUT" + PICS: CC.S.C08.Rsp && CC.S.F03 command: "MoveColor" arguments: values: - name: "rateX" - value: 15 + value: RateXConfigValue - name: "rateY" - value: 20 + value: RateYConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Reads CurrentX attribute from DUT" - PICS: CC.S.A0003 + - label: "Wait 500ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 500 + + - label: "TH reads CurrentX attribute from DUT" + PICS: CC.S.A0003 && CC.S.C08.Rsp && CC.S.F03 command: "readAttribute" attribute: "CurrentX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Reads CurrentY attribute from DUT" - PICS: CC.S.A0004 + - label: "TH reads CurrentY attribute from DUT" + PICS: CC.S.A0004 && CC.S.C08.Rsp && CC.S.F03 command: "readAttribute" attribute: "CurrentY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Stop Move Step command" - PICS: CC.S.C47.Rsp + - label: "TH sends StopMoveStep command to DUT" + PICS: CC.S.C47.Rsp && CC.S.F03 command: "StopMoveStep" arguments: values: @@ -213,88 +241,96 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Reads CurrentX attribute from DUT" - PICS: CC.S.A0003 + - label: "TH reads CurrentX attribute from DUT" + PICS: CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03 command: "readAttribute" attribute: "CurrentX" response: + saveAs: CurrentXValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Reads CurrentY attribute from DUT" - PICS: CC.S.A0004 + - label: "TH reads CurrentY attribute from DUT" + PICS: CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03 command: "readAttribute" attribute: "CurrentY" response: + saveAs: CurrentYValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Wait 100ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 1000 - - label: - "Check current x attribute value matched the value sent by the last - attribute" - PICS: CC.S.A0003 + - label: "TH reads CurrentY attribute from DUT" + PICS: CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03 command: "readAttribute" attribute: "CurrentX" response: + value: CurrentXValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: - "Check current y attribute value matched the value sent by the last - attribute" - PICS: CC.S.A0004 + - label: "TH reads CurrentY attribute from DUT" + PICS: CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03 command: "readAttribute" attribute: "CurrentY" response: + value: CurrentYValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Move up color temperature command" - PICS: CC.S.C4B.Rsp + - label: "TH sends MoveColorTemperature command to DUT" + PICS: CC.S.C4B.Rsp && CC.S.F04 command: "MoveColorTemperature" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 10 + value: RateConfigValue - name: "ColorTemperatureMinimumMireds" - value: 1 + value: ColorTemperatureMinMiredsConfigValue - name: "ColorTemperatureMaximumMireds" - value: 255 + value: ColorTemperatureMaxMiredsConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Reads current color temprature from DUT" - PICS: CC.S.A0007 + - label: "Wait 1000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 + + - label: "TH reads ColorTemperatureMireds attribute from DUT" + PICS: CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04 command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Stop Move Step command" - PICS: CC.S.C47.Rsp + - label: "TH sends StopMoveStep command to DUT" + PICS: CC.S.C47.Rsp && CC.S.F04 command: "StopMoveStep" arguments: values: @@ -303,62 +339,64 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Reads current color temprature from DUT" - PICS: CC.S.A0007 + - label: "TH reads ColorTemperatureMireds attribute from DUT" + PICS: CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04 command: "readAttribute" attribute: "ColorTemperature" response: + saveAs: ColorTemperatureMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Wait 100ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 500 - label: "Reads current color attribute value matched the value sent by the last attribute" - PICS: CC.S.A0007 + PICS: CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04 command: "readAttribute" attribute: "ColorTemperature" response: + value: ColorTemperatureMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Enhanced Move Hue Up command" - PICS: CC.S.C41.Rsp + - label: "TH sends EnhancedMoveHue command to DUT." + PICS: CC.S.C41.Rsp && CC.S.F01 command: "EnhancedMoveHue" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Reads EnhancedCurrentHue attribute value from DUT" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT" + PICS: CC.S.A4000 && CC.S.C41.Rsp && CC.S.F01 command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Stop Move Step command" - PICS: CC.S.C47.Rsp + - label: "TH sends StopMoveStep command to DUT" + PICS: CC.S.C47.Rsp && CC.S.F01 command: "StopMoveStep" arguments: values: @@ -367,33 +405,33 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Reads EnhancedCurrentHue attribute value from DUT" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT" + PICS: CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01 command: "readAttribute" attribute: "EnhancedCurrentHue" response: + saveAs: EnhancedCurrentHueValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 100ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 500 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last attribute" - PICS: CC.S.A4000 + - label: "TH reads EnhancedCurrentHue attribute from DUT" + PICS: CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01 command: "readAttribute" attribute: "EnhancedCurrentHue" response: + value: EnhancedCurrentHueValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml index 1c3a6386fc99e9..24486901098f3a 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml @@ -45,7 +45,7 @@ tests: "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command" command: "EnhancedMoveToHue" - PICS: CC.S.C40.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp arguments: values: - name: "enhancedHue" @@ -67,9 +67,16 @@ tests: - name: "ms" value: 1000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -90,13 +97,13 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -117,13 +124,13 @@ tests: - label: "Read ColorLoopDirection attribute from DUT" command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.A4003 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp response: value: 0 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -144,13 +151,13 @@ tests: - label: "Read ColorLoopTime attribute from DUT" command: "readAttribute" attribute: "ColorLoopTime" - PICS: CC.S.A4004 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4004 && CC.S.C44.Rsp response: value: 30 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -171,13 +178,13 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp response: value: 160 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -198,14 +205,14 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 1 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp response: value: 16384 @@ -220,18 +227,18 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp response: - saveAs: ColorLoopStartEnhancedHue + saveAs: ColorLoopStartEnhancedHueStep5d - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 - minValue: ColorLoopStartEnhancedHue + type: int16u + minValue: ColorLoopStartEnhancedHueStep5d maxValue: 65535 - label: "Wait for 30S" @@ -245,16 +252,16 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 - minValue: ColorLoopStartEnhancedHue + type: int16u + minValue: ColorLoopStartEnhancedHueStep5d maxValue: 65535 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -275,27 +282,27 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp response: - saveAs: ColorLoopStoredEnhancedHueValue1 + saveAs: ColorLoopStoredEnhancedHueStep6c - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: - value: ColorLoopStoredEnhancedHueValue1 + value: ColorLoopStoredEnhancedHueStep6c - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -316,13 +323,13 @@ tests: - label: "Read ColorLoopDirection attribute from DUT" command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.A4003 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp response: value: 1 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -343,14 +350,14 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 1 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp response: value: 16384 @@ -365,18 +372,18 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp response: - saveAs: ColorLoopStartEnhancedHue2 + saveAs: ColorLoopStartEnhancedHueStep8d - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 - minValue: ColorLoopStartEnhancedHue2 + type: int16u + minValue: ColorLoopStartEnhancedHueStep8d maxValue: 65535 - label: "Wait for 30S" @@ -390,16 +397,16 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 - minValue: ColorLoopStartEnhancedHue2 + type: int16u + minValue: ColorLoopStartEnhancedHueStep8d maxValue: 65535 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -420,27 +427,27 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp response: - saveAs: ColorLoopStoredEnhancedHueValue2 + saveAs: ColorLoopStoredEnhancedHueStep9c - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: - value: ColorLoopStoredEnhancedHueValue2 + value: ColorLoopStoredEnhancedHueStep9c - label: "Enhanced Move To Hue command" command: "EnhancedMoveToHue" - PICS: CC.S.C40.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp arguments: values: - name: "enhancedHue" @@ -465,13 +472,13 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp response: value: 16384 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -492,13 +499,13 @@ tests: - label: "Read ColorLoopDirection attribute from DUT" command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.A4003 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp response: value: 0 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -519,14 +526,14 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 1 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp response: value: 16384 @@ -541,18 +548,18 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp response: - saveAs: ColorLoopStartEnhancedHue3 + saveAs: ColorLoopStartEnhancedHueStep12d - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 - minValue: ColorLoopStartEnhancedHue3 + type: int16u + minValue: ColorLoopStartEnhancedHueStep12d maxValue: 65535 - label: "Wait for 30S" @@ -566,16 +573,16 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 - minValue: ColorLoopStartEnhancedHue3 + type: int16u + minValue: ColorLoopStartEnhancedHueStep12d maxValue: 65535 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -596,27 +603,27 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp response: - saveAs: ColorLoopStoredEnhancedHueValue3 + saveAs: ColorLoopStoredEnhancedHueStep13c - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: - value: ColorLoopStoredEnhancedHueValue3 + value: ColorLoopStoredEnhancedHueStep13c - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -637,13 +644,13 @@ tests: - label: "Read ColorLoopDirection attribute from DUT" command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.A4003 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp response: value: 1 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -664,14 +671,14 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 1 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp response: value: 16384 @@ -686,18 +693,18 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp response: - saveAs: ColorLoopStartEnhancedHue4 + saveAs: ColorLoopStartEnhancedHueStep15d - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 - minValue: ColorLoopStartEnhancedHue3 + type: int16u + minValue: ColorLoopStartEnhancedHueStep15d maxValue: 65535 - label: "Wait for 30S" @@ -711,16 +718,16 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 - minValue: ColorLoopStartEnhancedHue4 + type: int16u + minValue: ColorLoopStartEnhancedHueStep15d maxValue: 65535 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -741,23 +748,23 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp response: - saveAs: ColorLoopStoredEnhancedHue4 + saveAs: ColorLoopStoredEnhancedHueStep16b - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: - value: ColorLoopStoredEnhancedHue4 + value: ColorLoopStoredEnhancedHueStep16b - label: "Turn Off light for color control tests" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml index 6677f80a07296c..1f1a465ff68c34 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml @@ -46,7 +46,7 @@ tests: "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command" command: "EnhancedMoveToHue" - PICS: CC.S.C40.Rsp + PICS: CC.S.F01 && CC.S.F02 && CC.S.C40.Rsp arguments: values: - name: "enhancedHue" @@ -68,9 +68,16 @@ tests: - name: "ms" value: 1000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -91,34 +98,34 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopDirection attribute from DUT." command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.A4003 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopTime attribute from DUT." command: "readAttribute" attribute: "ColorLoopTime" - PICS: CC.S.A4004 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp response: value: 30 - label: "Read ColorLoopStartEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp response: value: 160 - label: "Color Loop Set Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -139,14 +146,14 @@ tests: - label: "Read ColorLoopActive attribute from DUT." command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp response: value: 1 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C40.Rsp response: value: 16384 @@ -161,17 +168,17 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp response: saveAs: ColorLoopStartEnhancedHueValue - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueValue maxValue: 65535 @@ -186,16 +193,16 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueValue maxValue: 65535 - label: "Color Loop Set Command - Start Color Loop" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -216,7 +223,7 @@ tests: - label: "Read ColorLoopDirection attribute from DUT." command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.A4003 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp response: value: 1 @@ -231,18 +238,18 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp response: - saveAs: ColorLoopStartEnhancedHue1 + saveAs: ColorLoopStartEnhancedHue - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 - minValue: ColorLoopStartEnhancedHue1 + type: int16u + minValue: ColorLoopStartEnhancedHue maxValue: 65535 - label: "Wait for 30S" @@ -256,16 +263,16 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 - minValue: ColorLoopStartEnhancedHue1 + type: int16u + minValue: ColorLoopStartEnhancedHue maxValue: 65535 - label: "Color Loop Set Command - Start Color Loop" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -286,13 +293,13 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" - PICS: CC.S.A4006 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C44.Rsp attribute: "ColorLoopStoredEnhancedHue" response: saveAs: ColorLoopStoredEnhancedHueValue @@ -300,7 +307,7 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT." command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: value: ColorLoopStoredEnhancedHueValue diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml index 52c888d5b48644..771c1c1b265790 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml @@ -45,7 +45,7 @@ tests: "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command" command: "EnhancedMoveToHue" - PICS: CC.S.C40.Rsp + PICS: CC.S.F01 && CC.S.F02 && CC.S.C40.Rsp arguments: values: - name: "enhancedHue" @@ -67,9 +67,16 @@ tests: - name: "ms" value: 1000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -90,34 +97,34 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopDirection attribute from DUT." command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.A4003 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopTime attribute from DUT." command: "readAttribute" attribute: "ColorLoopTime" - PICS: CC.S.A4004 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp response: value: 30 - label: "Read ColorLoopStartEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp response: value: 160 - label: "Color Loop Set Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -138,14 +145,14 @@ tests: - label: "Read ColorLoopActive attribute from DUT." command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp response: value: 1 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C40.Rsp response: value: 16384 @@ -160,17 +167,17 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp response: saveAs: ColorLoopStartEnhancedHueValue - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueValue maxValue: 65535 @@ -185,16 +192,16 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueValue maxValue: 65535 - label: "Color Loop Set Command - Start Color Loop" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -215,7 +222,7 @@ tests: - label: "Read ColorLoopTime attribute from DUT." command: "readAttribute" attribute: "ColorLoopTime" - PICS: CC.S.A4004 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp response: value: 60 @@ -230,10 +237,10 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -248,16 +255,16 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Color Loop Set Command - Start Color Loop" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -278,21 +285,21 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C44.Rsp response: saveAs: ColorLoopStoredEnhancedHueValue - label: "Read EnhancedCurrentHue attribute from DUT." command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: value: ColorLoopStoredEnhancedHueValue diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_4.yaml index 1a46b564b1b959..d5a01993e3380e 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_4.yaml @@ -25,72 +25,78 @@ tests: verification: | ./chip-tool onoff on 1 1 - [1657100775.227841][4422:4427] CHIP:DMG: InvokeResponseMessage = - [1657100775.227865][4422:4427] CHIP:DMG: { - [1657100775.227889][4422:4427] CHIP:DMG: suppressResponse = false, - [1657100775.227913][4422:4427] CHIP:DMG: InvokeResponseIBs = - [1657100775.227944][4422:4427] CHIP:DMG: [ - [1657100775.227968][4422:4427] CHIP:DMG: InvokeResponseIB = - [1657100775.227999][4422:4427] CHIP:DMG: { - [1657100775.228027][4422:4427] CHIP:DMG: CommandStatusIB = - [1657100775.228059][4422:4427] CHIP:DMG: { - [1657100775.228088][4422:4427] CHIP:DMG: CommandPathIB = - [1657100775.228121][4422:4427] CHIP:DMG: { - [1657100775.228154][4422:4427] CHIP:DMG: EndpointId = 0x1, - [1657100775.228189][4422:4427] CHIP:DMG: ClusterId = 0x6, - [1657100775.228222][4422:4427] CHIP:DMG: CommandId = 0x1, - [1657100775.228254][4422:4427] CHIP:DMG: }, - [1657100775.228289][4422:4427] CHIP:DMG: - [1657100775.228318][4422:4427] CHIP:DMG: StatusIB = - [1657100775.228350][4422:4427] CHIP:DMG: { - [1657100775.228383][4422:4427] CHIP:DMG: status = 0x00 (SUCCESS), - [1657100775.228417][4422:4427] CHIP:DMG: }, - [1657100775.228452][4422:4427] CHIP:DMG: - [1657100775.228482][4422:4427] CHIP:DMG: }, - [1657100775.228513][4422:4427] CHIP:DMG: - [1657100775.228540][4422:4427] CHIP:DMG: }, - [1657100775.228570][4422:4427] CHIP:DMG: - [1657100775.228592][4422:4427] CHIP:DMG: ], - [1657100775.228621][4422:4427] CHIP:DMG: - [1657100775.228645][4422:4427] CHIP:DMG: InteractionModelRevision = 1 - [1657100775.228668][4422:4427] CHIP:DMG: }, - [1657100775.228727][4422:4427] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x0 - [1657100775.228763][4422:4427] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + [1657912254.685769][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657912254.685812][2977:2977] CHIP:DMG: { + [1657912254.685849][2977:2977] CHIP:DMG: suppressResponse = false, + [1657912254.685891][2977:2977] CHIP:DMG: timedRequest = false, + [1657912254.685945][2977:2977] CHIP:DMG: InvokeRequests = + [1657912254.685994][2977:2977] CHIP:DMG: [ + [1657912254.686033][2977:2977] CHIP:DMG: CommandDataIB = + [1657912254.686097][2977:2977] CHIP:DMG: { + [1657912254.686138][2977:2977] CHIP:DMG: CommandPathIB = + [1657912254.686190][2977:2977] CHIP:DMG: { + [1657912254.686255][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657912254.686310][2977:2977] CHIP:DMG: ClusterId = 0x6, + [1657912254.686361][2977:2977] CHIP:DMG: CommandId = 0x1, + [1657912254.686424][2977:2977] CHIP:DMG: }, + [1657912254.686480][2977:2977] CHIP:DMG: + [1657912254.686523][2977:2977] CHIP:DMG: CommandFields = + [1657912254.686572][2977:2977] CHIP:DMG: { + [1657912254.686621][2977:2977] CHIP:DMG: }, + [1657912254.686679][2977:2977] CHIP:DMG: }, + [1657912254.686727][2977:2977] CHIP:DMG: + [1657912254.686765][2977:2977] CHIP:DMG: ], + [1657912254.686812][2977:2977] CHIP:DMG: + [1657912254.686866][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657912254.686904][2977:2977] CHIP:DMG: }, + [1657912254.687011][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0006 e=1 p=o + [1657912254.687066][2977:2977] CHIP:DMG: AccessControl: allowed + [1657912254.687110][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 + [1657912254.687171][2977:2977] CHIP:ZCL: On/Off set value: 1 1 + [1657912254.687213][2977:2977] CHIP:ZCL: Toggle on/off from 0 to 1 + [1657912254.687251][2977:2977] CHIP:ZCL: On Command - OffWaitTime : 0 + [1657912254.687307][2977:2977] CHIP:DMG: Endpoint 1, Cluster 0x0000_0006 update version to a51673a9 + [1657912254.687353][2977:2977] CHIP:ZCL: On/Toggle Command - Stop Timer + [1657912254.687388][2977:2977] CHIP:DMG: Endpoint 1, Cluster 0x0000_0006 update version to a51673aa + ./chip-tool colorcontrol enhanced-move-to-hue 16384 0 0 0 0 1 1 - [1657100804.250439][4428:4433] CHIP:DMG: InvokeResponseMessage = - [1657100804.250465][4428:4433] CHIP:DMG: { - [1657100804.250489][4428:4433] CHIP:DMG: suppressResponse = false, - [1657100804.250514][4428:4433] CHIP:DMG: InvokeResponseIBs = - [1657100804.250544][4428:4433] CHIP:DMG: [ - [1657100804.250569][4428:4433] CHIP:DMG: InvokeResponseIB = - [1657100804.250601][4428:4433] CHIP:DMG: { - [1657100804.250627][4428:4433] CHIP:DMG: CommandStatusIB = - [1657100804.250661][4428:4433] CHIP:DMG: { - [1657100804.250691][4428:4433] CHIP:DMG: CommandPathIB = - [1657100804.250728][4428:4433] CHIP:DMG: { - [1657100804.250766][4428:4433] CHIP:DMG: EndpointId = 0x1, - [1657100804.250805][4428:4433] CHIP:DMG: ClusterId = 0x300, - [1657100804.250842][4428:4433] CHIP:DMG: CommandId = 0x40, - [1657100804.250878][4428:4433] CHIP:DMG: }, - [1657100804.250917][4428:4433] CHIP:DMG: - [1657100804.250946][4428:4433] CHIP:DMG: StatusIB = - [1657100804.250983][4428:4433] CHIP:DMG: { - [1657100804.251017][4428:4433] CHIP:DMG: status = 0x00 (SUCCESS), - [1657100804.251052][4428:4433] CHIP:DMG: }, - [1657100804.251086][4428:4433] CHIP:DMG: - [1657100804.251115][4428:4433] CHIP:DMG: }, - [1657100804.251148][4428:4433] CHIP:DMG: - [1657100804.251173][4428:4433] CHIP:DMG: }, - [1657100804.251202][4428:4433] CHIP:DMG: - [1657100804.251226][4428:4433] CHIP:DMG: ], - [1657100804.251255][4428:4433] CHIP:DMG: - [1657100804.251279][4428:4433] CHIP:DMG: InteractionModelRevision = 1 - [1657100804.251302][4428:4433] CHIP:DMG: }, - [1657100804.251360][4428:4433] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0040 Status=0x0 - [1657100804.251400][4428:4433] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + [1657912325.922452][2977:2977] CHIP:DMG: InvokeRequestMessage = + [1657912325.922480][2977:2977] CHIP:DMG: { + [1657912325.922503][2977:2977] CHIP:DMG: suppressResponse = false, + [1657912325.922529][2977:2977] CHIP:DMG: timedRequest = false, + [1657912325.922553][2977:2977] CHIP:DMG: InvokeRequests = + [1657912325.922596][2977:2977] CHIP:DMG: [ + [1657912325.922622][2977:2977] CHIP:DMG: CommandDataIB = + [1657912325.922649][2977:2977] CHIP:DMG: { + [1657912325.922673][2977:2977] CHIP:DMG: CommandPathIB = + [1657912325.922720][2977:2977] CHIP:DMG: { + [1657912325.922753][2977:2977] CHIP:DMG: EndpointId = 0x1, + [1657912325.922787][2977:2977] CHIP:DMG: ClusterId = 0x300, + [1657912325.922820][2977:2977] CHIP:DMG: CommandId = 0x40, + [1657912325.922862][2977:2977] CHIP:DMG: }, + [1657912325.922896][2977:2977] CHIP:DMG: + [1657912325.922922][2977:2977] CHIP:DMG: CommandFields = + [1657912325.922953][2977:2977] CHIP:DMG: { + [1657912325.922986][2977:2977] CHIP:DMG: 0x0 = 16384, + [1657912325.923030][2977:2977] CHIP:DMG: 0x1 = 0, + [1657912325.923064][2977:2977] CHIP:DMG: 0x2 = 0, + [1657912325.923097][2977:2977] CHIP:DMG: 0x3 = 0, + [1657912325.923138][2977:2977] CHIP:DMG: 0x4 = 0, + [1657912325.923171][2977:2977] CHIP:DMG: }, + [1657912325.923200][2977:2977] CHIP:DMG: }, + [1657912325.923240][2977:2977] CHIP:DMG: + [1657912325.923265][2977:2977] CHIP:DMG: ], + [1657912325.923296][2977:2977] CHIP:DMG: + [1657912325.923319][2977:2977] CHIP:DMG: InteractionModelRevision = 1 + [1657912325.923351][2977:2977] CHIP:DMG: }, + [1657912325.923425][2977:2977] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657912325.923477][2977:2977] CHIP:DMG: AccessControl: allowed + [1657912325.923507][2977:2977] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0040 disabled: true - label: @@ -100,79 +106,169 @@ tests: PICS: CC.C.C44.Rsp verification: | ./chip-tool colorcontrol color-loop-set 15 0 0 30 160 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - [1657100829.032257][4435:4441] CHIP:DMG: InvokeResponseMessage = - [1657100829.032304][4435:4441] CHIP:DMG: { - [1657100829.032350][4435:4441] CHIP:DMG: suppressResponse = false, - [1657100829.032396][4435:4441] CHIP:DMG: InvokeResponseIBs = - [1657100829.032454][4435:4441] CHIP:DMG: [ - [1657100829.032500][4435:4441] CHIP:DMG: InvokeResponseIB = - [1657100829.032561][4435:4441] CHIP:DMG: { - [1657100829.032611][4435:4441] CHIP:DMG: CommandStatusIB = - [1657100829.032671][4435:4441] CHIP:DMG: { - [1657100829.032725][4435:4441] CHIP:DMG: CommandPathIB = - [1657100829.032793][4435:4441] CHIP:DMG: { - [1657100829.032857][4435:4441] CHIP:DMG: EndpointId = 0x1, - [1657100829.032928][4435:4441] CHIP:DMG: ClusterId = 0x300, - [1657100829.032994][4435:4441] CHIP:DMG: CommandId = 0x44, - [1657100829.033059][4435:4441] CHIP:DMG: }, - [1657100829.033127][4435:4441] CHIP:DMG: - [1657100829.033182][4435:4441] CHIP:DMG: StatusIB = - [1657100829.033241][4435:4441] CHIP:DMG: { - [1657100829.033287][4435:4441] CHIP:DMG: status = 0x00 (SUCCESS), - [1657100829.033339][4435:4441] CHIP:DMG: }, - [1657100829.033399][4435:4441] CHIP:DMG: - [1657100829.033438][4435:4441] CHIP:DMG: }, - [1657100829.033484][4435:4441] CHIP:DMG: - [1657100829.033521][4435:4441] CHIP:DMG: }, - [1657100829.033562][4435:4441] CHIP:DMG: - [1657100829.033593][4435:4441] CHIP:DMG: ], - [1657100829.033633][4435:4441] CHIP:DMG: - [1657100829.033666][4435:4441] CHIP:DMG: InteractionModelRevision = 1 - [1657100829.033697][4435:4441] CHIP:DMG: }, - [1657100829.033773][4435:4441] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0044 Status=0x0 - [1657100829.033826][4435:4441] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + [1657912387.432732][3126:3126] CHIP:DMG: InvokeRequestMessage = + [1657912387.432781][3126:3126] CHIP:DMG: { + [1657912387.432823][3126:3126] CHIP:DMG: suppressResponse = false, + [1657912387.432872][3126:3126] CHIP:DMG: timedRequest = false, + [1657912387.432917][3126:3126] CHIP:DMG: InvokeRequests = + [1657912387.432978][3126:3126] CHIP:DMG: [ + [1657912387.433023][3126:3126] CHIP:DMG: CommandDataIB = + [1657912387.433078][3126:3126] CHIP:DMG: { + [1657912387.433130][3126:3126] CHIP:DMG: CommandPathIB = + [1657912387.433192][3126:3126] CHIP:DMG: { + [1657912387.433250][3126:3126] CHIP:DMG: EndpointId = 0x1, + [1657912387.433311][3126:3126] CHIP:DMG: ClusterId = 0x300, + [1657912387.433372][3126:3126] CHIP:DMG: CommandId = 0x44, + [1657912387.433429][3126:3126] CHIP:DMG: }, + [1657912387.433489][3126:3126] CHIP:DMG: + [1657912387.433541][3126:3126] CHIP:DMG: CommandFields = + [1657912387.433595][3126:3126] CHIP:DMG: { + [1657912387.433660][3126:3126] CHIP:DMG: 0x0 = 15, + [1657912387.433722][3126:3126] CHIP:DMG: 0x1 = 0, + [1657912387.433778][3126:3126] CHIP:DMG: 0x2 = 0, + [1657912387.433846][3126:3126] CHIP:DMG: 0x3 = 30, + [1657912387.433914][3126:3126] CHIP:DMG: 0x4 = 160, + [1657912387.433974][3126:3126] CHIP:DMG: 0x5 = 0, + [1657912387.434040][3126:3126] CHIP:DMG: 0x6 = 0, + [1657912387.434101][3126:3126] CHIP:DMG: }, + [1657912387.434152][3126:3126] CHIP:DMG: }, + [1657912387.434213][3126:3126] CHIP:DMG: + [1657912387.434257][3126:3126] CHIP:DMG: ], + [1657912387.434312][3126:3126] CHIP:DMG: + [1657912387.434354][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912387.434397][3126:3126] CHIP:DMG: }, + [1657912387.434514][3126:3126] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657912387.434575][3126:3126] CHIP:DMG: AccessControl: allowed + [1657912387.434626][3126:3126] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0044 disabled: true - label: "DUT read ColorLoopActive attribute from TH." PICS: CC.C.A4002 verification: | ./chip-tool colorcontrol read color-loop-active 1 1 - verify on Reference app receives the right response for the data sent in the above commands - [1657100849.171372][4443:4448] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4002 DataVersion: 1806828076 - [1657100849.171444][4443:4448] CHIP:TOO: ColorLoopActive: 0 + Verify in DUT as client side log: + [1657912416.547714][3126:3126] CHIP:IM: Received Read request + [1657912416.547842][3126:3126] CHIP:DMG: ReadRequestMessage = + [1657912416.547890][3126:3126] CHIP:DMG: { + [1657912416.547930][3126:3126] CHIP:DMG: AttributePathIBs = + [1657912416.547986][3126:3126] CHIP:DMG: [ + [1657912416.548031][3126:3126] CHIP:DMG: AttributePathIB = + [1657912416.548116][3126:3126] CHIP:DMG: { + [1657912416.548167][3126:3126] CHIP:DMG: Endpoint = 0x1, + [1657912416.548231][3126:3126] CHIP:DMG: Cluster = 0x300, + [1657912416.548292][3126:3126] CHIP:DMG: Attribute = 0x0000_4002, + [1657912416.548356][3126:3126] CHIP:DMG: } + [1657912416.548410][3126:3126] CHIP:DMG: + [1657912416.548464][3126:3126] CHIP:DMG: ], + [1657912416.548516][3126:3126] CHIP:DMG: + [1657912416.548564][3126:3126] CHIP:DMG: isFabricFiltered = true, + [1657912416.548610][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912416.548653][3126:3126] CHIP:DMG: }, + [1657912416.548787][3126:3126] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912416.548947][3126:3126] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912416.549000][3126:3126] CHIP:DMG: Cluster 300, Attribute 4002 is dirty + [1657912416.549040][3126:3126] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4002 (expanded=0) + [1657912416.549091][3126:3126] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657912416.549147][3126:3126] CHIP:DMG: AccessControl: allowed + [1657912416.549237][3126:3126] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT read ColorLoopDirection attribute from TH." PICS: CC.C.A4003 verification: | ./chip-tool colorcontrol read color-loop-direction 1 1 - verify on Reference app receives the right response for the data sent in the above commands - [1657100868.557450][4449:4454] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4003 DataVersion: 1806828076 - [1657100868.557533][4449:4454] CHIP:TOO: ColorLoopDirection: 0 + Verify in DUT as client side log: + [1657912446.661818][3126:3126] CHIP:IM: Received Read request + [1657912446.661940][3126:3126] CHIP:DMG: ReadRequestMessage = + [1657912446.661989][3126:3126] CHIP:DMG: { + [1657912446.662029][3126:3126] CHIP:DMG: AttributePathIBs = + [1657912446.662076][3126:3126] CHIP:DMG: [ + [1657912446.662120][3126:3126] CHIP:DMG: AttributePathIB = + [1657912446.662174][3126:3126] CHIP:DMG: { + [1657912446.662225][3126:3126] CHIP:DMG: Endpoint = 0x1, + [1657912446.662282][3126:3126] CHIP:DMG: Cluster = 0x300, + [1657912446.662345][3126:3126] CHIP:DMG: Attribute = 0x0000_4003, + [1657912446.662407][3126:3126] CHIP:DMG: } + [1657912446.662462][3126:3126] CHIP:DMG: + [1657912446.662511][3126:3126] CHIP:DMG: ], + [1657912446.662563][3126:3126] CHIP:DMG: + [1657912446.662610][3126:3126] CHIP:DMG: isFabricFiltered = true, + [1657912446.662656][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912446.662695][3126:3126] CHIP:DMG: }, + [1657912446.662822][3126:3126] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912446.662971][3126:3126] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912446.663023][3126:3126] CHIP:DMG: Cluster 300, Attribute 4003 is dirty + [1657912446.663064][3126:3126] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4003 (expanded=0) + [1657912446.663114][3126:3126] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657912446.663169][3126:3126] CHIP:DMG: AccessControl: allowed + [1657912446.663260][3126:3126] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT read ColorLoopTime attribute from TH." PICS: CC.C.A4004 verification: | ./chip-tool colorcontrol read color-loop-time 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657100887.731783][4455:4460] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4004 DataVersion: 1806828076 - [1657100887.731858][4455:4460] CHIP:TOO: ColorLoopTime: 30 + Verify in DUT as client side log: + [1657912469.590293][3126:3126] CHIP:IM: Received Read request + [1657912469.590419][3126:3126] CHIP:DMG: ReadRequestMessage = + [1657912469.590466][3126:3126] CHIP:DMG: { + [1657912469.590499][3126:3126] CHIP:DMG: AttributePathIBs = + [1657912469.590546][3126:3126] CHIP:DMG: [ + [1657912469.590590][3126:3126] CHIP:DMG: AttributePathIB = + [1657912469.590639][3126:3126] CHIP:DMG: { + [1657912469.590690][3126:3126] CHIP:DMG: Endpoint = 0x1, + [1657912469.590748][3126:3126] CHIP:DMG: Cluster = 0x300, + [1657912469.590809][3126:3126] CHIP:DMG: Attribute = 0x0000_4004, + [1657912469.590861][3126:3126] CHIP:DMG: } + [1657912469.590913][3126:3126] CHIP:DMG: + [1657912469.590959][3126:3126] CHIP:DMG: ], + [1657912469.591009][3126:3126] CHIP:DMG: + [1657912469.591056][3126:3126] CHIP:DMG: isFabricFiltered = true, + [1657912469.591101][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912469.591143][3126:3126] CHIP:DMG: }, + [1657912469.591267][3126:3126] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912469.591410][3126:3126] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912469.591461][3126:3126] CHIP:DMG: Cluster 300, Attribute 4004 is dirty + [1657912469.591500][3126:3126] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4004 (expanded=0) + [1657912469.591545][3126:3126] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657912469.591599][3126:3126] CHIP:DMG: AccessControl: allowed + [1657912469.591688][3126:3126] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT read ColorLoopStartEnhancedHue attribute from TH." PICS: CC.C.A4005 verification: | ./chip-tool colorcontrol read color-loop-start-enhanced-hue 1 1 - verify on Reference app receives the right response for the data sent in the above commands - [1657100907.253262][4463:4468] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4005 DataVersion: 1806828076 - [1657100907.253326][4463:4468] CHIP:TOO: ColorLoopStartEnhancedHue: 160 + Verify in DUT as client side log: + [1657912490.104534][3126:3126] CHIP:IM: Received Read request + [1657912490.104664][3126:3126] CHIP:DMG: ReadRequestMessage = + [1657912490.104713][3126:3126] CHIP:DMG: { + [1657912490.104753][3126:3126] CHIP:DMG: AttributePathIBs = + [1657912490.104801][3126:3126] CHIP:DMG: [ + [1657912490.104844][3126:3126] CHIP:DMG: AttributePathIB = + [1657912490.104893][3126:3126] CHIP:DMG: { + [1657912490.104945][3126:3126] CHIP:DMG: Endpoint = 0x1, + [1657912490.105003][3126:3126] CHIP:DMG: Cluster = 0x300, + [1657912490.105059][3126:3126] CHIP:DMG: Attribute = 0x0000_4005, + [1657912490.105112][3126:3126] CHIP:DMG: } + [1657912490.105164][3126:3126] CHIP:DMG: + [1657912490.105211][3126:3126] CHIP:DMG: ], + [1657912490.105263][3126:3126] CHIP:DMG: + [1657912490.105311][3126:3126] CHIP:DMG: isFabricFiltered = true, + [1657912490.105357][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912490.105400][3126:3126] CHIP:DMG: }, + [1657912490.105531][3126:3126] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912490.105679][3126:3126] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912490.105731][3126:3126] CHIP:DMG: Cluster 300, Attribute 4005 is dirty + [1657912490.105771][3126:3126] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4005 (expanded=0) + [1657912490.105821][3126:3126] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657912490.105877][3126:3126] CHIP:DMG: AccessControl: allowed + [1657912490.105967][3126:3126] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: @@ -181,59 +277,98 @@ tests: PICS: CC.C.C44.Rsp verification: | ./chip-tool colorcontrol color-loop-set 1 1 0 0 0 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - [1657101008.744866][4475:4480] CHIP:DMG: InvokeResponseMessage = - [1657101008.744891][4475:4480] CHIP:DMG: { - [1657101008.744915][4475:4480] CHIP:DMG: suppressResponse = false, - [1657101008.744940][4475:4480] CHIP:DMG: InvokeResponseIBs = - [1657101008.744971][4475:4480] CHIP:DMG: [ - [1657101008.744995][4475:4480] CHIP:DMG: InvokeResponseIB = - [1657101008.745027][4475:4480] CHIP:DMG: { - [1657101008.745053][4475:4480] CHIP:DMG: CommandStatusIB = - [1657101008.745084][4475:4480] CHIP:DMG: { - [1657101008.745113][4475:4480] CHIP:DMG: CommandPathIB = - [1657101008.745148][4475:4480] CHIP:DMG: { - [1657101008.745183][4475:4480] CHIP:DMG: EndpointId = 0x1, - [1657101008.745222][4475:4480] CHIP:DMG: ClusterId = 0x300, - [1657101008.745252][4475:4480] CHIP:DMG: CommandId = 0x44, - [1657101008.745284][4475:4480] CHIP:DMG: }, - [1657101008.745317][4475:4480] CHIP:DMG: - [1657101008.745345][4475:4480] CHIP:DMG: StatusIB = - [1657101008.745378][4475:4480] CHIP:DMG: { - [1657101008.745411][4475:4480] CHIP:DMG: status = 0x00 (SUCCESS), - [1657101008.745443][4475:4480] CHIP:DMG: }, - [1657101008.745474][4475:4480] CHIP:DMG: - [1657101008.745502][4475:4480] CHIP:DMG: }, - [1657101008.745534][4475:4480] CHIP:DMG: - [1657101008.745559][4475:4480] CHIP:DMG: }, - [1657101008.745588][4475:4480] CHIP:DMG: - [1657101008.745611][4475:4480] CHIP:DMG: ], - [1657101008.745640][4475:4480] CHIP:DMG: - [1657101008.745664][4475:4480] CHIP:DMG: InteractionModelRevision = 1 - [1657101008.745687][4475:4480] CHIP:DMG: }, - [1657101008.745743][4475:4480] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0044 Status=0x0 - [1657101008.745784][4475:4480] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + [1657912520.093793][3126:3126] CHIP:DMG: InvokeRequestMessage = + [1657912520.093822][3126:3126] CHIP:DMG: { + [1657912520.093845][3126:3126] CHIP:DMG: suppressResponse = false, + [1657912520.093872][3126:3126] CHIP:DMG: timedRequest = false, + [1657912520.093896][3126:3126] CHIP:DMG: InvokeRequests = + [1657912520.093928][3126:3126] CHIP:DMG: [ + [1657912520.093952][3126:3126] CHIP:DMG: CommandDataIB = + [1657912520.093989][3126:3126] CHIP:DMG: { + [1657912520.094015][3126:3126] CHIP:DMG: CommandPathIB = + [1657912520.094046][3126:3126] CHIP:DMG: { + [1657912520.094079][3126:3126] CHIP:DMG: EndpointId = 0x1, + [1657912520.094112][3126:3126] CHIP:DMG: ClusterId = 0x300, + [1657912520.094144][3126:3126] CHIP:DMG: CommandId = 0x44, + [1657912520.094173][3126:3126] CHIP:DMG: }, + [1657912520.094199][3126:3126] CHIP:DMG: + [1657912520.094225][3126:3126] CHIP:DMG: CommandFields = + [1657912520.094255][3126:3126] CHIP:DMG: { + [1657912520.094286][3126:3126] CHIP:DMG: 0x0 = 1, + [1657912520.094316][3126:3126] CHIP:DMG: 0x1 = 1, + [1657912520.094342][3126:3126] CHIP:DMG: 0x2 = 0, + [1657912520.094367][3126:3126] CHIP:DMG: 0x3 = 0, + [1657912520.094492][3126:3126] CHIP:DMG: 0x4 = 0, + [1657912520.094533][3126:3126] CHIP:DMG: 0x5 = 0, + [1657912520.094565][3126:3126] CHIP:DMG: 0x6 = 0, + [1657912520.094597][3126:3126] CHIP:DMG: }, + [1657912520.094626][3126:3126] CHIP:DMG: }, + [1657912520.094660][3126:3126] CHIP:DMG: + [1657912520.094683][3126:3126] CHIP:DMG: ], + [1657912520.094715][3126:3126] CHIP:DMG: + [1657912520.094739][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912520.094762][3126:3126] CHIP:DMG: }, + [1657912520.094835][3126:3126] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657912520.094872][3126:3126] CHIP:DMG: AccessControl: allowed + [1657912520.094900][3126:3126] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0044 disabled: true - label: "DUT read ColorLoopActive attribute from TH." PICS: CC.C.A4002 verification: | ./chip-tool colorcontrol read color-loop-active 1 1 - verify on Reference app receives the right response for the data sent in the above commands - [1657101042.207152][4483:4488] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4002 DataVersion: 1806829078 - [1657101042.207223][4483:4488] CHIP:TOO: ColorLoopActive: 1 + Verify in DUT as client side log: + + [1657912750.645121][3126:3126] CHIP:IM: Received Read request + [1657912750.645210][3126:3126] CHIP:DMG: ReadRequestMessage = + [1657912750.645332][3126:3126] CHIP:DMG: { + [1657912750.645356][3126:3126] CHIP:DMG: AttributePathIBs = + [1657912750.645382][3126:3126] CHIP:DMG: [ + [1657912750.645406][3126:3126] CHIP:DMG: AttributePathIB = + [1657912750.645436][3126:3126] CHIP:DMG: { + [1657912750.645465][3126:3126] CHIP:DMG: Endpoint = 0x1, + [1657912750.645503][3126:3126] CHIP:DMG: Cluster = 0x300, + [1657912750.645531][3126:3126] CHIP:DMG: Attribute = 0x0000_4002, + [1657912750.645555][3126:3126] CHIP:DMG: } + [1657912750.645584][3126:3126] CHIP:DMG: + [1657912750.645615][3126:3126] CHIP:DMG: ], + [1657912750.645643][3126:3126] CHIP:DMG: + [1657912750.645667][3126:3126] CHIP:DMG: isFabricFiltered = true, + [1657912750.645692][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912750.645715][3126:3126] CHIP:DMG: }, + [1657912750.645801][3126:3126] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912750.645917][3126:3126] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912750.646000][3126:3126] CHIP:DMG: Cluster 300, Attribute 4002 is dirty disabled: true - label: "DUT read ColorLoopStoredEnhancedHue attribute from TH." PICS: CC.C.A4006 verification: | ./chip-tool colorcontrol read color-loop-stored-enhanced-hue 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657101062.166998][4489:4494] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4006 DataVersion: 1806829675 - [1657101062.167065][4489:4494] CHIP:TOO: ColorLoopStoredEnhancedHue: 16384 + Verify in DUT as client side log: + [1657912783.463733][3126:3126] CHIP:IM: Received Read request + [1657912783.463816][3126:3126] CHIP:DMG: ReadRequestMessage = + [1657912783.463844][3126:3126] CHIP:DMG: { + [1657912783.463865][3126:3126] CHIP:DMG: AttributePathIBs = + [1657912783.463891][3126:3126] CHIP:DMG: [ + [1657912783.463915][3126:3126] CHIP:DMG: AttributePathIB = + [1657912783.463943][3126:3126] CHIP:DMG: { + [1657912783.463970][3126:3126] CHIP:DMG: Endpoint = 0x1, + [1657912783.464005][3126:3126] CHIP:DMG: Cluster = 0x300, + [1657912783.464042][3126:3126] CHIP:DMG: Attribute = 0x0000_4006, + [1657912783.464140][3126:3126] CHIP:DMG: } + [1657912783.464177][3126:3126] CHIP:DMG: + [1657912783.464208][3126:3126] CHIP:DMG: ], + [1657912783.464237][3126:3126] CHIP:DMG: + [1657912783.464264][3126:3126] CHIP:DMG: isFabricFiltered = true, + [1657912783.464289][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912783.464312][3126:3126] CHIP:DMG: }, + [1657912783.464399][3126:3126] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912783.464546][3126:3126] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912783.464582][3126:3126] CHIP:DMG: Cluster 300, Attribute 4006 is dirty disabled: true - label: @@ -241,10 +376,27 @@ tests: PICS: CC.C.A4000 verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657101080.876810][4496:4501] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4000 DataVersion: 1806830233 - [1657101080.876876][4496:4501] CHIP:TOO: EnhancedCurrentHue: 39918 + Verify in DUT as client side log: + [1657912801.027600][3126:3126] CHIP:IM: Received Read request + [1657912801.027717][3126:3126] CHIP:DMG: ReadRequestMessage = + [1657912801.027761][3126:3126] CHIP:DMG: { + [1657912801.027803][3126:3126] CHIP:DMG: AttributePathIBs = + [1657912801.027909][3126:3126] CHIP:DMG: [ + [1657912801.027952][3126:3126] CHIP:DMG: AttributePathIB = + [1657912801.027999][3126:3126] CHIP:DMG: { + [1657912801.028046][3126:3126] CHIP:DMG: Endpoint = 0x1, + [1657912801.028135][3126:3126] CHIP:DMG: Cluster = 0x300, + [1657912801.028262][3126:3126] CHIP:DMG: Attribute = 0x0000_4000, + [1657912801.028320][3126:3126] CHIP:DMG: } + [1657912801.028372][3126:3126] CHIP:DMG: + [1657912801.028425][3126:3126] CHIP:DMG: ], + [1657912801.028472][3126:3126] CHIP:DMG: + [1657912801.028516][3126:3126] CHIP:DMG: isFabricFiltered = true, + [1657912801.028607][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912801.028653][3126:3126] CHIP:DMG: }, + [1657912801.028777][3126:3126] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912801.028982][3126:3126] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912801.029035][3126:3126] CHIP:DMG: Cluster 300, Attribute 4000 is dirty disabled: true - label: @@ -253,10 +405,27 @@ tests: PICS: CC.C.A4000 verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657101098.688681][4502:4507] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4000 DataVersion: 1806830767 - [1657101098.688757][4502:4507] CHIP:TOO: EnhancedCurrentHue: 1034 + Verify in DUT as client side log: + [1657912801.027600][3126:3126] CHIP:IM: Received Read request + [1657912801.027717][3126:3126] CHIP:DMG: ReadRequestMessage = + [1657912801.027761][3126:3126] CHIP:DMG: { + [1657912801.027803][3126:3126] CHIP:DMG: AttributePathIBs = + [1657912801.027909][3126:3126] CHIP:DMG: [ + [1657912801.027952][3126:3126] CHIP:DMG: AttributePathIB = + [1657912801.027999][3126:3126] CHIP:DMG: { + [1657912801.028046][3126:3126] CHIP:DMG: Endpoint = 0x1, + [1657912801.028135][3126:3126] CHIP:DMG: Cluster = 0x300, + [1657912801.028262][3126:3126] CHIP:DMG: Attribute = 0x0000_4000, + [1657912801.028320][3126:3126] CHIP:DMG: } + [1657912801.028372][3126:3126] CHIP:DMG: + [1657912801.028425][3126:3126] CHIP:DMG: ], + [1657912801.028472][3126:3126] CHIP:DMG: + [1657912801.028516][3126:3126] CHIP:DMG: isFabricFiltered = true, + [1657912801.028607][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912801.028653][3126:3126] CHIP:DMG: }, + [1657912801.028777][3126:3126] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912801.028982][3126:3126] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912801.029035][3126:3126] CHIP:DMG: Cluster 300, Attribute 4000 is dirty disabled: true - label: @@ -265,57 +434,99 @@ tests: PICS: CC.C.C44.Rsp verification: | ./chip-tool colorcontrol color-loop-set 1 0 0 0 0 0 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657101121.817411][4508:4513] CHIP:DMG: InvokeResponseMessage = - [1657101121.817450][4508:4513] CHIP:DMG: { - [1657101121.817490][4508:4513] CHIP:DMG: suppressResponse = false, - [1657101121.817529][4508:4513] CHIP:DMG: InvokeResponseIBs = - [1657101121.817579][4508:4513] CHIP:DMG: [ - [1657101121.817619][4508:4513] CHIP:DMG: InvokeResponseIB = - [1657101121.817672][4508:4513] CHIP:DMG: { - [1657101121.817715][4508:4513] CHIP:DMG: CommandStatusIB = - [1657101121.817772][4508:4513] CHIP:DMG: { - [1657101121.817820][4508:4513] CHIP:DMG: CommandPathIB = - [1657101121.817875][4508:4513] CHIP:DMG: { - [1657101121.817929][4508:4513] CHIP:DMG: EndpointId = 0x1, - [1657101121.817986][4508:4513] CHIP:DMG: ClusterId = 0x300, - [1657101121.818046][4508:4513] CHIP:DMG: CommandId = 0x44, - [1657101121.818105][4508:4513] CHIP:DMG: }, - [1657101121.818164][4508:4513] CHIP:DMG: - [1657101121.818212][4508:4513] CHIP:DMG: StatusIB = - [1657101121.818270][4508:4513] CHIP:DMG: { - [1657101121.818325][4508:4513] CHIP:DMG: status = 0x00 (SUCCESS), - [1657101121.818413][4508:4513] CHIP:DMG: }, - [1657101121.818466][4508:4513] CHIP:DMG: - [1657101121.818505][4508:4513] CHIP:DMG: }, - [1657101121.818562][4508:4513] CHIP:DMG: - [1657101121.818597][4508:4513] CHIP:DMG: }, - [1657101121.818637][4508:4513] CHIP:DMG: - [1657101121.818668][4508:4513] CHIP:DMG: ], - [1657101121.818707][4508:4513] CHIP:DMG: - [1657101121.818738][4508:4513] CHIP:DMG: InteractionModelRevision = 1 - [1657101121.818769][4508:4513] CHIP:DMG: }, - [1657101121.818845][4508:4513] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0044 Status=0x0 - [1657101121.818898][4508:4513] CHIP:DMG: ICR moving to [AwaitingDe] + Verify in DUT as client side log: + + [1657912615.862118][3126:3126] CHIP:DMG: InvokeRequestMessage = + [1657912615.862168][3126:3126] CHIP:DMG: { + [1657912615.862209][3126:3126] CHIP:DMG: suppressResponse = false, + [1657912615.862258][3126:3126] CHIP:DMG: timedRequest = false, + [1657912615.862305][3126:3126] CHIP:DMG: InvokeRequests = + [1657912615.862365][3126:3126] CHIP:DMG: [ + [1657912615.862409][3126:3126] CHIP:DMG: CommandDataIB = + [1657912615.862463][3126:3126] CHIP:DMG: { + [1657912615.862510][3126:3126] CHIP:DMG: CommandPathIB = + [1657912615.862565][3126:3126] CHIP:DMG: { + [1657912615.862626][3126:3126] CHIP:DMG: EndpointId = 0x1, + [1657912615.862687][3126:3126] CHIP:DMG: ClusterId = 0x300, + [1657912615.862745][3126:3126] CHIP:DMG: CommandId = 0x44, + [1657912615.862806][3126:3126] CHIP:DMG: }, + [1657912615.862865][3126:3126] CHIP:DMG: + [1657912615.862913][3126:3126] CHIP:DMG: CommandFields = + [1657912615.862968][3126:3126] CHIP:DMG: { + [1657912615.863027][3126:3126] CHIP:DMG: 0x0 = 1, + [1657912615.863084][3126:3126] CHIP:DMG: 0x1 = 0, + [1657912615.863142][3126:3126] CHIP:DMG: 0x2 = 0, + [1657912615.863202][3126:3126] CHIP:DMG: 0x3 = 0, + [1657912615.863263][3126:3126] CHIP:DMG: 0x4 = 0, + [1657912615.863323][3126:3126] CHIP:DMG: 0x5 = 0, + [1657912615.863383][3126:3126] CHIP:DMG: 0x6 = 0, + [1657912615.863436][3126:3126] CHIP:DMG: }, + [1657912615.863481][3126:3126] CHIP:DMG: }, + [1657912615.863538][3126:3126] CHIP:DMG: + [1657912615.863582][3126:3126] CHIP:DMG: ], + [1657912615.863638][3126:3126] CHIP:DMG: + [1657912615.863682][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912615.863725][3126:3126] CHIP:DMG: }, + [1657912615.863845][3126:3126] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o + [1657912615.863906][3126:3126] CHIP:DMG: AccessControl: allowed + [1657912615.863955][3126:3126] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0300 Command=0x0000_0044 disabled: true - label: "DUT read ColorLoopActive attribute from TH." PICS: CC.C.A4002 verification: | ./chip-tool colorcontrol read color-loop-active 1 1 - verify on Reference app receives the right response for the data sent in the above commands - [1657101141.547930][4516:4521] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4002 DataVersion: 1806831459 - [1657101141.547994][4516:4521] CHIP:TOO: ColorLoopActive: 0 + Verify in DUT as client side log: + [1657912416.547714][3126:3126] CHIP:IM: Received Read request + [1657912416.547842][3126:3126] CHIP:DMG: ReadRequestMessage = + [1657912416.547890][3126:3126] CHIP:DMG: { + [1657912416.547930][3126:3126] CHIP:DMG: AttributePathIBs = + [1657912416.547986][3126:3126] CHIP:DMG: [ + [1657912416.548031][3126:3126] CHIP:DMG: AttributePathIB = + [1657912416.548116][3126:3126] CHIP:DMG: { + [1657912416.548167][3126:3126] CHIP:DMG: Endpoint = 0x1, + [1657912416.548231][3126:3126] CHIP:DMG: Cluster = 0x300, + [1657912416.548292][3126:3126] CHIP:DMG: Attribute = 0x0000_4002, + [1657912416.548356][3126:3126] CHIP:DMG: } + [1657912416.548410][3126:3126] CHIP:DMG: + [1657912416.548464][3126:3126] CHIP:DMG: ], + [1657912416.548516][3126:3126] CHIP:DMG: + [1657912416.548564][3126:3126] CHIP:DMG: isFabricFiltered = true, + [1657912416.548610][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912416.548653][3126:3126] CHIP:DMG: }, + [1657912416.548787][3126:3126] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912416.548947][3126:3126] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912416.549000][3126:3126] CHIP:DMG: Cluster 300, Attribute 4002 is dirty + [1657912416.549040][3126:3126] CHIP:DMG: Reading attribute: Cluster=0x0000_0300 Endpoint=1 AttributeId=0x0000_4002 (expanded=0) + [1657912416.549091][3126:3126] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v + [1657912416.549147][3126:3126] CHIP:DMG: AccessControl: allowed + [1657912416.549237][3126:3126] CHIP:DMG: Sending report (payload has 38 bytes)... disabled: true - label: "DUT read EnhancedCurrentHue attribute from TH." PICS: CC.C.A4000 verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - verify on Reference app receives the right response for the data sent in the above commands - - [1657101157.473704][4522:4527] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4000 DataVersion: 1806831459 - [1657101157.473769][4522:4527] CHIP:TOO: EnhancedCurrentHue: 16384 + Verify in DUT as client side log: + [1657912801.027600][3126:3126] CHIP:IM: Received Read request + [1657912801.027717][3126:3126] CHIP:DMG: ReadRequestMessage = + [1657912801.027761][3126:3126] CHIP:DMG: { + [1657912801.027803][3126:3126] CHIP:DMG: AttributePathIBs = + [1657912801.027909][3126:3126] CHIP:DMG: [ + [1657912801.027952][3126:3126] CHIP:DMG: AttributePathIB = + [1657912801.027999][3126:3126] CHIP:DMG: { + [1657912801.028046][3126:3126] CHIP:DMG: Endpoint = 0x1, + [1657912801.028135][3126:3126] CHIP:DMG: Cluster = 0x300, + [1657912801.028262][3126:3126] CHIP:DMG: Attribute = 0x0000_4000, + [1657912801.028320][3126:3126] CHIP:DMG: } + [1657912801.028372][3126:3126] CHIP:DMG: + [1657912801.028425][3126:3126] CHIP:DMG: ], + [1657912801.028472][3126:3126] CHIP:DMG: + [1657912801.028516][3126:3126] CHIP:DMG: isFabricFiltered = true, + [1657912801.028607][3126:3126] CHIP:DMG: InteractionModelRevision = 1 + [1657912801.028653][3126:3126] CHIP:DMG: }, + [1657912801.028777][3126:3126] CHIP:DMG: IM RH moving to [GeneratingReports] + [1657912801.028982][3126:3126] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1657912801.029035][3126:3126] CHIP:DMG: Cluster 300, Attribute 4000 is dirty disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml index 983145e592e4b8..77e61062328056 100644 --- a/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_CGEN_2_1.yaml b/src/app/tests/suites/certification/Test_TC_CGEN_2_1.yaml index 9f318bb7e44166..c31563daf2a7ff 100644 --- a/src/app/tests/suites/certification/Test_TC_CGEN_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CGEN_2_1.yaml @@ -37,7 +37,7 @@ tests: attribute: "Breadcrumb" response: constraints: - type: uint64 + type: int64u - label: "TH1 writes the BreadCrumb attribute as 1 to the DUT" PICS: CGEN.S.A0000 @@ -88,4 +88,4 @@ tests: attribute: "SupportsConcurrentConnection" response: constraints: - type: bool + type: boolean diff --git a/src/app/tests/suites/certification/Test_TC_CGEN_2_3.yaml b/src/app/tests/suites/certification/Test_TC_CGEN_2_3.yaml deleted file mode 100644 index 3d1f43b96370c2..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CGEN_2_3.yaml +++ /dev/null @@ -1,184 +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: - 90.2.3. [TC-CGEN-2.3] BusyWithOtherAdmin Status code verification [DUT - - Server] - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: - "Condition 1: Factory reset the DUT Start the commissioning process of - TH1 on DUT" - verification: | - On reference platform we clear the storage (rm -rf /tmp/chip*) that will erase all NOCs ..etc and power cycle the device. - disabled: true - - - label: - "TH1 sends ArmFailSafe command to the DUT with ExpiryLengthSeconds as - 'commission_timeout' seconds and Breadcrumb value as 1" - PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - Start the commissioning process of TH1 on DUT - While provisioning will get all the below mentioned logs, using that log need to verify these steps - - [1651140888.275461][5289:5294] CHIP:CTL: Commissioning stage next step: 'ReadCommissioningInfo' -> 'ArmFailSafe' - [1651140888.275490][5289:5294] CHIP:CTL: Performing next commissioning step 'ArmFailSafe' - [1651140888.275514][5289:5294] CHIP:CTL: Arming failsafe (60 seconds) - - [1651140888.367336][5289:5294] CHIP:CTL: Received ArmFailSafe response - [1651140888.367398][5289:5294] CHIP:CTL: Successfully finished commissioning step 'ArmFailSafe' - disabled: true - - - label: - "TH1 Sends SetRegulatoryConfig command to the DUT with Location - attribute" - PICS: CGEN.S.C02.Rsp && CGEN.S.C03.Tx - verification: | - [1651140888.367450][5289:5294] CHIP:CTL: Commissioning stage next step: 'ArmFailSafe' -> 'ConfigRegulatory' - [1651140888.367506][5289:5294] CHIP:CTL: Performing next commissioning step 'ConfigRegulatory' - [1651140888.367556][5289:5294] CHIP:CTL: Setting Regulatory Config - [1651140888.367605][5289:5294] CHIP:CTL: Device does not support configurable regulatory location - - [1651140888.464020][5289:5294] CHIP:CTL: Received SetRegulatoryConfig response - [1651140888.464080][5289:5294] CHIP:CTL: Successfully finished commissioning step 'ConfigRegulatory' - disabled: true - - - label: "TH1 sends AttestationRequest command to the DUT" - verification: | - [1651140889.243208][5289:5294] CHIP:CTL: Commissioning stage next step: 'SendDACCertificateRequest' -> 'SendAttestationRequest' - [1651140889.243265][5289:5294] CHIP:CTL: Performing next commissioning step 'SendAttestationRequest' - [1651140889.243316][5289:5294] CHIP:CTL: Sending Attestation Request to the device. - [1651140889.243367][5289:5294] CHIP:CTL: Sending Attestation request to 0xffff90000b60 device - - [1651140889.583895][5289:5294] CHIP:CTL: Received Attestation Information from the device - [1651140889.583923][5289:5294] CHIP:CTL: Successfully finished commissioning step 'SendAttestationRequest' - [1651140889.583988][5289:5294] CHIP:CTL: Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification' - [1651140889.584015][5289:5294] CHIP:CTL: Performing next commissioning step 'AttestationVerification' - [1651140889.584036][5289:5294] CHIP:CTL: Verifying attestation - [1651140889.589167][5289:5294] CHIP:CTL: Successfully validated 'Attestation Information' command received from the device. - [1651140889.589244][5289:5294] CHIP:CTL: Successfully finished commissioning step 'AttestationVerification - disabled: true - - - label: - "When TH1s commissioning process with DUT is in progress, TH2 sends - ArmFailSafe command to the same DUT with ExpiryLengthSeconds value as - 950 seconds and Breadcrumb value as 1" - PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - This is not testable in normal scenario, and needs to be tested as part of Unit test. this test step to be removed from the manual execution. - disabled: true - - - label: "TH1 sends CSRRequest command to the DUT" - verification: | - [1651140889.829096][5289:5294] CHIP:CTL: Commissioning stage next step: 'SendOpCertSigningRequest' -> 'ValidateCSR' - [1651140889.829144][5289:5294] CHIP:CTL: Performing next commissioning step 'ValidateCSR' - [1651140889.831317][5289:5294] CHIP:CTL: Successfully finished commissioning step 'ValidateCSR' - disabled: true - - - label: "TH1 sends AddNOC command to the DUT" - verification: | - [1651140889.831388][5289:5294] CHIP:CTL: Commissioning stage next step: 'ValidateCSR' -> 'GenerateNOCChain' - [1651140889.831436][5289:5294] CHIP:CTL: Performing next commissioning step 'GenerateNOCChain' - [1651140889.831482][5289:5294] CHIP:CTL: Getting certificate chain for the device from the issuer - [1651140889.831880][5289:5294] CHIP:CTL: Verifying Certificate Signing Request - [1651140889.833332][5289:5294] CHIP:CTL: Generating NOC - - [1651140890.024038][5289:5294] CHIP:CTL: Commissioning stage next step: 'SendTrustedRootCert' -> 'SendNOC' - [1651140890.024093][5289:5294] CHIP:CTL: Performing next commissioning step 'SendNOC' - disabled: true - - - label: "TH1 Sends CommissionComplete command to the DUT" - PICS: CGEN.S.C04.Rsp && CGEN.S.C05.Tx - verification: | - [1651140891.081162][5289:5294] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1651140891.081231][5289:5294] CHIP:CTL: Received CommissioningComplete response - [1651140891.081281][5289:5294] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - disabled: true - - - label: "Condition 2: Factory reset the DUT" - verification: | - - disabled: true - - - label: "Commission TH1 and DUT" - verification: | - ubuntu@ubuntu:~/apps$ ./chip-tool pairing ble-wifi 1 GRLPrivate_EXT matter123 20202021 3840 - - [1651138461.545846][5161:5166] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1651138461.545906][5161:5166] CHIP:CTL: Received CommissioningComplete response - [1651138461.545950][5161:5166] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - disabled: true - - - label: "TH1 opens the open-commissioning-window" - verification: | - ubuntu@ubuntu:~/apps$ ./chip-tool pairing open-commissioning-window 1 1 600 1000 3840 - - - [1651138474.832127][5172:5177] CHIP:CTL: Manual pairing code: [35788419489] - [1651138474.832180][5172:5177] CHIP:CTL: SetupQRCode: [MT:-24J0AFN00WGI52OP00] - [1651138474.970651][5172:5177] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 - [1651138474.970678][5172:5177] CHIP:CTL: Successfully opened pairing window on the device - [1651138474.970754][5172:5177] CHIP:DMG: ICR moving to [AwaitingDe] - [1651138474.970792][5172:5177] CHIP:EM: Sending Standalone Ack for MessageCounter:7501147 on exchange 56004i - disabled: true - - - label: "Commission TH2 with DUT using manualcode from TH1" - verification: | - ubuntu@ubuntu:~/apps$ ./chip-tool pairing manualcode 2 35788419489 - - [1651138495.571105][3838:3843] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1651138495.571174][3838:3843] CHIP:CTL: Received CommissioningComplete response - [1651138495.571223][3838:3843] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - disabled: true - - - label: - 'TH1 sends ArmFailSafe command to the DUT with ExpiryLengthSeconds as - "commission_timeout" seconds and Breadcrumb value as 1' - PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - ubuntu@ubuntu:~/apps$ ./chip-tool generalcommissioning arm-fail-safe 60 0 1 0 - - [1651138554.165168][5180:5185] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 - [1651138554.165272][5180:5185] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 - [1651138554.165424][5180:5185] CHIP:TOO: ArmFailSafeResponse: { - [1651138554.165499][5180:5185] CHIP:TOO: errorCode: 0 - [1651138554.165556][5180:5185] CHIP:TOO: debugText: - [1651138554.165613][5180:5185] CHIP:TOO: } - [1651138554.165701][5180:5185] CHIP:DMG: ICR moving to [AwaitingDe] - [1651138554.165810][5180:5185] CHIP:EM: Sending Standalone Ack for MessageCounter:4547852 on exchange 39801i - disabled: true - - - label: - 'before the fail-safe timer expires, TH2 sends ArmFailSafe command to - the DUT with ExpiryLengthSeconds as "xx" seconds and Breadcrumb value - as 0' - PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - ubuntu@ubuntu:~/apps$ ./chip-tool generalcommissioning arm-fail-safe 60 0 2 0 - - [1651138555.612926][3849:3854] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 - [1651138555.615710][3849:3854] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 - [1651138555.615973][3849:3854] CHIP:TOO: ArmFailSafeResponse: { - [1651138555.616042][3849:3854] CHIP:TOO: errorCode: 4 - [1651138555.616089][3849:3854] CHIP:TOO: debugText: - [1651138555.616180][3849:3854] CHIP:TOO: } - [1651138555.616291][3849:3854] CHIP:DMG: ICR moving to [AwaitingDe] - [1651138555.616394][3849:3854] CHIP:EM: Sending Standalone Ack for MessageCounter:6224633 on exchange 56443i - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml index 3acefeff94fb68..95dfa5593d8b90 100644 --- a/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml @@ -35,20 +35,19 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - - label: "Read the optional global attribute: FeatureMap" + - label: "Read the global attribute: FeatureMap" PICS: CHANNEL.S.CL || CHANNEL.S.LI command: "readAttribute" attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 3 - label: "Read the global attribute: AttributeList" - PICS: CHANNEL.S.A0000 && CHANNEL.S.A0001 && CHANNEL.S.A0002 command: "readAttribute" attribute: "AttributeList" response: @@ -83,21 +82,52 @@ tests: type: list contains: [2] - - label: "Read the global attribute: AcceptedCommandList" + - label: "Read the optional command(ChangeChannel) in AcceptedCommandList" + PICS: CHANNEL.S.C00.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0, 2, 3] + contains: [0] + + - label: + "Read the optional command(ChangeChannelByNumber) in + AcceptedCommandList" + PICS: CHANNEL.S.C02.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [2] + + - label: "Read the optional command(SkipChannel) in AcceptedCommandList" + PICS: CHANNEL.S.C03.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [3] - label: "Read the global attribute: GeneratedCommandList" + PICS: " !CHANNEL.S.C01.Tx " command: "readAttribute" attribute: "GeneratedCommandList" response: + value: [] constraints: type: list - contains: [] + + - label: "Read the global attribute: GeneratedCommandList" + PICS: CHANNEL.S.C01.Tx + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + constraints: + type: list + contains: [1] #issue #11053 disabled steps below Global attributes missing from YAML framework - label: diff --git a/src/app/tests/suites/certification/Test_TC_CHANNEL_5_2.yaml b/src/app/tests/suites/certification/Test_TC_CHANNEL_5_2.yaml index b61d2c2cbed40b..9e4cf9a9ea418b 100644 --- a/src/app/tests/suites/certification/Test_TC_CHANNEL_5_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CHANNEL_5_2.yaml @@ -19,10 +19,10 @@ config: cluster: "Channel" endpoint: 1 majornumber: - type: INT16U + type: int16u defaultValue: 9 minornumber: - type: INT16U + type: int16u defaultValue: 1 tests: @@ -43,7 +43,7 @@ tests: type: list - label: "TH sends a ChangeChannelByNumber command" - PICS: CHANNEL.S.C0002 + PICS: CHANNEL.S.C02.Rsp command: "ChangeChannelByNumber" arguments: values: @@ -55,7 +55,7 @@ tests: - label: "Verify that the channel has changed on the device" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && CHANNEL.S.C02.Rsp arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_CHANNEL_5_3.yaml b/src/app/tests/suites/certification/Test_TC_CHANNEL_5_3.yaml index 6778836d2183bd..f23782ec436c38 100644 --- a/src/app/tests/suites/certification/Test_TC_CHANNEL_5_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CHANNEL_5_3.yaml @@ -19,10 +19,10 @@ config: cluster: "Channel" endpoint: 1 majornumber: - type: INT16U + type: int16u defaultValue: 9 minornumber: - type: INT16U + type: int16u defaultValue: 1 tests: @@ -59,7 +59,7 @@ tests: value: [majorNumber: majornumber, minorNumber: minornumber] - label: "Sends a SkipChannel command to the DUT" - PICS: CHANNEL.S.C0003 + PICS: CHANNEL.S.C03.Rsp command: "SkipChannel" arguments: values: @@ -69,7 +69,7 @@ tests: - label: "Verify that the channel has changed on the device" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && CHANNEL.S.C03.Rsp arguments: values: - name: "message" @@ -84,4 +84,4 @@ tests: response: value: [majorNumber: majornumber, minorNumber: minornumber + 1] constraints: - type: list + type: ChannelInfo diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml index b38fcb1589d7e7..97b156d7b4f886 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml @@ -29,7 +29,7 @@ tests: verification: | ./chip-tool generalcommissioning arm-fail-safe 900 1 62 0 - Verify on the TH Log: + Verify ArmFailSafeResponse on the TH Log: [1650391404.723087][10042:10047] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1650391404.723164][10042:10047] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 @@ -47,7 +47,7 @@ tests: verification: | ./chip-tool networkcommissioning read networks 1 0 - Verify on the TH Log: + Verify Networks entiries and its status on the TH Log: [1657790578.359665][5247:5252] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0001 DataVersion: 2276799582 [1657790578.359820][5247:5252] CHIP:TOO: Networks: 1 entries @@ -72,9 +72,11 @@ tests: 1" PICS: CNET.S.C04.Rsp && CNET.S.C05.Tx verification: | - ./chip-tool networkcommissioning remove-network hex:1850171990782922 62 0 + ./chip-tool networkcommissioning remove-network hex: 1 0 + Below is an example: + ./chip-tool networkcommissioning remove-network hex:1850171990782922 62 0 - Verify on the TH Log: + Verify NetworkConfigResponse and its arguments on the TH Log: [1657790635.532308][5254:5259] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 [1657790635.532395][5254:5259] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0005 @@ -91,7 +93,7 @@ tests: verification: | ./chip-tool networkcommissioning read networks 1 0 - Verify on the TH Log: + Verify Networks entiries and its status on the TH Log: [1657625584.426746][2703:2708] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0001 DataVersion: 1201757611 [1657625584.427014][2703:2708] CHIP:TOO: Networks: 0 entries @@ -103,7 +105,7 @@ tests: verification: | ./chip-tool networkcommissioning read last-networking-status 1 0 - Verify on the TH Log: + Verify LastNetworkingStatus on the TH Log: [1657625631.550171][2710:2715] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0005 DataVersion: 1201757611 [1657625631.550337][2710:2715] CHIP:TOO: LastNetworkingStatus: 0 @@ -115,7 +117,7 @@ tests: verification: | ./chip-tool networkcommissioning read last-network-id 1 0 - Verify on the TH Log: + Verify LastNetworkID on the TH Log: [1657625691.050998][2718:2724] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0006 DataVersion: 1201757611 [1657625691.051142][2718:2724] CHIP:TOO: LastNetworkID: 1850171990782922 @@ -129,7 +131,7 @@ tests: verification: | ./chip-tool generalcommissioning read breadcrumb 1 0 - Verify on the TH Log: + Verify Breadcrumb: 1 on the TH Log: [1657625860.742472][2739:2744] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0000 DataVersion: 2669958173 [1657625860.742607][2739:2744] CHIP:TOO: Breadcrumb: 1 @@ -142,9 +144,11 @@ tests: and Breadcrumb field set to 2" PICS: CNET.S.C04.Rsp verification: | + ./chip-tool networkcommissioning connect-network hex: 1 0 + Below is an example: ./chip-tool networkcommissioning connect-network hex:1850171990782922 1 0 --Breadcrumb 2 - Verify on the TH Log: + Verify ConnectNetworkResponse and its arguments on the TH Log: [1657625912.836563][2747:2752] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0007 @@ -164,7 +168,7 @@ tests: verification: | ./chip-tool generalcommissioning read breadcrumb 1 0 - Verify on the TH Log: + Verify Breadcrumb: 1 on the TH Log: [1657781070.617341][4823:4828] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0000 DataVersion: 2383846386 [1657781070.617458][4823:4828] CHIP:TOO: Breadcrumb: 1 @@ -177,7 +181,7 @@ tests: verification: | ./chip-tool generalcommissioning arm-fail-safe 0 0 1 0 - Verify on the TH Log: + Verify ArmFailSafeResponse on the TH Log: [1657626058.290176][2767:2772] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1657626058.290276][2767:2772] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 @@ -193,7 +197,7 @@ tests: verification: | ./chip-tool networkcommissioning read networks 1 0 - Verify on the TH Log: + Verify Networks entiries and its status on the TH Log: [1657790810.454838][5308:5313] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0001 DataVersion: 2276799582 [1657790810.454996][5308:5313] CHIP:TOO: Networks: 1 entries @@ -210,7 +214,7 @@ tests: verification: | ./chip-tool generalcommissioning arm-fail-safe 90 0 1 0 - Verify on the TH Log: + Verify ArmFailSafeResponse on the TH Log: [1657626161.611078][2780:2785] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1657626161.611183][2780:2785] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 @@ -228,9 +232,11 @@ tests: Breadcrumb field set to 1" PICS: CNET.S.C04.Rsp && CNET.S.C05.Tx verification: | + ./chip-tool networkcommissioning remove-network hex: 1 0 + Below is an example: ./chip-tool networkcommissioning remove-network hex:1850171990782922 32 0 --Breadcrumb 1 - Verify on the TH Log: + Verify NetworkConfigResponse and its arguments on the TH Log: [1657791030.761976][5336:5341] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 [1657791030.762070][5336:5341] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0005 @@ -247,7 +253,7 @@ tests: verification: | ./chip-tool generalcommissioning commissioning-complete 1 0 - Verify on the TH Log: + Verify CommissioningCompleteResponse and its arguments on the TH Log: [1657626243.485752][2795:2801] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 [1657626243.485947][2795:2801] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0005 @@ -267,7 +273,7 @@ tests: verification: | ./chip-tool generalcommissioning arm-fail-safe 0 0 62 0 - Verify on the TH Log: + Verify ArmFailSafeResponse on the TH Log: [1657626274.218994][2802:2807] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 @@ -285,7 +291,7 @@ tests: verification: | ./chip-tool networkcommissioning read networks 1 0 - Verify on the TH Log: + Verify Networks entiries and its status on the TH Log: [1657626300.861344][2808:2813] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0001 DataVersion: 1201757611 [1657626300.861492][2808:2813] CHIP:TOO: Networks: 0 entries diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_20.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_20.yaml index 4e1345b1d17dfb..a8be4cf5f31ddb 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_20.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_20.yaml @@ -22,11 +22,18 @@ config: endpoint: 0 tests: + - label: "Commission TH and DUT over BLE to setup the Wi-Fi" + verification: | + + disabled: true + - label: "DUT sends the ScanNetwork command to the TH" PICS: CNET.C.C00.Tx verification: | ./chip-tool networkcommissioning scan-networks 1 0 --Ssid null --Breadcrumb 1 + Verify ScanNetworksResponse status on the TH Log: + [1653475026.012811][29937:29942] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0001 [1653475026.012942][29937:29942] CHIP:TOO: ScanNetworksResponse: { [1653475026.012983][29937:29942] CHIP:TOO: networkingStatus: 0 @@ -160,6 +167,8 @@ tests: verification: | ./chip-tool generalcommissioning arm-fail-safe 60 0 1 0 + Verify ArmFailSafeResponse on the TH Log: + [1650371269.889246][42481:42486] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1650371269.889331][42481:42486] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 [1650371269.889471][42481:42486] CHIP:TOO: ArmFailSafeResponse: { @@ -173,8 +182,12 @@ tests: - label: "DUT sends the AddOrUpdateWiFiNetwork command to the TH" PICS: CNET.C.C03.Tx verification: | + ./chip-tool networkcommissioning add-or-update-wi-fi-network-network hex: 1 0 + Below is an example: ./chip-tool networkcommissioning add-or-update-wi-fi-network hex:47524C50726976617465 grlprivatewifi092010 1 0 + Verify NetworkConfigResponse and its arguments on the TH Log: + [1650371276.622265][42488:42493] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 [1650371276.622332][42488:42493] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0005 [1650371276.622445][42488:42493] CHIP:TOO: NetworkConfigResponse: { @@ -185,25 +198,14 @@ tests: [1650371276.622728][42488:42493] CHIP:EM: Sending Standalone Ack for MessageCounter:9593846 on exchange 33754i disabled: true - - label: "DUT sends the RemoveNetwork command to the TH" + - label: "DUT sends the ConnectNetwork command to the TH" PICS: CNET.C.C06.Tx verification: | - ./chip-tool networkcommissioning remove-network hex:47524C50726976617465 1 0 + ./chip-tool networkcommissioning connect-network hex: 1 0 + Below is an example: + ./chip-tool networkcommissioning connect-network hex:47524C50726976617465 1 0 - [1650373300.704806][42697:42702] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 - [1650373300.704864][42697:42702] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0005 - [1650373300.704957][42697:42702] CHIP:TOO: NetworkConfigResponse: { - [1650373300.705012][42697:42702] CHIP:TOO: networkingStatus: 0 - [1650373300.705044][42697:42702] CHIP:TOO: networkIndex: 0 - [1650373300.705073][42697:42702] CHIP:TOO: } - [1650373300.705120][42697:42702] CHIP:DMG: ICR moving to [AwaitingDe] - [1650373300.705181][42697:42702] CHIP:EM: Sending Standalone Ack for MessageCounter:9924068 on exchange 3557i - disabled: true - - - label: "DUT sends the ConnectNetwork command to the TH" - PICS: CNET.C.C08.Tx - verification: | - ./chip-tool networkcommissioning connect-network hex:47524C50726976617465 1 0 + Verify ConnectNetworkResponse and its arguments on the TH Log: [1650376217.124606][42876:42881] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0007 [1650376217.124707][42876:42881] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0007 @@ -216,10 +218,14 @@ tests: disabled: true - label: "DUT sends the ReorderNetwork command to the TH" - PICS: CNET.C.C04.Tx + PICS: CNET.C.C08.Tx verification: | + ./chip-tool networkcommissioning reorder-network hex: 1 0 + Below is an example: ./chip-tool networkcommissioning reorder-network hex:47524C50726976617465 3 1 0 + Verify NetworkConfigResponse and its arguments on the TH Log: + [1650381494.820649][44087:44092] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 [1650381494.820749][44087:44092] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0005 [1650381494.820860][44087:44092] CHIP:TOO: NetworkConfigResponse: { @@ -229,3 +235,22 @@ tests: [1650381494.821087][44087:44092] CHIP:DMG: ICR moving to [AwaitingDe] [1650381494.821174][44087:44092] CHIP:EM: Sending Standalone Ack for MessageCounter:5656346 on exchange 4849i disabled: true + + - label: "DUT sends the RemoveNetwork command to the TH" + PICS: CNET.C.C04.Tx + verification: | + ./chip-tool networkcommissioning remove-network hex: 1 0 + Below is an example: + ./chip-tool networkcommissioning remove-network hex:47524C50726976617465 1 0 + + Verify NetworkConfigResponse and its arguments on the TH Log: + + [1650373300.704806][42697:42702] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 + [1650373300.704864][42697:42702] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0005 + [1650373300.704957][42697:42702] CHIP:TOO: NetworkConfigResponse: { + [1650373300.705012][42697:42702] CHIP:TOO: networkingStatus: 0 + [1650373300.705044][42697:42702] CHIP:TOO: networkIndex: 0 + [1650373300.705073][42697:42702] CHIP:TOO: } + [1650373300.705120][42697:42702] CHIP:DMG: ICR moving to [AwaitingDe] + [1650373300.705181][42697:42702] CHIP:EM: Sending Standalone Ack for MessageCounter:9924068 on exchange 3557i + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml index db3a51888da9bf..b027d91c5b2322 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml @@ -24,13 +24,14 @@ config: tests: - label: - "TH sends ScanNetworks command to the DUT with the SSID argument value - as 'null' and Breadcrumb argument value as 1" + "TH sends ScanNetworks command to the DUT with the SSID field set to + 'null' and Breadcrumb field set to 1" PICS: CNET.S.C00.Rsp && CNET.S.C01.Tx verification: | ./chip-tool networkcommissioning scan-networks 1 0 --Ssid null --Breadcrumb 1 - Verify on the TH Log: + Verify wiFiScanResults entries and its arguments on the TH Log: + [1653475026.012811][29937:29942] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0001 [1653475026.012942][29937:29942] CHIP:TOO: ScanNetworksResponse: { [1653475026.012983][29937:29942] CHIP:TOO: networkingStatus: 0 @@ -161,13 +162,27 @@ tests: disabled: true - label: - "TH sends ScanNetworks Command to the DUT with SSID argument value as - 'Userwifi_ssid' and Breadcrumb argument value 1" + "TH reads Breadcumb attribute from the General Commissioning Cluster" + verification: | + ./chip-tool generalcommissioning read breadcrumb 1 0 + + Verify Breadcrumb: 1 on the TH Log: + + [1657190614.753193][5241:5246] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0000 DataVersion: 2805642039 + [1657190614.753305][5241:5246] CHIP:TOO: Breadcrumb: 1 + disabled: true + + - label: + "TH sends ScanNetworks Command to the DUT with SSID field set to + PIXIT.CNET.WIFI_ 1ST_ACCESSPOINT _SSID and Breadcrumb field set to 2" PICS: CNET.S.C00.Rsp && CNET.S.C01.Tx verification: | - ./chip-tool networkcommissioning scan-networks 1 0 --Ssid 47524C50726976617465 --Breadcrumb 1 + ./chip-tool networkcommissioning scan-network hex: 1 0 + Below is an example: + ./chip-tool networkcommissioning scan-networks 1 0 --Ssid 47524C50726976617465 --Breadcrumb 2 + + Verify ScanNetworksResponse and its arguments on the TH Log: - Verify on the TH Log: [1653475824.575642][30076:30081] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0001 [1653475824.575807][30076:30081] CHIP:TOO: ScanNetworksResponse: { [1653475824.575888][30076:30081] CHIP:TOO: networkingStatus: 0 @@ -184,3 +199,14 @@ tests: [1653475824.576668][30076:30081] CHIP:DMG: ICR moving to [AwaitingDe] [1653475824.576777][30076:30081] CHIP:EM: Sending Standalone Ack for MessageCounter:251134 on exchange 38023i disabled: true + + - label: + "TH reads Breadcumb attribute from the General Commissioning Cluster" + verification: | + ./chip-tool generalcommissioning read breadcrumb 1 0 + + Verify Breadcrumb: 2 on the TH Log: + + [1657197542.352377][5661:5666] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0000 DataVersion: 2805642042 + [1657197542.352450][5661:5666] CHIP:TOO: Breadcrumb: 2 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_7.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_7.yaml deleted file mode 100644 index be3a92db8eebf2..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_7.yaml +++ /dev/null @@ -1,99 +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: - 11.4.7. [TC-CNET-4.7] [Wi-Fi] Verification for AddOrUpdateWiFiNetwork - command [DUT-Server] - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: "TH sends ArmFailSafe command to the DUT" - verification: | - ./chip-tool generalcommissioning arm-fail-safe 60 0 1 0 - - Verify on the TH Log: - - [1653477320.523480][30238:30243] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 - [1653477320.523608][30238:30243] CHIP:TOO: ArmFailSafeResponse: { - [1653477320.523675][30238:30243] CHIP:TOO: errorCode: 0 - [1653477320.523724][30238:30243] CHIP:TOO: debugText: - [1653477320.523773][30238:30243] CHIP:TOO: } - [1653477320.523848][30238:30243] CHIP:DMG: ICR moving to [AwaitingDe] - [1653477320.523942][30238:30243] CHIP:EM: Sending Standalone Ack for MessageCounter:1909301 on exchange 3085i - disabled: true - - - label: - "TH sends AddOrUpdateWiFiNetwork command to the DUT with SSID argument - value as 'Userwifi_ssid', Credentials argument value as - 'Userwifi_Credentials' and Breadcrumb argument value as 1" - PICS: CNET.S.C02.Rsp && CNET.S.C05.Tx - verification: | - ./chip-tool networkcommissioning add-or-update-wi-fi-network hex:63686970736574757033 matter123 1 0 - - Verify on the TH Log: - - 1653477413.528761][30261:30266] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 - [1653477413.528863][30261:30266] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0005 - [1653477413.529035][30261:30266] CHIP:TOO: NetworkConfigResponse: { - [1653477413.529114][30261:30266] CHIP:TOO: networkingStatus: 0 - [1653477413.529175][30261:30266] CHIP:TOO: networkIndex: 0 - [1653477413.529231][30261:30266] CHIP:TOO: } - [1653477413.529319][30261:30266] CHIP:DMG: ICR moving to [AwaitingDe] - [1653477413.529433][30261:30266] CHIP:EM: Sending Standalone Ack for MessageCounter:5895144 on exchange 38910i - disabled: true - - - label: "TH reads MaxNetworks attribute from the DUT" - PICS: CNET.S.A0000 - verification: | - ./chip-tool networkcommissioning read max-networks 1 0 - - Verify on the TH Log: - - [1653477467.285273][30270:30275] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0000 DataVersion: 1600858167 - [1653477467.285409][30270:30275] CHIP:TOO: MaxNetworks: 1 - [1653477467.285585][30270:30275] CHIP:EM: Sending Standalone Ack for MessageCounter:2688725 on exchange 43816i - disabled: true - - - label: "TH reads LastNetworkingStatus attribute from the DUT" - PICS: CNET.S.A0005 - verification: | - ./chip-tool networkcommissioning read last-networking-status 1 0 - - Verify on the TH Log: - - [1653477574.502812][30306:30311] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0005 DataVersion: 1600858167 - [1653477574.502935][30306:30311] CHIP:TOO: LastNetworkingStatus: 0 - [1653477574.503104][30306:30311] CHIP:EM: Sending Standalone Ack for MessageCounter:12420113 on exchange 5762i - disabled: true - - - label: "TH reads Networks attribute from the DUT" - PICS: CNET.S.A0001 - verification: | - ./chip-tool networkcommissioning read networks 1 0 - - Verify on the TH Log: - - [1653477517.257488][30295:30300] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0001 DataVersion: 1600858167 - [1653477517.257649][30295:30300] CHIP:TOO: Networks: 1 entries - [1653477517.257760][30295:30300] CHIP:TOO: [1]: { - [1653477517.257824][30295:30300] CHIP:TOO: NetworkID: 47524C50726976617465 - [1653477517.257882][30295:30300] CHIP:TOO: Connected: TRUE - [1653477517.257940][30295:30300] CHIP:TOO: } - [1653477517.258168][30295:30300] CHIP:EM: Sending Standalone Ack for MessageCounter:13806793 on exchange 56068i - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_8.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_8.yaml deleted file mode 100644 index 49fe9d9663208b..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_8.yaml +++ /dev/null @@ -1,104 +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: - 11.4.8. [TC-CNET-4.8] [Thread] Verification for AddOrUpdateThreadNetwork - command [DUT-Server] - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: - "During the commissioning process, TH sends ArmFailSafe command to the - DUT" - verification: | - Executed during the commissioning - ubuntu@ubuntu:~/cntl/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool pairing ble-thread 62 hex:0e080000000000010000000300001035060004001fffe0020801191008990820220708fd067fa7635e1066051009116253045736078899aabbccddeeff030e4f70656e686b72657069446f6e6f01021234041029282c49503302ea4536648015d1ff180c0402a0fff8 20202021 3840 - [1650388629.653868][9682:9682] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs - - [1650388634.822788][9682:9687] CHIP:CTL: Commissioning stage next step: 'ReadCommissioningInfo' -> 'ArmFailSafe' - [1650388634.822849][9682:9687] CHIP:CTL: Performing next commissioning step 'ArmFailSafe' - [1650388634.822902][9682:9687] CHIP:CTL: Arming failsafe (60 seconds) - [1650388635.103211][9682:9687] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 - [1650388635.103362][9682:9687] CHIP:CTL: Received ArmFailSafe response - [1650388635.103426][9682:9687] CHIP:CTL: Successfully finished commissioning step 'ArmFailSafe' - disabled: true - - - label: - "During the commissioning process, TH sends AddOrUpdateThreadNetwork - command to the DUT with OperationalDataset argument value as - 'Userth_op' and Breadcrumb argument value as 1" - PICS: CNET.S.C03.Rsp && CNET.S.C05.Tx - verification: | - Executed during the commissioning - ubuntu@ubuntu:~/cntl/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool pairing ble-thread 62 hex:0e080000000000010000000300001035060004001fffe0020801191008990820220708fd067fa7635e1066051009116253045736078899aabbccddeeff030e4f70656e686b72657069446f6e6f01021234041029282c49503302ea4536648015d1ff180c0402a0fff8 20202021 3840 - [1650388629.653868][9682:9682] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs - - - [1650388638.775935][9682:9687] CHIP:CTL: Successfully finished commissioning step 'SendNOC' - [1650388638.775991][9682:9687] CHIP:CTL: Commissioning stage next step: 'SendNOC' -> 'ThreadNetworkSetup' - [1650388638.776048][9682:9687] CHIP:CTL: Performing next commissioning step 'ThreadNetworkSetup' - [1650388639.091089][9682:9687] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 - [1650388639.091215][9682:9687] CHIP:CTL: Received NetworkConfig response - [1650388639.091281][9682:9687] CHIP:CTL: Successfully finished commissioning step 'ThreadNetworkSetup' - [1650388639.091336][9682:9687] CHIP:CTL: Commissioning stage next step: 'ThreadNetworkSetup' -> 'ThreadNetworkEnable' - [1650388639.091393][9682:9687] CHIP:CTL: Performing next commissioning step 'ThreadNetworkEnable' - disabled: true - - - label: - "After commissioning completes, TH reads MaxNetworks attribute from - the DUT" - PICS: CNET.S.A0000 - verification: | - ubuntu@ubuntu:~/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool networkcommissioning read max-networks 162 0 - - - [1645772548.257320][3837:3842] CHIP:DMG: SuppressResponse = true, - [1645772548.257381][3837:3842] CHIP:DMG: InteractionModelRevision = 1 - [1645772548.257437][3837:3842] CHIP:DMG: } - [1645772548.257735][3837:3842] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0000DataVersion: 92121563 - [1645772548.257878][3837:3842] CHIP:TOO: MaxNetworks: 1 - [1645772548.258032][3837:3842] CHIP:EM: Sending Standalone Ack for MessageCounter:7388528 on exchange 41499i - disabled: true - - - label: "TH reads LastNetworkingStatus attribute from the DUT" - PICS: CNET.S.A0005 - verification: | - ./chip-tool networkcommissioning read last-networking-status 51 0 - - [1650371954.334608][7548:7553] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0005 DataVersion: 1032683896 - [1650371954.334756][7548:7553] CHIP:TOO: LastNetworkingStatus: 0 - [1650371954.334942][7548:7553] CHIP:EM: Sending Standalone Ack for MessageCounter:4654405 on exchange 45344i - disabled: true - - - label: "TH reads Networks attribute from the DUT" - PICS: CNET.S.A0001 - verification: | - ubuntu@ubuntu:~/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool networkcommissioning read networks 162 0 - - [1645772651.445097][3856:3861] CHIP:DMG: SuppressResponse = true, - [1645772651.445149][3856:3861] CHIP:DMG: InteractionModelRevision = 1 - [1645772651.445209][3856:3861] CHIP:DMG: } - [1645772651.445754][3856:3861] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0001DataVersion: 92121563 - [1645772651.445875][3856:3861] CHIP:TOO: Networks: 1 entries - [1645772651.446057][3856:3861] CHIP:TOO: [1]: { - [1645772651.446120][3856:3861] CHIP:TOO: NetworkID: 0119100899082022 - [1650389742.394958][9809:9814] CHIP:TOO: Connected: TRUE - [1645772651.446228][3856:3861] CHIP:TOO: } - [1645772651.446431][3856:3861] CHIP:EM: Sending Standalone Ack for MessageCounter:12695576 on exchange 11133i" - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_1.yaml b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_1.yaml index c068e3ec2618d0..f2a2d722d37d95 100644 --- a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_1.yaml @@ -42,4 +42,4 @@ tests: attribute: "SupportedStreamingProtocols" response: constraints: - type: map32 + type: bitmap32 diff --git a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml index 989788ff921502..6ee6404350dc37 100644 --- a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml @@ -36,20 +36,19 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - - label: "Read the optional global attribute: FeatureMap" + - label: "Read the global attribute: FeatureMap" PICS: CONTENTLAUNCHER.S.CS || CONTENTLAUNCHER.S.UP command: "readAttribute" attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 3 - label: "Read the global attribute: AttributeList" - PICS: CONTENTLAUNCHER.S.A0000 && CONTENTLAUNCHER.S.A0001 command: "readAttribute" attribute: "AttributeList" response: diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_3.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_3.yaml index 615ae2c6cd986d..143dcc82ca8ed2 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_3.yaml @@ -439,6 +439,24 @@ tests: [1655979686.741451][22876:22881] CHIP:CTL: Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification' disabled: true + #Verify that DUT Completes the commissioning process successfully + - label: "TH1 responds with a well-formed AttestationResponse Command" + verification: | + Both on DUT and TH side + DUT as commissioner side: + + [1655979694.071847][22876:22881] CHIP:CTL: Received CommissioningComplete response, errorCode=0 + [1655979694.071913][22876:22881] CHIP:CTL: Successfully finished commissioning step 'SendComplete' + [1655979694.071968][22876:22881] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1655979694.072031][22876:22881] CHIP:CTL: Performing next commissioning step 'Cleanup' + [1655979694.072081][22876:22881] CHIP:DIS: Closing all BLE connections + [1655979694.072136][22876:22881] CHIP:IN: Clearing BLE pending packets. + [1655979694.072268][22876:22881] CHIP:BLE: Auto-closing end point's BLE connection. + [1655979694.072328][22876:22881] CHIP:DL: Closing BLE GATT connection (con 0xffffa806f3f0) + [1655979694.072477][22876:22881] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1655979694.072547][22876:22881] CHIP:TOO: Device commissioning completed with success + disabled: true + - label: "Factory Reset TH1 so that it is commissionable again" verification: | Both on DUT and TH side @@ -716,3 +734,11 @@ tests: verification: | See above disabled: true + + #Verify that the Nonce_1 and Nonce_2 are different. + - label: + "TH1 records the AttestationNonce received in AttestationRequest as + Nonce_2" + verification: | + Verify the value of NONCE in step 9 and 3 are different + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_10.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_10.yaml index 908777d73e20b4..fadf56f23425c4 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_10.yaml @@ -23,10 +23,12 @@ config: endpoint: 0 tests: - - label: "Power up the TH Device and put the TH Device in pairing mode" + - label: + "Power up the TH Device and put the TH Device in commissioning mode" verification: | - sudo ./chip-all-clusters-app - + 1. Launch TH that has NFC tag + $ sudo ./chip-all-clusters-app + ... [1646286638.375844][11651:11651] CHIP:DL: Device Configuration: [1646286638.375960][11651:11651] CHIP:DL: Serial Number: TEST_SN [1646286638.376016][11651:11651] CHIP:DL: Vendor Id: 65521 (0xFFF1) @@ -38,12 +40,12 @@ tests: [1646286638.377664][11651:11651] CHIP:DL: Device Type: 65535 (0xFFFF) [1646286638.377771][11651:11651] CHIP:SVR: SetupQRCode: [MT:-24J042C00KA0648G00] [1646286638.377865][11651:11651] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1646286638.377915][11651:11651] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1646286638.377915][11651:11651] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 [1646286638.377986][11651:11651] CHIP:SVR: Manual pairing code: [34970112332] [1646286638.378089][11651:11651] CHIP:SVR: Long manual pairing code: [749701123365521327694] disabled: true - label: "Bring the DUT close to the NFC tag for the TH Device" verification: | - Vendor specific field testcase + Vendor specific field testcase as chip-all-clusters-app does not have an NFC tag to scan disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_11.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_11.yaml index 7df34462215563..0a3fd6db64b3fd 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_11.yaml @@ -24,64 +24,33 @@ config: tests: - label: - "If (PICS_DT_CTRL_CONCATENATED_QR_CODE_1), scan larger QR code that - will support the commissioning of all the devices" + "Scan larger QR code that will support the commissioning of all the TH + devices" PICS: MCORE.DD.CTRL_CONCATENATED_QR_CODE_1 verification: | - '' ./chip-all-clusters-app - - - [1646286638.375844][11651:11651] CHIP:DL: Device Configuration: - [1646286638.375960][11651:11651] CHIP:DL: Serial Number: TEST_SN - [1646286638.376016][11651:11651] CHIP:DL: Vendor Id: 65521 (0xFFF1) - [1646286638.376066][11651:11651] CHIP:DL: Product Id: 32769 (0x8001) - [1646286638.376153][11651:11651] CHIP:DL: Hardware Version: 0 - [1646286638.377458][11651:11651] CHIP:DL: Setup Pin Code: 20202021 - [1646286638.377541][11651:11651] CHIP:DL: Setup Discriminator: 3840 (0xF00) - [1646286638.377611][11651:11651] CHIP:DL: Manufacturing Date: (not set) - [1646286638.377664][11651:11651] CHIP:DL: Device Type: 65535 (0xFFFF) - [1646286638.377771][11651:11651] CHIP:SVR: SetupQRCode: [MT:-24J042C00KA0648G00] - [1646286638.377865][11651:11651] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1646286638.377915][11651:11651] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 - [1646286638.377986][11651:11651] CHIP:SVR: Manual pairing code: [34970112332] - [1646286638.378089][11651:11651] CHIP:SVR: Long manual pairing code: [749701123365521327694] - - - - - ./chip-tool payload parse-setup-payload MT:-24J042C00KA0648G00 - [1646287790.029238][8190:8190] CHIP:SPL: Parsing base38Representation: MT:-24J042C00KA0648G00 - [1646287790.029368][8190:8190] CHIP:SPL: CommissioningFlow: 0 - [1646287790.029393][8190:8190] CHIP:SPL: VendorID: 65521 - [1646287790.029413][8190:8190] CHIP:SPL: Version: 0 - [1646287790.029432][8190:8190] CHIP:SPL: ProductID: 32769 - [1646287790.029451][8190:8190] CHIP:SPL: Discriminator: 3840 - [1646287790.029469][8190:8190] CHIP:SPL: SetUpPINCode: 20202021 - [1646287790.029488][8190:8190] CHIP:SPL: RendezvousInformation: 2 - disabled: true - - - label: "If (PICS_DT_CTRL_CONCATENATED_QR_CODE_1)" - PICS: MCORE.DD.CTRL_CONCATENATED_QR_CODE_1 - verification: | - Vendor specific field testcase - disabled: true - - - label: - "If !(PICS_DT_CTRL_CONCATENATED_QR_CODE_1) && - PICS_DT_CTRL_CONCATENATED_QR_CODE_2" - PICS: - "!MCORE.DD.CTRL_CONCATENATED_QR_CODE_1 && - MCORE.DD.CTRL_CONCATENATED_QR_CODE_2" - verification: | - Vendor specific field testcase - disabled: true - - - label: - "If !(PICS_DT_CTRL_CONCATENATED_QR_CODE_1) && - !(PICS_DT_CTRL_CONCATENATED_QR_CODE_2)" - PICS: - "!MCORE.DD.CTRL_CONCATENATED_QR_CODE_1 && - !MCORE.DD.CTRL_CONCATENATED_QR_CODE_2" - verification: | - Vendor specific field testcase + Out of Scope for V1.0 as Concatenated QR codes are not supported yet + https://github.com/project-chip/connectedhomeip/issues/5331 + + 1. Lauch TH chip-all-clusters-app + ubuntu@matter-7:~/Apr18_dut/connectedhomeip/examples/all-clusters-app/linux/out/all-clusters-app$ sudo ./chip-all-clusters-app --wifi + + [13293:13293] CHIP:DL: Device Configuration: + [1653306603.740569][13293:13293] CHIP:DL: Serial Number: TEST_SN + [1653306603.740607][13293:13293] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1653306603.740644][13293:13293] CHIP:DL: Product Id: 32769 (0x8001) + [1653306603.740676][13293:13293] CHIP:DL: Hardware Version: 0 + [1653306603.740700][13293:13293] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 + [1653306603.740722][13293:13293] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) + [1653306603.740752][13293:13293] CHIP:DL: Manufacturing Date: (not set) + [1653306603.740777][13293:13293] CHIP:DL: Device Type: 65535 (0xFFFF) + [1653306603.740798][13293:13293] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== + [1653306603.740846][13293:13293] CHIP:SVR: SetupQRCode: [MT:-24J042C00KA0648G00] + [1653306603.740877][13293:13293] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1653306603.740898][13293:13293] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1653306603.740929][13293:13293] CHIP:SVR: Manual pairing code: [34970112332] + [1653306603.740951][13293:13293] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== + [1653306603.741000][13293:13293] CHIP:SVR: SetupQRCode: [MT:-24J0YXE00KA0648G00] + [1653306603.741028][13293:13293] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1653306603.741049][13293:13293] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0YXE00KA0648G00 + [1653306603.741081][13293:13293] CHIP:SVR: Manual pairing code: [749701123365521327694] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_12.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_12.yaml index 9b46d0b310964f..49a47c61f600d7 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_12.yaml @@ -25,19 +25,31 @@ config: tests: - label: "Scan the DUTs QR code using the TH." verification: | - 1. Run DUT. Example for DUT=all-clusters app + 1. Run DUT. Example for DUT=all-clusters-app $ ./out/all-clusters-app/chip-all-clusters-app --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --custom-flow 0 --capabilities 4 --discriminator 3840 --passcode 20202021 + ... + [1657213978.633542][366513:366513] CHIP:DL: Device Configuration: + [1657213978.633637][366513:366513] CHIP:DL: Serial Number: (not set) + [1657213978.633681][366513:366513] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1657213978.633721][366513:366513] CHIP:DL: Product Id: 32769 (0x8001) + [1657213978.633773][366513:366513] CHIP:DL: Hardware Version: 0 + [1657213978.633815][366513:366513] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 + [1657213978.633875][366513:366513] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) + [1657213978.633927][366513:366513] CHIP:DL: Manufacturing Date: (not set) + [1657213978.633985][366513:366513] CHIP:DL: Device Type: 65535 (0xFFFF) + [1657213978.634025][366513:366513] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== + [1657213978.634100][366513:366513] CHIP:SVR: SetupQRCode: [MT:-24J0AFN00KA0648G00] 2. Parse onboarding payload using TH=chip-tool - $ ./out/chip-tool/chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 - [1651193251086] [15494:447566] CHIP: [SPL] Parsing base38Representation: MT:-24J0AFN00KA0648G00 - [1651193251087] [15494:447566] CHIP: [SPL] CommissioningFlow: 0 - [1651193251087] [15494:447566] CHIP: [SPL] VendorID: 65521 - [1651193251087] [15494:447566] CHIP: [SPL] Version: 0 - [1651193251087] [15494:447566] CHIP: [SPL] ProductID: 32769 - [1651193251087] [15494:447566] CHIP: [SPL] Discriminator: 3840 - [1651193251087] [15494:447566] CHIP: [SPL] SetUpPINCode: 20202021 - [1651193251087] [15494:447566] CHIP: [SPL] RendezvousInformation: 4 + $ ./chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 + [1657214153060] [29000:16610528] CHIP: [SPL] Parsing base38Representation: MT:-24J0AFN00KA0648G00 + [1657214153060] [29000:16610528] CHIP: [SPL] Version: 0 + [1657214153060] [29000:16610528] CHIP: [SPL] VendorID: 65521 + [1657214153060] [29000:16610528] CHIP: [SPL] ProductID: 32769 + [1657214153060] [29000:16610528] CHIP: [SPL] Custom flow: 0 (STANDARD) + [1657214153060] [29000:16610528] CHIP: [SPL] Capabilities: 0x04 (On IP network) + [1657214153060] [29000:16610528] CHIP: [SPL] Discriminator: 3840 + [1657214153060] [29000:16610528] CHIP: [SPL] Passcode: 20202021 disabled: true - label: @@ -53,19 +65,17 @@ tests: "If CommissioningCustomFlow field in Step 2 = 0 (Standard Commissioning Flow), reboot the DUT device" verification: | - 1. Verify DUT is advertising in commissioning mode. On DUT, + 1. Verify DUT is advertising in commissioning mode. On DUT, verify through commissioning - $ ./out/chip-tool/chip-tool discover commissionables - [1651192893436] [15304:442604] CHIP: [DL] Mdns: OnNewAddress interface: 24 ip:fe80::dea6:32ff:fe8d:6e32 - [1651192893436] [15304:442604] CHIP: [DIS] Vendor ID: 65521 - [1651192893436] [15304:442604] CHIP: [DIS] Product ID: 32769 - [1651192893436] [15304:442604] CHIP: [DIS] Long Discriminator: 3840 - [1651192893436] [15304:442604] CHIP: [DIS] Pairing Hint: 33 - [1651192893436] [15304:442604] CHIP: [DIS] Hostname: DCA6328D6E320000 - [1651192893436] [15304:442604] CHIP: [DIS] Instance Name: 914762134DA8E7D1 - [1651192893436] [15304:442604] CHIP: [DIS] IP Address #1: fe80::dea6:32ff:fe8d:6e32 - [1651192893436] [15304:442604] CHIP: [DIS] Port: 5540 - [1651192893436] [15304:442604] CHIP: [DIS] Commissioning Mode: 1 - [1651192893436] [15304:442604] CHIP: [DIS] Mrp Interval idle: 5000 ms - [1651192893436] [15304:442604] CHIP: [DIS] Mrp Interval active: 300 ms + $ ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 + ... + [1657214364908] [29006:16612760] CHIP: [CTL] Starting commissioning discovery over DNS-SD + [1657214364908] [29006:16612760] CHIP: [DL] Browsing for: _matterc._udp,_L3840 + [1657214365080] [29006:16612761] CHIP: [DL] Mdns: OnBrowseAdd name: E5EFE5FB9DC494B9, type: _matterc._udp., domain: local., interface: 7 + [1657214365080] [29006:16612761] CHIP: [DL] Resolve type=_matterc._udp name=E5EFE5FB9DC494B9 interface=7 + [1657214365080] [29006:16612761] CHIP: [DL] Mdns : OnNewInterface hostname:DCA6328D2B9F0000.local. fullname:E5EFE5FB9DC494B9._matterc._udp.local. interface: 7 + [1657214365082] [29006:16612761] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 + [1657214365082] [29006:16612761] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fe80::1e81:3e0:3865:2d29 + [1657214365082] [29006:16612761] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.10 + [1657214365082] [29006:16612761] CHIP: [CTL] Discovered device to be commissioned over DNS-SD disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_13.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_13.yaml index 7e3257491440e0..dda362c1378f00 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_13.yaml @@ -27,7 +27,7 @@ tests: verification: | 1. Verify DUT is NOT advertising in commissioning mode. On DUT, the DUT should not show up - $ ./out/chip-tool/chip-tool discover commissionables + $ ./chip-tool discover commissionables disabled: true - label: "Scan the DUTs QR code from the previous step using the TH." @@ -36,7 +36,7 @@ tests: $ ./out/all-clusters-app/chip-all-clusters-app --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --custom-flow 0 --capabilities 4 --discriminator 3840 --passcode 20202021 2. Parse onboarding payload using TH=chip-tool - $ ./out/chip-tool/chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 + $ ./chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 [1651193251086] [15494:447566] CHIP: [SPL] Parsing base38Representation: MT:-24J0AFN00KA0648G00 [1651193251087] [15494:447566] CHIP: [SPL] CommissioningFlow: 1 [1651193251087] [15494:447566] CHIP: [SPL] VendorID: 65521 @@ -64,7 +64,7 @@ tests: 2. Verify DUT is advertising in commissioning mode. On DUT, - $ ./out/chip-tool/chip-tool discover commissionables + $ ./chip-tool discover commissionables [1651192893436] [15304:442604] CHIP: [DL] Mdns: OnNewAddress interface: 24 ip:fe80::dea6:32ff:fe8d:6e32 [1651192893436] [15304:442604] CHIP: [DIS] Vendor ID: 65521 [1651192893436] [15304:442604] CHIP: [DIS] Product ID: 32769 diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_14.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_14.yaml index ac7ae83602bec6..4cbbb65801c4dc 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_14.yaml @@ -27,7 +27,7 @@ tests: verification: | 1. Verify DUT is NOT advertising in commissioning mode. On DUT, the DUT should not show up - $ ./out/chip-tool/chip-tool discover commissionables + $ ./chip-tool discover commissionables disabled: true - label: "Scan the DUTs QR code from the previous step using the TH." @@ -36,7 +36,7 @@ tests: $ ./out/all-clusters-app/chip-all-clusters-app --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --custom-flow 0 --capabilities 4 --discriminator 3840 --passcode 20202021 2. Parse onboarding payload using TH=chip-tool - $ ./out/chip-tool/chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 + $ ./chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 [1651193251086] [15494:447566] CHIP: [SPL] Parsing base38Representation: MT:-24J0AFN00KA0648G00 [1651193251087] [15494:447566] CHIP: [SPL] CommissioningFlow: 2 [1651193251087] [15494:447566] CHIP: [SPL] VendorID: 65521 @@ -52,8 +52,9 @@ tests: CommissioningCustomFlowUrl field of the DCL. Verify that the CommissioningCustomFlow field is set to a value = 2" verification: | - 1. Verify CommissioningCustomFlow=1 - 2. Verify CommissioningModeInitialStepsHint contains a valid, non-zero integer + 1. Verify CommissioningCustomFlow=2 + 2. Verify CommissioningModeInitialStepsHint has bit 0 (Power Cycle) set to 0 and bit 1 (Device Manufacturer URL) set to 1 + 3. Verify CommissioningModeInitialStepsHint contains a valid, non-zero integer disabled: true - label: @@ -64,7 +65,7 @@ tests: 2. Verify DUT is advertising in commissioning mode. On DUT, - $ ./out/chip-tool/chip-tool discover commissionables + $ ./chip-tool discover commissionables [1651192893436] [15304:442604] CHIP: [DL] Mdns: OnNewAddress interface: 24 ip:fe80::dea6:32ff:fe8d:6e32 [1651192893436] [15304:442604] CHIP: [DIS] Vendor ID: 65521 [1651192893436] [15304:442604] CHIP: [DIS] Product ID: 32769 diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_15.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_15.yaml index 7b141c0887ce64..afd18c0f80739d 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_15.yaml @@ -29,7 +29,7 @@ tests: verification: | 1. Parse payload for DUT1 - $ ./out/chip-tool/chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 + $ ./chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 [1651194471211] [16050:465158] CHIP: [SPL] Parsing base38Representation: MT:-24J0AFN00KA0648G00 [1651194471211] [16050:465158] CHIP: [SPL] CommissioningFlow: 0 [1651194471211] [16050:465158] CHIP: [SPL] VendorID: 65521 @@ -42,7 +42,7 @@ tests: - label: "Using the TH, parse the Onboarding payload from previous step and - verify that the Descriminator and Passcode for DUT1 are present." + verify that the Discriminator and Passcode for DUT1 are present." verification: | DUT1 Descriminator: 3840 DUT1 Passcode: 20202021 @@ -54,7 +54,7 @@ tests: verification: | 1. Parse payload for DUT2 - $ ./out/chip-tool/chip-tool payload parse-setup-payload MT:-24J0IRV01WCCN68G00 + $ ./chip-tool payload parse-setup-payload MT:-24J0IRV01WCCN68G00 [1651194577916] [16053:466154] CHIP: [SPL] Parsing base38Representation: MT:-24J0IRV01WCCN68G00 [1651194577916] [16053:466154] CHIP: [SPL] CommissioningFlow: 0 [1651194577916] [16053:466154] CHIP: [SPL] VendorID: 65521 @@ -67,21 +67,21 @@ tests: - label: "Using the TH, parse the Onboarding payload from previous step and - verify that the Descriminator and Passcode for DUT2 are present." + verify that the Discriminator and Passcode for DUT2 are present." verification: | DUT2 Descriminator: 3841 DUT2 Passcode: 20212022 disabled: true - label: - "Compare the Descriminator values for DUT1 (Step 1.b) and DUT2 (Step + "Compare the Discriminator values for DUT1 (Step 1.b) and DUT2 (Step 2.b)" verification: | - 1. Verify DUT1 Descriminator does not equal DUT2 Descriminator + 1. Verify DUT1 Descriminator in Step 1.b is NOT equal to DUT2 Descriminator in Step 2.b disabled: true - label: "Compare the Passcode values for DUT1 (Step 1.b) and DUT2 (Step 2.b)" verification: | - 1. Verify DUT1 Passcode does not equal DUT2 Passcode + Verify DUT1 Passcode in step 1b is not equal DUT2 Passcode in step 2b disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_8.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_8.yaml index 63830076c49f14..1041553a11821c 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_8.yaml @@ -41,12 +41,12 @@ tests: [1653306603.740798][13293:13293] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== [1653306603.740846][13293:13293] CHIP:SVR: SetupQRCode: [MT:-24J042C00KA0648G00] [1653306603.740877][13293:13293] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1653306603.740898][13293:13293] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1653306603.740898][13293:13293] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 [1653306603.740929][13293:13293] CHIP:SVR: Manual pairing code: [34970112332] [1653306603.740951][13293:13293] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== [1653306603.741000][13293:13293] CHIP:SVR: SetupQRCode: [MT:-24J0YXE00KA0648G00] [1653306603.741028][13293:13293] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1653306603.741049][13293:13293] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0YXE00KA0648G00 + [1653306603.741049][13293:13293] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0YXE00KA0648G00 [1653306603.741081][13293:13293] CHIP:SVR: Manual pairing code: [749701123365521327694] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3841 (0xF01) @@ -54,17 +54,18 @@ tests: CHIP:DL: Device Type: 65535 (0xFFFF) CHIP:SVR: SetupQRCode: [MT:-24J0CEK01KA0648G00] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0CEK01KA0648G00 + CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0CEK01KA0648G00 CHIP:SVR: Manual pairing code: [34970112332] CHIP:SVR: SetupQRCode: [MT:-24J048N01KA0648G00] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 + CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 2. Parse the DUT's QR Code using the TH commissioner: chip-tool ubuntu@matter-7:~/Apr18_cntrl/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool payload parse-setup-payload MT:-24J048N01KA0648G00 + Verify in DUT as client side: [1650266365.939678][10146:10146] CHIP:SPL: CommissioningFlow: 2 [1650266365.939704][10146:10146] CHIP:SPL: VendorID: 65521 [1650266365.939724][10146:10146] CHIP:SPL: Version: 0 @@ -80,6 +81,7 @@ tests: verification: | ./chip-tool pairing code 1 MT:-24J042C00KA0648G00 + Verify in DUT as client side: CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 CHIP:CTL: Received CommissioningComplete response, errorCode=0 CHIP:CTL: Successfully finished commissioning step 'SendComplete' @@ -89,3 +91,36 @@ tests: CHIP:TOO: Device commissioning completed with success CHIP:DMG: ICR moving to [AwaitingDe] disabled: true + + - label: + 'Scan the TH Devices QR code (that includes the additional TLV data) + using DUT. Using the example provided above, the payload would be + "MT:-24J029Q00KA064IJ3P0IXZB0DK5N1K8SQ1RYCU1-A40".' + PICS: MCORE.DD.SCAN_QR_CODE + verification: | + 1. Get QR code from TH as server side: + $ ./out/all-clusters-app/chip-all-clusters-app + ... + [1657211128.302755][365927:365927] CHIP:SVR: SetupQRCode: [MT:-24J029Q00KA0648G00] + [1657211128.302783][365927:365927] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1657211128.302804][365927:365927] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J029Q00KA0648G00 + + 2. Build TLV Data into TH's QR code + $ ./chip-tool payload generate-qrcode --existing-payload MT:-24J029Q00KA0648G00 --tlvBytes hex:152C000A3132333435363738393018 + [1657211213125] [28612:16578643] CHIP: [TOO] QR Code: MT:-24J029Q00KA064IJ3P0IXZB0DK5N1K8SQ1RYCU1-A40 + disabled: true + + - label: + "Using the DUT, parse the THs QR code to onboard the TH Device onto + the Matter network." + verification: | + ./chip-tool pairing code 1 MT:-24J0AFN00KA064IJ3P0IXZB0DK5N1K8SQ1RYCU1-A40 + + Verify in DUT as client side: + [1657210956708] [28601:16575811] CHIP: [CTL] Received CommissioningComplete response, errorCode=0 + [1657210956708] [28601:16575811] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' + [1657210956708] [28601:16575811] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1657210956708] [28601:16575811] CHIP: [CTL] Performing next commissioning step 'Cleanup' + [1657210956708] [28601:16575811] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657210956709] [28601:16575811] CHIP: [TOO] Device commissioning completed with success + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_9.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_9.yaml index 9f3d1c65ffc459..19f9ae2248436d 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_9.yaml @@ -27,31 +27,35 @@ tests: "Provide the 11-digit/21-digit Manual Pairing Code from the TH Device in text, speech or any format supported by DUT" verification: | - 1. Launch all-clusters-app on the raspi , get the Manual Pairing code from the log, Controller should be able to parse the Manual Pairing code + 1. Launch all-clusters-app on the raspi , get the Manual Pairing code from the log - ubuntu@matter-7:~/Apr18_dut/connectedhomeip/examples/all-clusters-app/linux/out/all-clusters-app$ sudo ./chip-all-clusters-app --wifi --discriminator 3841 + ubuntu@matter-7:~/Apr18_dut/connectedhomeip/examples/all-clusters-app/linux/out/all-clusters-app$ sudo ./chip-all-clusters-app --wifi - CHIP:SPT: PASE PBKDF iterations set to 1000 - CHIP:SPT: LinuxCommissionableDataProvider didn't get a PASE salt, generating one. - CHIP:DL: Device Configuration: - CHIP:DL: Serial Number: TEST_SN - CHIP:DL: Vendor Id: 65521 (0xFFF1) - CHIP:DL: Product Id: 32769 (0x8001) - CHIP:DL: Hardware Version: 0 - CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 - CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3841 (0xF01) - CHIP:DL: Manufacturing Date: (not set) - CHIP:DL: Device Type: 65535 (0xFFFF) - CHIP:SVR: SetupQRCode: [MT:-24J0CEK01KA0648G00] - CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0CEK01KA0648G00 - CHIP:SVR: Manual pairing code: [34970112332] - CHIP:SVR: SetupQRCode: [MT:-24J048N01KA0648G00] - CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 + [13293:13293] CHIP:DL: Device Configuration: + [1653306603.740569][13293:13293] CHIP:DL: Serial Number: TEST_SN + [1653306603.740607][13293:13293] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1653306603.740644][13293:13293] CHIP:DL: Product Id: 32769 (0x8001) + [1653306603.740676][13293:13293] CHIP:DL: Hardware Version: 0 + [1653306603.740700][13293:13293] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 + [1653306603.740722][13293:13293] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) + [1653306603.740752][13293:13293] CHIP:DL: Manufacturing Date: (not set) + [1653306603.740777][13293:13293] CHIP:DL: Device Type: 65535 (0xFFFF) + [1653306603.740798][13293:13293] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== + [1653306603.740846][13293:13293] CHIP:SVR: SetupQRCode: [MT:-24J042C00KA0648G00] + [1653306603.740877][13293:13293] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1653306603.740898][13293:13293] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1653306603.740929][13293:13293] CHIP:SVR: Manual pairing code: [34970112332] + [1653306603.740951][13293:13293] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== + [1653306603.741000][13293:13293] CHIP:SVR: SetupQRCode: [MT:-24J0YXE00KA0648G00] + [1653306603.741028][13293:13293] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1653306603.741049][13293:13293] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0YXE00KA0648G00 + [1653306603.741081][13293:13293] CHIP:SVR: Manual pairing code: [749701123365521327694] + 2. Parse 11-digit Manual Pairing code ubuntu@matter-7:~/Apr18_cntrl/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool payload parse-setup-payload 34970112332 + + Verify in DUT as client side: CHIP:SPL: Parsing decimalRepresentation: 34970112332 CHIP:SPL: CommissioningFlow: 0 CHIP:SPL: VendorID: 0 @@ -61,7 +65,10 @@ tests: CHIP:SPL: SetUpPINCode: 20202021 CHIP:SPL: RendezvousInformation: 0 + 3. Parse 21-digit Manual Pairing code ubuntu@matter-7:~/Apr18_cntrl/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool payload parse-setup-payload 749701123365521327694 + + Verify in DUT as client side: CHIP:SPL: Parsing decimalRepresentation: 749701123365521327694 CHIP:SPL: CommissioningFlow: 2 CHIP:SPL: VendorID: 65521 @@ -70,4 +77,18 @@ tests: CHIP:SPL: Discriminator: 3840 CHIP:SPL: SetUpPINCode: 20202021 CHIP:SPL: RendezvousInformation: 0 + + 4. Parse payload by commissioning the TH + ./chip-tool pairing code 1 34970112332 + + Verify in DUT as client side: + [1653556303.582797][4071:4076] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1653556303.582850][4071:4076] CHIP:CTL: Received CommissioningComplete response, errorCode=0 + [1653556303.582891][4071:4076] CHIP:CTL: Successfully finished commissioning step 'SendComplete' + [1653556303.582927][4071:4076] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1653556303.582964][4071:4076] CHIP:CTL: Performing next commissioning step 'Cleanup' + [1653556303.583040][4071:4076] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1653556303.583110][4071:4076] CHIP:TOO: Device commissioning completed with success + [1653556303.583209][4071:4076] CHIP:DMG: ICR moving to [AwaitingDe] + [1653556303.583255][4071:4076] CHIP:EM: Sending Standalone Ack for MessageCounter:9735725 on exchange 24476i disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml index d5e124bd904ae6..4b5f223fce099a 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml @@ -118,7 +118,8 @@ tests: - label: "TH scans and finds the DUT SSID" PICS: MCORE.DD.WIFI verification: | - BLOCKED: SoftAP commissioning not currently supported on TH=chip-tool + Out of Scope for V1.0 + SoftAP commissioning not currently supported on TH=chip-tool disabled: true - label: @@ -127,18 +128,105 @@ tests: (or reset manually)" PICS: MCORE.DD.WIFI verification: | - BLOCKED: SoftAP commissioning not currently supported on TH=chip-tool + Out of Scope for V1.0 + SoftAP commissioning not currently supported on TH=chip-tool disabled: true - label: "TH scans and finds the DUT SSID" - PICS: MCORE.DD.WIFI && MCORE.DD.IE + PICS: MCORE.DD.WIFI & MCORE.DD.IE verification: | - BLOCKED: SoftAP commissioning not currently supported on TH=chip-tool + Out of Scope for V1.0 + SoftAP commissioning not currently supported on TH=chip-tool disabled: true - - label: "TH is connected to the DUT through an Ethernet connection" + - label: + "TH and DUT are connected to the same network and the DUT is sending + mandatory Commissionable Node Discovery service records over DNS-SD." verification: | - $ ./out/chip-tool/chip-tool discover commissionables + $ ./chip-tool discover commissionables + + Example output using all-clusters-app's advertisements: + [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 + [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 + [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 + [1651256405894] [18453:593886] CHIP: [DIS] Long Discriminator: 3840 + [1651256405894] [18453:593886] CHIP: [DIS] Pairing Hint: 33 + [1651256405894] [18453:593886] CHIP: [DIS] Hostname: DCA6328D2B9F0000 + [1651256405894] [18453:593886] CHIP: [DIS] Instance Name: 8FFEE04E82830E26 + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:dea6:32ff:fe8d:2b9f + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #2: fe80::dea6:32ff:fe8d:2b9f + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #3: fe80::dea6:32ff:fe8d:2ba0 + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #4: 192.168.1.2 + [1651256405894] [18453:593886] CHIP: [DIS] Port: 5540 + [1651256405894] [18453:593886] CHIP: [DIS] Commissioning Mode: 1 + [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval idle: 5000 ms + [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval active: 300 ms + disabled: true + + - label: + "TH and DUT are connected to the same network and the DUT is sending + optional Commissionable Node Discovery service records over DNS-SD." + PICS: + MCORE.DD.TXT_KEY_VP && MCORE.DD.TXT_KEY_DT && MCORE.DD.TXT_KEY_DN && + MCORE.DD.TXT_KEY_RI && MCORE.DD.TXT_KEY_PH && MCORE.DD.TXT_KEY_PI + verification: | + $ ./chip-tool discover commissionables + + Example output using all-clusters-app's advertisements: + [1657218902314] [29617:16663220] CHIP: [DL] Browsing for: _matterc._udp + [1657218902488] [29617:16663220] CHIP: [DL] Mdns: OnBrowseAdd name: 5B4185091B6CAD28, type: _matterc._udp., domain: local., interface: 7 + [1657218902488] [29617:16663220] CHIP: [DL] Resolve type=_matterc._udp name=5B4185091B6CAD28 interface=7 + [1657218902489] [29617:16663220] CHIP: [DL] Mdns : OnNewInterface hostname:DCA6328D2B9F0000.local. fullname:5B4185091B6CAD28._matterc._udp.local. interface: 7 + [1657218902490] [29617:16663220] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 + [1657218902490] [29617:16663220] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fe80::1e81:3e0:3865:2d29 + [1657218902490] [29617:16663220] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.10 + [1657218902490] [29617:16663220] CHIP: [DIS] Hostname: DCA6328D2B9F0000 + [1657218902490] [29617:16663220] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 + [1657218902490] [29617:16663220] CHIP: [DIS] IP Address #2: fe80::1e81:3e0:3865:2d29 + [1657218902490] [29617:16663220] CHIP: [DIS] IP Address #3: 192.168.1.10 + [1657218902490] [29617:16663220] CHIP: [DIS] Port: 5540 + [1657218902490] [29617:16663220] CHIP: [DIS] Mrp Interval idle: 5000 ms + [1657218902490] [29617:16663220] CHIP: [DIS] Mrp Interval active: 300 ms + [1657218902490] [29617:16663220] CHIP: [DIS] Vendor ID: 65521 + [1657218902490] [29617:16663220] CHIP: [DIS] Product ID: 32769 + [1657218902490] [29617:16663220] CHIP: [DIS] Long Discriminator: 3840 + [1657218902490] [29617:16663220] CHIP: [DIS] Pairing Hint: 33 + [1657218902490] [29617:16663220] CHIP: [DIS] Instance Name: 5B4185091B6CAD28 + [1657218902490] [29617:16663220] CHIP: [DIS] Commissioning Mode: 1 + + + OR + 1. User a dns-sd records browser + $ avahi-browse _matterc._udp -r + + Example output using all-clusters-app's advertisements: + + eth0 IPv6 1E36C55245E2908D _matterc._udp local + = eth0 IPv6 1E36C55245E2908D _matterc._udp local + hostname = [DCA6328D2B9F0000.local] + address = [192.168.1.10] + port = [5540] + txt = ["PI=" "PH=33" "CM=1" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] + disabled: true + + - label: "Place the DUT device into a non-commissionable state" + PICS: MCORE.DD.EXTENDED_DISCOVERY + verification: | + 1. Vendor specific, take DUT out of commissioning mode + + 2. Use a dns-sd browser to check for _CM subtype. Should be empty. + $ dns-sd -B _matterc._udp,_CM + Browsing for _matterc._udp,_CM + DATE: ---Thu 07 Jul 2022--- + 11:51:34.814 ...STARTING... + disabled: true + + - label: + "TH and DUT are connected to the same network and the DUT is sending a + Commissionable Node Discovery service record over DNS-SD." + verification: | + $ ./chip-tool discover commissionables + + Example output using all-clusters-app's advertisements: [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 @@ -155,3 +243,81 @@ tests: [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval idle: 5000 ms [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval active: 300 ms disabled: true + + - label: + "Mandatory Commissioning Subtypes: Send a browse request for + '_services._dns-sd._udp' using a DNS-SD records command-line test tool + (i.e. 'dns-sd -B _services._dns-sd._udp' or 'avahi-browse + _services._dns-sd._udp -r')" + verification: | + $ dns-sd -B _services._dns-sd._udp + + Example output using all-clusters-app's advertisements: + 11:30:36.040 Add 3 7 . _sub.local. _L3840 + 11:30:36.040 Add 3 7 . _sub.local. _S15 + 11:30:36.040 Add 2 7 . _sub.local. _CM + disabled: true + + - label: + "Optional Commissioning Subtypes: Send a browse request for + '_services._dns-sd._udp' using a DNS-SD records command-line test tool + (i.e. 'dns-sd -B _services._dns-sd._udp' or 'avahi-browse + _services._dns-sd._udp -r')" + PICS: MCORE.DD.COMMISSIONING_SUBTYPE_V && MCORE.DD.COMMISSIONING_SUBTYPE_T + verification: | + $ dns-sd -B _services._dns-sd._udp + + Example output using all-clusters-app's advertisements: + 11:56:29.770 Add 3 7 . _sub.local. _V65521 + disabled: true + + - label: "Place the DUT device into Commissioning mode" + verification: | + $ ./chip-tool discover commissionables + + Example output using all-clusters-app's advertisements: + [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 + [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 + [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 + [1651256405894] [18453:593886] CHIP: [DIS] Long Discriminator: 3840 + [1651256405894] [18453:593886] CHIP: [DIS] Pairing Hint: 33 + [1651256405894] [18453:593886] CHIP: [DIS] Hostname: DCA6328D2B9F0000 + [1651256405894] [18453:593886] CHIP: [DIS] Instance Name: 8FFEE04E82830E26 + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:dea6:32ff:fe8d:2b9f + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #2: fe80::dea6:32ff:fe8d:2b9f + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #3: fe80::dea6:32ff:fe8d:2ba0 + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #4: 192.168.1.2 + [1651256405894] [18453:593886] CHIP: [DIS] Port: 5540 + [1651256405894] [18453:593886] CHIP: [DIS] Commissioning Mode: 1 + [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval idle: 5000 ms + [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval active: 300 ms + disabled: true + + - label: + "Send a browse request for '_matterc._udp' using a DNS-SD records + command-line test tool (i.e. 'dns-sd -B _matterc._udp' or + 'avahi-browse _matterc._udp -r')" + verification: | + $ ./chip-tool discover commissionables + + [1657220492275] [29906:16679893] CHIP: [DL] Browsing for: _matterc._udp + [1657220492275] [29906:16679893] CHIP: [DL] Mdns: OnBrowseAdd name: 74AFA51731B2E373, type: _matterc._udp., domain: local., interface: 7 + [1657220492275] [29906:16679893] CHIP: [DL] Resolve type=_matterc._udp name=74AFA51731B2E373 interface=7 + [1657220492276] [29906:16679893] CHIP: [DL] Mdns : OnNewInterface hostname:DCA6328D2B9F0000.local. fullname:74AFA51731B2E373._matterc._udp.local. interface: 7 + [1657220492277] [29906:16679893] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 + [1657220492277] [29906:16679893] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fe80::1e81:3e0:3865:2d29 + [1657220492277] [29906:16679893] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.10 + [1657220492277] [29906:16679893] CHIP: [DIS] Hostname: DCA6328D2B9F0000 + [1657220492277] [29906:16679893] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 + [1657220492277] [29906:16679893] CHIP: [DIS] IP Address #2: fe80::1e81:3e0:3865:2d29 + [1657220492277] [29906:16679893] CHIP: [DIS] IP Address #3: 192.168.1.10 + [1657220492277] [29906:16679893] CHIP: [DIS] Port: 5540 + [1657220492277] [29906:16679893] CHIP: [DIS] Mrp Interval idle: 5000 ms + [1657220492277] [29906:16679893] CHIP: [DIS] Mrp Interval active: 300 ms + [1657220492277] [29906:16679893] CHIP: [DIS] Vendor ID: 65521 + [1657220492277] [29906:16679893] CHIP: [DIS] Product ID: 32769 + [1657220492277] [29906:16679893] CHIP: [DIS] Long Discriminator: 3840 + [1657220492277] [29906:16679893] CHIP: [DIS] Pairing Hint: 33 + [1657220492277] [29906:16679893] CHIP: [DIS] Instance Name: 74AFA51731B2E373 + [1657220492277] [29906:16679893] CHIP: [DIS] Commissioning Mode: 1 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml index 8812465160b3c8..21f2b82ea65b68 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml @@ -23,46 +23,44 @@ config: endpoint: 0 tests: - - label: - "If (PICS_BLE) TH starts matter announcement procedure using BLE - transport" + - label: "TH starts matter announcement procedure using BLE transport" PICS: MCORE.DD.BLE verification: | - $ ./out/all-clusters-app/chip-all-clusters-app --wifi --discriminator 3841 + $ ./out/ble/chip-all-clusters-app --ble-device 1 --discriminator 3841 - [1653087913.247229][8083:8083] CHIP:SVR: Server Listening... - [1653087913.247636][8083:8083] CHIP:DL: Device Configuration: - [1653087913.248094][8083:8083] CHIP:DL: Serial Number: TEST_SN - [1653087913.248608][8083:8083] CHIP:DL: Vendor Id: 65521 (0xFFF1) - [1653087913.249146][8083:8083] CHIP:DL: Product Id: 32769 (0x8001) - [1653087913.249610][8083:8083] CHIP:DL: Hardware Version: 0 - [1653087913.250082][8083:8083] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 - [1653087913.250739][8083:8083] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3841 (0xF01) - [1653087913.251234][8083:8083] CHIP:DL: Manufacturing Date: (not set) - [1653087913.251732][8083:8083] CHIP:DL: Device Type: 65535 (0xFFFF) - [1653087913.252171][8083:8083] CHIP:SVR: SetupQRCode: [MT:-24J048N01KA0648G00] - [1653087913.252710][8083:8083] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1653087913.253175][8083:8083] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 - [1653087913.253681][8083:8083] CHIP:SVR: Manual pairing code: [749701123365521327694] - [1653087913.254268][8083:8083] CHIP:DMG: Endpoint 0, Cluster 0x0000_001D update version to 29f72814 + [1657221603.350406][368108:368108] CHIP:DL: Device Configuration: + [1657221603.350445][368108:368108] CHIP:DL: Serial Number: TEST_SN + [1657221603.350488][368108:368108] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1657221603.350523][368108:368108] CHIP:DL: Product Id: 32769 (0x8001) + [1657221603.350555][368108:368108] CHIP:DL: Hardware Version: 0 + [1657221603.350579][368108:368108] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 + [1657221603.350599][368108:368108] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3841 (0xF01) + [1657221603.350627][368108:368108] CHIP:DL: Manufacturing Date: (not set) + [1657221603.350649][368108:368108] CHIP:DL: Device Type: 65535 (0xFFFF) + [1657221603.350684][368108:368108] CHIP:SVR: SetupQRCode: [MT:-24J048N01KA0648G00] + [1657221603.350719][368108:368108] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1657221603.350739][368108:368108] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 + [1657221603.350773][368108:368108] CHIP:SVR: Manual pairing code: [749701123365521327694] + [1657221603.350846][368108:368108] CHIP:DMG: Endpoint 0, Cluster 0x0000_001D update version to 4dd11284 + [1657221603.353048][368108:368113] CHIP:DL: TRACE: Bluez mainloop starting Thread + [1657221603.353167][368108:368111] CHIP:DL: TRACE: Bus acquired for name MATTER-3841 disabled: true - label: - "If (PICS_BLE) DUT starts BLE scan across all three advertising - channels with a sufficient dwell time, interval, and overall duration - of scan" + "DUT starts BLE scan across all three advertising channels with a + sufficient dwell time, interval, and overall duration of scan" PICS: MCORE.DD.BLE verification: | 1. Discover commissionables over BLE using DUT=chip-tool pairing - DUT Logs - $ ./out/chip-tool/chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 + Verify in TH as server side + $ ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 [1651743342.299897][3461:3464] CHIP:BLE: New device scanned: E4:5F:01:0F:1A:02 [1651743342.299951][3461:3464] CHIP:BLE: Device discriminator match. Attempting to connect. [1651743342.303783][3461:3464] CHIP:BLE: Scan complete notification without an active scan. [1651743346.244175][3461:3464] CHIP:DL: ConnectDevice complete - TH Logs + Verify in DUT as client side [1651743346.152716][5072:5075] CHIP:DL: Device E4:5F:01:0F:3B:B1 (Path: /org/bluez/hci0/dev_E4_5F_01_0F_3B_B1) Connected [1651743347.908807][5072:5075] CHIP:DL: BluezCharacteristicAcquireWrite is called, conn: 0xffffa0043700 [1651743347.911151][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 @@ -108,19 +106,19 @@ tests: [1651743348.446962][5072:5072] CHIP:SVR: Commissioning completed session establishment step disabled: true - - label: "If (PICS_BLE) DUT starts scan in background using BLE transport" + - label: "DUT starts scan in background using BLE transport" PICS: MCORE.DD.BLE verification: | 1. Discover commissionables over BLE using DUT=chip-tool pairing command - DUT Logs - $ ./out/chip-tool/chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 + Verify in TH as server side + $ ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 [1651743342.299897][3461:3464] CHIP:BLE: New device scanned: E4:5F:01:0F:1A:02 [1651743342.299951][3461:3464] CHIP:BLE: Device discriminator match. Attempting to connect. [1651743342.303783][3461:3464] CHIP:BLE: Scan complete notification without an active scan. [1651743346.244175][3461:3464] CHIP:DL: ConnectDevice complete - TH Logs + Verify in DUT as client side [1651743346.152716][5072:5075] CHIP:DL: Device E4:5F:01:0F:3B:B1 (Path: /org/bluez/hci0/dev_E4_5F_01_0F_3B_B1) Connected [1651743347.908807][5072:5075] CHIP:DL: BluezCharacteristicAcquireWrite is called, conn: 0xffffa0043700 [1651743347.911151][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 @@ -166,11 +164,12 @@ tests: [1651743348.446962][5072:5072] CHIP:SVR: Commissioning completed session establishment step disabled: true - - label: "If (PICS_BLE) TH starts matter announcement using BLE transport" + - label: "TH starts matter announcement using BLE transport" PICS: MCORE.DD.BLE verification: | $ ./out/all-clusters-app/chip-all-clusters-app --wifi --discriminator 3841 + Verify in TH as server side [1653087913.247229][8083:8083] CHIP:SVR: Server Listening... [1653087913.247636][8083:8083] CHIP:DL: Device Configuration: [1653087913.248094][8083:8083] CHIP:DL: Serial Number: TEST_SN @@ -183,45 +182,114 @@ tests: [1653087913.251732][8083:8083] CHIP:DL: Device Type: 65535 (0xFFFF) [1653087913.252171][8083:8083] CHIP:SVR: SetupQRCode: [MT:-24J048N01KA0648G00] [1653087913.252710][8083:8083] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1653087913.253175][8083:8083] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 + [1653087913.253175][8083:8083] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 [1653087913.253681][8083:8083] CHIP:SVR: Manual pairing code: [749701123365521327694] [1653087913.254268][8083:8083] CHIP:DMG: Endpoint 0, Cluster 0x0000_001D update version to 29f72814 disabled: true - - label: - "If (PICS_WIFI) TH starts SoftAP and begin matter announcement - procedure" - PICS: MCORE.DD.WIFI + - label: "TH starts matter announcement using BLE transport" + PICS: MCORE.DD.BLE verification: | - BLOCKED: SoftAP commissioning not currently supported on DUT=chip-tool + 1. Discover commissionables over BLE using DUT=chip-tool pairing command + + Verify in TH as server side + $ ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 + [1651743342.299897][3461:3464] CHIP:BLE: New device scanned: E4:5F:01:0F:1A:02 + [1651743342.299951][3461:3464] CHIP:BLE: Device discriminator match. Attempting to connect. + [1651743342.303783][3461:3464] CHIP:BLE: Scan complete notification without an active scan. + [1651743346.244175][3461:3464] CHIP:DL: ConnectDevice complete + + Verify in DUT as client side + [1651743346.152716][5072:5075] CHIP:DL: Device E4:5F:01:0F:3B:B1 (Path: /org/bluez/hci0/dev_E4_5F_01_0F_3B_B1) Connected + [1651743347.908807][5072:5075] CHIP:DL: BluezCharacteristicAcquireWrite is called, conn: 0xffffa0043700 + [1651743347.911151][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 + [1651743347.911349][5072:5075] CHIP:BLE: Write request received debug 0xffffa0043700 + [1651743347.911754][5072:5072] CHIP:BLE: local and remote recv window sizes = 6 + [1651743347.911829][5072:5072] CHIP:BLE: selected BTP version 4 + [1651743347.911877][5072:5072] CHIP:BLE: using BTP fragment sizes rx 244 / tx 244. + [1651743348.006770][5072:5075] CHIP:DL: CHIPoBLE subscribe received + [1651743348.007026][5072:5072] CHIP:IN: BLE EndPoint 0xaaaab7bb3c20 Connection Complete + [1651743348.007132][5072:5072] CHIP:DL: HandlePlatformSpecificBLEEvent 32778 + [1651743348.007196][5072:5072] CHIP:DL: Receive kCHIPoBLEConnectionEstablished + [1651743348.150980][5072:5075] CHIP:BLE: Indication confirmation, 0xffffa0043700 + [1651743348.199997][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 + [1651743348.200614][5072:5075] CHIP:BLE: Write request received debug 0xffffa0043700 + [1651743348.201013][5072:5072] CHIP:EM: Received message of type 0x20 with protocolId (0, 0) and MessageCounter:3306320356 on exchange 29381r + [1651743348.201117][5072:5072] CHIP:EM: Handling via exchange: 29381r, Delegate: 0xaaaab7bb2a90 + [1651743348.201191][5072:5072] CHIP:SC: Received PBKDF param request + [1651743348.201280][5072:5072] CHIP:SC: Peer assigned session ID 14881 + [1651743348.201349][5072:5072] CHIP:SC: Found MRP parameters in the message + [1651743348.201520][5072:5072] CHIP:SC: Including MRP parameters in PBKDF param response + [1651743348.201884][5072:5072] CHIP:IN: Prepared unauthenticated message 0xffffdcf2ef78 to 0x0000000000000000 (0) of type 0x21 and protocolId (0, 0) on exchange 29381r with MessageCounter:2627159088. + [1651743348.201989][5072:5072] CHIP:IN: Sending unauthenticated msg 0xffffdcf2ef78 with MessageCounter:2627159088 to 0x0000000000000000 at monotonic time: 0000000000FF6731 msec + [1651743348.202196][5072:5072] CHIP:SC: Sent PBKDF param response + [1651743348.298384][5072:5075] CHIP:BLE: Indication confirmation, 0xffffa0043700 + [1651743348.299274][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 + [1651743348.300132][5072:5075] CHIP:BLE: Write request received debug 0xffffa0043700 + [1651743348.300571][5072:5072] CHIP:EM: Received message of type 0x22 with protocolId (0, 0) and MessageCounter:3306320357 on exchange 29381r + [1651743348.300655][5072:5072] CHIP:EM: Found matching exchange: 29381r, Delegate: 0xaaaab7bb2a90 + [1651743348.300741][5072:5072] CHIP:SC: Received spake2p msg1 + [1651743348.304696][5072:5072] CHIP:IN: Prepared unauthenticated message 0xffffdcf2ee58 to 0x0000000000000000 (0) of type 0x23 and protocolId (0, 0) on exchange 29381r with MessageCounter:2627159089. + [1651743348.304817][5072:5072] CHIP:IN: Sending unauthenticated msg 0xffffdcf2ee58 with MessageCounter:2627159089 to 0x0000000000000000 at monotonic time: 0000000000FF6798 msec + [1651743348.305007][5072:5072] CHIP:SC: Sent spake2p msg2 + [1651743348.444144][5072:5075] CHIP:BLE: Indication confirmation, 0xffffa0043700 + [1651743348.444992][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 + [1651743348.445608][5072:5075] CHIP:BLE: Write request received debug 0xffffa0043700 + [1651743348.445888][5072:5072] CHIP:EM: Received message of type 0x24 with protocolId (0, 0) and MessageCounter:3306320358 on exchange 29381r + [1651743348.445943][5072:5072] CHIP:EM: Found matching exchange: 29381r, Delegate: 0xaaaab7bb2a90 + [1651743348.446001][5072:5072] CHIP:SC: Received spake2p msg3 + [1651743348.446130][5072:5072] CHIP:SC: Sending status report. Protocol code 0, exchange 29381 + [1651743348.446202][5072:5072] CHIP:IN: Prepared unauthenticated message 0xffffdcf2eea8 to 0x0000000000000000 (0) of type 0x40 and protocolId (0, 0) on exchange 29381r with MessageCounter:2627159090. + [1651743348.446262][5072:5072] CHIP:IN: Sending unauthenticated msg 0xffffdcf2eea8 with MessageCounter:2627159090 to 0x0000000000000000 at monotonic time: 0000000000FF6825 msec + [1651743348.446452][5072:5072] CHIP:IN: New secure session created for device , LSID:2138 PSID:14881! + [1651743348.446962][5072:5072] CHIP:SVR: Commissioning completed session establishment step + disabled: true + + - label: "TH starts SoftAP and begin matter announcement procedure" + PICS: MCORE.DD.DISCOVERY_SOFTAP + verification: | + Out of Scope V1.0 + SoftAP commissioning not currently supported on TH=all-clusters-app disabled: true - label: - "If (PICS_WIFI) DUT starts Wi-Fi scan of all 2.4 GHz Wi-Fi channels - allowed per its operational regulatory domain (channels 1, 6, and 11 - are preferred)" - PICS: MCORE.DD.WIFI + "DUT starts Wi-Fi scan of all 2.4 GHz Wi-Fi channels allowed per its + operational regulatory domain (channels 1, 6, and 11 are preferred)" + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - BLOCKED: SoftAP commissioning not currently supported on DUT=chip-tool + Out of Scope V1.0 + SoftAP commissioning not currently supported on TH=all-clusters-app disabled: true - - label: "If (PICS_WIFI) DUT scans using Wi-Fi in background" - PICS: MCORE.DD.WIFI + - label: "DUT scans using Wi-Fi in background" + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - BLOCKED: SoftAP commissioning not currently supported on DUT=chip-tool + Out of Scope V1.0 + SoftAP commissioning not currently supported on TH=all-clusters-app disabled: true - - label: - "If (PICS_WIFI) TH starts SoftAP and begin matter announcement - procedure" - PICS: MCORE.DD.WIFI + - label: "TH starts SoftAP and begin matter announcement procedure" + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - BLOCKED: SoftAP commissioning not currently supported on DUT=chip-tool + Out of Scope V1.0 + SoftAP commissioning not currently supported on TH=all-clusters-app disabled: true - - label: "DUT performs service discovery using DNS-SD" + - label: "TH starts SoftAP and begin matter announcement procedure" + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - $ ./out/chip-tool/chip-tool discover commissionables + Out of Scope V1.0 + SoftAP commissioning not currently supported on TH=all-clusters-app + disabled: true + + - label: + "With DUT and TH connected to the same network over IP, DUT performs + service discovery using DNS-SD" + verification: | + 1. TH is in commissioning mode and discoverable by DUT over IP through DNS-SD advertisements + + Verify in DUT as client side + $ ./chip-tool discover commissionables [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_1.yaml index 18c6edcbc079f2..d97e50beb3830a 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_1.yaml @@ -41,12 +41,12 @@ tests: [1653471956.972509][10713:10713] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== [1653471956.972546][10713:10713] CHIP:SVR: SetupQRCode: [MT:-24J0CEK01KA0648G00] [1653471956.972579][10713:10713] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1653471956.972600][10713:10713] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0CEK01KA0648G00 + [1653471956.972600][10713:10713] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0CEK01KA0648G00 [1653471956.972632][10713:10713] CHIP:SVR: Manual pairing code: [34970112332] [1653471956.972654][10713:10713] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== [1653471956.972715][10713:10713] CHIP:SVR: SetupQRCode: [MT:-24J048N01KA0648G00] [1653471956.972748][10713:10713] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1653471956.972769][10713:10713] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 + [1653471956.972769][10713:10713] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 [1653471956.972803][10713:10713] CHIP:SVR: Manual pairing code: [749701123365521327694] @@ -244,8 +244,8 @@ tests: disabled: true - label: - "If (PICS_WIFI) or (PICS_THREAD), Commissioner SHALL configure - regulatory information in the Commissionee." + "Commissioner SHALL configure regulatory information in the + Commissionee." PICS: MCORE.DD.WIRELESS verification: | Verify on TH Log: diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_10.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_10.yaml index 2bc80b4dc717f8..936e6943fe2c1b 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_10.yaml @@ -29,16 +29,16 @@ tests: verification: | 1. Parse the TH Onboarding Payload using the DUT commissioner - Example using chip-too as a DUT: - $ ./out/chip-tool/chip-tool payload parse-setup-payload MT:-24J029Q00KA0648G00 - [1651077458589] [91233:65331701] CHIP: [SPL] Parsing base38Representation: MT:-24J029Q00KA0648G00 - [1651077458590] [91233:65331701] CHIP: [SPL] CommissioningFlow: 2 - [1651077458590] [91233:65331701] CHIP: [SPL] VendorID: 65521 - [1651077458590] [91233:65331701] CHIP: [SPL] Version: 0 - [1651077458590] [91233:65331701] CHIP: [SPL] ProductID: 32769 - [1651077458590] [91233:65331701] CHIP: [SPL] Discriminator: 3840 - [1651077458590] [91233:65331701] CHIP: [SPL] SetUpPINCode: 20202021 - [1651077458590] [91233:65331701] CHIP: [SPL] RendezvousInformation: 4 + Example using chip-tool as a DUT: + $ ./chip-tool payload parse-setup-payload MT:-24J029Q00KA0648G00 + [1657230447725] [31078:16782733] CHIP: [SPL] Parsing base38Representation: MT:-24J029Q00KA0648G00 + [1657230447725] [31078:16782733] CHIP: [SPL] Version: 0 + [1657230447725] [31078:16782733] CHIP: [SPL] VendorID: 65521 + [1657230447725] [31078:16782733] CHIP: [SPL] ProductID: 32769 + [1657230447725] [31078:16782733] CHIP: [SPL] Custom flow: 2 (CUSTOM) + [1657230447725] [31078:16782733] CHIP: [SPL] Capabilities: 0x04 (On IP network) + [1657230447725] [31078:16782733] CHIP: [SPL] Discriminator: 3840 + [1657230447725] [31078:16782733] CHIP: [SPL] Passcode: 20202021 2. Verify that the Commissioning Flow is set to 2 (Custom Flow) disabled: true @@ -53,26 +53,15 @@ tests: - label: "Using the instructions located at the CommissioningCustomFlowURL from the DCL, DUT guides the user in next steps to prepare the commissionee - (TH) for commisssioning" + (TH) for commissioning" verification: | 1. Follow instructions for commissioning using the URL contained in the DCL disabled: true - label: "DUT commissions TH" verification: | - 1. Verify commissioning was successful + $ ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 - TH all-clusters-app: - [1651103591.176135][8940:8940] CHIP:SVR: Commissioning completed successfully - [1651103591.176179][8940:8940] CHIP:DIS: Updating services using commissioning mode 0 - - DUT chip-tool: - $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J029Q00KA0648G00 - - [1651103591085] [94586:65580481] CHIP: [CTL] Received CommissioningComplete response - [1651103591085] [94586:65580481] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' - [1651103591085] [94586:65580481] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1651103591085] [94586:65580481] CHIP: [CTL] Performing next commissioning step 'Cleanup' - [1651103591085] [94586:65580481] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' - [1651103591085] [94586:65580481] CHIP: [TOO] Device commissioning completed with success + [1657578523795] [9610:351965] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657578523795] [9610:351965] CHIP: [TOO] Device commissioning completed with success disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_11.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_11.yaml index 85e9e0c6f4dbee..8d65d3338b3e5e 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_11.yaml @@ -28,62 +28,53 @@ tests: has the Custom Flow field set to 0 and supports BLE for its Discovery Capability. Ensure the Version bit string follows the current Matter spec. documentation." - PICS: MCORE.DD.DT_BLE + PICS: MCORE.DD.DISCOVERY_BLE verification: | - $ ./out/ble/all-clusters-app/chip-all-clusters-app --capabilities 2 + $ ./out/ble/all-clusters-app/chip-all-clusters-app --capabilities 2 --ble-device 1 ... - [1651101335.714230][22353:22353] CHIP:DL: Device Configuration: - [1651101335.722064][22353:22353] CHIP:DL: Serial Number: TEST_SN - [1651101335.722638][22353:22353] CHIP:DL: Vendor Id: 65521 (0xFFF1) - [1651101335.723167][22353:22353] CHIP:DL: Product Id: 32769 (0x8001) - [1651101335.723712][22353:22353] CHIP:DL: Hardware Version: 0 - [1651101335.724228][22353:22353] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 - [1651101335.724756][22353:22353] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) - [1651101335.725226][22353:22353] CHIP:DL: Manufacturing Date: (not set) - [1651101335.725721][22353:22353] CHIP:DL: Device Type: 65535 (0xFFFF) - [1651101335.733693][22353:22353] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== - [1651101335.734598][22353:22353] CHIP:SVR: SetupQRCode: [MT:-24J042C00KA0648G00] - [1651101335.735182][22353:22353] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1651101335.735618][22353:22353] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 - - - ubuntu@ubuntu:~/apps$ ./chip-tool payload parse-setup-payload MT:-24J0YXE00KA0648G00 - [1653562354.037031][4312:4312] CHIP:SPL: Parsing base38Representation: MT:-24J0YXE00KA0648G00 - [1653562354.037218][4312:4312] CHIP:SPL: Version: 0 - [1653562354.037243][4312:4312] CHIP:SPL: VendorID: 65521 - [1653562354.037263][4312:4312] CHIP:SPL: ProductID: 32769 - [1653562354.037283][4312:4312] CHIP:SPL: Custom flow: 2 (CUSTOM) - [1653562354.037337][4312:4312] CHIP:SPL: Capabilities: 0x02 (BLE) - [1653562354.037359][4312:4312] CHIP:SPL: Discriminator: 3840 - [1653562354.037378][4312:4312] CHIP:SPL: Passcode: 20202021 + [1657232267.387816][370320:370320] CHIP:DL: Device Configuration: + [1657232267.387853][370320:370320] CHIP:DL: Serial Number: (not set) + [1657232267.387907][370320:370320] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1657232267.387942][370320:370320] CHIP:DL: Product Id: 32769 (0x8001) + [1657232267.387974][370320:370320] CHIP:DL: Hardware Version: 0 + [1657232267.387996][370320:370320] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 + [1657232267.388017][370320:370320] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) + [1657232267.388045][370320:370320] CHIP:DL: Manufacturing Date: (not set) + [1657232267.388067][370320:370320] CHIP:DL: Device Type: 65535 (0xFFFF) + [1657232267.388101][370320:370320] CHIP:SVR: SetupQRCode: [MT:-24J0YXE00KA0648G00] + [1657232267.388128][370320:370320] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1657232267.388148][370320:370320] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0YXE00KA0648G00 + [1657232267.388182][370320:370320] CHIP:SVR: Manual pairing code: [749701123365521327694] disabled: true - label: "Scan the QR code from the previous step using the DUT." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes + 1. Verify the QR code is scanned by DUT. + Note: chip-tool does not support physically scanning QR codes disabled: true - label: "Using the DUT, parse the THs QR code and follow any steps needed for the Commissioner/Commissionee to complete the commissioning process using BLE" - PICS: MCORE.DD.DT_BLE + PICS: MCORE.DD.DISCOVERY_BLE verification: | TH Commissionee: - [1651101510.975272][22353:22353] CHIP:SVR: Commissioning completed successfully - [1651101510.975318][22353:22353] CHIP:DIS: Updating services using commissioning mode 0 + [1657232374.956508][370357:370357] CHIP:DL: HandlePlatformSpecificBLEEvent 32784 + [1657232374.956534][370357:370357] CHIP:SVR: Commissioning completed successfully + [1657232374.956577][370357:370357] CHIP:DIS: Updating services using commissioning mode 0 DUT Commissioner: - $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J042C00KA0648G00 - - [1651101510810] [94338:65557180] CHIP: [CTL] Received CommissioningComplete response - [1651101510810] [94338:65557180] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' - [1651101510810] [94338:65557180] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1651101510810] [94338:65557180] CHIP: [CTL] Performing next commissioning step 'Cleanup' - [1651101510810] [94338:65557180] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' - [1651101510810] [94338:65557180] CHIP: [TOO] Device commissioning completed with success + $ ./chip-tool pairing code 1 MT:-24J0YXE00KA0648G00 + + [1657232374820] [31379:16804218] CHIP: [CTL] Received CommissioningComplete response, errorCode=0 + [1657232374820] [31379:16804218] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' + [1657232374820] [31379:16804218] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1657232374820] [31379:16804218] CHIP: [CTL] Performing next commissioning step 'Cleanup' + [1657232374820] [31379:16804218] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657232374820] [31379:16804218] CHIP: [TOO] Device commissioning completed with success disabled: true - label: @@ -92,7 +83,7 @@ tests: Discovery Capability and is already on the same IP network as the DUT commissioner. Ensure the Version bit string follows the current Matter spec. documentation." - PICS: MCORE.DD.DT_IP + PICS: MCORE.DD.DISCOVERY_IP verification: | $ ./out/all-clusters-app/chip-all-clusters-app --custom-flow 0 --capabilities 4 @@ -107,18 +98,6 @@ tests: [1651105420.610886][27312:27312] CHIP:DL: Device Type: 65535 (0xFFFF) [1651105420.610907][27312:27312] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== [1651105420.610962][27312:27312] CHIP:SVR: SetupQRCode: [MT:-24J0AFN00KA0648G00] - - - ubuntu@ubuntu:~/may30_cntrl/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 - [1653998998.287050][2941:2941] CHIP:SPL: Parsing base38Representation: MT:-24J0AFN00KA0648G00 - [1653998998.287266][2941:2941] CHIP:SPL: Version: 0 - [1653998998.287293][2941:2941] CHIP:SPL: VendorID: 65521 - [1653998998.287313][2941:2941] CHIP:SPL: ProductID: 32769 - [1653998998.287332][2941:2941] CHIP:SPL: Custom flow: 0 (STANDARD) - [1653998998.287354][2941:2941] CHIP:SPL: Capabilities: 0x04 (On IP network) - [1653998998.287374][2941:2941] CHIP:SPL: Discriminator: 3840 - [1653998998.287394][2941:2941] CHIP:SPL: Passcode: 20202021 - ubuntu@ubuntu:~/may30_cntrl/connectedhomeip/examples/chip-tool/out/debug$ disabled: true - label: "Scan the QR code from the previous step using the DUT." @@ -131,7 +110,7 @@ tests: "Using the DUT, parse the THs QR code and follow any steps needed for the Commissioner/Commissionee to complete the commissioning process using IP Network" - PICS: MCORE.DD.DT_IP + PICS: MCORE.DD.DISCOVERY_IP verification: | TH Commissionee: @@ -139,7 +118,7 @@ tests: [1651105530.973215][27371:27371] CHIP:DIS: Updating services using commissioning mode 0 DUT Commissioner: - $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J0AFN00KA0648G00 + $ ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 [1651105530854] [95067:65607294] CHIP: [CTL] Received CommissioningComplete response [1651105530854] [95067:65607294] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' @@ -154,14 +133,17 @@ tests: has the Custom Flow field set to 0 and supports SoftAP for its Discovery Capability. Ensure the Version bit string follows the current Matter spec. documentation." - PICS: MCORE.DD.DT_SOFTAP + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - BLOCKED: SoftAP commissioning not currently supported + Out of Scope for V1.0 + SoftAP commissioning not currently supported disabled: true - label: "Scan the QR code from the previous step using the DUT." PICS: MCORE.DD.SCAN_QR_CODE verification: | + Out of Scope for V1.0 + SoftAP commissioning not currently supported 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes disabled: true @@ -169,7 +151,8 @@ tests: "Using the DUT, parse the THs QR code and follow any steps needed for the Commissioner/Commissionee to complete the commissioning process using SoftAP" - PICS: MCORE.DD.DT_SOFTAP + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - BLOCKED: SoftAP commissioning not currently supported + Out of Scope for V1.0 + SoftAP commissioning not currently supported disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_12.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_12.yaml index 47a5969efc6af6..5565421d5de04e 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_12.yaml @@ -29,74 +29,56 @@ tests: Discovery Capability. Commissionee is NOT in commissioning mode. Ensure the Version bit string follows the current Matter spec. documentation." - PICS: MCORE.DD.DT_BLE + PICS: MCORE.DD.DISCOVERY_BLE verification: | - $ ./out/ble/all-clusters-app/chip-all-clusters-app --capabilities 2 --custom-flow 1 + $ ./out/ble/all-clusters-app/chip-all-clusters-app --capabilities 2 --custom-flow 1 --ble-device 1 ... - [1651101726.415743][23212:23212] CHIP:DL: Device Configuration: - [1651101726.415810][23212:23212] CHIP:DL: Serial Number: TEST_SN - [1651101726.415845][23212:23212] CHIP:DL: Vendor Id: 65521 (0xFFF1) - [1651101726.415880][23212:23212] CHIP:DL: Product Id: 32769 (0x8001) - [1651101726.415911][23212:23212] CHIP:DL: Hardware Version: 0 - [1651101726.415933][23212:23212] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 - [1651101726.415954][23212:23212] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) - [1651101726.415983][23212:23212] CHIP:DL: Manufacturing Date: (not set) - [1651101726.416004][23212:23212] CHIP:DL: Device Type: 65535 (0xFFFF) - [1651101726.416046][23212:23212] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== - [1651101726.416115][23212:23212] CHIP:SVR: SetupQRCode: [MT:-24J00ID00KA0648G00] - - - ubuntu@ubuntu:~/may30_cntrl/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool payload parse-setup-payload MT:-24J00ID00KA0648G00 - [1653992397.769301][2532:2532] CHIP:SPL: Parsing base38Representation: MT:-24J00ID00KA0648G00 - [1653992397.769449][2532:2532] CHIP:SPL: Version: 0 - [1653992397.769476][2532:2532] CHIP:SPL: VendorID: 65521 - [1653992397.769496][2532:2532] CHIP:SPL: ProductID: 32769 - [1653992397.769515][2532:2532] CHIP:SPL: Custom flow: 1 (USER ACTION REQUIRED) - [1653992397.769537][2532:2532] CHIP:SPL: Capabilities: 0x02 (BLE) - [1653992397.769558][2532:2532] CHIP:SPL: Discriminator: 3840 - [1653992397.769577][2532:2532] CHIP:SPL: Passcode: 20202021 + [1657234110.765139][370717:370717] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== + [1657234110.765249][370717:370717] CHIP:SVR: SetupQRCode: [MT:-24J0YXE00KA0648G00] + [1657234110.765314][370717:370717] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1657234110.765364][370717:370717] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0YXE00KA0648G00 disabled: true - label: "Scan the QR code from the previous step using the DUT." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes + 1. Verify the QR code is scanned by DUT + Note: chip-tool does not support physically scanning QR codes disabled: true - - label: "DUT parses QR code and DUT presents User with a pairing hint." - PICS: MCORE.DD.DT_BLE + - label: "DUT parses QR code." + PICS: MCORE.DD.DISCOVERY_BLE verification: | 1. Follow the steps given in the TH's pairing hint to allow for commissioning to happen. TH should not be commissioned until these steps were followed and indicate DUT can proceed with commissioning the TH to the Matter network - ./chip-tool pairing code 1 MT:-24J00ID00KA0648G00 - - [1653992449.765427][2535:2540] CHIP:-: ../../third_party/connectedhomeip/src/platform/Linux/BLEManagerImpl.cpp:748: CHIP Error 0x0000002D: Not Implemented at ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:450 - [1653992449.765485][2535:2540] CHIP:CTL: Stopping commissioning discovery over DNS-SD - [1653992449.765541][2535:2540] CHIP:TOO: Secure Pairing Failed + On DUT=chip-tool: + ./chip-tool pairing code 1 MT:-24J0YXE00KA0648G00 + [1657234147237] [31454:16822562] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' + [1657234147237] [31454:16822562] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1657234147237] [31454:16822562] CHIP: [CTL] Performing next commissioning step 'Cleanup' + [1657234147237] [31454:16822562] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657234147237] [31454:16822562] CHIP: [TOO] Device commissioning completed with success disabled: true - label: - "Follow any steps from the resources provided by the pairing hint for - putting the TH Commissionee into commissioning mode and to complete - the commissioning process using BLE." - PICS: MCORE.DD.DT_BLE + "Follow any steps from the resources provided by the pairing hint or + by the THs manufacturer for putting the TH Commissionee device into + commissioning mode and to complete the commissioning process using + BLE." + PICS: MCORE.DD.DISCOVERY_BLE verification: | TH Commissionee: [1651101988.943015][23212:23212] CHIP:SVR: Commissioning completed successfully [1651101988.943058][23212:23212] CHIP:DIS: Updating services using commissioning mode 0 - DUT Commissioner: - ubuntu@ubuntu:~/may30_cntrl/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3840 - - - - [1651101988809] [94439:65564515] CHIP: [CTL] Received CommissioningComplete response - [1651101988809] [94439:65564515] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' - [1651101988809] [94439:65564515] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1651101988809] [94439:65564515] CHIP: [CTL] Performing next commissioning step 'Cleanup' - [1651101988809] [94439:65564515] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' - [1651101988809] [94439:65564515] CHIP: [TOO] Device commissioning completed with success + On DUT Commissioner=chip-tool: + ./chip-tool pairing code 1 MT:-24J0YXE00KA0648G00 + [1657234147237] [31454:16822562] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' + [1657234147237] [31454:16822562] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1657234147237] [31454:16822562] CHIP: [CTL] Performing next commissioning step 'Cleanup' + [1657234147237] [31454:16822562] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657234147237] [31454:16822562] CHIP: [TOO] Device commissioning completed with success disabled: true - label: @@ -105,63 +87,55 @@ tests: its Discovery Capability. Commissionee is NOT in commissioning mode. Ensure the Version bit string follows the current Matter spec. documentation." - PICS: MCORE.DD.DT_IP + PICS: MCORE.DD.DISCOVERY_IP verification: | $ ./out/all-clusters-app/chip-all-clusters-app --custom-flow 1 --capabilities 4 - [1651105004.718882][27096:27096] CHIP:DL: Device Configuration: - [1651105004.718943][27096:27096] CHIP:DL: Serial Number: TEST_SN - [1651105004.718975][27096:27096] CHIP:DL: Vendor Id: 65521 (0xFFF1) - [1651105004.719010][27096:27096] CHIP:DL: Product Id: 32769 (0x8001) - [1651105004.719040][27096:27096] CHIP:DL: Hardware Version: 0 - [1651105004.719062][27096:27096] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 - [1651105004.719083][27096:27096] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) - [1651105004.719111][27096:27096] CHIP:DL: Manufacturing Date: (not set) - [1651105004.719133][27096:27096] CHIP:DL: Device Type: 65535 (0xFFFF) - [1651105004.719153][27096:27096] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== - [1651105004.719209][27096:27096] CHIP:SVR: SetupQRCode: [MT:-24J06VO00KA0648G00] - - ubuntu@ubuntu:~/may30_cntrl/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool payload parse-setup-payload MT:-24J06VO00KA0648G00 - [1653996764.810698][2819:2819] CHIP:SPL: Parsing base38Representation: MT:-24J06VO00KA0648G00 - [1653996764.810876][2819:2819] CHIP:SPL: Version: 0 - [1653996764.810903][2819:2819] CHIP:SPL: VendorID: 65521 - [1653996764.810923][2819:2819] CHIP:SPL: ProductID: 32769 - [1653996764.810943][2819:2819] CHIP:SPL: Custom flow: 1 (USER ACTION REQUIRED) - [1653996764.810966][2819:2819] CHIP:SPL: Capabilities: 0x04 (On IP network) - [1653996764.810987][2819:2819] CHIP:SPL: Discriminator: 3840 - [1653996764.811006][2819:2819] CHIP:SPL: Passcode: 20202021 - ubuntu@ubuntu:~/may30_cntrl/connectedhomeip/examples/chip-tool/out/debug$ + [1657234233.898170][370755:370755] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== + [1657234233.898195][370755:370755] CHIP:SVR: SetupQRCode: [MT:-24J029Q00KA0648G00] + [1657234233.898227][370755:370755] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1657234233.898248][370755:370755] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J029Q00KA0648G00 disabled: true - label: "Scan the QR code from the previous step using the DUT." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes + 1. Verify the QR code is scanned by DUT + Note: chip-tool does not support physically scanning QR codes disabled: true - - label: "DUT parses QR code and DUT presents User with a pairing hint." - PICS: MCORE.DD.DT_IP + - label: "DUT parses QR code." + PICS: MCORE.DD.DISCOVERY_IP verification: | 1. Follow the steps given in the TH's pairing hint to allow for commissioning to happen. TH should not be commissioned until these steps were followed and indicate DUT can proceed with commissioning the TH to the Matter network + + + On DUT=chip-tool: + ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 + [1657234324847] [31475:16824564] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' + [1657234324847] [31475:16824564] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1657234324847] [31475:16824564] CHIP: [CTL] Performing next commissioning step 'Cleanup' + [1657234324847] [31475:16824564] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657234324847] [31475:16824564] CHIP: [TOO] Device commissioning completed with success disabled: true - label: - "Follow any steps from the resources provided by the pairing hint for - putting the TH Commissionee into commissioning mode and to complete - the commissioning process using IP Network." - PICS: MCORE.DD.DT_IP + "Follow any steps from the resources provided by the pairing hint or + by the THs manufacturer for putting the TH Commissionee device into + commissioning mode and to complete the commissioning process using IP + Network." + PICS: MCORE.DD.DISCOVERY_IP verification: | TH all-clusters-app: - [1651105158.168056][27096:27096] CHIP:SVR: Commissioning completed successfully - [1651105158.168100][27096:27096] CHIP:DIS: Updating services using commissioning mode 0 - - DUT chip-tool: - $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J06VO00KA0648G00 - [1651105158065] [95045:65602272] CHIP: [CTL] Received CommissioningComplete response - [1651105158065] [95045:65602272] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' - [1651105158065] [95045:65602272] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1651105158065] [95045:65602272] CHIP: [CTL] Performing next commissioning step 'Cleanup' - [1651105158065] [95045:65602272] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' - [1651105158065] [95045:65602272] CHIP: [TOO] Device commissioning completed with success + [1657234324.992098][370755:370755] CHIP:SVR: Commissioning completed successfully + [1657234324.992146][370755:370755] CHIP:DIS: Updating services using commissioning mode 0 + + On DUT=chip-tool: + ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 + [1657234324847] [31475:16824564] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' + [1657234324847] [31475:16824564] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1657234324847] [31475:16824564] CHIP: [CTL] Performing next commissioning step 'Cleanup' + [1657234324847] [31475:16824564] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657234324847] [31475:16824564] CHIP: [TOO] Device commissioning completed with success disabled: true - label: @@ -170,28 +144,33 @@ tests: Discovery Capability. Commissionee is NOT in commissioning mode. Ensure the Version bit string follows the current Matter spec. documentation." - PICS: MCORE.DD.DT_SOFTAP + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - BLOCKED: SoftAP commissioning not currently supported + Out of Scope for V1.0 + SoftAP commissioning not currently supported disabled: true - label: "Scan the QR code from the previous step using the DUT." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes + Out of Scope for V1.0 + SoftAP commissioning not currently supported disabled: true - - label: "DUT parses QR code and DUT presents User with a pairing hint." - PICS: MCORE.DD.DT_SOFTAP + - label: "DUT parses QR code." + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - 1. Follow the steps given in the TH's pairing hint to allow for commissioning to happen. TH should not be commissioned until these steps were followed and indicate DUT can proceed with commissioning the TH to the Matter network + Out of Scope for V1.0 + SoftAP commissioning not currently supported disabled: true - label: - "Follow any steps from the resources provided by the pairing hint for - putting the TH Commissionee into commissioning mode and to complete - the commissioning process using SoftAP." - PICS: MCORE.DD.DT_SOFTAP + "Follow any steps from the resources provided by the pairing hint or + by the THs manufacturer for putting the TH Commissionee device into + commissioning mode and to complete the commissioning process using + SoftAP." + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - BLOCKED: SoftAP commissioning not currently supported + Out of Scope for V1.0 + SoftAP commissioning not currently supported disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_13.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_13.yaml index b1e3b486e9e2eb..8bce578a417fc0 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_13.yaml @@ -28,66 +28,49 @@ tests: the Custom Flow field set to 2 and supports BLE for its Discovery Capability. Commissionee is NOT in commissioning mode. Ensure the Version bit string follows the current Matter spec. documentation." - PICS: MCORE.DD.DT_BLE + PICS: MCORE.DD.DISCOVERY_BLE verification: | $ ./out/ble/all-clusters-app/chip-all-clusters-app --custom-flow 2 --capabilities 2 - [1651103874.314141][26507:26507] CHIP:DL: Device Configuration: - [1651103874.314196][26507:26507] CHIP:DL: Serial Number: TEST_SN - [1651103874.314264][26507:26507] CHIP:DL: Vendor Id: 65521 (0xFFF1) - [1651103874.314305][26507:26507] CHIP:DL: Product Id: 32769 (0x8001) - [1651103874.314337][26507:26507] CHIP:DL: Hardware Version: 0 - [1651103874.314362][26507:26507] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 - [1651103874.314383][26507:26507] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) - [1651103874.314412][26507:26507] CHIP:DL: Manufacturing Date: (not set) - [1651103874.314434][26507:26507] CHIP:DL: Device Type: 65535 (0xFFFF) - [1651103874.314502][26507:26507] CHIP:SVR: SetupQRCode: [MT:-24J0YXE00KA0648G00] - - ubuntu@ubuntu:~/may30_cntrl/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool payload parse-setup-payload MT:-24J0YXE00KA0648G00 - [1653997840.457937][2875:2875] CHIP:SPL: Parsing base38Representation: MT:-24J0YXE00KA0648G00 - [1653997840.458108][2875:2875] CHIP:SPL: Version: 0 - [1653997840.458134][2875:2875] CHIP:SPL: VendorID: 65521 - [1653997840.458155][2875:2875] CHIP:SPL: ProductID: 32769 - [1653997840.458175][2875:2875] CHIP:SPL: Custom flow: 2 (CUSTOM) - [1653997840.458197][2875:2875] CHIP:SPL: Capabilities: 0x02 (BLE) - [1653997840.458218][2875:2875] CHIP:SPL: Discriminator: 3840 - [1653997840.458237][2875:2875] CHIP:SPL: Passcode: 20202021 - ubuntu@ubuntu:~/may30_cntrl/connectedhomeip/examples/chip-tool/out/debug$ + [1657235055.253604][370941:370941] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== + [1657235055.253688][370941:370941] CHIP:SVR: SetupQRCode: [MT:-24J0YXE00KA0648G00] + [1657235055.253736][370941:370941] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1657235055.253774][370941:370941] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0YXE00KA0648G00 disabled: true - label: "Scan the QR code from the previous step using the DUT." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes + 1. Verify the QR code is scanned by DUT + Note: chip-tool does not support physically scanning QR codes disabled: true - - label: - "DUT parses QR code and DUT presents User with a URL in the pairing - hint." - PICS: MCORE.DD.DT_BLE + - label: "DUT parses QR code." + PICS: MCORE.DD.DISCOVERY_BLE verification: | 1. Follow the steps given in the TH's URL to allow for commissioning to happen. TH should not be commissioned until these steps were followed and indicate DUT can proceed with commissioning the TH to the Matter network + + On DUT=chip-tool: + ./chip-tool pairing code 1 MT:-24J0YXE00KA0648G00 + [1657235087918] [31502:16832693] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657235087918] [31502:16832693] CHIP: [TOO] Device commissioning completed with success disabled: true - label: - "Follow any steps from the URL provided by the pairing hint for - putting the TH Commissionee into commissioning mode, for triggering - the DUT Commissioner for commissioning, and for completing the - commissioning process using BLE." - PICS: MCORE.DD.DT_BLE + "User should follow any steps from the CommissioningCustomFlowUrl + within the THs DCL, unless the DUT has alternative means to guide the + user to successful commissioning, for putting the TH Commissionee into + commissioning mode, for triggering the DUT Commissioner for + commissioning, and for completing the commissioning process using BLE." + PICS: MCORE.DD.DISCOVERY_BLE verification: | TH all-clusters-app: - [1651104141.533461][26507:26507] CHIP:SVR: Commissioning completed successfully - [1651104141.533498][26507:26507] CHIP:DIS: Updating services using commissioning mode 0 + [1657235088.040328][370941:370941] CHIP:SVR: Commissioning completed successfully + [1657235088.040371][370941:370941] CHIP:DIS: Updating services using commissioning mode 0 - DUT chip-tool: $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J0YXE00KA0648G00 - - [1651104141454] [94607:65586111] CHIP: [CTL] Received CommissioningComplete response - [1651104141454] [94607:65586111] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' - [1651104141454] [94607:65586111] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1651104141454] [94607:65586111] CHIP: [CTL] Performing next commissioning step 'Cleanup' - [1651104141454] [94607:65586111] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' - [1651104141454] [94607:65586111] CHIP: [TOO] Device commissioning completed with success + DUT chip-tool: $ ./chip-tool pairing code 1 MT:-24J0YXE00KA0648G00 + [1657235087918] [31502:16832693] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657235087918] [31502:16832693] CHIP: [TOO] Device commissioning completed with success disabled: true - label: @@ -96,70 +79,51 @@ tests: Discovery Capability. Commissionee is NOT in commissioning mode. Ensure the Version bit string follows the current Matter spec. documentation." - PICS: MCORE.DD.DT_IP + PICS: MCORE.DD.DISCOVERY_IP verification: | $ ./out/all-clusters-app/chip-all-clusters-app --custom-flow 2 --capabilities 4 - [1651103447.175705][8940:8940] CHIP:DL: Device Configuration: - [1651103447.175762][8940:8940] CHIP:DL: Serial Number: TEST_SN - [1651103447.175804][8940:8940] CHIP:DL: Vendor Id: 65521 (0xFFF1) - [1651103447.175846][8940:8940] CHIP:DL: Product Id: 32769 (0x8001) - [1651103447.175883][8940:8940] CHIP:DL: Hardware Version: 0 - [1651103447.175911][8940:8940] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 - [1651103447.175937][8940:8940] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) - [1651103447.175971][8940:8940] CHIP:DL: Manufacturing Date: (not set) - [1651103447.175998][8940:8940] CHIP:DL: Device Type: 65535 (0xFFFF) - [1651103447.176023][8940:8940] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== - [1651103447.176084][8940:8940] CHIP:SVR: SetupQRCode: [MT:-24J029Q00KA0648G00] - - - ubuntu@ubuntu:~/may30_cntrl/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool payload parse-setup-payload MT:-24J029Q00KA0648G00 - [1653998683.950764][2924:2924] CHIP:SPL: Parsing base38Representation: MT:-24J029Q00KA0648G00 - [1653998683.951071][2924:2924] CHIP:SPL: Version: 0 - [1653998683.951203][2924:2924] CHIP:SPL: VendorID: 65521 - [1653998683.951256][2924:2924] CHIP:SPL: ProductID: 32769 - [1653998683.951305][2924:2924] CHIP:SPL: Custom flow: 2 (CUSTOM) - [1653998683.951357][2924:2924] CHIP:SPL: Capabilities: 0x04 (On IP network) - [1653998683.951451][2924:2924] CHIP:SPL: Discriminator: 3840 - [1653998683.951498][2924:2924] CHIP:SPL: Passcode: 20202021 - ubuntu@ubuntu:~/may30_cntrl/connectedhomeip/examples/chip-tool/out/debug$ - " + [1657235141.663008][370963:370963] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== + [1657235141.663082][370963:370963] CHIP:SVR: SetupQRCode: [MT:-24J029Q00KA0648G00] + [1657235141.663133][370963:370963] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1657235141.663189][370963:370963] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J029Q00KA0648G00 disabled: true - label: "Scan the QR code from the previous step using the DUT." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes + 1. Verify the QR code is scanned by DUT + Note: chip-tool does not support physically scanning QR codes disabled: true - - label: - "DUT parses QR code and DUT presents User with a URL in the pairing - hint." - PICS: MCORE.DD.DT_IP + - label: "DUT parses QR code." + PICS: MCORE.DD.DISCOVERY_IP verification: | 1. Follow the steps given in the TH's URL to allow for commissioning to happen. TH should not be commissioned until these steps were followed and indicate DUT can proceed with commissioning the TH to the Matter network + + On DUT=chip-tool: + ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 + [1657235198856] [31506:16834043] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657235198856] [31506:16834043] CHIP: [TOO] Device commissioning completed with success disabled: true - label: - "Follow any steps from the URL provided by the pairing hint for - putting the TH Commissionee into commissioning mode, for triggering - the DUT Commissioner for commissioning, and for completing the - commissioning process using IP Network." - PICS: MCORE.DD.DT_IP + "User should follow any steps from the CommissioningCustomFlowUrl + within the THs DCL, unless the DUT has alternative means to guide the + user to successful commissioning, for putting the TH Commissionee into + commissioning mode, for triggering the DUT Commissioner for + commissioning, and for completing the commissioning process using IP + Network." + PICS: MCORE.DD.DISCOVERY_IP verification: | TH all-clusters-app: - [1651103591.176135][8940:8940] CHIP:SVR: Commissioning completed successfully - [1651103591.176179][8940:8940] CHIP:DIS: Updating services using commissioning mode 0 + [1657235198.977848][370963:370963] CHIP:SVR: Commissioning completed successfully + [1657235198.977943][370963:370963] CHIP:DIS: Updating services using commissioning mode 0 DUT chip-tool: - $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J029Q00KA0648G00 - - [1651103591085] [94586:65580481] CHIP: [CTL] Received CommissioningComplete response - [1651103591085] [94586:65580481] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' - [1651103591085] [94586:65580481] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1651103591085] [94586:65580481] CHIP: [CTL] Performing next commissioning step 'Cleanup' - [1651103591085] [94586:65580481] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' - [1651103591085] [94586:65580481] CHIP: [TOO] Device commissioning completed with success + $ ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 + [1657235198856] [31506:16834043] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657235198856] [31506:16834043] CHIP: [TOO] Device commissioning completed with success disabled: true - label: @@ -167,31 +131,35 @@ tests: the Custom Flow field set to 2 and supports SoftAP for its Discovery Capability. Commissionee is NOT in commissioning mode. Ensure the Version bit string follows the current Matter spec. documentation." - PICS: MCORE.DD.DT_SOFTAP + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - BLOCKED: SoftAP commissioning not currently supported + Out of Scope for V1.0 + SoftAP commissioning not currently supported disabled: true - label: "Scan the QR code from the previous step using the DUT." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes + Out of Scope for V1.0 + SoftAP commissioning not currently supported disabled: true - - label: - "DUT parses QR code and DUT presents User with a URL in the pairing - hint." - PICS: MCORE.DD.DT_SOFTAP + - label: "DUT parses QR code." + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - 1. Follow the steps given in the TH's URL to allow for commissioning to happen. TH should not be commissioned until these steps were followed and indicate DUT can proceed with commissioning the TH to the Matter network + Out of Scope for V1.0 + SoftAP commissioning not currently supported disabled: true - label: - "Follow any steps from the URL provided by the pairing hint for - putting the TH Commissionee into commissioning mode, for triggering - the DUT Commissioner for commissioning, and for completing the - commissioning process using SoftAP." - PICS: MCORE.DD.DT_SOFTAP + "User should follow any steps from the CommissioningCustomFlowUrl + within the THs DCL, unless the DUT has alternative means to guide the + user to successful commissioning, for putting the TH Commissionee into + commissioning mode, for triggering the DUT Commissioner for + commissioning, and for completing the commissioning process using + SoftAP." + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - BLOCKED: SoftAP commissioning not currently supported + Out of Scope for V1.0 + SoftAP commissioning not currently supported disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_14.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_14.yaml index 9deb8df0c00e28..bedb54e49c8399 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_14.yaml @@ -27,17 +27,19 @@ tests: verification: | $ ./out/all-clusters-app/chip-all-clusters-app --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --custom-flow 2 --capabilities 4 --discriminator 3840 --passcode 20202021 - [1654000392.120361][3962:3962] CHIP:DL: Device Configuration: - [1654000392.120522][3962:3962] CHIP:DL: Serial Number: (not set) - [1654000392.120578][3962:3962] CHIP:DL: Vendor Id: 65521 (0xFFF1) - [1654000392.120631][3962:3962] CHIP:DL: Product Id: 32769 (0x8001) - [1654000392.120677][3962:3962] CHIP:DL: Hardware Version: 0 - [1654000392.120711][3962:3962] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 - [1654000392.120742][3962:3962] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) - [1654000392.120783][3962:3962] CHIP:DL: Manufacturing Date: (not set) - [1654000392.120816][3962:3962] CHIP:DL: Device Type: 65535 (0xFFFF) - [1654000392.120846][3962:3962] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== - [1654000392.120891][3962:3962] CHIP:SVR: SetupQRCode: [MT:-24J0YXE00KA0648G00] + [1657235470.970680][371041:371041] CHIP:DL: Device Configuration: + [1657235470.970772][371041:371041] CHIP:DL: Serial Number: (not set) + [1657235470.970811][371041:371041] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1657235470.970845][371041:371041] CHIP:DL: Product Id: 32769 (0x8001) + [1657235470.970892][371041:371041] CHIP:DL: Hardware Version: 0 + [1657235470.970929][371041:371041] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 + [1657235470.970984][371041:371041] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) + [1657235470.971031][371041:371041] CHIP:DL: Manufacturing Date: (not set) + [1657235470.971095][371041:371041] CHIP:DL: Device Type: 65535 (0xFFFF) + [1657235470.971147][371041:371041] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== + [1657235470.971199][371041:371041] CHIP:SVR: SetupQRCode: [MT:-24J029Q00KA0648G00] + [1657235470.971258][371041:371041] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1657235470.971293][371041:371041] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J029Q00KA0648G00 disabled: true - label: @@ -45,120 +47,42 @@ tests: but substituting out the current Version String with an invalid Version String (i.e. '010' or any non-zero 3-bit value)" verification: | - MT:034J029Q00KA0648G00 + 1. Use chip-tool's "payload generate-qrcode" command to help generate the new, invalid QR code + $ ./chip-tool payload generate-qrcode --existing-payload MT:-24J029Q00KA0648G00 --allow-invalid-payload 1 --version 2 + [1657235626568] [31698:16839018] CHIP: [TOO] QR Code: MT:034J029Q00KA0648G00 disabled: true - label: "Scan/read the QR code, generated in the previous step, using the DUT" verification: | - $ ./out/chip-tool/chip-tool pairing code 1 MT:034J029Q00KA0648G00 + TH all-clusters-app: + [1657235198.977848][370963:370963] CHIP:SVR: Commissioning completed successfully + [1657235198.977943][370963:370963] CHIP:DIS: Updating services using commissioning mode 0 - ERROR: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument + DUT chip-tool: + $ ./chip-tool pairing code 1 MT:034J029Q00KA0648G00 + [1657235198856] [31506:16834043] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657235198856] [31506:16834043] CHIP: [TOO] Device commissioning completed with success disabled: true - label: - "Using the QR code from Step 1, generate a new QR code using all the - same Onboarding Payload components except for the Custom Flow field, - set it to 1: User-Intent Commissioning Flow" - PICS: MCORE.DD.USER_INTENT_COMM_FLOW + "Using the QR code from Step 1, ensure the THs Discovery Capability + bit string is NOT set to BLE for discovery (i.e. set to OnNetwork + discovery capability)" + PICS: MCORE.DD.DISCOVERY_BLE verification: | - MT:-24J06VO00KA0648G00 + 1. Use chip-tool's "payload generate-qrcode" command to help generate the new, invalid QR code + $ ./chip-tool payload generate-qrcode --existing-payload MT:-24J029Q00KA0648G00 --allow-invalid-payload 1 --rendezvous 4 + [1657235754393] [31702:16840391] CHIP: [TOO] QR Code: MT:-24J029Q00KA0648G00 disabled: true - - label: - "Scan/read the QR code, generated in the previous step, using the DUT" - PICS: MCORE.DD.USER_INTENT_COMM_FLOW - verification: | - ERROR: chip-tool allows pairing to all-clusters-app when QR code contains user-intent flow but device uses custom commissioning flow - - $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J06VO00KA0648G00 - disabled: true - - - label: - "Using the QR code from Step 1, generate a new QR code using all the - same Onboarding Payload components except for the Custom Flow field, - set it to 2: Custom Commissioning Flow" - PICS: MCORE.DD.CUSTOM_COMM_FLOW - verification: | - MT:-24J029Q00KA0648G00 - disabled: true - - - label: - "Scan/read the QR code, generated in the previous step, using the DUT" - PICS: MCORE.DD.CUSTOM_COMM_FLOW - verification: | - ERROR: chip-tool allows pairing to all-clusters-app when QR code contains custom commissioning flow but device uses standard commissioning flow - - $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J029Q00KA0648G00 - disabled: true - - - label: - "Commissioning Flow - Reserved: Using the QR code from Step 1, - generate a new QR code using all the same Onboarding Payload - components except for the Custom Flow field, set it to 3: Reserved" - verification: | - MT:-24J0-OR00KA0648G00 - disabled: true - - - label: - "Scan/read the QR code, generated in the previous step, using the DUT" - verification: | - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J0-OR00KA0648G00 - - ERROR: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - disabled: true - - - label: - "Using the QR code from Step 1, generate a new QR code using all the - same Onboarding Payload components except for the Discovery Capability - bit string, set it to BLE for discovery" - PICS: MCORE.DD.DT_BLE + - label: "Scan/read the QR code of the TH device using the DUT" + PICS: MCORE.DD.DISCOVERY_BLE verification: | - MT:-24J0YXE00KA0648G00 - disabled: true - - - label: - "Scan/read the QR code, generated in the previous step, using the DUT" - PICS: MCORE.DD.DT_BLE - verification: | - ERROR: chip-tool allows pairing to all-clusters-app when QR code contains BLE Discovery but device uses IP Discovery - - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J0YXE00KA0648G00 - disabled: true - - - label: - "Using the QR code from Step 1, generate a new QR code using all the - same Onboarding Payload components except for the Discovery Capability - bit string, set it to IP Network for discovery" - PICS: MCORE.DD.DT_IP - verification: | - MT:-24J029Q00KA0648G00 - disabled: true - - - label: - "Scan/read the QR code, generated in the previous step, using the DUT" - PICS: MCORE.DD.DT_IP - verification: | - ERROR: chip-tool allows pairing to all-clusters-app when QR code contains IP Discovery but device uses BLE Discovery - - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q00KA0648G00 - disabled: true - - - label: - "Discovery Capability - Reserved: Using the QR code from Step 1, - generate a new QR code using all the same Onboarding Payload - components except for the Discovery Capability bit string, set it to - non-zeros" - verification: | - MT:-24J0EZA10KA0648G00 - disabled: true - - - label: - "Scan/read the QR code, generated in the previous step, using the DUT" - verification: | - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J0EZA10KA0648G00 - - ERROR: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument + ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 + [1657235905214] [31706:16841970] CHIP: [CTL] Discovered device to be commissioned over DNS-SD + ... + [1657235906071] [31706:16841969] CHIP: [TOO] Device commissioning completed with success disabled: true - label: @@ -194,51 +118,51 @@ tests: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q00OC0000000 + $ ./chip-tool pairing code 1 MT:-24J029Q00OC0000000 Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q00KMSP0Z800 + $ ./chip-tool pairing code 1 MT:-24J029Q00KMSP0Z800 Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q00GWID1WH00 + $ ./chip-tool pairing code 1 MT:-24J029Q00GWID1WH00 Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q00C4912TQ00 + $ ./chip-tool pairing code 1 MT:-24J029Q00C4912TQ00 Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q008E.Q2QZ00 + $ ./chip-tool pairing code 1 MT:-24J029Q008E.Q2QZ00 Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q004ORE3N610 + $ ./chip-tool pairing code 1 MT:-24J029Q004ORE3N610 Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q000YH24KF10 + $ ./chip-tool pairing code 1 MT:-24J029Q000YH24KF10 Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q00Y58S4HO10 + $ ./chip-tool pairing code 1 MT:-24J029Q00Y58S4HO10 Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q00UF-F5EX10 + $ ./chip-tool pairing code 1 MT:-24J029Q00UF-F5EX10 Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q00QPQ36B420 + $ ./chip-tool pairing code 1 MT:-24J029Q00QPQ36B420 Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q004QG46Y900 + $ ./chip-tool pairing code 1 MT:-24J029Q004QG46Y900 Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument - $ ./out/chip-tool/chip-tool pairing code 1 MT:-24J029Q00YX018EW10 + $ ./chip-tool pairing code 1 MT:-24J029Q00YX018EW10 Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument disabled: true @@ -253,6 +177,6 @@ tests: - label: "Scan/read the QR code, generated in the previous step, using the DUT" verification: | - $ ./out/chip-tool/chip-tool pairing code 1 AB:-24J029Q00KA0648G00 - [1651179728083] [11173:253719] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:50: CHIP Error 0x00000013: Integrity check failed + $ ./chip-tool pairing code 1 AB:-24J029Q00KA0648G00 + [1657236169984] [31732:16844455] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:50: CHIP Error 0x00000013: Integrity check failed disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_15.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_15.yaml index 711fe24a9b3434..8a6326fd83ebd2 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_15.yaml @@ -29,6 +29,7 @@ tests: Matter spec. documentation - VID_PID_PRESENT bit string set to 0" PICS: MCORE.DD.11_MANUAL_PC verification: | + On TH Commissionee: $ ./out/ble/all-clusters-app/chip-all-clusters-app [1651108891.390266][30833:30833] CHIP:DL: Device Configuration: [1651108891.390455][30833:30833] CHIP:DL: Serial Number: TEST_SN @@ -42,7 +43,7 @@ tests: [1651108891.390744][30833:30833] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== [1651108891.390809][30833:30833] CHIP:SVR: SetupQRCode: [MT:-24J0AFN00KA0648G00] [1651108891.390848][30833:30833] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1651108891.390876][30833:30833] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0AFN00KA0648G00 + [1651108891.390876][30833:30833] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0AFN00KA0648G00 [1651108891.390917][30833:30833] CHIP:SVR: Manual pairing code: [34970112332] disabled: true @@ -53,12 +54,12 @@ tests: process." PICS: MCORE.DD.11_MANUAL_PC verification: | - TH Commissionee: + On TH Commissionee: [1651109112.909458][30833:30833] CHIP:SVR: Commissioning completed successfully [1651109112.909503][30833:30833] CHIP:DIS: Updating services using commissioning mode 0 - DUT Commissioner: - $ ./out/chip-tool/chip-tool pairing manualcode 1 34970112332 + On DUT Commissioner: + $ ./chip-tool pairing code 1 34970112332 [1651109112823] [95528:65650355] CHIP: [CTL] Received CommissioningComplete response [1651109112823] [95528:65650355] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' @@ -77,6 +78,7 @@ tests: Identifier")' PICS: MCORE.DD.21_MANUAL_PC verification: | + On TH Commissionee: $ ./out/ble/all-clusters-app/chip-all-clusters-app [1651109167.022364][30980:30980] CHIP:DL: Device Configuration: @@ -91,12 +93,12 @@ tests: [1651109167.022753][30980:30980] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== [1651109167.022825][30980:30980] CHIP:SVR: SetupQRCode: [MT:-24J0AFN00KA0648G00] [1651109167.022868][30980:30980] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1651109167.022898][30980:30980] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0AFN00KA0648G00 + [1651109167.022898][30980:30980] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0AFN00KA0648G00 [1651109167.022942][30980:30980] CHIP:SVR: Manual pairing code: [34970112332] [1651109167.022974][30980:30980] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== [1651109167.023050][30980:30980] CHIP:SVR: SetupQRCode: [MT:-24J029Q00KA0648G00] [1651109167.023090][30980:30980] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1651109167.023120][30980:30980] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J029Q00KA0648G00 + [1651109167.023120][30980:30980] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J029Q00KA0648G00 [1651109167.023167][30980:30980] CHIP:SVR: Manual pairing code: [749701123365521327694] disabled: true @@ -107,12 +109,12 @@ tests: process." PICS: MCORE.DD.21_MANUAL_PC verification: | - TH Commissionee: + On TH Commissionee: [1651109219.100167][30980:30980] CHIP:SVR: Commissioning completed successfully [1651109219.100213][30980:30980] CHIP:DIS: Updating services using commissioning mode 0 - DUT Commissioner: - $ ./out/chip-tool/chip-tool pairing manualcode 1 749701123365521327694 + On DUT Commissioner: + $ ./chip-tool pairing code 1 749701123365521327694 [1651109219028] [95536:65652322] CHIP: [CTL] Received CommissioningComplete response [1651109219028] [95536:65652322] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_16.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_16.yaml index 50230bea87e811..210dff6fb66575 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_16.yaml @@ -28,6 +28,7 @@ tests: DUT in any format supported by DUT" PICS: MCORE.DD.11_MANUAL_PC verification: | + On TH: $ ./out/all-clusters-app/chip-all-clusters-app --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --custom-flow 0 --capabilities 4 --discriminator 3840 --passcode 20202021 [1651180718.960383][13218:13218] CHIP:DL: Device Configuration: @@ -42,7 +43,7 @@ tests: [1651180718.960671][13218:13218] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== [1651180718.960729][13218:13218] CHIP:SVR: SetupQRCode: [MT:-24J0AFN00KA0648G00] [1651180718.960760][13218:13218] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1651180718.960781][13218:13218] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0AFN00KA0648G00 + [1651180718.960781][13218:13218] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0AFN00KA0648G00 [1651180718.960814][13218:13218] CHIP:SVR: Manual pairing code: [34970112332] disabled: true @@ -52,7 +53,9 @@ tests: 2" PICS: MCORE.DD.11_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool payload verhoeff-generate 8497011233 + 1. Use chip-tool's "payload verhoeff-generate" command to help generate the new, invalid Manual code + + $ ./chip-tool payload verhoeff-generate 8497011233 [1651186243492] [13415:349553] CHIP: [SPL] Generating Character for: 84970112331 [1651186243492] [13415:349553] CHIP: [SPL] Generated Char: 1 Manual Code: 84970112331 @@ -63,7 +66,7 @@ tests: the DUT in any format supported by the DUT" PICS: MCORE.DD.11_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool pairing code 1 84970112331 + $ ./chip-tool pairing code 1 84970112331 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument disabled: true @@ -74,7 +77,7 @@ tests: invalid VID_PID_PRESENT set to 1" PICS: MCORE.DD.11_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 0xF00 --setup-pin-code 20202021 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 2 --force-short-code 1 + $ ./chip-tool payload generate-manualcode --discriminator 0xF00 --setup-pin-code 20202021 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 2 --force-short-code 1 [1651181048462] [11611:269469] CHIP: [TOO] Manual Code: 74970112334 disabled: true @@ -83,7 +86,7 @@ tests: the DUT in any format supported by the DUT" PICS: MCORE.DD.11_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool pairing code 1 74970112334 + $ ./chip-tool pairing code 1 74970112334 [1651184274318] [12512:321250] CHIP: [SPL] Failed decoding base10. Input length 10 was not expected length 20 ... @@ -100,6 +103,11 @@ tests: "Discriminator value")' PICS: MCORE.DD.11_MANUAL_PC verification: | + 1. Use chip-tool's "payload generate-manualcode" command to help generate the new, invalid Manual code + + $ ./chip-tool payload generate-manualcode --existing-payload 34970112332 --discriminator 0xE00 + [1657236763262] [31784:16850989] CHIP: [TOO] Manual Code: 33331712336 + Manual Code: 33331712336 disabled: true @@ -108,7 +116,8 @@ tests: the DUT in any format supported by the DUT" PICS: MCORE.DD.11_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool pairing code 1 33331712336 + On DUT=chip-tool: + $ ./chip-tool pairing code 1 33331712336 [1654001605.517505][3200:3205] CHIP:-: ../../third_party/connectedhomeip/src/platform/Linux/BLEManagerImpl.cpp:748: CHIP Error 0x0000002D: Not Implemented at ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:450 [1654001605.517563][3200:3205] CHIP:CTL: Stopping commissioning discovery over DNS-SD @@ -128,51 +137,51 @@ tests: 1. Use these as examples of how to generate manual codes with invalid passcodes "34915200008" (00000000), - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 00000000 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 00000000 [1651182185732] [11790:282099] CHIP: [TOO] Manual Code: 34915200008 "35191106788" (11111111), - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 11111111 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 11111111 [1651182284292] [11799:283222] CHIP: [TOO] Manual Code: 35191106788 "35467013565" (22222222), - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 22222222 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 22222222 [1651182331458] [11817:283904] CHIP: [TOO] Manual Code: 35467013565 "35742920344" (33333333), - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 33333333 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 33333333 [1651182345419] [11876:284294] CHIP: [TOO] Manual Code: 35742920344 "36018827124" (44444444), - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 44444444 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 44444444 [1651182362963] [11944:284816] CHIP: [TOO] Manual Code: 36018827124 "36294733900" (55555555), - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 55555555 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 55555555 [1651182375363] [11945:284938] CHIP: [TOO] Manual Code: 36294733900 "34932240691" (66666666), - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 66666666 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 66666666 [1651182395140] [11958:285261] CHIP: [TOO] Manual Code: 34932240691 "35208147474" (77777777), - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 77777777 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 77777777 [1651182411341] [11966:285478] CHIP: [TOO] Manual Code: 35208147474 "35484054250" (88888888), - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 88888888 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 88888888 [1651182422264] [11967:285581] CHIP: [TOO] Manual Code: 35484054250 "35759961037" (99999999), - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 99999999 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 99999999 [1651182431755] [11968:285672] CHIP: [TOO] Manual Code: 35759961037 "35767807533" (12345678), - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 12345678 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 12345678 [1651182443511] [11969:285786] CHIP: [TOO] Manual Code: 35767807533 "36545753496" (87654321), - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 87654321 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 87654321 [1651182459737] [11970:285960] CHIP: [TOO] Manual Code: 36545753496 disabled: true @@ -182,51 +191,51 @@ tests: PICS: MCORE.DD.11_MANUAL_PC verification: | (00000000) - $ ./out/chip-tool/chip-tool pairing code 1 34915200008 + $ ./chip-tool pairing code 1 34915200008 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument (11111111) - $ ./out/chip-tool/chip-tool pairing code 1 35191106788 + $ ./chip-tool pairing code 1 35191106788 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument (22222222) - $ ./out/chip-tool/chip-tool pairing code 1 35467013565 + $ ./chip-tool pairing code 1 35467013565 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument (33333333) - $ ./out/chip-tool/chip-tool pairing code 1 35742920344 + $ ./chip-tool pairing code 1 35742920344 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument (44444444) - $ ./out/chip-tool/chip-tool pairing code 1 36018827124 + $ ./chip-tool pairing code 1 36018827124 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument (55555555) - $ ./out/chip-tool/chip-tool pairing code 1 36294733900 + $ ./chip-tool pairing code 1 36294733900 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument (66666666) - $ ./out/chip-tool/chip-tool pairing code 1 34932240691 + $ ./chip-tool pairing code 1 34932240691 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument (77777777) - $ ./out/chip-tool/chip-tool pairing code 1 35208147474 + $ ./chip-tool pairing code 1 35208147474 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument (88888888) - $ ./out/chip-tool/chip-tool pairing code 1 35484054250 + $ ./chip-tool pairing code 1 35484054250 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument (99999999) - $ ./out/chip-tool/chip-tool pairing code 1 35759961037 + $ ./chip-tool pairing code 1 35759961037 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument (12345678) - $ ./out/chip-tool/chip-tool pairing code 1 35767807533 + $ ./chip-tool pairing code 1 35767807533 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument (87654321) - $ ./out/chip-tool/chip-tool pairing code 1 36545753496 + $ ./chip-tool pairing code 1 36545753496 Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument disabled: true @@ -238,6 +247,8 @@ tests: and Product IDs (VID_PID_Present == 0))" PICS: MCORE.DD.11_MANUAL_PC verification: | + 1. Change the last digit of the manual pairing code to a different digit + Manual Code: 34970112331 disabled: true @@ -246,7 +257,7 @@ tests: the DUT in any format supported by the DUT" PICS: MCORE.DD.11_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool pairing code 1 34970112331 - - [1651184084907] [12271:316118] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:50: CHIP Error 0x00000013: Integrity check failed + On DUT=chip-tool: + $ ./chip-tool pairing code 1 34970112331 + [1657586218401] [10710:465838] CHIP: [TOO] Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:50: CHIP Error 0x00000013: Integrity check failed disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_17.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_17.yaml index 736f05ce0804ba..afe697535574b4 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_17.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_17.yaml @@ -28,18 +28,28 @@ tests: DUT in any format supported by DUT" PICS: MCORE.DD.21_MANUAL_PC verification: | - $ ./out/all-clusters-app/chip-all-clusters-app --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --custom-flow 2 --capabilities 4 --discriminator 3840 --passcode 20202021 - - [1651165486.365306][4112:4112] CHIP:DL: Device Configuration: - [1651165486.365374][4112:4112] CHIP:DL: Serial Number: TEST_SN - [1651165486.365415][4112:4112] CHIP:DL: Vendor Id: 65521 (0xFFF1) - [1651165486.365449][4112:4112] CHIP:DL: Product Id: 32769 (0x8001) - [1651165486.365479][4112:4112] CHIP:DL: Hardware Version: 0 - [1651165486.365502][4112:4112] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 - [1651165486.365522][4112:4112] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) - [1651165486.365549][4112:4112] CHIP:DL: Manufacturing Date: (not set) - [1651165486.365570][4112:4112] CHIP:DL: Device Type: 65535 (0xFFFF) - [1651165486.365646][4112:4112] CHIP:SVR: SetupQRCode: [MT:-24J029Q00KA0648G00] + On TH: + $ ./out/all-clusters-app/chip-all-clusters-app + + [1657203632.334400][13827:13827] CHIP:DL: Device Configuration: + [1657203632.334663][13827:13827] CHIP:DL: Serial Number: (not set) + [1657203632.334724][13827:13827] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1657203632.334801][13827:13827] CHIP:DL: Product Id: 32769 (0x8001) + [1657203632.334879][13827:13827] CHIP:DL: Hardware Version: 0 + [1657203632.334934][13827:13827] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 + [1657203632.334983][13827:13827] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) + [1657203632.335054][13827:13827] CHIP:DL: Manufacturing Date: (not set) + [1657203632.335109][13827:13827] CHIP:DL: Device Type: 65535 (0xFFFF) + [1657203632.335158][13827:13827] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== + [1657203632.335234][13827:13827] CHIP:SVR: SetupQRCode: [MT:-24J042C00KA0648G00] + [1657203632.335298][13827:13827] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1657203632.335348][13827:13827] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1657203632.335420][13827:13827] CHIP:SVR: Manual pairing code: [34970112332] + [1657203632.335470][13827:13827] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== + [1657203632.335532][13827:13827] CHIP:SVR: SetupQRCode: [MT:-24J0YXE00KA0648G00] + [1657203632.335589][13827:13827] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1657203632.335637][13827:13827] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0YXE00KA0648G00 + [1657203632.335712][13827:13827] CHIP:SVR: Manual pairing code: [749701123365521327694] disabled: true - label: @@ -48,10 +58,13 @@ tests: 2" PICS: MCORE.DD.21_MANUAL_PC verification: | - $ chip-tool/out/debug$ ./chip-tool payload verhoeff-generate 849701123365521327693 - [1652423715.746979][23816:23816] CHIP:SPL: Generating Character for: 849701123365521327693 - [1652423715.747112][23816:23816] CHIP:SPL: Generated Char: 0 - $ chip-tool/out/debug$ + 1. Use chip-tool's "payload verhoeff-generate" command to help generate the new, invalid Manual code + + $ ./chip-tool payload verhoeff-generate 84970112336552132769 + [1657238290868] [31968:16868160] CHIP: [SPL] Generating Character for: 84970112336552132769 + [1657238290868] [31968:16868160] CHIP: [SPL] Generated Char: 3 + + Manual code: 8497011233655213276930 disabled: true - label: @@ -59,12 +72,9 @@ tests: the DUT in any format supported by the DUT" PICS: MCORE.DD.21_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool pairing code 1 849701123365521327693 - - [1651186987544] [13533:359998] CHIP: [SPL] Failed decoding base10. Input length 20 was not expected length 10 - ... + $ ./chip-tool pairing code 1 849701123365521327693 - Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument + [1657238348848] [31971:16868925] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument disabled: true - label: @@ -73,7 +83,8 @@ tests: invalid VID_PID_PRESENT set to 0" PICS: MCORE.DD.21_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool payload verhoeff-generate 34970112336552132769 + 1. Use chip-tool's "payload verhoeff-generate" command to help generate the new, invalid Manual code + $ ./chip-tool payload verhoeff-generate 34970112336552132769 [1651186492744] [13434:353094] CHIP: [SPL] Generating Character for: 34970112336552132769 [1651186492744] [13434:353094] CHIP: [SPL] Generated Char: 6 @@ -85,11 +96,11 @@ tests: the DUT in any format supported by the DUT" PICS: MCORE.DD.21_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool pairing code 1 349701123365521327696 + $ ./chip-tool pairing code 1 349701123365521327696 - [1651187185899] [13557:362337] CHIP: [SPL] Failed decoding base10. Input length 20 was not expected length 10 + [1657238541643] [31975:16871084] CHIP: [SPL] Failed decoding base10. Input length 20 was not expected length 10 ... - [1651187185900] [13557:362333] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:63: CHIP Error 0x0000001E: Invalid string length + [1657238541644] [31975:16871079] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:63: CHIP Error 0x0000001E: Invalid string length disabled: true - label: @@ -102,10 +113,10 @@ tests: "Discriminator value")' PICS: MCORE.DD.21_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool payload verhoeff-generate 733317123365521327692 - [1651186243492] [13415:349553] CHIP: [SPL] Generating Character for: 8497011233 - [1651186243492] [13415:349553] CHIP: [SPL] Generated Char: 1 - Manual Code: 733317123365521327692 + 1. Use chip-tool's "payload generate-manualcode" command to help generate the new, invalid Manual code + + $ ./chip-tool payload generate-manualcode --existing-payload 749701123365521327694 --allow-invalid-payload 1 --discriminator 3584 + [1657238783501] [31989:16873588] CHIP: [TOO] Manual Code: 733317123365521327692 disabled: true - label: @@ -113,7 +124,7 @@ tests: the DUT in any format supported by the DUT" PICS: MCORE.DD.21_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool pairing code 1 733317123365521327692 + $ ./chip-tool pairing code 1 733317123365521327692 [1655814152.716988][3723:3726] CHIP:CTL: Commissioning discovery over BLE failed: ../../third_party/connectedhomeip/src/platform/Linux/BLEManagerImpl.cpp:829: CHIP Error 0x00000032: Timeout [1655814152.717099][3723:3726] CHIP:-: ../../third_party/connectedhomeip/src/platform/Linux/BLEManagerImpl.cpp:829: CHIP Error 0x00000032: Timeout at ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:270 @@ -132,10 +143,12 @@ tests: 55555555, 66666666, 77777777, 88888888, 99999999, 12345678, 87654321" PICS: MCORE.DD.21_MANUAL_PC verification: | - 1. Use this as an example of how to generate a manual code with an invalid passcode + 1. Use this as an example of how to generate a manual code with an invalid passcode. In this example the invalid passcode=00000000 + + Use chip-tool's "payload generate-manualcode" command to help generate the new, invalid Manual code - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 1 --allow-invalid-payload 1 --setup-pin-code 00000000 - [1651188323732] [14068:388953] CHIP: [TOO] Manual Code: 749152000065521327698 + $ ./chip-tool payload generate-manualcode --existing-payload 749701123365521327694 --allow-invalid-payload 1 --setup-pin-code 00000000 + [1657239062245] [32164:16876812] CHIP: [TOO] Manual Code: 749152000065521327698 disabled: true - label: @@ -144,61 +157,61 @@ tests: PICS: MCORE.DD.21_MANUAL_PC verification: | (00000000) - $ ./out/chip-tool/chip-tool pairing code 1 749152000065521327698 + $ ./chip-tool pairing code 1 749152000065521327698 [1651187937232] [13896:372977] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:161: CHIP Error 0x0000002F: Invalid argument (11111111) - $ ./out/chip-tool/chip-tool pairing code 1 751911067865521327698 + $ ./chip-tool pairing code 1 751911067865521327698 [1655814240.531424][3747:3747] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument (22222222) - $ ./out/chip-tool/chip-tool pairing code 1 754670135665521327694 + $ ./chip-tool pairing code 1 754670135665521327694 [1655814269.264731][3754:3754] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument (33333333) - $ ./out/chip-tool/chip-tool pairing code 1 757429203465521327699 + $ ./chip-tool pairing code 1 757429203465521327699 [1655814269.264731][3754:3754] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument (44444444) - $ ./out/chip-tool/chip-tool pairing code 1 760188271265521327697 + $ ./chip-tool pairing code 1 760188271265521327697 [1655814269.264731][3754:3754] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument (55555555) - $ ./out/chip-tool/chip-tool pairing code 1 762947339065521327695 + $ ./chip-tool pairing code 1 762947339065521327695 [1655814269.264731][3754:3754] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument (66666666) - $ ./out/chip-tool/chip-tool pairing code 1 749322406965521327695 + $ ./chip-tool pairing code 1 749322406965521327695 [1655814269.264731][3754:3754] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument (77777777) - $ ./out/chip-tool/chip-tool pairing code 1 752081474765521327697 + $ ./chip-tool pairing code 1 752081474765521327697 [1655814269.264731][3754:3754] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument (88888888) - $ ./out/chip-tool/chip-tool pairing code 1 754840542565521327693 + $ ./chip-tool pairing code 1 754840542565521327693 [1655814269.264731][3754:3754] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument (99999999) - $ ./out/chip-tool/chip-tool pairing code 1 757599610365521327695 + $ ./chip-tool pairing code 1 757599610365521327695 [1655814269.264731][3754:3754] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument (12345678) - $ ./out/chip-tool/chip-tool pairing code 1 757678075365521327695 + $ ./chip-tool pairing code 1 757678075365521327695 [1655814269.264731][3754:3754] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument (87654321) - $ ./out/chip-tool/chip-tool pairing code 1 765457534965521327696 + $ ./chip-tool pairing code 1 765457534965521327696 [1655814323.718122][3761:3761] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument disabled: true @@ -213,7 +226,7 @@ tests: verification: | 1. Use this as an example of how to generate a manual code with an invalid vendor IDs - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --setup-pin-code 20202021 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 1 + $ ./chip-tool payload generate-manualcode --discriminator 3840 --setup-pin-code 20202021 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 1 [1651189120686] [14218:398626] CHIP: [TOO] Manual Code: 749701123365521327694 disabled: true @@ -223,22 +236,18 @@ tests: PICS: MCORE.DD.21_MANUAL_PC verification: | (0xFFF1) - $ ./out/chip-tool/chip-tool pairing manualcode 1 749701123365521327694 - Error: chip-tool pairs to chip-all-clusters-app with this invalid vendor ID but that is expected of chip-tool + $ ./chip-tool pairing code 1 749701123365521327694 (0xFFF2) - $ ./out/chip-tool/chip-tool pairing manualcode 1 749701123365522327692 - Error: chip-tool pairs to chip-all-clusters-app with this invalid vendor ID but that is expected of chip-tool + $ ./chip-tool pairing code 1 749701123365522327692 (0xFFF3) - $ ./out/chip-tool/chip-tool pairing manualcode 1 749701123365523327697 - Error: chip-tool pairs to chip-all-clusters-app with this invalid vendor ID but that is expected of chip-tool + $ ./chip-tool pairing code 1 749701123365523327697 (0xFFF4) - $ ./out/chip-tool/chip-tool pairing manualcode 1 749701123365524327693 - Error: chip-tool pairs to chip-all-clusters-app with this invalid vendor ID but that is expected of chip-tool + $ ./chip-tool pairing code 1 749701123365524327693 disabled: true - label: @@ -248,8 +257,10 @@ tests: Identifier")' PICS: MCORE.DD.21_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool payload generate-manualcode --discriminator 3840 --setup-pin-code 20202021 --version 0 --vendor-id 0xFFF1 --product-id 0x0000 --commissioning-mode 1 --allow-invalid-payload 1 - [1651187401077] [13610:366251] CHIP: [TOO] Manual Code: 749701123365521000006 + 1. Use chip-tool's "payload generate-manualcode" command to help generate the new, invalid Manual code + + $ ./chip-tool payload generate-manualcode --existing-payload 749701123365521327694 --allow-invalid-payload 1 --product-id 0x0000 + [1657239418656] [32180:16880488] CHIP: [TOO] Manual Code: 749701123365521000006 disabled: true - label: @@ -257,9 +268,10 @@ tests: the DUT in any format supported by the DUT" PICS: MCORE.DD.21_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool pairing manualcode 1 749701123365521000006 + On DUT: + $ ./chip-tool pairing code 1 749701123365521000006 - [1655380389.096806][35861:35861] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument + [1657239565895] [32193:16881922] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument disabled: true - label: @@ -270,7 +282,9 @@ tests: Product IDs included (VID_PID_Present == 1))" PICS: MCORE.DD.21_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool payload verhoeff-verify 749701123365521327693 20 + 1. Use chip-tool's "payload verhoeff-verify" command to help verify that the check-digit is invalid + + $ ./chip-tool payload verhoeff-verify 749701123365521327693 20 [1651187504088] [13629:367627] CHIP: [SPL] Verifying Manual Code: 74970112336552132769 [1651187504088] [13629:367627] CHIP: [SPL] 749701123365521327693 is INVALID at position 20 disabled: true @@ -280,7 +294,7 @@ tests: the DUT in any format supported by the DUT" PICS: MCORE.DD.21_MANUAL_PC verification: | - $ ./out/chip-tool/chip-tool pairing code 1 749701123365521327693 + $ ./chip-tool pairing code 1 749701123365521327693 [1651187528666] [13631:367920] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:50: CHIP Error 0x00000013: Integrity check failed disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_18.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_18.yaml index 198e053c05ee6d..1b901be800df83 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_18.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_18.yaml @@ -27,74 +27,37 @@ tests: "Place TH1 into commissioning mode using the TH manufacturers means to be discovered by a commissioner" verification: | - After launching all-clusters-app using discriminator 3841 using below command - sudo ./chip-all-clusters-app --wifi --discriminator 3841 - - ./chip-tool discover commissionables - [1654068872.283184][8000:8005] CHIP:DL: Avahi resolve found - [1654068872.283316][8000:8005] CHIP:DIS: Hostname: E45F010F19FF0000 - [1654068872.283374][8000:8005] CHIP:DIS: IP Address #1: fe80::e65f:1ff:fe0f:19ff - [1654068872.283419][8000:8005] CHIP:DIS: Port: 5540 - [1654068872.283460][8000:8005] CHIP:DIS: Mrp Interval idle: 5000 ms - [1654068872.283503][8000:8005] CHIP:DIS: Mrp Interval active: 300 ms - [1654068872.283563][8000:8005] CHIP:DIS: Vendor ID: 65521 - [1654068872.283605][8000:8005] CHIP:DIS: Product ID: 32769 - [1654068872.283646][8000:8005] CHIP:DIS: Long Discriminator: 3844 - [1654068872.283687][8000:8005] CHIP:DIS: Pairing Hint: 33 - [1654068872.283728][8000:8005] CHIP:DIS: Instance Name: C50FE94C4952D393 - [1654068872.283768][8000:8005] CHIP:DIS: Commissioning Mode: 1 - [1654068872.285052][8000:8005] CHIP:DL: Avahi resolve found - [1654068872.285156][8000:8005] CHIP:DIS: Hostname: E45F010F27530000 - [1654068872.285211][8000:8005] CHIP:DIS: IP Address #1: fe80::e65f:1ff:fe0f:2755 - [1654068872.285254][8000:8005] CHIP:DIS: Port: 5540 - [1654068872.285296][8000:8005] CHIP:DIS: Mrp Interval idle: 5000 ms - [1654068872.285337][8000:8005] CHIP:DIS: Mrp Interval active: 300 ms - [1654068872.285378][8000:8005] CHIP:DIS: Vendor ID: 65521 - [1654068872.285418][8000:8005] CHIP:DIS: Product ID: 32769 - [1654068872.285458][8000:8005] CHIP:DIS: Long Discriminator: 3841 - [1654068872.285498][8000:8005] CHIP:DIS: Pairing Hint: 33 - [1654068872.285538][8000:8005] CHIP:DIS: Instance Name: DC47D37251924E87 - [1654068872.285579][8000:8005] CHIP:DIS: Commissioning Mode: 1 + 1. After launching all-clusters-app using discriminator 3841 using below command + $ ./out/all-clusters-app/chip-all-clusters-app --wifi --discriminator 3841 + + $ dns-sd -B _matterc._udp,_L3841 + Browsing for _matterc._udp,_L3841 + DATE: ---Thu 07 Jul 2022--- + 17:39:06.762 ...STARTING... + Timestamp A/R Flags if Domain Service Type Instance Name + 17:39:06.764 Add 2 7 local. _matterc._udp. 930430C7C701B844 disabled: true - label: "Place TH2 into commissioning mode using the TH manufacturers means to be discovered by a commissioner" verification: | - After launching all-clusters-app using discriminator 3844 using below command + 1. After launching all-clusters-app using discriminator 3844 using below command sudo ./chip-all-clusters-app --wifi --discriminator 3844 - ./chip-tool discover commissionables - [1654068872.283184][8000:8005] CHIP:DL: Avahi resolve found - [1654068872.283316][8000:8005] CHIP:DIS: Hostname: E45F010F19FF0000 - [1654068872.283374][8000:8005] CHIP:DIS: IP Address #1: fe80::e65f:1ff:fe0f:19ff - [1654068872.283419][8000:8005] CHIP:DIS: Port: 5540 - [1654068872.283460][8000:8005] CHIP:DIS: Mrp Interval idle: 5000 ms - [1654068872.283503][8000:8005] CHIP:DIS: Mrp Interval active: 300 ms - [1654068872.283563][8000:8005] CHIP:DIS: Vendor ID: 65521 - [1654068872.283605][8000:8005] CHIP:DIS: Product ID: 32769 - [1654068872.283646][8000:8005] CHIP:DIS: Long Discriminator: 3844 - [1654068872.283687][8000:8005] CHIP:DIS: Pairing Hint: 33 - [1654068872.283728][8000:8005] CHIP:DIS: Instance Name: C50FE94C4952D393 - [1654068872.283768][8000:8005] CHIP:DIS: Commissioning Mode: 1 - [1654068872.285052][8000:8005] CHIP:DL: Avahi resolve found - [1654068872.285156][8000:8005] CHIP:DIS: Hostname: E45F010F27530000 - [1654068872.285211][8000:8005] CHIP:DIS: IP Address #1: fe80::e65f:1ff:fe0f:2755 - [1654068872.285254][8000:8005] CHIP:DIS: Port: 5540 - [1654068872.285296][8000:8005] CHIP:DIS: Mrp Interval idle: 5000 ms - [1654068872.285337][8000:8005] CHIP:DIS: Mrp Interval active: 300 ms - [1654068872.285378][8000:8005] CHIP:DIS: Vendor ID: 65521 - [1654068872.285418][8000:8005] CHIP:DIS: Product ID: 32769 - [1654068872.285458][8000:8005] CHIP:DIS: Long Discriminator: 3841 - [1654068872.285498][8000:8005] CHIP:DIS: Pairing Hint: 33 - [1654068872.285538][8000:8005] CHIP:DIS: Instance Name: DC47D37251924E87 - [1654068872.285579][8000:8005] CHIP:DIS: Commissioning Mode: 1 + $ dns-sd -B _matterc._udp,_L3844 + Browsing for _matterc._udp,_L3844 + DATE: ---Thu 07 Jul 2022--- + 17:39:35.265 ...STARTING... + Timestamp A/R Flags if Domain Service Type Instance Name + 17:40:17.959 Add 2 7 local. _matterc._udp. 8F1FEB734CE46129 disabled: true - label: "Scan TH1s QR code using the DUT Commissioner." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes + 1. Verify the QR code is scanned by DUT + Note: chip-tool does not support physically scanning QR codes disabled: true - label: @@ -103,24 +66,21 @@ tests: the TH Commissionees method of device discovery" verification: | TH1 Commissionee: - [1651109784.452770][31207:31207] CHIP:SVR: Commissioning completed successfully - [1651109784.452813][31207:31207] CHIP:DIS: Updating services using commissioning mode 0 + [1657240914.891250][372173:372173] CHIP:SVR: Commissioning completed successfully + [1657240914.891297][372173:372173] CHIP:DIS: Updating services using commissioning mode 0 DUT Commissioner: - $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J0AFN00KA0648G00 - - [1651109784376] [95553:65657838] CHIP: [CTL] Received CommissioningComplete response - [1651109784376] [95553:65657838] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' - [1651109784376] [95553:65657838] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1651109784376] [95553:65657838] CHIP: [CTL] Performing next commissioning step 'Cleanup' - [1651109784376] [95553:65657838] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' - [1651109784376] [95553:65657838] CHIP: [TOO] Device commissioning completed with success + $ ./chip-tool pairing code 1 MT:-24J0IRV01KA0648G00 + + [1657240914764] [32262:16895870] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657240914764] [32262:16895870] CHIP: [TOO] Device commissioning completed with success disabled: true - label: "Scan TH2s QR code using the DUT Commissioner." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes + 1. Verify the QR code is scanned by DUT + Note: chip-tool does not support physically scanning QR codes disabled: true - label: @@ -129,34 +89,30 @@ tests: the TH Commissionees method of device discovery" verification: | TH2 Commissionee: - [1651109919.159014][11588:11588] CHIP:SVR: Commissioning completed successfully - [1651109919.159067][11588:11588] CHIP:DIS: Updating services using commissioning mode 0 + [1657240985.801360][112581:112581] CHIP:SVR: Commissioning completed successfully + [1657240985.801406][112581:112581] CHIP:DIS: Updating services using commissioning mode 0 DUT Commissioner: - $ ./out/chip-tool/chip-tool pairing qrcode 2 MT:-24J04QI14KA0648G00 - - [1651109919079] [95563:65659558] CHIP: [CTL] Received CommissioningComplete response - [1651109919079] [95563:65659558] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' - [1651109919079] [95563:65659558] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1651109919079] [95563:65659558] CHIP: [CTL] Performing next commissioning step 'Cleanup' - [1651109919079] [95563:65659558] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' - [1651109919079] [95563:65659558] CHIP: [TOO] Device commissioning completed with success + $ ./chip-tool pairing code 2 MT:-24J04QI14KA0648G00 + + [1657240985682] [32264:16896797] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1657240985682] [32264:16896797] CHIP: [TOO] Device commissioning completed with success disabled: true - label: "Verify the Commissioner can still interact with TH1 (ex: Read any clusters attribute from TH1)" verification: | - $ ./out/chip-tool/chip-tool basic read reachable 1 0 - [1651110057235] [95634:65662038] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0011 DataVersion: 3647361086 - [1651110057235] [95634:65662038] CHIP: [TOO] Reachable: TRUE + $ ./chip-tool basic read reachable 1 0 + [1657241043430] [32266:16897416] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0011 DataVersion: 131004400 + [1657241043432] [32266:16897416] CHIP: [TOO] Reachable: TRUE disabled: true - label: "Verify the Commissioner can still interact with TH2 (ex: Read any clusters attribute from TH2)" verification: | - $ ./out/chip-tool/chip-tool basic read reachable 2 0 - [1651110080978] [95636:65662333] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0011 DataVersion: 3234420698 - [1651110080978] [95636:65662333] CHIP: [TOO] Reachable: TRUE + $ ./chip-tool basic read reachable 2 0 + [1657241066927] [32267:16897671] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0011 DataVersion: 2450774961 + [1657241066927] [32267:16897671] CHIP: [TOO] Reachable: TRUE disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_19.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_19.yaml index 62f2f9ba508e9d..5e98def66a667d 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_19.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_19.yaml @@ -42,7 +42,7 @@ tests: [1651111142.370760][32024:32024] CHIP:SVR: SetupQRCode: [MT:-24J0ALY01KA0648G00] TH Commissioner: - $ ./out/chip-tool/chip-tool discover commissionables + $ ./chip-tool discover commissionables [1651111150395] [95835:65674062] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 [1651111150395] [95835:65674062] CHIP: [DIS] Vendor ID: 65521 @@ -70,7 +70,7 @@ tests: [1651111335.475204][32130:32130] CHIP:DIS: Updating services using commissioning mode 0 TH Commissioner: - $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J0ALY01KA0648G00 + $ ./chip-tool pairing code 1 MT:-24J0ALY01KA0648G00 [1651111335378] [95843:65675989] CHIP: [CTL] Received CommissioningComplete response [1651111335378] [95843:65675989] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' @@ -84,6 +84,7 @@ tests: "Using TH Commissioner, unpair the DUT Commissionee from the Matter network." verification: | + TH Commissioner: ./chip-tool operationalcredentials remove-fabric 1 1 0 CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 @@ -103,7 +104,7 @@ tests: 2. On RasPi DUT $ ./out/all-clusters-app/chip-all-clusters-app --discriminator 3841 On TH chip-tool: - $ ./out/chip-tool/chip-tool discover commissionables + $ ./chip-tool discover commissionables [1651111576350] [95850:65678872] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 [1651111576350] [95850:65678872] CHIP: [DIS] Vendor ID: 65521 [1651111576350] [95850:65678872] CHIP: [DIS] Product ID: 32769 @@ -130,7 +131,7 @@ tests: [1651111614.006893][32259:32259] CHIP:DIS: Updating services using commissioning mode 0 TH Commissioner: - $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J0ALY01KA0648G00 + $ ./chip-tool pairing code 1 MT:-24J0ALY01KA0648G00 [1651111613912] [95856:65679504] CHIP: [CTL] Received CommissioningComplete response [1651111613912] [95856:65679504] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_2.yaml index 6689e63f294300..f05fba9c1d176b 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_2.yaml @@ -51,8 +51,8 @@ tests: disabled: true - label: - "If (PICS_WIFI) or (PICS_THREAD), Commissioner SHALL configure - regulatory information in the Commissionee." + "Commissioner SHALL configure regulatory information in the + Commissionee." PICS: MCORE.DD.WIRELESS verification: | On TH: @@ -337,7 +337,7 @@ tests: "Commissioning channel between the Commissioner and Commissionee is terminated." verification: | - + 1. Terminate the connection between the Commissionee and the Commissioner. (i.e. remove network access or terminate commissioning process) disabled: true - label: "Commissioner starts discovery of DUT using Operational Discovery" diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_20.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_20.yaml index 64d2ad99a54fb2..bc6adc2aa8c083 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_20.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_20.yaml @@ -45,7 +45,8 @@ tests: - label: "Scan THs QR code using the DUT Commissioner." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes + 1. Verify the QR code is scanned by DUT + Note: chip-tool does not support physically scanning QR codes disabled: true - label: @@ -58,7 +59,7 @@ tests: [1651109784.452813][31207:31207] CHIP:DIS: Updating services using commissioning mode 0 DUT Commissioner: - $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J0AFN00KA0648G00 + $ ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 [1651109784376] [95553:65657838] CHIP: [CTL] Received CommissioningComplete response [1651109784376] [95553:65657838] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' @@ -105,7 +106,8 @@ tests: - label: "Scan THs QR code using the DUT Commissioner." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes + 1. Verify the QR code is scanned by DUT + Note: chip-tool does not support physically scanning QR codes disabled: true - label: @@ -118,7 +120,7 @@ tests: [1651110724.759869][31791:31791] CHIP:DIS: Updating services using commissioning mode 0 DUT Commissioner: - $ ./out/chip-tool/chip-tool pairing qrcode 1 MT:-24J0AFN00KA0648G00 + $ ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 [1651110724689] [95810:65669790] CHIP: [CTL] Received CommissioningComplete response [1651110724689] [95810:65669790] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_21.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_21.yaml new file mode 100644 index 00000000000000..17a468d0c195b7 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DD_3_21.yaml @@ -0,0 +1,105 @@ +# 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: + 3.3.21. [TC-DD-3.21] Commissioning Flow - Commission Multiple-Endpoint + Device [DUT - Commissioner] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: + "Place TH into commissioning mode using the TH manufacturers means to + be discovered by the DUT Commissioner" + verification: | + $ ./out/all-clusters-app/chip-all-clusters-app --discriminator 3840 + + [1651109580.413197][31207:31207] CHIP:DL: Device Configuration: + [1651109580.413259][31207:31207] CHIP:DL: Serial Number: TEST_SN + [1651109580.413294][31207:31207] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1651109580.413327][31207:31207] CHIP:DL: Product Id: 32769 (0x8001) + [1651109580.413358][31207:31207] CHIP:DL: Hardware Version: 0 + [1651109580.413380][31207:31207] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 + [1651109580.413401][31207:31207] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) + [1651109580.413428][31207:31207] CHIP:DL: Manufacturing Date: (not set) + [1651109580.413450][31207:31207] CHIP:DL: Device Type: 65535 (0xFFFF) + [1651109580.413470][31207:31207] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== + [1651109580.413525][31207:31207] CHIP:SVR: SetupQRCode: [MT:-24J0AFN00KA0648G00] + disabled: true + + - label: "Scan THs QR code using the DUT Commissioner." + PICS: MCORE.DD.SCAN_QR_CODE + verification: | + 1. Verify the QR code is scanned by DUT + Note: chip-tool does not support physically scanning QR codes + disabled: true + + - label: + "DUT parses THs QR code. Follow any steps needed for the + Commissioner/Commissionee to complete the commissioning process over + the TH Commissionees method of device discovery" + verification: | + TH Commissionee: + [1651109784.452770][31207:31207] CHIP:SVR: Commissioning completed successfully + [1651109784.452813][31207:31207] CHIP:DIS: Updating services using commissioning mode 0 + + DUT Commissioner: + $ ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 + + [1651109784376] [95553:65657838] CHIP: [CTL] Received CommissioningComplete response + [1651109784376] [95553:65657838] CHIP: [CTL] Successfully finished commissioning step 'SendComplete' + [1651109784376] [95553:65657838] CHIP: [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1651109784376] [95553:65657838] CHIP: [CTL] Performing next commissioning step 'Cleanup' + [1651109784376] [95553:65657838] CHIP: [CTL] Successfully finished commissioning step 'Cleanup' + [1651109784376] [95553:65657838] CHIP: [TOO] Device commissioning completed with success + disabled: true + + - label: + "For each TH Endpoint that implements the On/Off light device, verify + that the DUT acknowledges the existence of the Endpoint through DUT + issuing an On command to the respective Endpoint (e.g. through some + user action to trigger such command)." + verification: | + 1. Send 'on' command from Commissioner to TH Endpoint 1 + On DUT=chip-tool: + $ ./chip-tool onoff on 1 1 + [...] + [1657930715416] [56399:2451384] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x0 + + On TH=all-clusters-app: + [...] + [1657930715.432295][2911:2911] CHIP:ZCL: On/Off set value: 1 1 + [1657930715.432341][2911:2911] CHIP:ZCL: Toggle on/off from 0 to 1 + [1657930715.432383][2911:2911] CHIP:ZCL: On Command - OffWaitTime : 0 + [1657930715.432422][2911:2911] CHIP:DMG: Endpoint 1, Cluster 0x0000_0006 update version to ce1d8e1f + [1657930715.432468][2911:2911] CHIP:ZCL: On/Toggle Command - Stop Timer + [1657930715.432509][2911:2911] CHIP:DMG: Endpoint 1, Cluster 0x0000_0006 update version to ce1d8e20 + + + 2. Send 'on' command from Commissioner to TH Endpoint 2 + On DUT=chip-tool: + $ ./chip-tool onoff on 1 2 + [...] + [1657930953792] [56404:2453640] CHIP: [DMG] Received Command Response Status for Endpoint=2 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x0 + + On TH=all-clusters-app: + [...] + [1657930953.816805][2911:2911] CHIP:ZCL: On/Off set value: 2 1 + [1657930953.816841][2911:2911] CHIP:ZCL: Toggle on/off from 0 to 1 + [1657930953.816870][2911:2911] CHIP:DMG: Endpoint 2, Cluster 0x0000_0006 update version to 6475f591 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_3.yaml index f328055332e329..8ef9bcd4ab55bb 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_3.yaml @@ -76,16 +76,29 @@ tests: - label: "DUT is instructed to start the commissioning procedure with the TH - found at step 2" + found at Step 3" verification: | - This particular step is Out of scope for V1.0 + Out of scope for V1.0 - IDM functionality - https://github.com/CHIP-Specifications/chip-test-plans/issues/1312 + https://github.com/project-chip/connectedhomeip/issues/11004 disabled: true - label: "TH verifies the Identification Declaration message" verification: | - This particular step is Out of scope for V1.0 + Out of scope for V1.0 - IDM functionality - https://github.com/CHIP-Specifications/chip-test-plans/issues/1312 + https://github.com/project-chip/connectedhomeip/issues/11004 + disabled: true + + - label: "TH start the commissioning procedure with DUT" + verification: | + ./chip-tool pairing ethernet 1 20202021 3840 fe80::e65f:1ff:fe0f:2755 5640 + + [1653559159.021348][4240:4246] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1653559159.021432][4240:4246] CHIP:CTL: Received CommissioningComplete response, errorCode=0 + [1653559159.021499][4240:4246] CHIP:CTL: Successfully finished commissioning step 'SendComplete' + [1653559159.021554][4240:4246] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1653559159.021611][4240:4246] CHIP:CTL: Performing next commissioning step 'Cleanup' + [1653559159.021725][4240:4246] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1653559159.021790][4240:4246] CHIP:TOO: Device commissioning completed with success disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_4.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_4.yaml index c2e2d53dfa8054..770b44590833f3 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_4.yaml @@ -32,7 +32,7 @@ tests: disabled: true - label: - "TH start scanning for available commissioners using Commissioner + "TH starts scanning for available commissioners using Commissioner Discovery" verification: | ubuntu@ubuntu:~/may23_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterd._udp @@ -53,26 +53,26 @@ tests: - label: "TH is instructed to start the commissioning procedure with the DUT - found at step 2" + found at Step 2" verification: | - This particular step is Out of scope for V1.0 + Out of scope for V1.0 - IDM functionality - https://github.com/CHIP-Specifications/chip-test-plans/issues/1312 + https://github.com/project-chip/connectedhomeip/issues/11004 disabled: true - - label: "DUT verify the Identification Declaration message" + - label: "DUT verifies the Identification Declaration message" verification: | - This particular step is Out of scope for V1.0 + Out of scope for V1.0 - IDM functionality - https://github.com/CHIP-Specifications/chip-test-plans/issues/1312 + https://github.com/project-chip/connectedhomeip/issues/11004 disabled: true - - label: "By any means DUT prompt user for onboarding payload" + - label: "By any means, DUT prompts user for onboarding payload" verification: | disabled: true - - label: "DUT start the commissioning procedure with TH" + - label: "DUT starts the commissioning procedure with TH" verification: | ./chip-tool pairing ethernet 1 20202021 3840 fe80::e65f:1ff:fe0f:2755 5640 diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_5.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_5.yaml index fcebf4f8047175..7fc5d4dbbc766c 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_5.yaml @@ -25,7 +25,8 @@ tests: "Commissioner has regulatory and fabric information available and has accurate date, time and timezone" verification: | - On DUT: sudo ./chip-all-clusters-app --wifi --discriminator 3841 + On TH: + sudo ./chip-all-clusters-app --wifi --discriminator 3841 [1653471956.966855][10713:10713] CHIP:SPT: PASE PBKDF iterations set to 1000 [1653471956.966887][10713:10713] CHIP:SPT: LinuxCommissionableDataProvider didn't get a PASE salt, generating one. @@ -41,162 +42,24 @@ tests: [1653471956.972509][10713:10713] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== [1653471956.972546][10713:10713] CHIP:SVR: SetupQRCode: [MT:-24J0CEK01KA0648G00] [1653471956.972579][10713:10713] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1653471956.972600][10713:10713] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0CEK01KA0648G00 + [1653471956.972600][10713:10713] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0CEK01KA0648G00 [1653471956.972632][10713:10713] CHIP:SVR: Manual pairing code: [34970112332] [1653471956.972654][10713:10713] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== [1653471956.972715][10713:10713] CHIP:SVR: SetupQRCode: [MT:-24J048N01KA0648G00] [1653471956.972748][10713:10713] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1653471956.972769][10713:10713] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 + [1653471956.972769][10713:10713] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 [1653471956.972803][10713:10713] CHIP:SVR: Manual pairing code: [749701123365521327694] - - connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool discover commissionables - Waiting for device responses... - CHIP:CTL: Generating ICAC - CHIP:DL: AUDIT: ===== RANDOM NUMBER GENERATOR AUDIT START ==== - CHIP:DL: AUDIT: * Validate buf1 and buf2 are <<>> - CHIP:DL: AUDIT: * Validate r1 and r2 are <<>> - CHIP:DL: AUDIT: * buf1: 3BE3E264C0A0A053248E93609D22044A - CHIP:DL: AUDIT: * buf2: E69C8767AD6B60907AD3633E774F38EB - CHIP:DL: AUDIT: * r1: 0x2A0E6454 r2: 0x16315893 - CHIP:DL: AUDIT: ===== RANDOM NUMBER GENERATOR AUDIT END ==== - CHIP:DL: writing settings to file (/tmp/chip_counters.ini-9yXPat) - CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) - CHIP:DL: NVS set: chip-counters/reboot-count = 23 (0x17) - CHIP:DL: Got Ethernet interface: eth0 - CHIP:DL: Found the primary Ethernet interface:eth0 - CHIP:DL: Got WiFi interface: wlan0 - CHIP:DL: Failed to reset WiFi statistic counts - CHIP:IN: UDP::Init bind&listen port=5541 - CHIP:IN: UDP::Init bound to port=5541 - CHIP:IN: UDP::Init bind&listen port=5541 - CHIP:IN: UDP::Init bound to port=5541 - CHIP:IN: TransportMgr initialized - CHIP:DIS: Init fabric pairing table with server storage - CHIP:DL: writing settings to file (/tmp/chip_counters.ini-zgCtZd) - CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) - CHIP:DL: NVS set: chip-counters/GlobalMCTR = 25000 (0x61A8) - CHIP:CTL: System State Initialized... - CHIP:DL: MDNS failed to join multicast group on veth5731933 for address type IPv4: ../th - CHIP:DL: MDNS failed to join multicast group on vethbf7bfa6 for address type IPv4: ../th - CHIP:DL: MDNS failed to join multicast group on vethcf434e5 for address type IPv4: ../th - CHIP:ZCL: Using ZAP configuration... - CHIP:DIS: Verifying the received credentials - CHIP:IN: Generating compressed fabric ID using uncompressed fabric ID 0x0000000000000000 - CHIP:IN: 0x04, 0x66, 0xd6, 0xcf, 0x4c, 0x1e, 0x11, 0xc3, - CHIP:IN: 0x52, 0x4f, 0xa6, 0x8c, 0x6e, 0x65, 0x46, 0xdc, - CHIP:IN: 0x90, 0x1b, 0x5f, 0x42, 0x9f, 0x69, 0xd1, 0xb7, - CHIP:IN: 0x7d, 0xf3, 0x6b, 0x54, 0x12, 0x6c, 0x12, 0x59, - CHIP:IN: 0x5b, 0xc3, 0x07, 0x1c, 0x5c, 0xf4, 0x4e, 0x5f, - CHIP:IN: 0x71, 0x06, 0x9a, 0xbb, 0x2f, 0xef, 0x20, 0x0d, - CHIP:IN: 0x0e, 0x9b, 0x26, 0x3e, 0x8d, 0x46, 0x09, 0xd8, - CHIP:IN: 0xfd, 0xa1, 0xc0, 0x10, 0x4f, 0x05, 0x14, 0x99, - CHIP:IN: 0x22, - CHIP:IN: Generated compressed fabric ID - CHIP:IN: 0x4a, 0x53, 0x1e, 0x52, 0x06, 0xed, 0x06, 0xda, - CHIP:DIS: Added new fabric at index: 1, Initialized: 1 - CHIP:DIS: Assigned compressed fabric ID: 0x4A531E5206ED06DA, node ID: 0x000000000001B669 - CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x4A531E5206ED06DA - CHIP:DL: CHIP task running - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - - - connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 - - connectedhomeip/examples/chip-tool/out/debug$ sudo ./chip-tool basic read product-name 1 0 + On DUT: + ./chip-tool pairing code 1 MT:-24J0CEK01KA0648G00 + ... + [1657226543861] [30621:16744161] CHIP: [IN] SecureSession[0x6000007cc000]: Activated - Type:1 LSID:47293 + [1657226543861] [30621:16744161] CHIP: [IN] New secure session activated for device , LSID:47293 PSID:201! + [1657226543861] [30621:16744161] CHIP: [CTL] Remote device completed SPAKE2+ handshake + [1657226543861] [30621:16744161] CHIP: [CTL] Stopping commissioning discovery over DNS-SD + [1657226543861] [30621:16744161] CHIP: [TOO] Pairing Success + [1657226543861] [30621:16744161] CHIP: [TOO] PASE establishment successful + [1657226543861] [30621:16744161] CHIP: [CTL] Commissioning stage next step: 'SecurePairing' -> 'ReadCommissioningInfo' disabled: true - label: @@ -204,152 +67,26 @@ tests: discovery mode applicable for the DUT. If (MCORE.DD.DT_IP), TH device is advertising over IP Network using DNS-based Service Discovery (DNS-SD)" - PICS: MCORE.DD.DT_IP + PICS: MCORE.DD.DISCOVERY_IP verification: | - Verify on DUT: - - ./chip-tool discover commissionables - Waiting for device responses... - CHIP:CTL: Generating ICAC - CHIP:DL: AUDIT: ===== RANDOM NUMBER GENERATOR AUDIT START ==== - CHIP:DL: AUDIT: * Validate buf1 and buf2 are <<>> - CHIP:DL: AUDIT: * Validate r1 and r2 are <<>> - CHIP:DL: AUDIT: * buf1: 3BE3E264C0A0A053248E93609D22044A - CHIP:DL: AUDIT: * buf2: E69C8767AD6B60907AD3633E774F38EB - CHIP:DL: AUDIT: * r1: 0x2A0E6454 r2: 0x16315893 - CHIP:DL: AUDIT: ===== RANDOM NUMBER GENERATOR AUDIT END ==== - CHIP:DL: writing settings to file (/tmp/chip_counters.ini-9yXPat) - CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) - CHIP:DL: NVS set: chip-counters/reboot-count = 23 (0x17) - CHIP:DL: Got Ethernet interface: eth0 - CHIP:DL: Found the primary Ethernet interface:eth0 - CHIP:DL: Got WiFi interface: wlan0 - CHIP:DL: Failed to reset WiFi statistic counts - CHIP:IN: UDP::Init bind&listen port=5541 - CHIP:IN: UDP::Init bound to port=5541 - CHIP:IN: UDP::Init bind&listen port=5541 - CHIP:IN: UDP::Init bound to port=5541 - CHIP:IN: TransportMgr initialized - CHIP:DIS: Init fabric pairing table with server storage - CHIP:DL: writing settings to file (/tmp/chip_counters.ini-zgCtZd) - CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) - CHIP:DL: NVS set: chip-counters/GlobalMCTR = 25000 (0x61A8) - CHIP:CTL: System State Initialized... - CHIP:DL: MDNS failed to join multicast group on veth5731933 for address type IPv4: ../th - CHIP:DL: MDNS failed to join multicast group on vethbf7bfa6 for address type IPv4: ../th - CHIP:DL: MDNS failed to join multicast group on vethcf434e5 for address type IPv4: ../th - CHIP:ZCL: Using ZAP configuration... - CHIP:DIS: Verifying the received credentials - CHIP:IN: Generating compressed fabric ID using uncompressed fabric ID 0x0000000000000000 - CHIP:IN: 0x04, 0x66, 0xd6, 0xcf, 0x4c, 0x1e, 0x11, 0xc3, - CHIP:IN: 0x52, 0x4f, 0xa6, 0x8c, 0x6e, 0x65, 0x46, 0xdc, - CHIP:IN: 0x90, 0x1b, 0x5f, 0x42, 0x9f, 0x69, 0xd1, 0xb7, - CHIP:IN: 0x7d, 0xf3, 0x6b, 0x54, 0x12, 0x6c, 0x12, 0x59, - CHIP:IN: 0x5b, 0xc3, 0x07, 0x1c, 0x5c, 0xf4, 0x4e, 0x5f, - CHIP:IN: 0x71, 0x06, 0x9a, 0xbb, 0x2f, 0xef, 0x20, 0x0d, - CHIP:IN: 0x0e, 0x9b, 0x26, 0x3e, 0x8d, 0x46, 0x09, 0xd8, - CHIP:IN: 0xfd, 0xa1, 0xc0, 0x10, 0x4f, 0x05, 0x14, 0x99, - CHIP:IN: 0x22, - CHIP:IN: Generated compressed fabric ID - CHIP:IN: 0x4a, 0x53, 0x1e, 0x52, 0x06, 0xed, 0x06, 0xda, - CHIP:DIS: Added new fabric at index: 1, Initialized: 1 - CHIP:DIS: Assigned compressed fabric ID: 0x4A531E5206ED06DA, node ID: 0x000000000001B669 - CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x4A531E5206ED06DA - CHIP:DL: CHIP task running - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 + On DUT: + ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 + ... + [1657226543861] [30621:16744161] CHIP: [IN] SecureSession[0x6000007cc000]: Activated - Type:1 LSID:47293 + [1657226543861] [30621:16744161] CHIP: [IN] New secure session activated for device , LSID:47293 PSID:201! + [1657226543861] [30621:16744161] CHIP: [CTL] Remote device completed SPAKE2+ handshake + [1657226543861] [30621:16744161] CHIP: [CTL] Stopping commissioning discovery over DNS-SD + [1657226543861] [30621:16744161] CHIP: [TOO] Pairing Success + [1657226543861] [30621:16744161] CHIP: [TOO] PASE establishment successful + [1657226543861] [30621:16744161] CHIP: [CTL] Commissioning stage next step: 'SecurePairing' -> 'ReadCommissioningInfo' + + + On TH: + $ ./out/all-clusters-app/chip-all-clusters-app + ... + [1657226543.948995][369114:369114] CHIP:IN: SecureSession[0xaaaab60788e0]: Activated - Type:1 LSID:201 + [1657226543.949023][369114:369114] CHIP:IN: New secure session created for device , LSID:201 PSID:47293! + [1657226543.949048][369114:369114] CHIP:SVR: Commissioning completed session establishment step disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_6.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_6.yaml index 10590e2df572f6..22c1fafbdceb5f 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_6.yaml @@ -26,7 +26,7 @@ tests: "Commissioner has regulatory and fabric information available and has accurate date, time and timezone" verification: | - + 1. Manually verify that the time, date and timezone is accurate for the DUT Commissioner disabled: true - label: @@ -38,7 +38,6 @@ tests: On DUT: start commissioning process(need to obtain the Thread dataset first) ./chip-tool pairing ble-thread 1 hex:0e080000000000010000000300000f35060004001fffe0020811111111222222220708fd27e57b1b1e22d9051000112233445566778899aabbccddeeff030e4f70656e54687265616444656d6f01021234041061e1206d2c2b46e079eb775f41fc72190c0402a0fff8 20202021 3840 - ,, disabled: true - label: @@ -62,7 +61,14 @@ tests: Commissionee." PICS: MCORE.DD.WIRELESS verification: | - Need chip-tool implementation + Verify on DUT Log: + + Performing next commissioning step 'ConfigRegulatory' + [1653471968.202645][30157:30162] CHIP:CTL: Setting Regulatory Config + [1653471968.202666][30157:30162] CHIP:CTL: No regulatory config supplied by controller, leaving as device default (0) + + Verify on TH: + NVS set: chip-config/regulatory-location = 0 (0x0) disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_7.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_7.yaml index 6948b45f5b129b..0ab2c671825069 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_7.yaml @@ -27,321 +27,65 @@ tests: "Commissioner has regulatory and fabric information available and has accurate date, time and timezone" verification: | - On DUT: sudo ./chip-all-clusters-app - - - On Controller: ./chip-tool discover commissionables - - 1. Connect the device to Ethernet - 2. Disover the device using CHIP Tool . ./chip-tool discover commissionables - 3. connect -ip , - 4. Once device is provisioned, read 'Product Name' attribute from the Basic cluster. Example:./chip-tool basic read product-name 1 0 - - Reference : below Full log for the above commands (click on this cell if you like to see complete log) - - - connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool discover commissionables - Waiting for device responses... - CHIP:CTL: Generating ICAC - CHIP:DL: AUDIT: ===== RANDOM NUMBER GENERATOR AUDIT START ==== - CHIP:DL: AUDIT: * Validate buf1 and buf2 are <<>> - CHIP:DL: AUDIT: * Validate r1 and r2 are <<>> - CHIP:DL: AUDIT: * buf1: 3BE3E264C0A0A053248E93609D22044A - CHIP:DL: AUDIT: * buf2: E69C8767AD6B60907AD3633E774F38EB - CHIP:DL: AUDIT: * r1: 0x2A0E6454 r2: 0x16315893 - CHIP:DL: AUDIT: ===== RANDOM NUMBER GENERATOR AUDIT END ==== - CHIP:DL: writing settings to file (/tmp/chip_counters.ini-9yXPat) - CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) - CHIP:DL: NVS set: chip-counters/reboot-count = 23 (0x17) - CHIP:DL: Got Ethernet interface: eth0 - CHIP:DL: Found the primary Ethernet interface:eth0 - CHIP:DL: Got WiFi interface: wlan0 - CHIP:DL: Failed to reset WiFi statistic counts - CHIP:IN: UDP::Init bind&listen port=5541 - CHIP:IN: UDP::Init bound to port=5541 - CHIP:IN: UDP::Init bind&listen port=5541 - CHIP:IN: UDP::Init bound to port=5541 - CHIP:IN: TransportMgr initialized - CHIP:DIS: Init fabric pairing table with server storage - CHIP:DL: writing settings to file (/tmp/chip_counters.ini-zgCtZd) - CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) - CHIP:DL: NVS set: chip-counters/GlobalMCTR = 25000 (0x61A8) - CHIP:CTL: System State Initialized... - CHIP:DL: MDNS failed to join multicast group on veth5731933 for address type IPv4: ../th - CHIP:DL: MDNS failed to join multicast group on vethbf7bfa6 for address type IPv4: ../th - CHIP:DL: MDNS failed to join multicast group on vethcf434e5 for address type IPv4: ../th - CHIP:ZCL: Using ZAP configuration... - CHIP:DIS: Verifying the received credentials - CHIP:IN: Generating compressed fabric ID using uncompressed fabric ID 0x0000000000000000 - CHIP:IN: 0x04, 0x66, 0xd6, 0xcf, 0x4c, 0x1e, 0x11, 0xc3, - CHIP:IN: 0x52, 0x4f, 0xa6, 0x8c, 0x6e, 0x65, 0x46, 0xdc, - CHIP:IN: 0x90, 0x1b, 0x5f, 0x42, 0x9f, 0x69, 0xd1, 0xb7, - CHIP:IN: 0x7d, 0xf3, 0x6b, 0x54, 0x12, 0x6c, 0x12, 0x59, - CHIP:IN: 0x5b, 0xc3, 0x07, 0x1c, 0x5c, 0xf4, 0x4e, 0x5f, - CHIP:IN: 0x71, 0x06, 0x9a, 0xbb, 0x2f, 0xef, 0x20, 0x0d, - CHIP:IN: 0x0e, 0x9b, 0x26, 0x3e, 0x8d, 0x46, 0x09, 0xd8, - CHIP:IN: 0xfd, 0xa1, 0xc0, 0x10, 0x4f, 0x05, 0x14, 0x99, - CHIP:IN: 0x22, - CHIP:IN: Generated compressed fabric ID - CHIP:IN: 0x4a, 0x53, 0x1e, 0x52, 0x06, 0xed, 0x06, 0xda, - CHIP:DIS: Added new fabric at index: 1, Initialized: 1 - CHIP:DIS: Assigned compressed fabric ID: 0x4A531E5206ED06DA, node ID: 0x000000000001B669 - CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x4A531E5206ED06DA - CHIP:DL: CHIP task running - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - - - connectedhomeip/examples/chip-tool/out/debug$ sudo ./chip-tool pairing ethernet 112233 20202021 3840 fe80::e65f:1ff:fe0f:2753 5540 - - - - - connectedhomeip/examples/chip-tool/out/debug$ sudo ./chip-tool basic read product-name 0x000000000001B669 0 - - ,, + On TH: + sudo ./chip-all-clusters-app --wifi --discriminator 3841 + + [1653471956.966855][10713:10713] CHIP:SPT: PASE PBKDF iterations set to 1000 + [1653471956.966887][10713:10713] CHIP:SPT: LinuxCommissionableDataProvider didn't get a PASE salt, generating one. + [1653471956.972152][10713:10713] CHIP:DL: Device Configuration: + [1653471956.972270][10713:10713] CHIP:DL: Serial Number: TEST_SN + [1653471956.972315][10713:10713] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1653471956.972354][10713:10713] CHIP:DL: Product Id: 32769 (0x8001) + [1653471956.972388][10713:10713] CHIP:DL: Hardware Version: 0 + [1653471956.972413][10713:10713] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 + [1653471956.972435][10713:10713] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3841 (0xF01) + [1653471956.972464][10713:10713] CHIP:DL: Manufacturing Date: (not set) + [1653471956.972488][10713:10713] CHIP:DL: Device Type: 65535 (0xFFFF) + [1653471956.972509][10713:10713] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ==== + [1653471956.972546][10713:10713] CHIP:SVR: SetupQRCode: [MT:-24J0CEK01KA0648G00] + [1653471956.972579][10713:10713] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1653471956.972600][10713:10713] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0CEK01KA0648G00 + [1653471956.972632][10713:10713] CHIP:SVR: Manual pairing code: [34970112332] + [1653471956.972654][10713:10713] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== + [1653471956.972715][10713:10713] CHIP:SVR: SetupQRCode: [MT:-24J048N01KA0648G00] + [1653471956.972748][10713:10713] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1653471956.972769][10713:10713] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 + [1653471956.972803][10713:10713] CHIP:SVR: Manual pairing code: [749701123365521327694] + + On DUT: + ./chip-tool pairing code 1 MT:-24J0CEK01KA0648G00 + ... + [1657226543861] [30621:16744161] CHIP: [IN] SecureSession[0x6000007cc000]: Activated - Type:1 LSID:47293 + [1657226543861] [30621:16744161] CHIP: [IN] New secure session activated for device , LSID:47293 PSID:201! + [1657226543861] [30621:16744161] CHIP: [CTL] Remote device completed SPAKE2+ handshake + [1657226543861] [30621:16744161] CHIP: [CTL] Stopping commissioning discovery over DNS-SD + [1657226543861] [30621:16744161] CHIP: [TOO] Pairing Success + [1657226543861] [30621:16744161] CHIP: [TOO] PASE establishment successful + [1657226543861] [30621:16744161] CHIP: [CTL] Commissioning stage next step: 'SecurePairing' -> 'ReadCommissioningInfo' disabled: true - label: "Commissioner and Commissionee discover each other and connect via the discovery mode applicable for the DUT." verification: | - Verify on DUT: - - ./chip-tool discover commissionables - Waiting for device responses... - CHIP:CTL: Generating ICAC - CHIP:DL: AUDIT: ===== RANDOM NUMBER GENERATOR AUDIT START ==== - CHIP:DL: AUDIT: * Validate buf1 and buf2 are <<>> - CHIP:DL: AUDIT: * Validate r1 and r2 are <<>> - CHIP:DL: AUDIT: * buf1: 3BE3E264C0A0A053248E93609D22044A - CHIP:DL: AUDIT: * buf2: E69C8767AD6B60907AD3633E774F38EB - CHIP:DL: AUDIT: * r1: 0x2A0E6454 r2: 0x16315893 - CHIP:DL: AUDIT: ===== RANDOM NUMBER GENERATOR AUDIT END ==== - CHIP:DL: writing settings to file (/tmp/chip_counters.ini-9yXPat) - CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) - CHIP:DL: NVS set: chip-counters/reboot-count = 23 (0x17) - CHIP:DL: Got Ethernet interface: eth0 - CHIP:DL: Found the primary Ethernet interface:eth0 - CHIP:DL: Got WiFi interface: wlan0 - CHIP:DL: Failed to reset WiFi statistic counts - CHIP:IN: UDP::Init bind&listen port=5541 - CHIP:IN: UDP::Init bound to port=5541 - CHIP:IN: UDP::Init bind&listen port=5541 - CHIP:IN: UDP::Init bound to port=5541 - CHIP:IN: TransportMgr initialized - CHIP:DIS: Init fabric pairing table with server storage - CHIP:DL: writing settings to file (/tmp/chip_counters.ini-zgCtZd) - CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) - CHIP:DL: NVS set: chip-counters/GlobalMCTR = 25000 (0x61A8) - CHIP:CTL: System State Initialized... - CHIP:DL: MDNS failed to join multicast group on veth5731933 for address type IPv4: ../th - CHIP:DL: MDNS failed to join multicast group on vethbf7bfa6 for address type IPv4: ../th - CHIP:DL: MDNS failed to join multicast group on vethcf434e5 for address type IPv4: ../th - CHIP:ZCL: Using ZAP configuration... - CHIP:DIS: Verifying the received credentials - CHIP:IN: Generating compressed fabric ID using uncompressed fabric ID 0x0000000000000000 - CHIP:IN: 0x04, 0x66, 0xd6, 0xcf, 0x4c, 0x1e, 0x11, 0xc3, - CHIP:IN: 0x52, 0x4f, 0xa6, 0x8c, 0x6e, 0x65, 0x46, 0xdc, - CHIP:IN: 0x90, 0x1b, 0x5f, 0x42, 0x9f, 0x69, 0xd1, 0xb7, - CHIP:IN: 0x7d, 0xf3, 0x6b, 0x54, 0x12, 0x6c, 0x12, 0x59, - CHIP:IN: 0x5b, 0xc3, 0x07, 0x1c, 0x5c, 0xf4, 0x4e, 0x5f, - CHIP:IN: 0x71, 0x06, 0x9a, 0xbb, 0x2f, 0xef, 0x20, 0x0d, - CHIP:IN: 0x0e, 0x9b, 0x26, 0x3e, 0x8d, 0x46, 0x09, 0xd8, - CHIP:IN: 0xfd, 0xa1, 0xc0, 0x10, 0x4f, 0x05, 0x14, 0x99, - CHIP:IN: 0x22, - CHIP:IN: Generated compressed fabric ID - CHIP:IN: 0x4a, 0x53, 0x1e, 0x52, 0x06, 0xed, 0x06, 0xda, - CHIP:DIS: Added new fabric at index: 1, Initialized: 1 - CHIP:DIS: Assigned compressed fabric ID: 0x4A531E5206ED06DA, node ID: 0x000000000001B669 - CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x4A531E5206ED06DA - CHIP:DL: CHIP task running - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Attempt to mDNS broadcast failed: ../third_party/connectedhomeip/src/inet/UDP - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 - CHIP:DIS: Discovered Node: - CHIP:DIS: Host name: EEAABADABAD0DDCA - CHIP:DIS: Port: 5540 - CHIP:DIS: Long discriminator: 3840 - CHIP:DIS: Vendor ID: 9050 - CHIP:DIS: Product ID: 65279 - CHIP:DIS: Commissioning Mode 1 - CHIP:DIS: Device Type 0 - CHIP:DIS: Device Name - CHIP:DIS: Rotating Id 00007C5F6E176CD40F68685D100A1CF8A98B - CHIP:DIS: Pairing Instruction - CHIP:DIS: Pairing Hint 0x21 - CHIP:DIS: Address 0: 2402:e280:2108:181:dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 1: fe80::dea6:32ff:fef9:f0a1 - CHIP:DIS: Address 2: 192.168.1.12 + On DUT: + ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 + ... + [1657226543861] [30621:16744161] CHIP: [IN] SecureSession[0x6000007cc000]: Activated - Type:1 LSID:47293 + [1657226543861] [30621:16744161] CHIP: [IN] New secure session activated for device , LSID:47293 PSID:201! + [1657226543861] [30621:16744161] CHIP: [CTL] Remote device completed SPAKE2+ handshake + [1657226543861] [30621:16744161] CHIP: [CTL] Stopping commissioning discovery over DNS-SD + [1657226543861] [30621:16744161] CHIP: [TOO] Pairing Success + [1657226543861] [30621:16744161] CHIP: [TOO] PASE establishment successful + [1657226543861] [30621:16744161] CHIP: [CTL] Commissioning stage next step: 'SecurePairing' -> 'ReadCommissioningInfo' + + + On TH: + $ ./out/all-clusters-app/chip-all-clusters-app + ... + [1657226543.948995][369114:369114] CHIP:IN: SecureSession[0xaaaab60788e0]: Activated - Type:1 LSID:201 + [1657226543.949023][369114:369114] CHIP:IN: New secure session created for device , LSID:201 PSID:47293! + [1657226543.949048][369114:369114] CHIP:SVR: Commissioning completed session establishment step disabled: true - label: @@ -558,7 +302,14 @@ tests: Commissionee." PICS: MCORE.DD.WIRELESS verification: | - Need test step review, potentially not a hard requirement so would not be required in test case + Verify on DUT Log: + + Performing next commissioning step 'ConfigRegulatory' + [1653471968.202645][30157:30162] CHIP:CTL: Setting Regulatory Config + [1653471968.202666][30157:30162] CHIP:CTL: No regulatory config supplied by controller, leaving as device default (0) + + Verify on TH: + NVS set: chip-config/regulatory-location = 0 (0x0) disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_8.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_8.yaml index 1e0500759afca0..77b93736de59bc 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_8.yaml @@ -27,7 +27,7 @@ tests: "Commissioner has regulatory and fabric information available and has accurate date, time and timezone" verification: | - + 1. Manually verify that the time, date and timezone is accurate for the DUT Commissioner disabled: true - label: @@ -39,7 +39,6 @@ tests: On DUT: start commissioning process(need to obtain the Thread dataset first) ./chip-tool pairing ble-thread 1 hex:0e080000000000010000000300000f35060004001fffe0020811111111222222220708fd27e57b1b1e22d9051000112233445566778899aabbccddeeff030e4f70656e54687265616444656d6f01021234041061e1206d2c2b46e079eb775f41fc72190c0402a0fff8 20202021 3840 - ,, disabled: true - label: @@ -63,8 +62,14 @@ tests: Commissionee." PICS: MCORE.DD.WIRELESS verification: | - On DUT: - CHIP:CTL: Setting Regulatory Config + Verify on DUT Log: + + Performing next commissioning step 'ConfigRegulatory' + [1653471968.202645][30157:30162] CHIP:CTL: Setting Regulatory Config + [1653471968.202666][30157:30162] CHIP:CTL: No regulatory config supplied by controller, leaving as device default (0) + + Verify on TH: + NVS set: chip-config/regulatory-location = 0 (0x0) disabled: true - label: @@ -380,7 +385,14 @@ tests: Commissionee." PICS: MCORE.DD.WIRELESS verification: | - Need test step review, potentially not a hard requirement so would not be required in test case + Verify on DUT Log: + + Performing next commissioning step 'ConfigRegulatory' + [1653471968.202645][30157:30162] CHIP:CTL: Setting Regulatory Config + [1653471968.202666][30157:30162] CHIP:CTL: No regulatory config supplied by controller, leaving as device default (0) + + Verify on TH: + NVS set: chip-config/regulatory-location = 0 (0x0) disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_9.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_9.yaml index 2028db0de9b25c..f8d1c497fbe84b 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_9.yaml @@ -25,15 +25,15 @@ tests: - label: "TH receives Onboarding Payload from the DUT" verification: | 1. Parse the DUT's QR Code using the TH commissioner: chip-tool - $ ./out/chip-tool/chip-tool payload parse-setup-payload MT:-24J029Q00KA0648G00 - [1651077458589] [91233:65331701] CHIP: [SPL] Parsing base38Representation: MT:-24J029Q00KA0648G00 - [1651077458590] [91233:65331701] CHIP: [SPL] CommissioningFlow: 2 - [1651077458590] [91233:65331701] CHIP: [SPL] VendorID: 65521 - [1651077458590] [91233:65331701] CHIP: [SPL] Version: 0 - [1651077458590] [91233:65331701] CHIP: [SPL] ProductID: 32769 - [1651077458590] [91233:65331701] CHIP: [SPL] Discriminator: 3840 - [1651077458590] [91233:65331701] CHIP: [SPL] SetUpPINCode: 20202021 - [1651077458590] [91233:65331701] CHIP: [SPL] RendezvousInformation: 4 + $ ./chip-tool payload parse-setup-payload MT:-24J029Q00KA0648G00 + [1657230447725] [31078:16782733] CHIP: [SPL] Parsing base38Representation: MT:-24J029Q00KA0648G00 + [1657230447725] [31078:16782733] CHIP: [SPL] Version: 0 + [1657230447725] [31078:16782733] CHIP: [SPL] VendorID: 65521 + [1657230447725] [31078:16782733] CHIP: [SPL] ProductID: 32769 + [1657230447725] [31078:16782733] CHIP: [SPL] Custom flow: 2 (CUSTOM) + [1657230447725] [31078:16782733] CHIP: [SPL] Capabilities: 0x04 (On IP network) + [1657230447725] [31078:16782733] CHIP: [SPL] Discriminator: 3840 + [1657230447725] [31078:16782733] CHIP: [SPL] Passcode: 20202021 2. Verify that the CommissioningFlow is set to 2 (Custom Flow) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml index de618503146889..1b76ec8d242429 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 @@ -35,7 +35,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -43,7 +43,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" 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 6751b292a96e2b..a3d2b4280a4391 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 @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 81.2. [TC-DESC-2.1] Descriptor Cluster Attributes with DUT as Server +name: 84.2.1. [TC-DESC-2.1] Descriptor Cluster Attributes [DUT-Server] config: nodeId: 0x12344321 @@ -21,10 +21,15 @@ config: endpoint: 0 tests: - - label: "TH reads DeviceTypeList attribute from DUT." + - label: + "TH reads DeviceTypeList and PartsList attributes from DUT for + Endpoint 0" + PICS: DESC.S.A0000 && DESC.S.A0004 && DESC.S.A0003 verification: | ./chip-tool descriptor read device-list 1 0 + Verify on the TH Log: + [1641454498.809603][16120:16125] CHIP:TOO: Descriptor.DeviceList response: 1 entries [1641454498.809737][16120:16125] CHIP:TOO: [1]: { [1641454498.809780][16120:16125] CHIP:TOO: Type: 22 @@ -33,51 +38,79 @@ tests: [1641454498.809938][16120:16125] CHIP:EM: Sending Standalone Ack for MessageCounter:52943 on exchange 24061i disabled: true - - label: "TH reads 'ServerList' attribute. Refer to Precondition " + - label: + "TH reads DeviceTypeList and PartsList attributes from DUT for each + Endpoint supported by DUT (except Endpoint 0)." + PICS: DESC.S.A0000 && DESC.S.A0004 && DESC.S.A0003 + verification: | + ./chip-tool descriptor read device-list 1 1 + + Verify on the TH Log: + + + [1657200303.724408][2509:2514] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1624758542 + [1657200303.724508][2509:2514] CHIP:TOO: device list: 1 entries + [1657200303.724565][2509:2514] CHIP:TOO: [1]: { + [1657200303.724594][2509:2514] CHIP:TOO: Type: 256 + [1657200303.724621][2509:2514] CHIP:TOO: Revision: 1 + [1657200303.724647][2509:2514] CHIP:TOO: } + disabled: true + + - label: 'TH reads "ServerList" attribute.' + PICS: DESC.S.A0001 verification: | ./chip-tool descriptor read server-list 1 0 - [1650281763.417848][9672:9678] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1976976904 - [1650281763.417958][9672:9678] CHIP:TOO: server list: 25 entries - [1650281763.418002][9672:9678] CHIP:TOO: [1]: 3 - [1650281763.418028][9672:9678] CHIP:TOO: [2]: 4 - [1650281763.418053][9672:9678] CHIP:TOO: [3]: 29 - [1650281763.418077][9672:9678] CHIP:TOO: [4]: 30 - [1650281763.418101][9672:9678] CHIP:TOO: [5]: 31 - [1650281763.418125][9672:9678] CHIP:TOO: [6]: 40 - [1650281763.418149][9672:9678] CHIP:TOO: [7]: 42 - [1650281763.418173][9672:9678] CHIP:TOO: [8]: 43 - [1650281763.418197][9672:9678] CHIP:TOO: [9]: 44 - [1650281763.418218][9672:9678] CHIP:TOO: [10]: 45 - [1650281763.418238][9672:9678] CHIP:TOO: [11]: 46 - [1650281763.418257][9672:9678] CHIP:TOO: [12]: 48 - [1650281763.418277][9672:9678] CHIP:TOO: [13]: 49 - [1650281763.418297][9672:9678] CHIP:TOO: [14]: 50 - [1650281763.418316][9672:9678] CHIP:TOO: [15]: 51 - [1650281763.418336][9672:9678] CHIP:TOO: [16]: 52 - [1650281763.418356][9672:9678] CHIP:TOO: [17]: 53 - [1650281763.418382][9672:9678] CHIP:TOO: [18]: 54 - [1650281763.418406][9672:9678] CHIP:TOO: [19]: 55 - [1650281763.418430][9672:9678] CHIP:TOO: [20]: 60 - [1650281763.418454][9672:9678] CHIP:TOO: [21]: 62 - [1650281763.418478][9672:9678] CHIP:TOO: [22]: 63 - [1650281763.418502][9672:9678] CHIP:TOO: [23]: 64 - [1650281763.418526][9672:9678] CHIP:TOO: [24]: 65 - [1650281763.418550][9672:9678] CHIP:TOO: [25]: 1029 + Verify on the TH Log: + + [1654155402.956829][3701:3706] CHIP:TOO: server list: 26 entries + [1654155402.956863][3701:3706] CHIP:TOO: [1]: 3 + [1654155402.956889][3701:3706] CHIP:TOO: [2]: 4 + [1654155402.956914][3701:3706] CHIP:TOO: [3]: 29 + [1654155402.956939][3701:3706] CHIP:TOO: [4]: 30 + [1654155402.956963][3701:3706] CHIP:TOO: [5]: 31 + [1654155402.956988][3701:3706] CHIP:TOO: [6]: 40 + [1654155402.957012][3701:3706] CHIP:TOO: [7]: 42 + [1654155402.957037][3701:3706] CHIP:TOO: [8]: 43 + [1654155402.957061][3701:3706] CHIP:TOO: [9]: 44 + [1654155402.957086][3701:3706] CHIP:TOO: [10]: 45 + [1654155402.957110][3701:3706] CHIP:TOO: [11]: 46 + [1654155402.957135][3701:3706] CHIP:TOO: [12]: 47 + [1654155402.957159][3701:3706] CHIP:TOO: [13]: 48 + [1654155402.957183][3701:3706] CHIP:TOO: [14]: 49 + [1654155402.957207][3701:3706] CHIP:TOO: [15]: 50 + [1654155402.957231][3701:3706] CHIP:TOO: [16]: 51 + [1654155402.957256][3701:3706] CHIP:TOO: [17]: 52 + [1654155402.957280][3701:3706] CHIP:TOO: [18]: 53 + [1654155402.957304][3701:3706] CHIP:TOO: [19]: 54 + [1654155402.957328][3701:3706] CHIP:TOO: [20]: 55 + [1654155402.957352][3701:3706] CHIP:TOO: [21]: 60 + [1654155402.957376][3701:3706] CHIP:TOO: [22]: 62 + [1654155402.957400][3701:3706] CHIP:TOO: [23]: 63 + [1654155402.957424][3701:3706] CHIP:TOO: [24]: 64 + [1654155402.957449][3701:3706] CHIP:TOO: [25]: 65 + [1654155402.957473][3701:3706] CHIP:TOO: [26]: 1029 disabled: true - - label: "TH reads 'ClientList' attribute" + - label: 'TH reads "ClientList" attribute' + PICS: DESC.S.A0002 verification: | ./chip-tool descriptor read client-list 1 0 + + Verify on the TH Log: + [1650281818.533446][9679:9684] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 1976976904 [1650281818.533514][9679:9684] CHIP:TOO: client list: 1 entries [1650281818.533563][9679:9684] CHIP:TOO: [1]: 41 disabled: true - - label: "TH reads 'PartsList' attribute." + - label: 'TH reads "PartsList" attribute.' + PICS: DESC.S.A0003 verification: | ./chip-tool descriptor read parts-list 1 0 + Verify on the TH Log: + [1641456769.777217][16238:16244] CHIP:DMG: SuppressResponse = true, [1641456769.777267][16238:16244] CHIP:DMG: } [1641456769.777839][16238:16244] CHIP:TOO: Descriptor.PartsList response: 2 entries @@ -85,3 +118,11 @@ tests: [1641456769.777978][16238:16244] CHIP:TOO: [2]: 2 [1641456769.778080][16238:16244] CHIP:EM: Sending Standalone Ack for MessageCounter:2830202 on exchange 38042i disabled: true + + - label: + "The cluster tests applicable to each Device Type should be executed + to make sure all mandatory (and applicable optional) + attributes/commands are implemented." + verification: | + + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DESC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DESC_2_2.yaml index 8850b14bd322d5..d8ac172d6fde78 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_2_2.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 81.3. [TC-DESC-2.2] Descriptor Cluster Attributes with DUT as Client +name: 84.2.2. [TC-DESC-2.2] Descriptor Cluster Attributes [DUT-Client] config: nodeId: 0x12344321 @@ -22,95 +22,89 @@ config: tests: - label: "DUT reads DeviceTypeList from TH." + PICS: DESC.C.A0000 verification: | ./chip-tool descriptor read device-list 1 0 - [1651220525.982478][11001:11001] CHIP:EM: Handling via exchange: 13340r, Delegate: 0xaaaaacdc5098 - [1651220525.982545][11001:11001] CHIP:IM: Received Read request - [1651220525.982624][11001:11001] CHIP:DMG: ReadRequestMessage = - [1651220525.982667][11001:11001] CHIP:DMG: { - [1651220525.982703][11001:11001] CHIP:DMG: AttributePathIBs = - [1651220525.982745][11001:11001] CHIP:DMG: [ - [1651220525.982784][11001:11001] CHIP:DMG: AttributePathIB = - [1651220525.982840][11001:11001] CHIP:DMG: { - [1651220525.982892][11001:11001] CHIP:DMG: Endpoint = 0x0, - [1651220525.982948][11001:11001] CHIP:DMG: Cluster = 0x1d, - [1651220525.983005][11001:11001] CHIP:DMG: Attribute = 0x0000_0000, - [1651220525.983054][11001:11001] CHIP:DMG: } - [1651220525.983104][11001:11001] CHIP:DMG: - [1651220525.983149][11001:11001] CHIP:DMG: ], - [1651220525.983195][11001:11001] CHIP:DMG: - [1651220525.983238][11001:11001] CHIP:DMG: isFabricFiltered = true, - [1651220525.983279][11001:11001] CHIP:DMG: InteractionModelRevision = 1 - [1651220525.983318][11001:11001] CHIP:DMG: }, + verify TH(On a reference app) receives the right Read Request Message for the data sent in the above command + + Verify in DUT as client side: + + [1657095358.858070][3443:3448] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2880250959 + [1657095358.858130][3443:3448] CHIP:TOO: device list: 1 entries + [1657095358.858213][3443:3448] CHIP:TOO: [1]: { + [1657095358.858255][3443:3448] CHIP:TOO: Type: 22 + [1657095358.858283][3443:3448] CHIP:TOO: Revision: 1 + [1657095358.858310][3443:3448] CHIP:TOO: } disabled: true - label: "DUT reads ServerList from the TH" + PICS: DESC.C.A0001 verification: | ./chip-tool descriptor read server-list 1 0 - [1651220576.025574][11001:11001] CHIP:IM: Received Read request - [1651220576.025629][11001:11001] CHIP:DMG: ReadRequestMessage = - [1651220576.025655][11001:11001] CHIP:DMG: { - [1651220576.025677][11001:11001] CHIP:DMG: AttributePathIBs = - [1651220576.025703][11001:11001] CHIP:DMG: [ - [1651220576.025728][11001:11001] CHIP:DMG: AttributePathIB = - [1651220576.025763][11001:11001] CHIP:DMG: { - [1651220576.025792][11001:11001] CHIP:DMG: Endpoint = 0x0, - [1651220576.025823][11001:11001] CHIP:DMG: Cluster = 0x1d, - [1651220576.025856][11001:11001] CHIP:DMG: Attribute = 0x0000_0001, - [1651220576.025882][11001:11001] CHIP:DMG: } - [1651220576.025910][11001:11001] CHIP:DMG: - [1651220576.025936][11001:11001] CHIP:DMG: ], - [1651220576.025964][11001:11001] CHIP:DMG: - [1651220576.025990][11001:11001] CHIP:DMG: isFabricFiltered = true, - [1651220576.026015][11001:11001] CHIP:DMG: InteractionModelRevision = 1 - [1651220576.026039][11001:11001] CHIP:DMG: }, + verify TH(On a reference app) receives the right Read Request Message for the data sent in the above command + + Verify in DUT as client side: + + + [1657095388.496869][3451:3456] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 2880250959 + [1657095388.496964][3451:3456] CHIP:TOO: server list: 26 entries + [1657095388.496996][3451:3456] CHIP:TOO: [1]: 3 + [1657095388.497023][3451:3456] CHIP:TOO: [2]: 4 + [1657095388.497049][3451:3456] CHIP:TOO: [3]: 29 + [1657095388.497074][3451:3456] CHIP:TOO: [4]: 30 + [1657095388.497098][3451:3456] CHIP:TOO: [5]: 31 + [1657095388.497123][3451:3456] CHIP:TOO: [6]: 40 + [1657095388.497147][3451:3456] CHIP:TOO: [7]: 42 + [1657095388.497172][3451:3456] CHIP:TOO: [8]: 43 + [1657095388.497197][3451:3456] CHIP:TOO: [9]: 44 + [1657095388.497221][3451:3456] CHIP:TOO: [10]: 45 + [1657095388.497246][3451:3456] CHIP:TOO: [11]: 46 + [1657095388.497271][3451:3456] CHIP:TOO: [12]: 47 + [1657095388.497295][3451:3456] CHIP:TOO: [13]: 48 + [1657095388.497320][3451:3456] CHIP:TOO: [14]: 49 + [1657095388.497344][3451:3456] CHIP:TOO: [15]: 50 + [1657095388.497369][3451:3456] CHIP:TOO: [16]: 51 + [1657095388.497394][3451:3456] CHIP:TOO: [17]: 52 + [1657095388.497418][3451:3456] CHIP:TOO: [18]: 53 + [1657095388.497443][3451:3456] CHIP:TOO: [19]: 54 + [1657095388.497468][3451:3456] CHIP:TOO: [20]: 55 + [1657095388.497493][3451:3456] CHIP:TOO: [21]: 60 + [1657095388.497517][3451:3456] CHIP:TOO: [22]: 62 + [1657095388.497542][3451:3456] CHIP:TOO: [23]: 63 + [1657095388.497567][3451:3456] CHIP:TOO: [24]: 64 + [1657095388.497591][3451:3456] CHIP:TOO: [25]: 65 + [1657095388.497616][3451:3456] CHIP:TOO: [26]: 1029 disabled: true - label: "DUT reads ClientList from the TH" + PICS: DESC.C.A0002 verification: | ./chip-tool descriptor read client-list 1 0 - [1651220639.440188][11001:11001] CHIP:IM: Received Read request - [1651220639.440259][11001:11001] CHIP:DMG: ReadRequestMessage = - [1651220639.440298][11001:11001] CHIP:DMG: { - [1651220639.440330][11001:11001] CHIP:DMG: AttributePathIBs = - [1651220639.440367][11001:11001] CHIP:DMG: [ - [1651220639.440402][11001:11001] CHIP:DMG: AttributePathIB = - [1651220639.440447][11001:11001] CHIP:DMG: { - [1651220639.440491][11001:11001] CHIP:DMG: Endpoint = 0x0, - [1651220639.440539][11001:11001] CHIP:DMG: Cluster = 0x1d, - [1651220639.440589][11001:11001] CHIP:DMG: Attribute = 0x0000_0002, - [1651220639.440634][11001:11001] CHIP:DMG: } - [1651220639.440675][11001:11001] CHIP:DMG: - [1651220639.440715][11001:11001] CHIP:DMG: ], - [1651220639.440756][11001:11001] CHIP:DMG: - [1651220639.440794][11001:11001] CHIP:DMG: isFabricFiltered = true, - [1651220639.440830][11001:11001] CHIP:DMG: InteractionModelRevision = 1 - [1651220639.440864][11001:11001] CHIP:DMG: }, + verify TH(On a reference app) receives the right Read Request Message for the data sent in the above command + + Verify in DUT as client side: + + + [1657095415.492647][3459:3464] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 2880250959 + [1657095415.492717][3459:3464] CHIP:TOO: client list: 1 entries + [1657095415.492749][3459:3464] CHIP:TOO: [1]: 41 disabled: true - label: "DUT reads PartsList from the TH" + PICS: DESC.C.A0003 verification: | ./chip-tool descriptor read parts-list 1 0 - [1651220678.308560][11001:11001] CHIP:EM: Handling via exchange: 30507r, Delegate: 0xaaaaacdc5098 - [1651220678.308658][11001:11001] CHIP:IM: Received Read request - [1651220678.308766][11001:11001] CHIP:DMG: ReadRequestMessage = - [1651220678.308828][11001:11001] CHIP:DMG: { - [1651220678.308882][11001:11001] CHIP:DMG: AttributePathIBs = - [1651220678.308945][11001:11001] CHIP:DMG: [ - [1651220678.309053][11001:11001] CHIP:DMG: AttributePathIB = - [1651220678.309137][11001:11001] CHIP:DMG: { - [1651220678.309210][11001:11001] CHIP:DMG: Endpoint = 0x0, - [1651220678.309284][11001:11001] CHIP:DMG: Cluster = 0x1d, - [1651220678.309355][11001:11001] CHIP:DMG: Attribute = 0x0000_0003, - [1651220678.309422][11001:11001] CHIP:DMG: } - [1651220678.309485][11001:11001] CHIP:DMG: - [1651220678.309558][11001:11001] CHIP:DMG: ], - [1651220678.309629][11001:11001] CHIP:DMG: - [1651220678.309693][11001:11001] CHIP:DMG: isFabricFiltered = true, - [1651220678.309755][11001:11001] CHIP:DMG: InteractionModelRevision = 1 - [1651220678.309810][11001:11001] CHIP:DMG: }, + verify TH(On a reference app) receives the right Read Request Message for the data sent in the above command + + Verify in DUT as client side: + + + [1657095439.967554][3470:3475] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2880250959 + [1657095439.967633][3470:3475] CHIP:TOO: parts list: 2 entries + [1657095439.967668][3470:3475] CHIP:TOO: [1]: 1 + [1657095439.967697][3470:3475] CHIP:TOO: [2]: 2 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGETH_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGETH_2_1.yaml index a94faa0ebda955..8b6243027a7699 100644 --- a/src/app/tests/suites/certification/Test_TC_DGETH_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGETH_2_1.yaml @@ -44,7 +44,7 @@ tests: attribute: "FullDuplex" response: constraints: - type: bool + type: boolean #issue #13648 - label: "Read PacketRxCount attribute constraints" @@ -53,7 +53,7 @@ tests: attribute: "PacketRxCount" response: constraints: - type: uint64 + type: int64u - label: "Read PacketRxCount value from DUT and verify the number of packets @@ -80,7 +80,7 @@ tests: attribute: "PacketTxCount" response: constraints: - type: uint64 + type: int64u - label: "Read PacketTxCount value from DUT and verify the number of packets @@ -107,7 +107,7 @@ tests: attribute: "TxErrCount" response: constraints: - type: uint64 + type: int64u - label: "Read TxErrCount value from DUT and verify value indicates the number @@ -134,7 +134,7 @@ tests: attribute: "CollisionCount" response: constraints: - type: uint64 + type: int64u - label: "Read CollisionCount value from DUT and verify value indicates the @@ -162,7 +162,7 @@ tests: attribute: "OverrunCount" response: constraints: - type: uint64 + type: int64u - label: "Read OverrunCount value from DUT and verify value indicates the @@ -189,7 +189,7 @@ tests: attribute: "CarrierDetect" response: constraints: - type: bool + type: boolean - label: "Read CarrierDetect value from DUT and verify value indicates the @@ -217,7 +217,7 @@ tests: attribute: "TimeSinceReset" response: constraints: - type: uint64 + type: int64u - label: "Read TimeSinceReset value from DUT and verify the value indicates the diff --git a/src/app/tests/suites/certification/Test_TC_DGETH_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DGETH_2_2.yaml index 87662dcb4c5717..94dcdb1ed6e524 100644 --- a/src/app/tests/suites/certification/Test_TC_DGETH_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGETH_2_2.yaml @@ -28,42 +28,182 @@ tests: - name: "nodeId" value: nodeId + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PacketRxCount attribute value from DUT" + PICS: DGETH.S.A0002 + command: "readAttribute" + attribute: "PacketRxCount" + response: + saveAs: PacketRxCount + + - label: "TH reads PacketTxCount attribute value from DUT" + PICS: DGETH.S.A0003 + command: "readAttribute" + attribute: "PacketTxCount" + response: + saveAs: PacketTxCount + + - label: "TH reads TxErrCount attribute value from DUT" + PICS: DGETH.S.A0004 + command: "readAttribute" + attribute: "TxErrCount" + response: + saveAs: TxErrCount + + - label: "TH reads CollisionCount attribute value from DUT" + PICS: DGETH.S.A0005 + command: "readAttribute" + attribute: "CollisionCount" + response: + saveAs: CollisionCount + + - label: "TH reads OverrunCount attribute value from DUT" + PICS: DGETH.S.A0006 + command: "readAttribute" + attribute: "OverrunCount" + response: + saveAs: OverrunCount + #issue #13648 - label: "Sends ResetCounts command" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.C00.Rsp + PICS: DGETH.S.C00.Rsp command: "ResetCounts" - - label: "Read the PacketRxCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0002 + - label: "TH reads PacketRxCount attribute value from DUT" + PICS: DGETH.S.A0002 command: "readAttribute" attribute: "PacketRxCount" response: - value: 0 + constraints: + maxValue: PacketRxCount - - label: "Read the PacketTxCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0003 + - label: "TH reads PacketTxCount attribute value from DUT" + PICS: DGETH.S.A0003 command: "readAttribute" attribute: "PacketTxCount" response: - value: 0 + constraints: + maxValue: PacketTxCount - - label: "Read the TxErrCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0004 + - label: "TH reads TxErrCount attribute value from DUT" + PICS: DGETH.S.A0004 command: "readAttribute" attribute: "TxErrCount" response: - value: 0 + constraints: + maxValue: TxErrCount - - label: "Read the CollisionCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0005 + - label: "TH reads CollisionCount attribute value from DUT" + PICS: DGETH.S.A0005 command: "readAttribute" attribute: "CollisionCount" response: - value: 0 + constraints: + maxValue: CollisionCount - - label: "Read the OverrunCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0006 + - label: "TH reads OverrunCount attribute value from DUT" + PICS: DGETH.S.A0006 command: "readAttribute" attribute: "OverrunCount" response: - value: 0 + constraints: + maxValue: OverrunCount 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 d27e6f29454356..290189a2deb587 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 @@ -35,7 +35,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -43,7 +43,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" 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 968cccaffe22ca..478959957c5b08 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 @@ -43,7 +43,7 @@ tests: attribute: "RebootCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -99,7 +99,7 @@ tests: attribute: "UpTime" response: constraints: - type: uint64 + type: int64u - label: "TH reads a TotalOperationalHours attribute value from DUT." PICS: DGGEN.S.A0003 @@ -107,7 +107,7 @@ tests: attribute: "TotalOperationalHours" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFE diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_2_1.yaml index 9eacb0943f6fa3..6b68769f96fb79 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_2_1.yaml @@ -44,7 +44,7 @@ tests: PICS: DGSW.S.A0001 response: constraints: - type: uint64 + type: int64u - label: "Reads CurrentHeapUsed non-global attribute value from DUT" command: "readAttribute" @@ -52,7 +52,7 @@ tests: PICS: DGSW.S.A0002 response: constraints: - type: uint64 + type: int64u - label: "Reads CurrentHeapHighWaterMark non-global attribute value from DUT" @@ -61,4 +61,4 @@ tests: PICS: DGSW.S.A0003 response: constraints: - type: uint64 + type: int64u diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_2_2.yaml index 243aad00e637fc..8d4778dbc2192b 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_2_2.yaml @@ -51,7 +51,7 @@ tests: [1649682271.390714][9722:9727] CHIP:EM: Sending Standalone Ack for MessageCounter:4574884 on exchange 14495i cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && DGSW.S.E00 arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml index b0d2902ff36b70..0c6fb332e0f795 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml @@ -47,7 +47,7 @@ tests: PICS: DGSW.S.A0002 response: constraints: - type: uint64 + type: int64u #issue #830 - label: "Reads CurrentHeapHighWaterMark attribute value from DUT" @@ -56,4 +56,4 @@ tests: PICS: DGSW.S.A0003 response: constraints: - type: uint64 + type: int64u diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml index 3f8eb5a01cb48c..cf675507724109 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "channel" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -44,7 +44,7 @@ tests: attribute: "RoutingRole" response: constraints: - type: RoutingRole + type: enum8 minValue: 0 maxValue: 6 @@ -56,7 +56,7 @@ tests: attribute: "NetworkName" response: constraints: - type: string + type: char_string - label: "Read NetworkName attribute from DUT and verify response value, If @@ -90,7 +90,7 @@ tests: attribute: "PanId" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -125,7 +125,7 @@ tests: attribute: "ExtendedPanId" response: constraints: - type: uint64 + type: int64u - label: "Read ExtendedPanId attribute from DUT and verify response value, If @@ -180,7 +180,7 @@ tests: attribute: "OverrunCount" response: constraints: - type: uint64 + type: int64u - label: "read OverrunCount attribute from DUT and verify response value, If @@ -271,7 +271,7 @@ tests: attribute: "PartitionId" response: constraints: - type: uint32 + type: int32u - label: "TH reads Weighting attribute value from DUT" PICS: DGTHREAD.S.A000a @@ -279,7 +279,7 @@ tests: attribute: "weighting" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -289,7 +289,7 @@ tests: attribute: "DataVersion" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -299,7 +299,7 @@ tests: attribute: "StableDataVersion" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -309,7 +309,7 @@ tests: attribute: "LeaderRouterId" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -319,7 +319,7 @@ tests: attribute: "DetachedRoleCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -329,7 +329,7 @@ tests: attribute: "ChildRoleCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -339,7 +339,7 @@ tests: attribute: "RouterRoleCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -349,7 +349,7 @@ tests: attribute: "LeaderRoleCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -359,7 +359,7 @@ tests: attribute: "AttachAttemptCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -369,7 +369,7 @@ tests: attribute: "PartitionIdChangeCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -380,7 +380,7 @@ tests: attribute: "BetterPartitionAttachAttemptCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -390,7 +390,7 @@ tests: attribute: "ParentChangeCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -400,7 +400,7 @@ tests: attribute: "ActiveTimestamp" response: constraints: - type: uint64 + type: int64u - label: "TH reads PendingTimestamp attribute value from DUT" PICS: DGTHREAD.S.A0039 @@ -408,7 +408,7 @@ tests: attribute: "PendingTimestamp" response: constraints: - type: uint64 + type: int64u - label: "TH reads Delay attribute value from DUT" PICS: DGTHREAD.S.A003a @@ -416,7 +416,9 @@ tests: attribute: "delay" response: constraints: - type: uint32 + type: int32u + minValue: 0x0 + maxValue: 0xFFFFFFFF #issue #14097 - label: @@ -450,7 +452,7 @@ tests: attribute: "ChannelMask" response: constraints: - type: octstr + type: octet_string #issue #14097 - label: diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_2.yaml index 6e2836a4a23a69..b2271fe4109bda 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_2.yaml @@ -34,7 +34,7 @@ tests: attribute: "TxTotalCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -44,7 +44,7 @@ tests: attribute: "TxUnicastCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -54,7 +54,7 @@ tests: attribute: "TxBroadcastCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -64,7 +64,7 @@ tests: attribute: "TxAckRequestedCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -74,7 +74,7 @@ tests: attribute: "TxAckedCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -84,7 +84,7 @@ tests: attribute: "TxNoAckRequestedCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -94,7 +94,7 @@ tests: attribute: "TxDataCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -104,7 +104,7 @@ tests: attribute: "TxDataPollCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -114,7 +114,7 @@ tests: attribute: "TxBeaconCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -124,7 +124,7 @@ tests: attribute: "TxBeaconRequestCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -134,7 +134,7 @@ tests: attribute: "TxOtherCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -144,7 +144,7 @@ tests: attribute: "TxRetryCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -154,7 +154,7 @@ tests: attribute: "TxDirectMaxRetryExpiryCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -164,7 +164,7 @@ tests: attribute: "TxIndirectMaxRetryExpiryCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -174,7 +174,7 @@ tests: attribute: "TxErrCcaCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -184,7 +184,7 @@ tests: attribute: "TxErrAbortCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -194,6 +194,6 @@ tests: attribute: "TxErrBusyChannelCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_3.yaml index 670d8413c70862..b0d995e9aee70b 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_3.yaml @@ -34,7 +34,7 @@ tests: attribute: "RxTotalCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -44,7 +44,7 @@ tests: attribute: "RxUnicastCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -54,7 +54,7 @@ tests: attribute: "RxBroadcastCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -64,7 +64,7 @@ tests: attribute: "RxDataCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -74,7 +74,7 @@ tests: attribute: "RxDataPollCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -84,7 +84,7 @@ tests: attribute: "RxBeaconCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -94,7 +94,7 @@ tests: attribute: "RxBeaconRequestCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -104,7 +104,7 @@ tests: attribute: "RxOtherCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -114,7 +114,7 @@ tests: attribute: "RxAddressFilteredCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -124,7 +124,7 @@ tests: attribute: "RxDestAddrFilteredCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -134,7 +134,7 @@ tests: attribute: "RxDuplicatedCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -144,7 +144,7 @@ tests: attribute: "RxErrNoFrameCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -154,7 +154,7 @@ tests: attribute: "RxErrUnknownNeighborCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -186,7 +186,7 @@ tests: attribute: "RxErrSecCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -196,7 +196,7 @@ tests: attribute: "RxErrFcsCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -206,6 +206,6 @@ tests: attribute: "RxErrOtherCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_2_1.yaml index b395fbb0fc5202..f6a0ab3ad1b014 100644 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_2_1.yaml @@ -28,14 +28,13 @@ tests: - name: "nodeId" value: nodeId - - label: "Reads NetworkInterface structure attribute from DUT" + - label: "TH reads BSSID attribute from DUT" PICS: DGWIFI.S.A0000 - cluster: "General Diagnostics" command: "readAttribute" - attribute: "NetworkInterfaces" + attribute: "BSSID" response: constraints: - type: list + type: octet_string #issue #13645 - label: "Reads SecurityType attribute constraints" @@ -44,7 +43,7 @@ tests: attribute: "SecurityType" response: constraints: - type: enum + type: enum8 - label: "Reads WiFiVersion attribute constraints" PICS: DGWIFI.S.A0002 @@ -52,7 +51,7 @@ tests: attribute: "WiFiVersion" response: constraints: - type: enum + type: enum8 minValue: 0 maxValue: 5 @@ -62,7 +61,7 @@ tests: attribute: "ChannelNumber" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -72,7 +71,7 @@ tests: attribute: "RSSI" response: constraints: - type: int8 + type: int8s minValue: -120 maxValue: 0 @@ -82,7 +81,7 @@ tests: attribute: "BeaconLostCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -92,7 +91,7 @@ tests: attribute: "BeaconRxCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -102,7 +101,7 @@ tests: attribute: "PacketMulticastRxCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -112,7 +111,7 @@ tests: attribute: "PacketMulticastTxCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -122,7 +121,7 @@ tests: attribute: "PacketUnicastRxCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -132,7 +131,7 @@ tests: attribute: "PacketUnicastTxCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -142,7 +141,7 @@ tests: attribute: "CurrentMaxRate" response: constraints: - type: uint64 + type: int64u - label: "Reads OverrunCount attribute constraints" PICS: PICS_SKIP_SAMPLE_APP && DGWIFI.S.A000c @@ -150,4 +149,4 @@ tests: attribute: "OverrunCount" response: constraints: - type: uint64 + type: int64u diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_2_3.yaml index aef885fe6add0a..71dc3d4f640376 100644 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_2_3.yaml @@ -40,39 +40,57 @@ tests: command: "readAttribute" attribute: "BeaconLostCount" response: - value: 0 + constraints: + type: int32u + minValue: 0 + maxValue: 4294967295 - label: "Reads BeaconRxCount attribute from DUT" PICS: PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp command: "readAttribute" attribute: "BeaconRxCount" response: - value: 0 + constraints: + type: int32u + minValue: 0 + maxValue: 4294967295 - label: "Reads PacketMulticastRxCount attribute from DUT" PICS: PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp command: "readAttribute" attribute: "PacketMulticastRxCount" response: - value: 0 + constraints: + type: int32u + minValue: 0 + maxValue: 4294967295 - label: "Reads PacketMulticastTxCount attribute from DUT" PICS: PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp command: "readAttribute" attribute: "PacketMulticastTxCount" response: - value: 0 + constraints: + type: int32u + minValue: 0 + maxValue: 4294967295 - label: "Reads PacketUnicastRxCount attribute from DUT" PICS: PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp command: "readAttribute" attribute: "PacketUnicastRxCount" response: - value: 0 + constraints: + type: int32u + minValue: 0 + maxValue: 4294967295 - label: "Reads PacketUnicastTxCount attribute from DUT" PICS: PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp command: "readAttribute" attribute: "PacketUnicastTxCount" response: - value: 0 + constraints: + type: int32u + minValue: 0 + maxValue: 4294967295 diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1.yaml index dcfa35600960df..47ad8a10280ed0 100644 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1.yaml @@ -26,7 +26,7 @@ tests: disabled: true - - label: "DUT reads NetworkInterface structure attribute from TH." + - label: "TH reads BSSID attribute from DUT." PICS: DGWIFI.S.A0000 verification: | verify on Reference app receives the right response for the data sent in the below commands 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 b5714b2c1e5581..407243f10ad9ee 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 @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 113.2.10. [TC-DRLK-2.10] Verification for the Door Lock Events [DUT-Server] + 114.2.10. [TC-DRLK-2.10] Verification for the Door Lock Events [DUT-Server] config: nodeId: 0x12344321 @@ -28,14 +28,6 @@ tests: PICS: DRLK.S.E00 verification: | ./chip-tool doorlock read-event door-lock-alarm 1 1 - - Verify on the TH Log: - - [1658139762.662050][2506:2511] CHIP:DMG: ReportDataMessage = - [1658139762.662086][2506:2511] CHIP:DMG: { - [1658139762.662178][2506:2511] CHIP:DMG: SuppressResponse = true, - [1658139762.662244][2506:2511] CHIP:DMG: InteractionModelRevision = 1 - [1658139762.662272][2506:2511] CHIP:DMG: } disabled: true - label: "TH reads the DoorLockAlarm event from DUT" @@ -43,7 +35,7 @@ tests: verification: | ./chip-tool doorlock read-event door-lock-alarm 1 1 - Verify on the TH Log: + [1658139762.662050][2506:2511] CHIP:DMG: ReportDataMessage = [1658139762.662086][2506:2511] CHIP:DMG: { @@ -57,13 +49,13 @@ tests: verification: | ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - "Verify on the TH Log: + On TH, verify DUT responds with status code as (SUCCESS) [1656497453.684077][25847:25853] CHIP:DMG: status = 0x00 (SUCCESS), ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - "Verify on the TH Log: + On TH, verify DUT responds with status code as (SUCCESS) [1656497508.814196][25858:25863] CHIP:TOO: SetCredentialResponse: { [1656497508.814257][25858:25863] CHIP:TOO: status: 0 @@ -74,7 +66,7 @@ tests: ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 123456 - "Verify on the TH Log: + On TH, verify DUT responds with status code as (SUCCESS) [1654687870.020678][4246:4251] CHIP:DMG: [1654687870.020715][4246:4251] CHIP:DMG: StatusIB = @@ -95,15 +87,7 @@ tests: - label: "TH reads the DoorStateChange event from DUT" PICS: DRLK.S.F05 && DRLK.S.E01 verification: | - ./chip-tool doorlock read-event door-state-change 1 1 - - Verify on the TH Log: - - [1658140355.250306][2597:2602] CHIP:DMG: ReportDataMessage = - [1658140355.250342][2597:2602] CHIP:DMG: { - [1658140355.250374][2597:2602] CHIP:DMG: SuppressResponse = true, - [1658140355.250408][2597:2602] CHIP:DMG: InteractionModelRevision = 1 - [1658140355.250440][2597:2602] CHIP:DMG: } + out of scope disabled: true - label: "TH sends the Unlock Door command to the DUT with valid PINCode" @@ -111,7 +95,7 @@ tests: verification: | ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 123456 - Verify on the TH Log: + On TH, verify DUT responds with status code as (SUCCESS) [1658140426.668024][2679:2684] CHIP:DMG: [1658140426.668070][2679:2684] CHIP:DMG: StatusIB = @@ -133,15 +117,7 @@ tests: - label: "TH reads the DoorStateChange event from DUT" PICS: DRLK.S.F05 && DRLK.S.E01 verification: | - ./chip-tool doorlock read-event door-state-change 1 1 - - Verify on the TH Log: - - [1658140531.370175][2693:2698] CHIP:DMG: ReportDataMessage = - [1658140531.370210][2693:2698] CHIP:DMG: { - [1658140531.370241][2693:2698] CHIP:DMG: SuppressResponse = true, - [1658140531.370273][2693:2698] CHIP:DMG: InteractionModelRevision = 1 - [1658140531.370303][2693:2698] CHIP:DMG: } + out of scope disabled: true - label: @@ -151,7 +127,7 @@ tests: verification: | ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 123456 - Verify on the TH Log: + On TH, verify DUT responds with status code as (SUCCESS) [1658140605.608041][2735:2740] CHIP:DMG: [1658140605.608082][2735:2740] CHIP:DMG: StatusIB = @@ -175,113 +151,24 @@ tests: verification: | ./chip-tool doorlock read-event lock-operation 1 1 - Verify on the TH Log: - - [1658140690.917363][2747:2752] CHIP:DMG: } - [1658140690.917725][2747:2752] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658140690.917758][2747:2752] CHIP:TOO: Event number: 5 - [1658140690.917782][2747:2752] CHIP:TOO: Priority: Critical - [1658140690.917807][2747:2752] CHIP:TOO: Timestamp: 799336 - [1658140690.917992][2747:2752] CHIP:TOO: LockOperation: { - [1658140690.918038][2747:2752] CHIP:TOO: LockOperationType: 1 - [1658140690.918067][2747:2752] CHIP:TOO: OperationSource: 7 - [1658140690.918095][2747:2752] CHIP:TOO: UserIndex: 1 - [1658140690.918123][2747:2752] CHIP:TOO: FabricIndex: 1 - [1658140690.918152][2747:2752] CHIP:TOO: SourceNode: 112233 - [1658140690.918190][2747:2752] CHIP:TOO: Credentials: 1 entries - [1658140690.918233][2747:2752] CHIP:TOO: [1]: { - [1658140690.918262][2747:2752] CHIP:TOO: CredentialType: 1 - [1658140690.918290][2747:2752] CHIP:TOO: CredentialIndex: 1 - [1658140690.918318][2747:2752] CHIP:TOO: } - [1658140690.918347][2747:2752] CHIP:TOO: } - [1658140690.918472][2747:2752] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658140690.918502][2747:2752] CHIP:TOO: Event number: 6 - [1658140690.918528][2747:2752] CHIP:TOO: Priority: Critical - [1658140690.918559][2747:2752] CHIP:TOO: Timestamp: 859340 - [1658140690.918606][2747:2752] CHIP:TOO: LockOperation: { - [1658140690.918635][2747:2752] CHIP:TOO: LockOperationType: 0 - [1658140690.918662][2747:2752] CHIP:TOO: OperationSource: 4 - [1658140690.918689][2747:2752] CHIP:TOO: UserIndex: null - [1658140690.918714][2747:2752] CHIP:TOO: FabricIndex: null - [1658140690.918741][2747:2752] CHIP:TOO: SourceNode: null - [1658140690.918767][2747:2752] CHIP:TOO: Credentials: null - [1658140690.918793][2747:2752] CHIP:TOO: } - [1658140690.918919][2747:2752] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658140690.919025][2747:2752] CHIP:TOO: Event number: 7 - [1658140690.919053][2747:2752] CHIP:TOO: Priority: Critical - [1658140690.919079][2747:2752] CHIP:TOO: Timestamp: 980898 - [1658140690.919135][2747:2752] CHIP:TOO: LockOperation: { - [1658140690.919166][2747:2752] CHIP:TOO: LockOperationType: 0 - [1658140690.919194][2747:2752] CHIP:TOO: OperationSource: 7 - [1658140690.919221][2747:2752] CHIP:TOO: UserIndex: 1 - [1658140690.919248][2747:2752] CHIP:TOO: FabricIndex: 1 - [1658140690.919273][2747:2752] CHIP:TOO: SourceNode: 112233 - [1658140690.919305][2747:2752] CHIP:TOO: Credentials: 1 entries - [1658140690.919341][2747:2752] CHIP:TOO: [1]: { - [1658140690.919369][2747:2752] CHIP:TOO: CredentialType: 1 - [1658140690.919396][2747:2752] CHIP:TOO: CredentialIndex: 1 - [1658140690.919422][2747:2752] CHIP:TOO: } - [1658140690.919454][2747:2752] CHIP:TOO: } - [1658140690.919587][2747:2752] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658140690.919614][2747:2752] CHIP:TOO: Event number: 8 - [1658140690.919695][2747:2752] CHIP:TOO: Priority: Critical - [1658140690.919725][2747:2752] CHIP:TOO: Timestamp: 1103895 - [1658140690.919779][2747:2752] CHIP:TOO: LockOperation: { - [1658140690.919810][2747:2752] CHIP:TOO: LockOperationType: 0 - [1658140690.919836][2747:2752] CHIP:TOO: OperationSource: 7 - [1658140690.919864][2747:2752] CHIP:TOO: UserIndex: 1 - [1658140690.919891][2747:2752] CHIP:TOO: FabricIndex: 1 - [1658140690.919919][2747:2752] CHIP:TOO: SourceNode: 112233 - [1658140690.919952][2747:2752] CHIP:TOO: Credentials: 1 entries - [1658140690.919987][2747:2752] CHIP:TOO: [1]: { - [1658140690.920014][2747:2752] CHIP:TOO: CredentialType: 1 - [1658140690.920040][2747:2752] CHIP:TOO: CredentialIndex: 1 - [1658140690.920066][2747:2752] CHIP:TOO: } - [1658140690.920094][2747:2752] CHIP:TOO: } - [1658140690.920224][2747:2752] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658140690.920253][2747:2752] CHIP:TOO: Event number: 9 - [1658140690.920278][2747:2752] CHIP:TOO: Priority: Critical - [1658140690.920303][2747:2752] CHIP:TOO: Timestamp: 1220546 - [1658140690.920350][2747:2752] CHIP:TOO: LockOperation: { - [1658140690.920381][2747:2752] CHIP:TOO: LockOperationType: 1 - [1658140690.920405][2747:2752] CHIP:TOO: OperationSource: 7 - [1658140690.920429][2747:2752] CHIP:TOO: UserIndex: 1 - [1658140690.920452][2747:2752] CHIP:TOO: FabricIndex: 1 - [1658140690.920476][2747:2752] CHIP:TOO: SourceNode: 112233 - [1658140690.920567][2747:2752] CHIP:TOO: Credentials: 1 entries - [1658140690.920599][2747:2752] CHIP:TOO: [1]: { - [1658140690.920623][2747:2752] CHIP:TOO: CredentialType: 1 - [1658140690.920646][2747:2752] CHIP:TOO: CredentialIndex: 1 - [1658140690.920668][2747:2752] CHIP:TOO: } - [1658140690.920692][2747:2752] CHIP:TOO: } - [1658140690.920798][2747:2752] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658140690.920822][2747:2752] CHIP:TOO: Event number: 10 - [1658140690.920844][2747:2752] CHIP:TOO: Priority: Critical - [1658140690.920866][2747:2752] CHIP:TOO: Timestamp: 1280590 - [1658140690.920899][2747:2752] CHIP:TOO: LockOperation: { - [1658140690.920925][2747:2752] CHIP:TOO: LockOperationType: 0 - [1658140690.920949][2747:2752] CHIP:TOO: OperationSource: 4 - [1658140690.920972][2747:2752] CHIP:TOO: UserIndex: null - [1658140690.920996][2747:2752] CHIP:TOO: FabricIndex: null - [1658140690.921019][2747:2752] CHIP:TOO: SourceNode: null - [1658140690.921042][2747:2752] CHIP:TOO: Credentials: null - [1658140690.921064][2747:2752] CHIP:TOO: } - [1658140690.921173][2747:2752] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658140690.921197][2747:2752] CHIP:TOO: Event number: 11 - [1658140690.921225][2747:2752] CHIP:TOO: Priority: Critical - [1658140690.921247][2747:2752] CHIP:TOO: Timestamp: 1399486 - [1658140690.921284][2747:2752] CHIP:TOO: LockOperation: { - [1658140690.921310][2747:2752] CHIP:TOO: LockOperationType: 0 - [1658140690.921333][2747:2752] CHIP:TOO: OperationSource: 7 - [1658140690.921356][2747:2752] CHIP:TOO: UserIndex: 1 - [1658140690.921379][2747:2752] CHIP:TOO: FabricIndex: 1 - [1658140690.921403][2747:2752] CHIP:TOO: SourceNode: 112233 - [1658140690.921431][2747:2752] CHIP:TOO: Credentials: 1 entries - [1658140690.921463][2747:2752] CHIP:TOO: [1]: { - [1658140690.921487][2747:2752] CHIP:TOO: CredentialType: 1 - [1658140690.921510][2747:2752] CHIP:TOO: CredentialIndex: 1 - [1658140690.921533][2747:2752] CHIP:TOO: } - [1658140690.921557][2747:2752] CHIP:TOO: } + On TH verify that LockOperation event has priority set as INFO and LockOperationType is set to Lock + + [1658222145.539382][4312:4317] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1658222145.539416][4312:4317] CHIP:TOO: Event number: 6 + [1658222145.539446][4312:4317] CHIP:TOO: Priority: Critical + [1658222145.539476][4312:4317] CHIP:TOO: Timestamp: 13664087 + [1658222145.539609][4312:4317] CHIP:TOO: LockOperation: { + [1658222145.539657][4312:4317] CHIP:TOO: LockOperationType: 0 + [1658222145.539691][4312:4317] CHIP:TOO: OperationSource: 7 + [1658222145.539723][4312:4317] CHIP:TOO: UserIndex: 1 + [1658222145.539755][4312:4317] CHIP:TOO: FabricIndex: 1 + [1658222145.539788][4312:4317] CHIP:TOO: SourceNode: 112233 + [1658222145.539827][4312:4317] CHIP:TOO: Credentials: 1 entries + [1658222145.539871][4312:4317] CHIP:TOO: [1]: { + [1658222145.539903][4312:4317] CHIP:TOO: CredentialType: 1 + [1658222145.539933][4312:4317] CHIP:TOO: CredentialIndex: 1 + [1658222145.539963][4312:4317] CHIP:TOO: } + [1658222145.539995][4312:4317] CHIP:TOO: } disabled: true - label: @@ -289,9 +176,9 @@ tests: PINCode" PICS: DRLK.S.C01.Rsp verification: | - ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 12345 + ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 123456 - Verify on the TH Log: + On TH, verify DUT responds with status code as (SUCCESS) [1658141312.730591][2781:2786] CHIP:DMG: { [1658141312.730635][2781:2786] CHIP:DMG: status = 0x00 (SUCCESS), @@ -314,141 +201,40 @@ tests: verification: | ./chip-tool doorlock read-event lock-operation 1 1 - Verify on the TH Log: - - [1658141417.196253][2790:2795] CHIP:DMG: } - [1658141417.196625][2790:2795] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658141417.196651][2790:2795] CHIP:TOO: Event number: 5 - [1658141417.196672][2790:2795] CHIP:TOO: Priority: Critical - [1658141417.196693][2790:2795] CHIP:TOO: Timestamp: 799336 - [1658141417.196825][2790:2795] CHIP:TOO: LockOperation: { - [1658141417.196864][2790:2795] CHIP:TOO: LockOperationType: 1 - [1658141417.196889][2790:2795] CHIP:TOO: OperationSource: 7 - [1658141417.196912][2790:2795] CHIP:TOO: UserIndex: 1 - [1658141417.196935][2790:2795] CHIP:TOO: FabricIndex: 1 - [1658141417.196970][2790:2795] CHIP:TOO: SourceNode: 112233 - [1658141417.197001][2790:2795] CHIP:TOO: Credentials: 1 entries - [1658141417.197046][2790:2795] CHIP:TOO: [1]: { - [1658141417.197070][2790:2795] CHIP:TOO: CredentialType: 1 - [1658141417.197103][2790:2795] CHIP:TOO: CredentialIndex: 1 - [1658141417.197125][2790:2795] CHIP:TOO: } - [1658141417.197158][2790:2795] CHIP:TOO: } - [1658141417.197277][2790:2795] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658141417.197301][2790:2795] CHIP:TOO: Event number: 6 - [1658141417.197332][2790:2795] CHIP:TOO: Priority: Critical - [1658141417.197353][2790:2795] CHIP:TOO: Timestamp: 859340 - [1658141417.197386][2790:2795] CHIP:TOO: LockOperation: { - [1658141417.197420][2790:2795] CHIP:TOO: LockOperationType: 0 - [1658141417.197444][2790:2795] CHIP:TOO: OperationSource: 4 - [1658141417.197474][2790:2795] CHIP:TOO: UserIndex: null - [1658141417.197497][2790:2795] CHIP:TOO: FabricIndex: null - [1658141417.197519][2790:2795] CHIP:TOO: SourceNode: null - [1658141417.197550][2790:2795] CHIP:TOO: Credentials: null - [1658141417.197572][2790:2795] CHIP:TOO: } - [1658141417.197697][2790:2795] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658141417.197729][2790:2795] CHIP:TOO: Event number: 7 - [1658141417.197750][2790:2795] CHIP:TOO: Priority: Critical - [1658141417.197771][2790:2795] CHIP:TOO: Timestamp: 980898 - [1658141417.197808][2790:2795] CHIP:TOO: LockOperation: { - [1658141417.197843][2790:2795] CHIP:TOO: LockOperationType: 0 - [1658141417.197866][2790:2795] CHIP:TOO: OperationSource: 7 - [1658141417.197889][2790:2795] CHIP:TOO: UserIndex: 1 - [1658141417.197921][2790:2795] CHIP:TOO: FabricIndex: 1 - [1658141417.197944][2790:2795] CHIP:TOO: SourceNode: 112233 - [1658141417.197980][2790:2795] CHIP:TOO: Credentials: 1 entries - [1658141417.198010][2790:2795] CHIP:TOO: [1]: { - [1658141417.198043][2790:2795] CHIP:TOO: CredentialType: 1 - [1658141417.198066][2790:2795] CHIP:TOO: CredentialIndex: 1 - [1658141417.198097][2790:2795] CHIP:TOO: } - [1658141417.198120][2790:2795] CHIP:TOO: } - [1658141417.198245][2790:2795] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658141417.198277][2790:2795] CHIP:TOO: Event number: 8 - [1658141417.198298][2790:2795] CHIP:TOO: Priority: Critical - [1658141417.198319][2790:2795] CHIP:TOO: Timestamp: 1103895 - [1658141417.198354][2790:2795] CHIP:TOO: LockOperation: { - [1658141417.198387][2790:2795] CHIP:TOO: LockOperationType: 0 - [1658141417.198410][2790:2795] CHIP:TOO: OperationSource: 7 - [1658141417.198432][2790:2795] CHIP:TOO: UserIndex: 1 - [1658141417.198463][2790:2795] CHIP:TOO: FabricIndex: 1 - [1658141417.198486][2790:2795] CHIP:TOO: SourceNode: 112233 - [1658141417.198522][2790:2795] CHIP:TOO: Credentials: 1 entries - [1658141417.198552][2790:2795] CHIP:TOO: [1]: { - [1658141417.198585][2790:2795] CHIP:TOO: CredentialType: 1 - [1658141417.198607][2790:2795] CHIP:TOO: CredentialIndex: 1 - [1658141417.198638][2790:2795] CHIP:TOO: } - [1658141417.198662][2790:2795] CHIP:TOO: } - [1658141417.198784][2790:2795] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658141417.198815][2790:2795] CHIP:TOO: Event number: 9 - [1658141417.198837][2790:2795] CHIP:TOO: Priority: Critical - [1658141417.198858][2790:2795] CHIP:TOO: Timestamp: 1220546 - [1658141417.198893][2790:2795] CHIP:TOO: LockOperation: { - [1658141417.198926][2790:2795] CHIP:TOO: LockOperationType: 1 - [1658141417.198949][2790:2795] CHIP:TOO: OperationSource: 7 - [1658141417.198981][2790:2795] CHIP:TOO: UserIndex: 1 - [1658141417.199004][2790:2795] CHIP:TOO: FabricIndex: 1 - [1658141417.199027][2790:2795] CHIP:TOO: SourceNode: 112233 - [1658141417.199063][2790:2795] CHIP:TOO: Credentials: 1 entries - [1658141417.199093][2790:2795] CHIP:TOO: [1]: { - [1658141417.199125][2790:2795] CHIP:TOO: CredentialType: 1 - [1658141417.199148][2790:2795] CHIP:TOO: CredentialIndex: 1 - [1658141417.199178][2790:2795] CHIP:TOO: } - [1658141417.199202][2790:2795] CHIP:TOO: } - [1658141417.199318][2790:2795] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658141417.199342][2790:2795] CHIP:TOO: Event number: 10 - [1658141417.199372][2790:2795] CHIP:TOO: Priority: Critical - [1658141417.199394][2790:2795] CHIP:TOO: Timestamp: 1280590 - [1658141417.199425][2790:2795] CHIP:TOO: LockOperation: { - [1658141417.199449][2790:2795] CHIP:TOO: LockOperationType: 0 - [1658141417.199481][2790:2795] CHIP:TOO: OperationSource: 4 - [1658141417.199503][2790:2795] CHIP:TOO: UserIndex: null - [1658141417.199534][2790:2795] CHIP:TOO: FabricIndex: null - [1658141417.199557][2790:2795] CHIP:TOO: SourceNode: null - [1658141417.199589][2790:2795] CHIP:TOO: Credentials: null - [1658141417.199612][2790:2795] CHIP:TOO: } - [1658141417.199748][2790:2795] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658141417.199780][2790:2795] CHIP:TOO: Event number: 11 - [1658141417.199802][2790:2795] CHIP:TOO: Priority: Critical - [1658141417.199824][2790:2795] CHIP:TOO: Timestamp: 1399486 - [1658141417.199859][2790:2795] CHIP:TOO: LockOperation: { - [1658141417.199893][2790:2795] CHIP:TOO: LockOperationType: 0 - [1658141417.199916][2790:2795] CHIP:TOO: OperationSource: 7 - [1658141417.199938][2790:2795] CHIP:TOO: UserIndex: 1 - [1658141417.199969][2790:2795] CHIP:TOO: FabricIndex: 1 - [1658141417.199992][2790:2795] CHIP:TOO: SourceNode: 112233 - [1658141417.200028][2790:2795] CHIP:TOO: Credentials: 1 entries - [1658141417.200058][2790:2795] CHIP:TOO: [1]: { - [1658141417.200091][2790:2795] CHIP:TOO: CredentialType: 1 - [1658141417.200114][2790:2795] CHIP:TOO: CredentialIndex: 1 - [1658141417.200146][2790:2795] CHIP:TOO: } - [1658141417.200170][2790:2795] CHIP:TOO: } - [1658141417.200294][2790:2795] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658141417.200326][2790:2795] CHIP:TOO: Event number: 12 - [1658141417.200348][2790:2795] CHIP:TOO: Priority: Critical - [1658141417.200369][2790:2795] CHIP:TOO: Timestamp: 2106609 - [1658141417.200404][2790:2795] CHIP:TOO: LockOperation: { - [1658141417.200436][2790:2795] CHIP:TOO: LockOperationType: 1 - [1658141417.200459][2790:2795] CHIP:TOO: OperationSource: 7 - [1658141417.200481][2790:2795] CHIP:TOO: UserIndex: 1 - [1658141417.200513][2790:2795] CHIP:TOO: FabricIndex: 1 - [1658141417.200535][2790:2795] CHIP:TOO: SourceNode: 112233 - [1658141417.200572][2790:2795] CHIP:TOO: Credentials: 1 entries - [1658141417.200601][2790:2795] CHIP:TOO: [1]: { - [1658141417.200634][2790:2795] CHIP:TOO: CredentialType: 1 - [1658141417.200656][2790:2795] CHIP:TOO: CredentialIndex: 1 - [1658141417.200689][2790:2795] CHIP:TOO: } - [1658141417.200712][2790:2795] CHIP:TOO: } - [1658141417.200829][2790:2795] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658141417.200860][2790:2795] CHIP:TOO: Event number: 13 - [1658141417.200882][2790:2795] CHIP:TOO: Priority: Critical - [1658141417.200903][2790:2795] CHIP:TOO: Timestamp: 2166613 - [1658141417.200934][2790:2795] CHIP:TOO: LockOperation: { - [1658141417.200957][2790:2795] CHIP:TOO: LockOperationType: 0 - [1658141417.200990][2790:2795] CHIP:TOO: OperationSource: 4 - [1658141417.201013][2790:2795] CHIP:TOO: UserIndex: null - [1658141417.201035][2790:2795] CHIP:TOO: FabricIndex: null - [1658141417.201067][2790:2795] CHIP:TOO: SourceNode: null - [1658141417.201089][2790:2795] CHIP:TOO: Credentials: null - [1658141417.201119][2790:2795] CHIP:TOO: } + On TH verify that LockOperation event has priority set as CRITICAL and LockOperationType is set to UnLock + + [1658222212.596945][4331:4336] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1658222212.596979][4331:4336] CHIP:TOO: Event number: 6 + [1658222212.597010][4331:4336] CHIP:TOO: Priority: Critical + [1658222212.597040][4331:4336] CHIP:TOO: Timestamp: 13664087 + [1658222212.597178][4331:4336] CHIP:TOO: LockOperation: { + [1658222212.597226][4331:4336] CHIP:TOO: LockOperationType: 0 + [1658222212.597260][4331:4336] CHIP:TOO: OperationSource: 7 + [1658222212.597291][4331:4336] CHIP:TOO: UserIndex: 1 + [1658222212.597323][4331:4336] CHIP:TOO: FabricIndex: 1 + [1658222212.597356][4331:4336] CHIP:TOO: SourceNode: 112233 + [1658222212.597396][4331:4336] CHIP:TOO: Credentials: 1 entries + [1658222212.597440][4331:4336] CHIP:TOO: [1]: { + [1658222212.597473][4331:4336] CHIP:TOO: CredentialType: 1 + [1658222212.597504][4331:4336] CHIP:TOO: CredentialIndex: 1 + [1658222212.597534][4331:4336] CHIP:TOO: } + [1658222212.597566][4331:4336] CHIP:TOO: } + [1658222212.597711][4331:4336] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1658222212.597744][4331:4336] CHIP:TOO: Event number: 7 + [1658222212.597773][4331:4336] CHIP:TOO: Priority: Critical + [1658222212.597803][4331:4336] CHIP:TOO: Timestamp: 13712745 + [1658222212.597851][4331:4336] CHIP:TOO: LockOperation: { + [1658222212.597887][4331:4336] CHIP:TOO: LockOperationType: 1 + [1658222212.597919][4331:4336] CHIP:TOO: OperationSource: 7 + [1658222212.597949][4331:4336] CHIP:TOO: UserIndex: 1 + [1658222212.597980][4331:4336] CHIP:TOO: FabricIndex: 1 + [1658222212.598011][4331:4336] CHIP:TOO: SourceNode: 112233 + [1658222212.598047][4331:4336] CHIP:TOO: Credentials: 1 entries + [1658222212.598087][4331:4336] CHIP:TOO: [1]: { + [1658222212.598119][4331:4336] CHIP:TOO: CredentialType: 1 + [1658222212.598150][4331:4336] CHIP:TOO: CredentialIndex: 1 + [1658222212.598179][4331:4336] CHIP:TOO: } + [1658222212.598211][4331:4336] CHIP:TOO: } disabled: true - label: @@ -458,7 +244,7 @@ tests: verification: | ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 12345678 - Verify on the TH Log: + On TH, verify DUT responds with status code as (FAILURE) [1658144579.661894][3173:3179] CHIP:DMG: StatusIB = [1658144579.661936][3173:3179] CHIP:DMG: { @@ -482,29 +268,25 @@ tests: verification: | ./chip-tool doorlock read-event lock-operation-error 1 1 - Verify on the TH Log: - - [1658141588.017284][2825:2830] CHIP:DMG: - [1658141588.017331][2825:2830] CHIP:DMG: SuppressResponse = true, - [1658141588.017366][2825:2830] CHIP:DMG: InteractionModelRevision = 1 - [1658141588.017410][2825:2830] CHIP:DMG: } - [1658141588.017667][2825:2830] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 - [1658141588.017701][2825:2830] CHIP:TOO: Event number: 15 - [1658141588.017731][2825:2830] CHIP:TOO: Priority: Critical - [1658141588.017761][2825:2830] CHIP:TOO: Timestamp: 2346777 - [1658141588.017930][2825:2830] CHIP:TOO: LockOperationError: { - [1658141588.017979][2825:2830] CHIP:TOO: LockOperationType: 0 - [1658141588.018013][2825:2830] CHIP:TOO: OperationSource: 7 - [1658141588.018044][2825:2830] CHIP:TOO: OperationError: 1 - [1658141588.018077][2825:2830] CHIP:TOO: UserIndex: 0 - [1658141588.018109][2825:2830] CHIP:TOO: FabricIndex: 1 - [1658141588.018156][2825:2830] CHIP:TOO: SourceNode: 112233 - [1658141588.018196][2825:2830] CHIP:TOO: Credentials: 1 entries - [1658141588.018255][2825:2830] CHIP:TOO: [1]: { - [1658141588.018289][2825:2830] CHIP:TOO: CredentialType: 1 - [1658141588.018333][2825:2830] CHIP:TOO: CredentialIndex: 0 - [1658141588.018365][2825:2830] CHIP:TOO: } - [1658141588.018410][2825:2830] CHIP:TOO: } + On TH verify that LockOperationError event has priority set as CRITICAL and LockOperationType is set to Lock + + [1658222263.577367][4348:4353] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 + [1658222263.577392][4348:4353] CHIP:TOO: Event number: 9 + [1658222263.577414][4348:4353] CHIP:TOO: Priority: Critical + [1658222263.577436][4348:4353] CHIP:TOO: Timestamp: 13778879 + [1658222263.577479][4348:4353] CHIP:TOO: LockOperationError: { + [1658222263.577505][4348:4353] CHIP:TOO: LockOperationType: 0 + [1658222263.577528][4348:4353] CHIP:TOO: OperationSource: 7 + [1658222263.577551][4348:4353] CHIP:TOO: OperationError: 1 + [1658222263.577574][4348:4353] CHIP:TOO: UserIndex: 0 + [1658222263.577596][4348:4353] CHIP:TOO: FabricIndex: 1 + [1658222263.577620][4348:4353] CHIP:TOO: SourceNode: 112233 + [1658222263.577648][4348:4353] CHIP:TOO: Credentials: 1 entries + [1658222263.577679][4348:4353] CHIP:TOO: [1]: { + [1658222263.577703][4348:4353] CHIP:TOO: CredentialType: 1 + [1658222263.577726][4348:4353] CHIP:TOO: CredentialIndex: 0 + [1658222263.577748][4348:4353] CHIP:TOO: } + [1658222263.577771][4348:4353] CHIP:TOO: } disabled: true - label: @@ -514,7 +296,7 @@ tests: verification: | ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 12345678 - Verify on the TH Log: + On TH, verify DUT responds with status code as (FAILURE) [1658141754.166112][2844:2850] CHIP:DMG: [1658141754.166152][2844:2850] CHIP:DMG: StatusIB = @@ -539,62 +321,45 @@ tests: verification: | ./chip-tool doorlock read-event lock-operation-error 1 1 - Verify on the TH Log: - - [1658141778.331445][2852:2857] CHIP:DMG: SuppressResponse = true, - [1658141778.331482][2852:2857] CHIP:DMG: InteractionModelRevision = 1 - [1658141778.331516][2852:2857] CHIP:DMG: } - [1658141778.331837][2852:2857] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 - [1658141778.331867][2852:2857] CHIP:TOO: Event number: 15 - [1658141778.331890][2852:2857] CHIP:TOO: Priority: Critical - [1658141778.331913][2852:2857] CHIP:TOO: Timestamp: 2346777 - [1658141778.332035][2852:2857] CHIP:TOO: LockOperationError: { - [1658141778.332075][2852:2857] CHIP:TOO: LockOperationType: 0 - [1658141778.332101][2852:2857] CHIP:TOO: OperationSource: 7 - [1658141778.332125][2852:2857] CHIP:TOO: OperationError: 1 - [1658141778.332150][2852:2857] CHIP:TOO: UserIndex: 0 - [1658141778.332174][2852:2857] CHIP:TOO: FabricIndex: 1 - [1658141778.332200][2852:2857] CHIP:TOO: SourceNode: 112233 - [1658141778.332232][2852:2857] CHIP:TOO: Credentials: 1 entries - [1658141778.332269][2852:2857] CHIP:TOO: [1]: { - [1658141778.332295][2852:2857] CHIP:TOO: CredentialType: 1 - [1658141778.332319][2852:2857] CHIP:TOO: CredentialIndex: 0 - [1658141778.332342][2852:2857] CHIP:TOO: } - [1658141778.332368][2852:2857] CHIP:TOO: } - [1658141778.332490][2852:2857] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 - [1658141778.332516][2852:2857] CHIP:TOO: Event number: 16 - [1658141778.332539][2852:2857] CHIP:TOO: Priority: Critical - [1658141778.332561][2852:2857] CHIP:TOO: Timestamp: 2516979 - [1658141778.332601][2852:2857] CHIP:TOO: LockOperationError: { - [1658141778.332627][2852:2857] CHIP:TOO: LockOperationType: 1 - [1658141778.332651][2852:2857] CHIP:TOO: OperationSource: 7 - [1658141778.332675][2852:2857] CHIP:TOO: OperationError: 1 - [1658141778.332698][2852:2857] CHIP:TOO: UserIndex: 0 - [1658141778.332722][2852:2857] CHIP:TOO: FabricIndex: 1 - [1658141778.332746][2852:2857] CHIP:TOO: SourceNode: 112233 - [1658141778.332774][2852:2857] CHIP:TOO: Credentials: 1 entries - [1658141778.332805][2852:2857] CHIP:TOO: [1]: { - [1658141778.332830][2852:2857] CHIP:TOO: CredentialType: 1 - [1658141778.332854][2852:2857] CHIP:TOO: CredentialIndex: 0 - [1658141778.332877][2852:2857] CHIP:TOO: } - [1658141778.332902][2852:2857] CHIP:TOO: } - [1658141778.333018][2852:2857] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 - [1658141778.333043][2852:2857] CHIP:TOO: Event number: 17 - [1658141778.333066][2852:2857] CHIP:TOO: Priority: Critical - [1658141778.333088][2852:2857] CHIP:TOO: Timestamp: 2548044 - [1658141778.333126][2852:2857] CHIP:TOO: LockOperationError: { - [1658141778.333153][2852:2857] CHIP:TOO: LockOperationType: 1 - [1658141778.333176][2852:2857] CHIP:TOO: OperationSource: 7 - [1658141778.333200][2852:2857] CHIP:TOO: OperationError: 1 - [1658141778.333223][2852:2857] CHIP:TOO: UserIndex: 0 - [1658141778.333246][2852:2857] CHIP:TOO: FabricIndex: 1 - [1658141778.333270][2852:2857] CHIP:TOO: SourceNode: 112233 - [1658141778.333298][2852:2857] CHIP:TOO: Credentials: 1 entries - [1658141778.333329][2852:2857] CHIP:TOO: [1]: { - [1658141778.333353][2852:2857] CHIP:TOO: CredentialType: 1 - [1658141778.333377][2852:2857] CHIP:TOO: CredentialIndex: 0 - [1658141778.333400][2852:2857] CHIP:TOO: } - [1658141778.333425][2852:2857] CHIP:TOO: } + On TH verify that LockOperationError event has priority set as INFO and LockOperationType is set to UnLock + + [1658213977.361043][3321:3326] CHIP:DMG: SuppressResponse = true, + [1658213977.361087][3321:3326] CHIP:DMG: InteractionModelRevision = 1 + [1658213977.361119][3321:3326] CHIP:DMG: } + [1658213977.361418][3321:3326] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 + [1658213977.361454][3321:3326] CHIP:TOO: Event number: 12 + [1658213977.361484][3321:3326] CHIP:TOO: Priority: Critical + [1658213977.361513][3321:3326] CHIP:TOO: Timestamp: 5448731 + [1658213977.361680][3321:3326] CHIP:TOO: LockOperationError: { + [1658213977.361726][3321:3326] CHIP:TOO: LockOperationType: 0 + [1658213977.361760][3321:3326] CHIP:TOO: OperationSource: 7 + [1658213977.361792][3321:3326] CHIP:TOO: OperationError: 1 + [1658213977.361823][3321:3326] CHIP:TOO: UserIndex: 0 + [1658213977.361854][3321:3326] CHIP:TOO: FabricIndex: 1 + [1658213977.361900][3321:3326] CHIP:TOO: SourceNode: 112233 + [1658213977.361941][3321:3326] CHIP:TOO: Credentials: 1 entries + [1658213977.361998][3321:3326] CHIP:TOO: [1]: { + [1658213977.362031][3321:3326] CHIP:TOO: CredentialType: 1 + [1658213977.362075][3321:3326] CHIP:TOO: CredentialIndex: 0 + [1658213977.362107][3321:3326] CHIP:TOO: } + [1658213977.362153][3321:3326] CHIP:TOO: } + [1658213977.362330][3321:3326] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 + [1658213977.362373][3321:3326] CHIP:TOO: Event number: 13 + [1658213977.362404][3321:3326] CHIP:TOO: Priority: Critical + [1658213977.362433][3321:3326] CHIP:TOO: Timestamp: 5489885 + [1658213977.362484][3321:3326] CHIP:TOO: LockOperationError: { + [1658213977.362533][3321:3326] CHIP:TOO: LockOperationType: 1 + [1658213977.362565][3321:3326] CHIP:TOO: OperationSource: 7 + [1658213977.362606][3321:3326] CHIP:TOO: OperationError: 1 + [1658213977.362637][3321:3326] CHIP:TOO: UserIndex: 0 + [1658213977.362667][3321:3326] CHIP:TOO: FabricIndex: 1 + [1658213977.362709][3321:3326] CHIP:TOO: SourceNode: 112233 + [1658213977.362746][3321:3326] CHIP:TOO: Credentials: 1 entries + [1658213977.362798][3321:3326] CHIP:TOO: [1]: { + [1658213977.362831][3321:3326] CHIP:TOO: CredentialType: 1 + [1658213977.362874][3321:3326] CHIP:TOO: CredentialIndex: 0 + [1658213977.362904][3321:3326] CHIP:TOO: } + [1658213977.362948][3321:3326] CHIP:TOO: } disabled: true - label: @@ -607,7 +372,7 @@ tests: verification: | ./chip-tool doorlock set-user 0 2 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 100 - Verify on the TH Log: + On TH, verify DUT responds with status code as (SUCCESS) [1658141909.546881][2863:2868] CHIP:DMG: StatusIB = [1658141909.546925][2863:2868] CHIP:DMG: { @@ -630,49 +395,34 @@ tests: verification: | ./chip-tool doorlock read-event lock-user-change 1 1 - Verify on the TH Log: - - [1658142004.711305][2873:2878] CHIP:DMG: SuppressResponse = true, - [1658142004.711336][2873:2878] CHIP:DMG: InteractionModelRevision = 1 - [1658142004.711365][2873:2878] CHIP:DMG: } - [1658142004.711620][2873:2878] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142004.711668][2873:2878] CHIP:TOO: Event number: 3 - [1658142004.711695][2873:2878] CHIP:TOO: Priority: Info - [1658142004.711722][2873:2878] CHIP:TOO: Timestamp: 770678 - [1658142004.711849][2873:2878] CHIP:TOO: LockUserChange: { - [1658142004.711894][2873:2878] CHIP:TOO: LockDataType: 2 - [1658142004.711925][2873:2878] CHIP:TOO: DataOperationType: 0 - [1658142004.712065][2873:2878] CHIP:TOO: OperationSource: 7 - [1658142004.712095][2873:2878] CHIP:TOO: UserIndex: 1 - [1658142004.712124][2873:2878] CHIP:TOO: FabricIndex: 1 - [1658142004.712154][2873:2878] CHIP:TOO: SourceNode: 112233 - [1658142004.712182][2873:2878] CHIP:TOO: DataIndex: 1 - [1658142004.712210][2873:2878] CHIP:TOO: } - [1658142004.712343][2873:2878] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142004.712373][2873:2878] CHIP:TOO: Event number: 4 - [1658142004.712400][2873:2878] CHIP:TOO: Priority: Info - [1658142004.712427][2873:2878] CHIP:TOO: Timestamp: 785182 - [1658142004.712469][2873:2878] CHIP:TOO: LockUserChange: { - [1658142004.712501][2873:2878] CHIP:TOO: LockDataType: 6 - [1658142004.712531][2873:2878] CHIP:TOO: DataOperationType: 0 - [1658142004.712560][2873:2878] CHIP:TOO: OperationSource: 7 - [1658142004.712587][2873:2878] CHIP:TOO: UserIndex: 1 - [1658142004.712615][2873:2878] CHIP:TOO: FabricIndex: 1 - [1658142004.712643][2873:2878] CHIP:TOO: SourceNode: 112233 - [1658142004.712671][2873:2878] CHIP:TOO: DataIndex: 1 - [1658142004.712698][2873:2878] CHIP:TOO: } - [1658142004.712817][2873:2878] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142004.712847][2873:2878] CHIP:TOO: Event number: 18 - [1658142004.712875][2873:2878] CHIP:TOO: Priority: Info - [1658142004.712901][2873:2878] CHIP:TOO: Timestamp: 2703425 - [1658142004.712941][2873:2878] CHIP:TOO: LockUserChange: { - [1658142004.712971][2873:2878] CHIP:TOO: LockDataType: 2 - [1658142004.713000][2873:2878] CHIP:TOO: DataOperationType: 0 - [1658142004.713028][2873:2878] CHIP:TOO: OperationSource: 7 - [1658142004.713056][2873:2878] CHIP:TOO: UserIndex: 2 - [1658142004.713084][2873:2878] CHIP:TOO: FabricIndex: 1 - [1658142004.713112][2873:2878] CHIP:TOO: SourceNode: 112233 - [1658142004.713140][2873:2878] CHIP:TOO: DataIndex: 2 + On TH verify that LockUserChange event has priority set as INFO and LockDataType is set to UserIndex + + [1658222553.250503][4410:4415] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1658222553.250590][4410:4415] CHIP:TOO: Event number: 5 + [1658222553.250621][4410:4415] CHIP:TOO: Priority: Info + [1658222553.250651][4410:4415] CHIP:TOO: Timestamp: 13610676 + [1658222553.250702][4410:4415] CHIP:TOO: LockUserChange: { + [1658222553.250781][4410:4415] CHIP:TOO: LockDataType: 6 + [1658222553.250813][4410:4415] CHIP:TOO: DataOperationType: 0 + [1658222553.250872][4410:4415] CHIP:TOO: OperationSource: 7 + [1658222553.250915][4410:4415] CHIP:TOO: UserIndex: 1 + [1658222553.250946][4410:4415] CHIP:TOO: FabricIndex: 1 + [1658222553.250991][4410:4415] CHIP:TOO: SourceNode: 112233 + [1658222553.251022][4410:4415] CHIP:TOO: DataIndex: 1 + [1658222553.251063][4410:4415] CHIP:TOO: } + [1658222553.251230][4410:4415] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1658222553.251263][4410:4415] CHIP:TOO: Event number: 13 + [1658222553.251292][4410:4415] CHIP:TOO: Priority: Info + [1658222553.251321][4410:4415] CHIP:TOO: Timestamp: 14066763 + [1658222553.251366][4410:4415] CHIP:TOO: LockUserChange: { + [1658222553.251411][4410:4415] CHIP:TOO: LockDataType: 2 + [1658222553.251443][4410:4415] CHIP:TOO: DataOperationType: 0 + [1658222553.251474][4410:4415] CHIP:TOO: OperationSource: 7 + [1658222553.251517][4410:4415] CHIP:TOO: UserIndex: 2 + [1658222553.251547][4410:4415] CHIP:TOO: FabricIndex: 1 + [1658222553.251590][4410:4415] CHIP:TOO: SourceNode: 112233 + [1658222553.251622][4410:4415] CHIP:TOO: DataIndex: 2 + [1658222553.251662][4410:4415] CHIP:TOO: } disabled: true - label: @@ -683,7 +433,7 @@ tests: verification: | ./chip-tool doorlock set-week-day-schedule 1 1 2 15 45 16 55 1 1 - Verify on the TH Log: + On TH, verify DUT responds with status code as (SUCCESS) [1658142169.347859][2900:2905] CHIP:DMG: StatusIB = [1658142169.347900][2900:2905] CHIP:DMG: { @@ -705,51 +455,34 @@ tests: verification: | ./chip-tool doorlock read-event lock-user-change 1 1 - Verify on the TH Log: - - [1658142193.226750][2907:2912] CHIP:DMG: - [1658142193.226784][2907:2912] CHIP:DMG: SuppressResponse = true, - [1658142193.226818][2907:2912] CHIP:DMG: InteractionModelRevision = 1 - [1658142193.226850][2907:2912] CHIP:DMG: } - [1658142193.227131][2907:2912] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142193.227165][2907:2912] CHIP:TOO: Event number: 18 - [1658142193.227191][2907:2912] CHIP:TOO: Priority: Info - [1658142193.227215][2907:2912] CHIP:TOO: Timestamp: 2703425 - [1658142193.227345][2907:2912] CHIP:TOO: LockUserChange: { - [1658142193.227394][2907:2912] CHIP:TOO: LockDataType: 2 - [1658142193.227428][2907:2912] CHIP:TOO: DataOperationType: 0 - [1658142193.227460][2907:2912] CHIP:TOO: OperationSource: 7 - [1658142193.227492][2907:2912] CHIP:TOO: UserIndex: 2 - [1658142193.227523][2907:2912] CHIP:TOO: FabricIndex: 1 - [1658142193.227557][2907:2912] CHIP:TOO: SourceNode: 112233 - [1658142193.227588][2907:2912] CHIP:TOO: DataIndex: 2 - [1658142193.227618][2907:2912] CHIP:TOO: } - [1658142193.227780][2907:2912] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142193.227815][2907:2912] CHIP:TOO: Event number: 19 - [1658142193.227845][2907:2912] CHIP:TOO: Priority: Info - [1658142193.227874][2907:2912] CHIP:TOO: Timestamp: 2942697 - [1658142193.227921][2907:2912] CHIP:TOO: LockUserChange: { - [1658142193.227954][2907:2912] CHIP:TOO: LockDataType: 3 - [1658142193.227986][2907:2912] CHIP:TOO: DataOperationType: 0 - [1658142193.228016][2907:2912] CHIP:TOO: OperationSource: 7 - [1658142193.228046][2907:2912] CHIP:TOO: UserIndex: 1 - [1658142193.228077][2907:2912] CHIP:TOO: FabricIndex: 1 - [1658142193.228108][2907:2912] CHIP:TOO: SourceNode: 112233 - [1658142193.228139][2907:2912] CHIP:TOO: DataIndex: 1 - [1658142193.228168][2907:2912] CHIP:TOO: } - [1658142193.228305][2907:2912] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142193.228336][2907:2912] CHIP:TOO: Event number: 20 - [1658142193.228366][2907:2912] CHIP:TOO: Priority: Info - [1658142193.228395][2907:2912] CHIP:TOO: Timestamp: 2963226 - [1658142193.228439][2907:2912] CHIP:TOO: LockUserChange: { - [1658142193.228472][2907:2912] CHIP:TOO: LockDataType: 3 - [1658142193.228503][2907:2912] CHIP:TOO: DataOperationType: 0 - [1658142193.228534][2907:2912] CHIP:TOO: OperationSource: 7 - [1658142193.228564][2907:2912] CHIP:TOO: UserIndex: 1 - [1658142193.228594][2907:2912] CHIP:TOO: FabricIndex: 1 - [1658142193.228624][2907:2912] CHIP:TOO: SourceNode: 112233 - [1658142193.228654][2907:2912] CHIP:TOO: DataIndex: 1 - [1658142193.228684][2907:2912] CHIP:TOO: } + On TH verify that LockUserChange event has priority set as INFO and LockDataType is set to UserIndex + + [1658222711.893600][4428:4433] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1658222711.893624][4428:4433] CHIP:TOO: Event number: 13 + [1658222711.893646][4428:4433] CHIP:TOO: Priority: Info + [1658222711.893668][4428:4433] CHIP:TOO: Timestamp: 14066763 + [1658222711.893701][4428:4433] CHIP:TOO: LockUserChange: { + [1658222711.893726][4428:4433] CHIP:TOO: LockDataType: 2 + [1658222711.893748][4428:4433] CHIP:TOO: DataOperationType: 0 + [1658222711.893772][4428:4433] CHIP:TOO: OperationSource: 7 + [1658222711.893795][4428:4433] CHIP:TOO: UserIndex: 2 + [1658222711.893818][4428:4433] CHIP:TOO: FabricIndex: 1 + [1658222711.893841][4428:4433] CHIP:TOO: SourceNode: 112233 + [1658222711.893864][4428:4433] CHIP:TOO: DataIndex: 2 + [1658222711.893886][4428:4433] CHIP:TOO: } + [1658222711.893987][4428:4433] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1658222711.894011][4428:4433] CHIP:TOO: Event number: 14 + [1658222711.894033][4428:4433] CHIP:TOO: Priority: Info + [1658222711.894054][4428:4433] CHIP:TOO: Timestamp: 14222934 + [1658222711.894088][4428:4433] CHIP:TOO: LockUserChange: { + [1658222711.894113][4428:4433] CHIP:TOO: LockDataType: 3 + [1658222711.894136][4428:4433] CHIP:TOO: DataOperationType: 0 + [1658222711.894160][4428:4433] CHIP:TOO: OperationSource: 7 + [1658222711.894183][4428:4433] CHIP:TOO: UserIndex: 1 + [1658222711.894206][4428:4433] CHIP:TOO: FabricIndex: 1 + [1658222711.894229][4428:4433] CHIP:TOO: SourceNode: 112233 + [1658222711.894252][4428:4433] CHIP:TOO: DataIndex: 1 + [1658222711.894275][4428:4433] CHIP:TOO: } disabled: true - label: @@ -760,7 +493,7 @@ tests: verification: | ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - Verify on the TH Log: + On TH, verify DUT responds with status code as (SUCCESS) [1658142472.351596][2966:2971] CHIP:DMG: }, [1658142472.351698][2966:2971] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 @@ -777,102 +510,34 @@ tests: verification: | ./chip-tool doorlock read-event lock-user-change 1 1 - Verify on the TH Log: - - [1658142539.454641][2974:2979] CHIP:DMG: SuppressResponse = true, - [1658142539.454670][2974:2979] CHIP:DMG: InteractionModelRevision = 1 - [1658142539.454697][2974:2979] CHIP:DMG: } - [1658142539.455028][2974:2979] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142539.455058][2974:2979] CHIP:TOO: Event number: 18 - [1658142539.455084][2974:2979] CHIP:TOO: Priority: Info - [1658142539.455110][2974:2979] CHIP:TOO: Timestamp: 2703425 - [1658142539.455235][2974:2979] CHIP:TOO: LockUserChange: { - [1658142539.455279][2974:2979] CHIP:TOO: LockDataType: 2 - [1658142539.455309][2974:2979] CHIP:TOO: DataOperationType: 0 - [1658142539.455336][2974:2979] CHIP:TOO: OperationSource: 7 - [1658142539.455363][2974:2979] CHIP:TOO: UserIndex: 2 - [1658142539.455391][2974:2979] CHIP:TOO: FabricIndex: 1 - [1658142539.455419][2974:2979] CHIP:TOO: SourceNode: 112233 - [1658142539.455446][2974:2979] CHIP:TOO: DataIndex: 2 - [1658142539.455471][2974:2979] CHIP:TOO: } - [1658142539.455587][2974:2979] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142539.455615][2974:2979] CHIP:TOO: Event number: 19 - [1658142539.455652][2974:2979] CHIP:TOO: Priority: Info - [1658142539.455679][2974:2979] CHIP:TOO: Timestamp: 2942697 - [1658142539.455721][2974:2979] CHIP:TOO: LockUserChange: { - [1658142539.455750][2974:2979] CHIP:TOO: LockDataType: 3 - [1658142539.455776][2974:2979] CHIP:TOO: DataOperationType: 0 - [1658142539.455802][2974:2979] CHIP:TOO: OperationSource: 7 - [1658142539.455828][2974:2979] CHIP:TOO: UserIndex: 1 - [1658142539.455853][2974:2979] CHIP:TOO: FabricIndex: 1 - [1658142539.455879][2974:2979] CHIP:TOO: SourceNode: 112233 - [1658142539.455904][2974:2979] CHIP:TOO: DataIndex: 1 - [1658142539.455929][2974:2979] CHIP:TOO: } - [1658142539.456044][2974:2979] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142539.456070][2974:2979] CHIP:TOO: Event number: 20 - [1658142539.456095][2974:2979] CHIP:TOO: Priority: Info - [1658142539.456120][2974:2979] CHIP:TOO: Timestamp: 2963226 - [1658142539.456158][2974:2979] CHIP:TOO: LockUserChange: { - [1658142539.456183][2974:2979] CHIP:TOO: LockDataType: 3 - [1658142539.456209][2974:2979] CHIP:TOO: DataOperationType: 0 - [1658142539.456235][2974:2979] CHIP:TOO: OperationSource: 7 - [1658142539.456260][2974:2979] CHIP:TOO: UserIndex: 1 - [1658142539.456286][2974:2979] CHIP:TOO: FabricIndex: 1 - [1658142539.456313][2974:2979] CHIP:TOO: SourceNode: 112233 - [1658142539.456339][2974:2979] CHIP:TOO: DataIndex: 1 - [1658142539.456364][2974:2979] CHIP:TOO: } - [1658142539.456480][2974:2979] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142539.456506][2974:2979] CHIP:TOO: Event number: 21 - [1658142539.456531][2974:2979] CHIP:TOO: Priority: Info - [1658142539.456555][2974:2979] CHIP:TOO: Timestamp: 3177054 - [1658142539.456593][2974:2979] CHIP:TOO: LockUserChange: { - [1658142539.456621][2974:2979] CHIP:TOO: LockDataType: 2 - [1658142539.456647][2974:2979] CHIP:TOO: DataOperationType: 1 - [1658142539.456672][2974:2979] CHIP:TOO: OperationSource: 7 - [1658142539.456699][2974:2979] CHIP:TOO: UserIndex: 1 - [1658142539.456724][2974:2979] CHIP:TOO: FabricIndex: 1 - [1658142539.456749][2974:2979] CHIP:TOO: SourceNode: 112233 - [1658142539.456775][2974:2979] CHIP:TOO: DataIndex: 1 - [1658142539.456799][2974:2979] CHIP:TOO: } - [1658142539.456914][2974:2979] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142539.456940][2974:2979] CHIP:TOO: Event number: 22 - [1658142539.456965][2974:2979] CHIP:TOO: Priority: Info - [1658142539.456989][2974:2979] CHIP:TOO: Timestamp: 3245726 - [1658142539.457026][2974:2979] CHIP:TOO: LockUserChange: { - [1658142539.457054][2974:2979] CHIP:TOO: LockDataType: 2 - [1658142539.457080][2974:2979] CHIP:TOO: DataOperationType: 1 - [1658142539.457106][2974:2979] CHIP:TOO: OperationSource: 7 - [1658142539.457132][2974:2979] CHIP:TOO: UserIndex: 1 - [1658142539.457158][2974:2979] CHIP:TOO: FabricIndex: 1 - [1658142539.457183][2974:2979] CHIP:TOO: SourceNode: 112233 - [1658142539.457209][2974:2979] CHIP:TOO: DataIndex: 1 - [1658142539.457234][2974:2979] CHIP:TOO: } - [1658142539.457350][2974:2979] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142539.457376][2974:2979] CHIP:TOO: Event number: 23 - [1658142539.457402][2974:2979] CHIP:TOO: Priority: Info - [1658142539.457426][2974:2979] CHIP:TOO: Timestamp: 3258719 - [1658142539.457464][2974:2979] CHIP:TOO: LockUserChange: { - [1658142539.457492][2974:2979] CHIP:TOO: LockDataType: 2 - [1658142539.457519][2974:2979] CHIP:TOO: DataOperationType: 0 - [1658142539.457544][2974:2979] CHIP:TOO: OperationSource: 7 - [1658142539.457571][2974:2979] CHIP:TOO: UserIndex: 1 - [1658142539.457596][2974:2979] CHIP:TOO: FabricIndex: 1 - [1658142539.457621][2974:2979] CHIP:TOO: SourceNode: 112233 - [1658142539.457648][2974:2979] CHIP:TOO: DataIndex: 1 - [1658142539.457673][2974:2979] CHIP:TOO: } - [1658142539.457789][2974:2979] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658142539.457815][2974:2979] CHIP:TOO: Event number: 24 - [1658142539.457840][2974:2979] CHIP:TOO: Priority: Info - [1658142539.457865][2974:2979] CHIP:TOO: Timestamp: 3266228 - [1658142539.457903][2974:2979] CHIP:TOO: LockUserChange: { - [1658142539.457931][2974:2979] CHIP:TOO: LockDataType: 6 - [1658142539.457958][2974:2979] CHIP:TOO: DataOperationType: 0 - [1658142539.457983][2974:2979] CHIP:TOO: OperationSource: 7 - [1658142539.458009][2974:2979] CHIP:TOO: UserIndex: 1 - [1658142539.458034][2974:2979] CHIP:TOO: FabricIndex: 1 - [1658142539.458060][2974:2979] CHIP:TOO: SourceNode: 112233 - [1658142539.458085][2974:2979] CHIP:TOO: DataIndex: 1 - [1658142539.458110][2974:2979] CHIP:TOO: } + On TH verify that LockUserChange event has priority set as INFO and LockDataType is set to UserIndex + + [1658223096.124315][4517:4522] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1658223096.124350][4517:4522] CHIP:TOO: Event number: 3 + [1658223096.124380][4517:4522] CHIP:TOO: Priority: Info + [1658223096.124409][4517:4522] CHIP:TOO: Timestamp: 14584496 + [1658223096.124583][4517:4522] CHIP:TOO: LockUserChange: { + [1658223096.124633][4517:4522] CHIP:TOO: LockDataType: 2 + [1658223096.124668][4517:4522] CHIP:TOO: DataOperationType: 0 + [1658223096.124700][4517:4522] CHIP:TOO: OperationSource: 7 + [1658223096.124731][4517:4522] CHIP:TOO: UserIndex: 1 + [1658223096.124763][4517:4522] CHIP:TOO: FabricIndex: 1 + [1658223096.124796][4517:4522] CHIP:TOO: SourceNode: 112233 + [1658223096.124827][4517:4522] CHIP:TOO: DataIndex: 1 + [1658223096.124857][4517:4522] CHIP:TOO: } + [1658223096.124988][4517:4522] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1658223096.125020][4517:4522] CHIP:TOO: Event number: 4 + [1658223096.125050][4517:4522] CHIP:TOO: Priority: Info + [1658223096.125079][4517:4522] CHIP:TOO: Timestamp: 14612633 + [1658223096.125125][4517:4522] CHIP:TOO: LockUserChange: { + [1658223096.125158][4517:4522] CHIP:TOO: LockDataType: 6 + [1658223096.125190][4517:4522] CHIP:TOO: DataOperationType: 0 + [1658223096.125220][4517:4522] CHIP:TOO: OperationSource: 7 + [1658223096.125250][4517:4522] CHIP:TOO: UserIndex: 1 + [1658223096.125281][4517:4522] CHIP:TOO: FabricIndex: 1 + [1658223096.125312][4517:4522] CHIP:TOO: SourceNode: 112233 + [1658223096.125342][4517:4522] CHIP:TOO: DataIndex: 1 + [1658223096.125372][4517:4522] CHIP:TOO: } disabled: true - label: "TH sends Clear Credential Command to DUT" @@ -880,7 +545,7 @@ tests: verification: | ./chip-tool doorlock clear-credential '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 - Verify on the TH Log: + On TH, verify DUT responds with status code as (SUCCESS) [1658142697.890014][2985:2990] CHIP:DMG: StatusIB = [1658142697.890058][2985:2990] CHIP:DMG: { @@ -904,7 +569,7 @@ tests: verification: | ./chip-tool doorlock clear-user 1 1 1 --timedInteractionTimeoutMs 1000 - Verify on the TH Log: + On TH, verify DUT responds with status code as (SUCCESS) [1658142762.492854][2993:2998] CHIP:DMG: [1658142762.492888][2993:2998] CHIP:DMG: StatusIB = 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 index a7efd0c912d0bf..a990de02601054 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml @@ -131,6 +131,24 @@ tests: arguments: value: false + - label: + "TH writes the RequirePINforRemoteOperation attribute value as False + on the DUT and Verify DUT responds with UNSUPPORTED_WRITE" + PICS: "!DRLK.S.A0033" + command: "writeAttribute" + attribute: "RequirePINforRemoteOperation" + arguments: + value: false + response: + error: UNSUPPORTED_WRITE + + - label: "TH reads the RequirePINforRemoteOperation attribute from the DUT" + PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 + command: "readAttribute" + attribute: "RequirePINforRemoteOperation" + response: + value: false + - label: "TH sends Lock Door Command to the DUT without PINCode" PICS: DRLK.S.C00.Rsp command: "LockDoor" @@ -156,6 +174,17 @@ tests: arguments: value: true + - label: + "TH writes the RequirePINforRemoteOperation attribute value as True on + the DUT and Verify DUT responds with UNSUPPORTED_WRITE" + PICS: "!DRLK.S.A0033" + command: "writeAttribute" + attribute: "RequirePINforRemoteOperation" + arguments: + value: true + response: + error: UNSUPPORTED_WRITE + - label: "TH reads the RequirePINforRemoteOperation attribute from the DUT" PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 command: "readAttribute" @@ -164,7 +193,7 @@ tests: value: true - label: "TH sends Lock Door Command to the DUT with valid PINCode" - PICS: DRLK.S.C00.Rsp + PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 command: "LockDoor" timedInteractionTimeoutMs: 10000 arguments: @@ -173,7 +202,7 @@ tests: value: "123456" - label: "TH sends Lock Door Command to the DUT without valid PINCode" - PICS: DRLK.S.C00.Rsp + PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 command: "LockDoor" timedInteractionTimeoutMs: 10000 arguments: @@ -185,17 +214,15 @@ tests: - label: "TH sends Lock Door Command to the DUT without any argument PINCode" - PICS: DRLK.S.C00.Rsp + PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 command: "LockDoor" timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "pinCode" - value: "" response: error: FAILURE - - label: "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT" + - label: + "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and + Verify that the DUT sends Success response" PICS: DRLK.S.A0030 command: "writeAttribute" attribute: "WrongCodeEntryLimit" @@ -203,14 +230,36 @@ tests: value: 3 - label: - "TH writes UserCodeTemporaryDisableTime attribute value as 5 seconds - on the DUT" + "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and + verify DUT responds with UNSUPPORTED_WRITE" + PICS: "!DRLK.S.A0030" + command: "writeAttribute" + attribute: "WrongCodeEntryLimit" + arguments: + value: 3 + response: + error: UNSUPPORTED_WRITE + + - label: + "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds + on the DUT and Verify that the DUT send the Success response" PICS: DRLK.S.A0031 command: "writeAttribute" attribute: "UserCodeTemporaryDisableTime" arguments: value: 15 + - label: + "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds + on the DUT and Verify DUT responds with UNSUPPORTED_WRITE" + PICS: "!DRLK.S.A0031" + command: "writeAttribute" + attribute: "UserCodeTemporaryDisableTime" + arguments: + value: 15 + response: + error: UNSUPPORTED_WRITE + - label: "TH sends Lock Door Command to the DUT with invalid PINCode" PICS: DRLK.S.C00.Rsp command: "LockDoor" @@ -218,7 +267,7 @@ tests: arguments: values: - name: "pinCode" - value: "12345" + value: "123458" response: error: FAILURE @@ -229,7 +278,7 @@ tests: arguments: values: - name: "pinCode" - value: "54321" + value: "123458" response: error: FAILURE @@ -240,7 +289,7 @@ tests: arguments: values: - name: "pinCode" - value: "987623" + value: "123458" response: error: FAILURE @@ -251,25 +300,49 @@ tests: arguments: values: - name: "pinCode" - value: "67890" + value: "123458" response: error: FAILURE - - label: "TH reads UserCodeTemporaryDisableTime attribute from DUT" - PICS: DRLK.S.A0031 - command: "readAttribute" - attribute: "UserCodeTemporaryDisableTime" - response: - value: 15 + - label: + "TH reads UserCodeTemporaryDisableTime attribute from DUT and After + sending 3 failure responses verify that UserCodeTemporaryDisableTime + attribute is triggered" + verification: | + ./chip-tool doorlock read user-code-temporary-disable-time 1 1 - - label: "TH sends Lock Door Command to the DUT with valid PINCode" - PICS: DRLK.S.C00.Rsp - command: "LockDoor" - timedInteractionTimeoutMs: 10000 + On TH, verify the UserCodeTemporaryDisableTime value as 15 + + [1657867358.396037][2551:2556] CHIP:DMG: + [1657867358.396067][2551:2556] CHIP:DMG: SuppressResponse = true, + [1657867358.396099][2551:2556] CHIP:DMG: InteractionModelRevision = 1 + [1657867358.396129][2551:2556] CHIP:DMG: } + [1657867358.396286][2551:2556] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0031 DataVersion: 2082875948 + [1657867358.396378][2551:2556] CHIP:TOO: UserCodeTemporaryDisableTime: 15 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DRLK.S.A0031 arguments: values: - - name: "pinCode" - value: "123456" + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH sends Lock Command to the DUT with valid PINCode before + UserCodeTemporaryDisableTime attribute time expires" + verification: | + Verify that DUT sends failure response to the TH + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DRLK.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Clean the created user" command: "ClearUser" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml index b0b84a8a7220c9..9a6d1b97abbdaa 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml @@ -80,7 +80,7 @@ tests: - name: "nextUserIndex" value: null - - label: "Get Max number of Week Day schedules for user" + - label: "TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute" PICS: DRLK.S.F04 && DRLK.S.A0014 command: "readAttribute" attribute: "NumberOfWeekDaySchedulesSupportedPerUser" @@ -90,7 +90,7 @@ tests: minValue: 0 maxValue: 255 - - label: "Get number of supported users" + - label: "TH reads NumberOfTotalUsers Supported attribute" PICS: DRLK.S.F08 && DRLK.S.A0011 command: "readAttribute" attribute: "NumberOfTotalUsersSupported" @@ -100,7 +100,7 @@ tests: minValue: 0 maxValue: 65534 - - label: "Send Set Week Day Schedule Command to DUT" + - label: "TH send Set Week Day Schedule Command" PICS: DRLK.S.F04 && DRLK.S.C0b.Rsp command: "SetWeekDaySchedule" arguments: @@ -121,7 +121,7 @@ tests: value: 55 #issue #18591 - - label: "send GetWeekDay Schedule Command " + - label: "TH send Get Week Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx command: "GetWeekDaySchedule" arguments: @@ -133,44 +133,27 @@ tests: response: values: - name: "weekDayIndex" - constraints: - minValue: 1 - maxValue: NumberOfWeekDaySchedulesSupportedPerUser + value: 1 - name: "userIndex" - constraints: - minValue: 1 - maxValue: NumberOfTotalUsersSupported + value: 1 - name: "status" value: 0x0 - name: "daysMask" - constraints: - hasValue: true - minValue: 0 - maxValue: 6 + value: 2 - name: "startHour" - constraints: - hasValue: true - minValue: 0 - maxValue: 23 + value: 15 - name: "startMinute" - constraints: - hasValue: true - minValue: 0 - maxValue: 59 + value: 45 - name: "endHour" constraints: hasValue: true - minValue: 0 - maxValue: 23 + minValue: 16 - name: "endMinute" constraints: hasValue: true - minValue: 0 - maxValue: 59 + minValue: 55 - - label: - "Send Set Week Day Schedule Command to DUT and verify INVALID_COMMAND - response" + - label: "TH send Set Week Day Schedule Command" PICS: DRLK.S.F04 && DRLK.S.C0b.Rsp command: "SetWeekDaySchedule" arguments: @@ -192,9 +175,7 @@ tests: response: error: INVALID_COMMAND - - label: - "send GetWeekDay Schedule Command to DUT and verify INVALID_COMMAND - response" + - label: "TH send Get Week Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx command: "GetWeekDaySchedule" arguments: @@ -227,7 +208,7 @@ tests: constraints: hasValue: false - - label: "Clear all week day schedules for the first user" + - label: "TH sends Clear Week Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0d.Rsp command: "ClearWeekDaySchedule" arguments: @@ -237,19 +218,19 @@ tests: - name: "userIndex" value: 1 - - label: "send GetWeekDay Schedule Command " + - label: "TH sends Get Week Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx command: "GetWeekDaySchedule" arguments: values: - name: "weekDayIndex" - value: 2 + value: 1 - name: "userIndex" value: 1 response: values: - name: "weekDayIndex" - value: 2 + value: 1 - name: "userIndex" value: 1 - name: "status" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml index e5b7de063a3908..408fc6a9f4c8a8 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml @@ -80,7 +80,7 @@ tests: - name: "nextUserIndex" value: null - - label: "Get Max number of year Day schedules for user" + - label: "TH reads NumberOfYearDay SchedulesSupportedPerUser attribute" PICS: DRLK.S.F04 && DRLK.S.A0015 command: "readAttribute" attribute: "NumberOfYearDaySchedulesSupportedPerUser" @@ -90,7 +90,7 @@ tests: minValue: 0 maxValue: 255 - - label: "Get number of supported users" + - label: "TH reads NumberOfTotalUsers Supported attribute" PICS: DRLK.C.F08 && DRLK.S.A0011 command: "readAttribute" attribute: "NumberOfTotalUsersSupported" @@ -100,7 +100,7 @@ tests: minValue: 0 maxValue: 65534 - - label: "Send Set Year Day Schedule Command to DUT" + - label: "TH sends Set Year Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0e.Rsp command: "SetYearDaySchedule" arguments: @@ -115,7 +115,7 @@ tests: value: 1980 #issue #18591 - - label: "send Get Year Day Schedule Command" + - label: "TH sends Get Year Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx command: "GetYearDaySchedule" arguments: @@ -127,27 +127,19 @@ tests: response: values: - name: "YearDayIndex" - constraints: - minValue: 1 - maxValue: NumberOfYearDaySchedulesSupportedPerUser + value: 1 - name: "userIndex" - constraints: - minValue: 1 - maxValue: NumberOfTotalUsersSupported + value: 1 - name: "status" value: 0x0 - name: "LocalStartTime" - constraints: - hasValue: true - type: epoch-s + value: 960 - name: "LocalEndTime" + value: 1980 constraints: - hasValue: true - type: epoch-s + minValue: 961 - - label: - "Send Set Year Day Schedule Command to DUT and verify INVALID_COMMAND - response" + - label: "TH send Set Year Day Schedule Command to DUT" PICS: DRLK.S.C0e.Rsp command: "SetYearDaySchedule" arguments: @@ -163,9 +155,7 @@ tests: response: error: INVALID_COMMAND - - label: - "send Get Year Day Schedule Command to DUT and Verify INVALID_FIELD - response" + - label: "TH sends Get Year Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx command: "GetYearDaySchedule" arguments: @@ -189,8 +179,27 @@ tests: constraints: hasValue: false - - label: - "send Get Year Day Schedule Command to DUT and verify FAILURE response" + - label: "Create a user with userIndex as 5" + command: "SetUser" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "operationType" + value: 0 + - name: "userIndex" + value: 5 + - name: "userName" + value: "xxx" + - name: "userUniqueId" + value: 6452 + - name: "userStatus" + value: 1 + - name: "userType" + value: 0 + - name: "credentialRule" + value: 0 + + - label: "TH sends Get Year Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx command: "GetYearDaySchedule" arguments: @@ -206,7 +215,7 @@ tests: - name: "userIndex" value: 5 - name: "status" - value: 0x01 + value: 0x8B - name: "LocalStartTime" constraints: hasValue: false @@ -214,7 +223,7 @@ tests: constraints: hasValue: false - - label: "Clear a year day schedule for the first user" + - label: "TH sends Clear Year Day Schedule to DUT" PICS: DRLK.S.C10.Rsp command: "ClearYearDaySchedule" arguments: @@ -224,9 +233,7 @@ tests: - name: "userIndex" value: 1 - - label: - "send Get Year Day Schedule Command to DUT and verify NOT_FOUND - response" + - label: "TH sends Get Year Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx && DRLK.S.C10.Rsp command: "GetYearDaySchedule" arguments: @@ -242,7 +249,7 @@ tests: - name: "userIndex" value: 1 - name: "status" - value: 0x01 + value: 0x8B - name: "LocalStartTime" constraints: hasValue: false @@ -250,7 +257,7 @@ tests: constraints: hasValue: false - - label: "Send Set Year Day Schedule Command to DUT " + - label: "TH sends Set Year Day Schedule Command to DUT" PICS: DRLK.S.C0e.Rsp command: "SetYearDaySchedule" arguments: @@ -264,7 +271,7 @@ tests: - name: "LocalEndTime" value: 2100 - - label: "send Get Year Day Schedule Command" + - label: "TH sends Get Year Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx command: "GetYearDaySchedule" arguments: @@ -285,6 +292,20 @@ tests: value: 1080 - name: "LocalEndTime" value: 2100 + constraints: + minValue: 1081 + + - label: "TH sends Clear Year Day Schedule to DUT" + PICS: DRLK.S.F04 && DRLK.S.C10.Rsp + command: "ClearYearDaySchedule" + arguments: + values: + - name: "yearDayIndex" + value: 0 + - name: "userIndex" + value: 0 + response: + error: INVALID_COMMAND - label: "Clear a year day schedule for the first user" PICS: DRLK.S.F04 && DRLK.S.C10.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml index 2c1da053d9c7fe..0050fdaa3862d1 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml @@ -92,6 +92,7 @@ tests: minValue: 0 maxValue: 255 + #Issues 20930 - label: "TH sends Set Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" @@ -132,9 +133,7 @@ tests: constraints: type: boolean - name: "userIndex" - constraints: - minValue: 1 - maxValue: NumberOfTotalUsersSupported + value: 1 - name: "creatorFabricIndex" value: 1 - name: "lastModifiedFabricIndex" @@ -142,9 +141,7 @@ tests: - name: "nextCredentialIndex" value: null - - label: - "TH sends Set Credential Command to DUT and verify the - INVALID_COMMAND if any of the fields are invalid" + - label: "TH sends Set Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" timedInteractionTimeoutMs: 10000 @@ -155,7 +152,7 @@ tests: - name: "credential" value: { CredentialType: 1, CredentialIndex: 2 } - name: "credentialData" - value: "1234" + value: "4321" - name: "userIndex" value: 2 - name: "userStatus" @@ -171,9 +168,7 @@ tests: - name: "nextCredentialIndex" value: 3 - - label: - "TH sends Set Credential Command to DUT and verify response as - DUPLICATE if CredentialData is repeated" + - label: "TH sends Set Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" timedInteractionTimeoutMs: 10000 @@ -200,9 +195,8 @@ tests: - name: "nextCredentialIndex" value: 3 - - label: - "TH sends Set Credential Command to DUT and verify response as - OCCUPIED if CredentialIndex is repeated" + #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. + - label: "TH sends Set Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" timedInteractionTimeoutMs: 10000 @@ -229,9 +223,86 @@ tests: - name: "nextCredentialIndex" value: 2 + #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. + - label: + "TH sends Set Credential Command to DUT and Verify that the DUT sends + Set Credential Response command with response as OCCUPIED if the + CredentialIndex is repeated" + verification: | + ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 1 }' 123456 2 0 0 1 1 --timedInteractionTimeoutMs 1000 + + [1656506733.767451][27276:27281] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 + [1656506733.767542][27276:27281] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 + [1656506733.767663][27276:27281] CHIP:TOO: SetCredentialResponse: { + [1656506733.767731][27276:27281] CHIP:TOO: status: 2 + [1656506733.767779][27276:27281] CHIP:TOO: userIndex: null + [1656506733.767826][27276:27281] CHIP:TOO: nextCredentialIndex: 2 + [1656506733.767871][27276:27281] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. + - label: "TH sends Set Credential Command to DUT" + PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + command: "SetCredential" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "operationType" + value: 0 + - name: "credential" + value: { CredentialType: 1, CredentialIndex: 3 } + - name: "credentialData" + value: "123456" + - name: "userIndex" + value: 3 + - name: "userStatus" + value: 0 + - name: "userType" + value: 0 + response: + values: + - name: "status" + value: 0x02 + - name: "userIndex" + value: null + - name: "nextCredentialIndex" + value: 4 + + #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. - label: - "TH sends Set Credential Command to DUT and verify the DUT response as - OCCUPIED if the CredentialIndex is not associated with the UserIndex" + "TH sends Set Credential Command to DUT and Verify that the DUT sends + Set Credential Response command with response as OCCUPIED if the + CredentialIndex is repeated" + verification: | + ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 3 }' 123456 3 0 0 1 1 --timedInteractionTimeoutMs 1000 + + [1656506733.767451][27276:27281] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 + [1656506733.767542][27276:27281] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 + [1656506733.767663][27276:27281] CHIP:TOO: SetCredentialResponse: { + [1656506733.767731][27276:27281] CHIP:TOO: status: 2 + [1656506733.767779][27276:27281] CHIP:TOO: userIndex: null + [1656506733.767826][27276:27281] CHIP:TOO: nextCredentialIndex: 4 + [1656506733.767871][27276:27281] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. + - label: "TH sends Set Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" timedInteractionTimeoutMs: 10000 @@ -258,6 +329,31 @@ tests: - name: "nextCredentialIndex" value: 4 + #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. + - label: + "TH sends Set Credential Command to DUT and Verify that the DUT sends + Set Credential Response command with response as OCCUPIED if the + CredentialIndex is repeated" + verification: | + ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 3 }' 123456 2 0 0 1 1 --timedInteractionTimeoutMs 1000 + + [1656506733.767451][27276:27281] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 + [1656506733.767542][27276:27281] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 + [1656506733.767663][27276:27281] CHIP:TOO: SetCredentialResponse: { + [1656506733.767731][27276:27281] CHIP:TOO: status: 2 + [1656506733.767779][27276:27281] CHIP:TOO: userIndex: null + [1656506733.767826][27276:27281] CHIP:TOO: nextCredentialIndex: 4 + [1656506733.767871][27276:27281] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + - label: "TH sends Clear Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C26.Rsp command: "ClearCredential" @@ -267,9 +363,7 @@ tests: - name: "credential" value: { CredentialType: 1, CredentialIndex: 1 } - - label: - "TH sends Get Credential Status Command and verify that the - CredentialType and CredentialIndex for the provided value is cleared" + - label: "TH sends Get Credential Status Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx command: "GetCredentialStatus" arguments: @@ -318,7 +412,7 @@ tests: - name: "operationType" value: 0 - name: "credential" - value: { CredentialType: 1, CredentialIndex: 3 } + value: { CredentialType: 1, CredentialIndex: 1 } - name: "credentialData" value: "123456" - name: "userIndex" @@ -334,7 +428,7 @@ tests: - name: "userIndex" value: null - name: "nextCredentialIndex" - value: 4 + value: 2 - label: "TH sends Clear Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C26.Rsp @@ -345,6 +439,7 @@ tests: - name: "credential" value: { CredentialType: 1, CredentialIndex: 65534 } + #Issue 20991 expected NULL values but got INVALID_COMMAND response fix script once the issue is fixed. - label: "TH sends Get Credential Status Command" PICS: DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx command: "GetCredentialStatus" @@ -355,6 +450,39 @@ tests: response: error: INVALID_COMMAND + #Issue 20991 expected NULL values but got INVALID_COMMAND response fix script once the issue is fixed. + - label: + "TH sends Get Credential command to DUT and Verify that the + CredentialType for the provided value is cleared Verify that the + CredentialIndex is cleared" + verification: | + ./chip-tool doorlock get-credential-status '{ "credentialType" : 1 , "credentialIndex" : 65534 }' 1 1 --timedInteractionTimeoutMs 1000 + Verify on the TH Log: + + [1654698175.243889][5478:5483] CHIP:DMG: + [1654698175.243965][5478:5483] CHIP:DMG: StatusIB = + [1654698175.244054][5478:5483] CHIP:DMG: { + [1654698175.244136][5478:5483] CHIP:DMG: status = 0x85 (INVALID_COMMAND), + [1654698175.244218][5478:5483] CHIP:DMG: }, + [1654698175.244307][5478:5483] CHIP:DMG: + [1654698175.244388][5478:5483] CHIP:DMG: }, + [1654698175.244473][5478:5483] CHIP:DMG: + [1654698175.244541][5478:5483] CHIP:DMG: }, + [1654698175.244621][5478:5483] CHIP:DMG: + [1654698175.244681][5478:5483] CHIP:DMG: ], + [1654698175.244755][5478:5483] CHIP:DMG: + [1654698175.244814][5478:5483] CHIP:DMG: InteractionModelRevision = 1 + [1654698175.244872][5478:5483] CHIP:DMG: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + - label: "TH sends Get Credential Status Command" PICS: DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx command: "GetCredentialStatus" @@ -385,3 +513,11 @@ tests: value: { CredentialType: 8, CredentialIndex: 2 } response: error: INVALID_COMMAND + + - label: "Cleanup the created user" + command: "ClearUser" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "userIndex" + value: 1 diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml index 953d7e237a0682..c89dd737772221 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml @@ -26,7 +26,24 @@ tests: verification: | ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 - verify on Reference app receives the right response for the data sent in the above commands + Verify Test Harness receives the Lock Door command from the DUT on TH / lock app log: + + [1658397948.013891][2822:2827] CHIP:DMG: CommandPathIB = + [1658397948.013943][2822:2827] CHIP:DMG: { + [1658397948.013993][2822:2827] CHIP:DMG: EndpointId = 0x1, + [1658397948.014040][2822:2827] CHIP:DMG: ClusterId = 0x101, + [1658397948.014086][2822:2827] CHIP:DMG: CommandId = 0x0, + [1658397948.014127][2822:2827] CHIP:DMG: }, + [1658397948.014172][2822:2827] CHIP:DMG: + [1658397948.014208][2822:2827] CHIP:DMG: StatusIB = + [1658397948.014253][2822:2827] CHIP:DMG: { + [1658397948.014298][2822:2827] CHIP:DMG: status = 0x00 (SUCCESS), + [1658397948.014342][2822:2827] CHIP:DMG: }, + [1658397948.014386][2822:2827] CHIP:DMG: + + + DUT/ChipTool log: + [1654755271.172070][2969:2969] CHIP:DMG: InvokeRequestMessage = [1654755271.172131][2969:2969] CHIP:DMG: { @@ -63,7 +80,24 @@ tests: PICS: DRLK.C.C01.Tx verification: | ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 - verify on Reference app receives the right response for the data sent in the above commands + Verify Test Harness receives the Unlock Door command from the DUT on TH / lock app log: + + + [1658398068.142926][2835:2840] CHIP:DMG: CommandPathIB = + [1658398068.142976][2835:2840] CHIP:DMG: { + [1658398068.143026][2835:2840] CHIP:DMG: EndpointId = 0x1, + [1658398068.143072][2835:2840] CHIP:DMG: ClusterId = 0x101, + [1658398068.143108][2835:2840] CHIP:DMG: CommandId = 0x1, + [1658398068.143143][2835:2840] CHIP:DMG: }, + [1658398068.143184][2835:2840] CHIP:DMG: + [1658398068.143243][2835:2840] CHIP:DMG: StatusIB = + [1658398068.143287][2835:2840] CHIP:DMG: { + [1658398068.143334][2835:2840] CHIP:DMG: status = 0x00 (SUCCESS), + [1658398068.143377][2835:2840] CHIP:DMG: }, + [1658398068.143422][2835:2840] CHIP:DMG: + + + DUT/ChipTool log: [1654755356.562412][2969:2969] CHIP:DMG: InvokeRequestMessage = [1654755356.562459][2969:2969] CHIP:DMG: { @@ -100,7 +134,23 @@ tests: PICS: DRLK.C.C03.Tx verification: | ./chip-tool doorlock unlock-with-timeout 60 1 1 --timedInteractionTimeoutMs 1000 - verify on Reference app receives the right response for the data sent in the above commands + + Verify Test Harness receives the Unlock with Timeout command from the DUT on TH / lock app log: + + + [1658398109.395806][2844:2849] CHIP:DMG: CommandPathIB = + [1658398109.395850][2844:2849] CHIP:DMG: { + [1658398109.395900][2844:2849] CHIP:DMG: EndpointId = 0x1, + [1658398109.395942][2844:2849] CHIP:DMG: ClusterId = 0x101, + [1658398109.395990][2844:2849] CHIP:DMG: CommandId = 0x3, + [1658398109.396037][2844:2849] CHIP:DMG: }, + [1658398109.396076][2844:2849] CHIP:DMG: + [1658398109.396117][2844:2849] CHIP:DMG: StatusIB = + [1658398109.396162][2844:2849] CHIP:DMG: { + [1658398109.396200][2844:2849] CHIP:DMG: status = 0x00 (SUCCESS), + [1658398109.396246][2844:2849] CHIP:DMG: }, + + DUT/ChipTool log: [1654755446.175911][2969:2969] CHIP:DMG: InvokeRequestMessage = [1654755446.175940][2969:2969] CHIP:DMG: { @@ -140,8 +190,30 @@ tests: - label: "DUT sends Set Week Day Schedule command to TH." PICS: DRLK.S.F04 && DRLK.C.C0b.Tx verification: | + ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 + + Verify Test Harness receives the Set user command from the DUT on TH / lock app log: + + [1656497453.684077][25847:25853] CHIP:DMG: status = 0x00 (SUCCESS), + ./chip-tool doorlock set-week-day-schedule 1 1 2 15 45 16 55 1 1 - verify on Reference app receives the right response for the data sent in the above commands + + Verify Test Harness receives the Set Week Day Schedule command from the DUT on TH / lock app log: + + [1658398235.190085][2867:2873] CHIP:DMG: CommandPathIB = + [1658398235.190127][2867:2873] CHIP:DMG: { + [1658398235.190170][2867:2873] CHIP:DMG: EndpointId = 0x1, + [1658398235.190213][2867:2873] CHIP:DMG: ClusterId = 0x101, + [1658398235.190253][2867:2873] CHIP:DMG: CommandId = 0xb, + [1658398235.190290][2867:2873] CHIP:DMG: }, + [1658398235.190358][2867:2873] CHIP:DMG: + [1658398235.190404][2867:2873] CHIP:DMG: StatusIB = + [1658398235.190452][2867:2873] CHIP:DMG: { + [1658398235.190499][2867:2873] CHIP:DMG: status = 0x00 (SUCCESS), + [1658398235.190536][2867:2873] CHIP:DMG: }, + + + DUT/ChipTool log: [1657115333.959925][8804:8804] CHIP:DMG: InvokeRequestMessage = [1657115333.959993][8804:8804] CHIP:DMG: { @@ -184,7 +256,25 @@ tests: PICS: DRLK.S.F04 && DRLK.C.C0c.Tx verification: | ./chip-tool doorlock get-week-day-schedule 1 1 1 1 - verify on Reference app receives the right response for the data sent in the above commands + Verify Test Harness receives the Get Week Day Schedule command from the DUT on TH / lock app log: + + + [1658398448.669494][2880:2886] CHIP:DMG: }, + [1658398448.669599][2880:2886] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000C + [1658398448.669668][2880:2886] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_000C + [1658398448.669754][2880:2886] CHIP:TOO: GetWeekDayScheduleResponse: { + [1658398448.669809][2880:2886] CHIP:TOO: weekDayIndex: 1 + [1658398448.669838][2880:2886] CHIP:TOO: userIndex: 1 + [1658398448.669867][2880:2886] CHIP:TOO: status: 0 + [1658398448.669922][2880:2886] CHIP:TOO: daysMask: 2 + [1658398448.669963][2880:2886] CHIP:TOO: startHour: 15 + [1658398448.669991][2880:2886] CHIP:TOO: startMinute: 45 + [1658398448.670019][2880:2886] CHIP:TOO: endHour: 16 + [1658398448.670058][2880:2886] CHIP:TOO: endMinute: 55 + [1658398448.670084][2880:2886] CHIP:TOO: } + + + DUT/ChipTool log: [1657115377.506828][8804:8804] CHIP:DMG: InvokeRequestMessage = [1657115377.506895][8804:8804] CHIP:DMG: { @@ -225,7 +315,23 @@ tests: PICS: DRLK.S.F04 && DRLK.C.C0d.Tx verification: | ./chip-tool doorlock clear-week-day-schedule 1 1 1 1 - verify on Reference app receives the right response for the data sent in the above commands + + Verify Test Harness receives the Clear Week Day Schedule command from the DUT on TH / lock app log: + [1658398494.785114][2890:2895] CHIP:DMG: CommandPathIB = + [1658398494.785145][2890:2895] CHIP:DMG: { + [1658398494.785175][2890:2895] CHIP:DMG: EndpointId = 0x1, + [1658398494.785208][2890:2895] CHIP:DMG: ClusterId = 0x101, + [1658398494.785239][2890:2895] CHIP:DMG: CommandId = 0xd, + [1658398494.785268][2890:2895] CHIP:DMG: }, + [1658398494.785302][2890:2895] CHIP:DMG: + [1658398494.785330][2890:2895] CHIP:DMG: StatusIB = + [1658398494.785361][2890:2895] CHIP:DMG: { + [1658398494.785392][2890:2895] CHIP:DMG: status = 0x00 (SUCCESS), + [1658398494.785422][2890:2895] CHIP:DMG: }, + [1658398494.785451][2890:2895] CHIP:DMG: + + + DUT/ChipTool log: [1657115416.513747][8804:8804] CHIP:DMG: InvokeRequestMessage = [1657115416.513812][8804:8804] CHIP:DMG: { @@ -266,7 +372,23 @@ tests: PICS: DRLK.S.F04 && DRLK.C.C0e.Tx verification: | ./chip-tool doorlock set-year-day-schedule 1 1 1080 2100 1 1 - verify on Reference app receives the right response for the data sent in the above commands + + Verify Test Harness receives the Set Year Day Schedule command from the DUT on TH / lock app log: + + + [1658398552.203952][2899:2904] CHIP:DMG: CommandPathIB = + [1658398552.204130][2899:2904] CHIP:DMG: { + [1658398552.204249][2899:2904] CHIP:DMG: EndpointId = 0x1, + [1658398552.204376][2899:2904] CHIP:DMG: ClusterId = 0x101, + [1658398552.204503][2899:2904] CHIP:DMG: CommandId = 0xe, + [1658398552.204629][2899:2904] CHIP:DMG: }, + [1658398552.204748][2899:2904] CHIP:DMG: + [1658398552.204849][2899:2904] CHIP:DMG: StatusIB = + [1658398552.204964][2899:2904] CHIP:DMG: { + [1658398552.205079][2899:2904] CHIP:DMG: status = 0x00 (SUCCESS), + [1658398552.205205][2899:2904] CHIP:DMG: }, + + DUT/ChipTool log: [1657115453.534892][8804:8804] CHIP:DMG: InvokeRequestMessage = [1657115453.534959][8804:8804] CHIP:DMG: { @@ -309,7 +431,21 @@ tests: PICS: DRLK.S.F04 && DRLK.C.C0f.Tx verification: | ./chip-tool doorlock get-year-day-schedule 1 1 1 1 - verify on Reference app receives the right response for the data sent in the above commands + Verify Test Harness receives the Get Year Day Schedule command from the DUT on TH / lock app log: + + + [1658398580.334699][2907:2912] CHIP:DMG: }, + [1658398580.334778][2907:2912] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000F + [1658398580.334837][2907:2912] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_000F + [1658398580.334916][2907:2912] CHIP:TOO: GetYearDayScheduleResponse: { + [1658398580.334959][2907:2912] CHIP:TOO: yearDayIndex: 1 + [1658398580.334988][2907:2912] CHIP:TOO: userIndex: 1 + [1658398580.335016][2907:2912] CHIP:TOO: status: 0 + [1658398580.335045][2907:2912] CHIP:TOO: localStartTime: 1080 + [1658398580.335074][2907:2912] CHIP:TOO: localEndTime: 2100 + [1658398580.335102][2907:2912] CHIP:TOO: } + + DUT/ChipTool log: [1657115480.383098][8804:8804] CHIP:DMG: InvokeRequestMessage = [1657115480.383167][8804:8804] CHIP:DMG: { @@ -350,7 +486,22 @@ tests: PICS: DRLK.S.F04 && DRLK.C.C10.Tx verification: | ./chip-tool doorlock clear-year-day-schedule 1 1 1 1 - verify on Reference app receives the right response for the data sent in the above commands + + Verify Test Harness receives the Clear Year Day Schedule command from the DUT on TH / lock app log: + + [1658398609.109412][2915:2920] CHIP:DMG: CommandPathIB = + [1658398609.109449][2915:2920] CHIP:DMG: { + [1658398609.109496][2915:2920] CHIP:DMG: EndpointId = 0x1, + [1658398609.109547][2915:2920] CHIP:DMG: ClusterId = 0x101, + [1658398609.109596][2915:2920] CHIP:DMG: CommandId = 0x10, + [1658398609.109631][2915:2920] CHIP:DMG: }, + [1658398609.109679][2915:2920] CHIP:DMG: + [1658398609.109723][2915:2920] CHIP:DMG: StatusIB = + [1658398609.109772][2915:2920] CHIP:DMG: { + [1658398609.109822][2915:2920] CHIP:DMG: status = 0x00 (SUCCESS), + [1658398609.109869][2915:2920] CHIP:DMG: }, + + DUT/ChipTool log: [1657115522.132250][8804:8804] CHIP:DMG: InvokeRequestMessage = [1657115522.132318][8804:8804] CHIP:DMG: { @@ -391,7 +542,23 @@ tests: PICS: DRLK.S.F04 && DRLK.C.C11.Tx verification: | ./chip-tool doorlock set-holiday-schedule 1 20 30 0 1 1 - verify on Reference app receives the right response for the data sent in the above commands + + Verify Test Harness receives the Set Holiday Day Schedule command from the DUT on TH / lock app log: + + [1658398634.311670][2925:2930] CHIP:DMG: CommandPathIB = + [1658398634.311724][2925:2930] CHIP:DMG: { + [1658398634.311792][2925:2930] CHIP:DMG: EndpointId = 0x1, + [1658398634.311863][2925:2930] CHIP:DMG: ClusterId = 0x101, + [1658398634.311931][2925:2930] CHIP:DMG: CommandId = 0x11, + [1658398634.311980][2925:2930] CHIP:DMG: }, + [1658398634.312046][2925:2930] CHIP:DMG: + [1658398634.312105][2925:2930] CHIP:DMG: StatusIB = + [1658398634.312160][2925:2930] CHIP:DMG: { + [1658398634.312224][2925:2930] CHIP:DMG: status = 0x00 (SUCCESS), + [1658398634.312286][2925:2930] CHIP:DMG: }, + [1658398634.312335][2925:2930] CHIP:DMG: + + DUT/ChipTool log: [1657115547.835987][8804:8804] CHIP:DMG: InvokeRequestMessage = [1657115547.836055][8804:8804] CHIP:DMG: { @@ -432,7 +599,19 @@ tests: PICS: DRLK.S.F04 && DRLK.C.C12.Tx verification: | ./chip-tool doorlock get-holiday-schedule 1 1 1 - verify on Reference app receives the right response for the data sent in the above commands + Verify Test Harness receives the Get Holiday Day Schedule command from the DUT on TH / lock app log: + + [1658398730.061557][3008:3013] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0012 + [1658398730.061605][3008:3013] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0012 + [1658398730.061687][3008:3013] CHIP:TOO: GetHolidayScheduleResponse: { + [1658398730.061728][3008:3013] CHIP:TOO: holidayIndex: 1 + [1658398730.061753][3008:3013] CHIP:TOO: status: 0 + [1658398730.061778][3008:3013] CHIP:TOO: localStartTime: 20 + [1658398730.061802][3008:3013] CHIP:TOO: localEndTime: 30 + [1658398730.061827][3008:3013] CHIP:TOO: operatingMode: 0 + [1658398730.061850][3008:3013] CHIP:TOO: } + + DUT/ChipTool log: [1655380520.601439][3411:3411] CHIP:DMG: { [1655380520.601461][3411:3411] CHIP:DMG: suppressResponse = false, @@ -467,7 +646,23 @@ tests: PICS: DRLK.S.F04 && DRLK.C.C13.Tx verification: | ./chip-tool doorlock clear-holiday-schedule 1 1 1 - verify on Reference app receives the right response for the data sent in the above commands + + Verify Test Harness receives the Clear Holiday Day Schedule command from the DUT on TH / lock app log: + + [1658398766.330588][3015:3021] CHIP:DMG: CommandPathIB = + [1658398766.330626][3015:3021] CHIP:DMG: { + [1658398766.330666][3015:3021] CHIP:DMG: EndpointId = 0x1, + [1658398766.330705][3015:3021] CHIP:DMG: ClusterId = 0x101, + [1658398766.330743][3015:3021] CHIP:DMG: CommandId = 0x13, + [1658398766.330786][3015:3021] CHIP:DMG: }, + [1658398766.330831][3015:3021] CHIP:DMG: + [1658398766.330867][3015:3021] CHIP:DMG: StatusIB = + [1658398766.330911][3015:3021] CHIP:DMG: { + [1658398766.330955][3015:3021] CHIP:DMG: status = 0x00 (SUCCESS), + [1658398766.330992][3015:3021] CHIP:DMG: }, + [1658398766.331032][3015:3021] CHIP:DMG: + + DUT/ChipTool log: [1657115633.501630][8804:8804] CHIP:DMG: InvokeRequestMessage = [1657115633.501697][8804:8804] CHIP:DMG: { @@ -504,273 +699,334 @@ tests: - label: "DUT sends Set USer command to TH." PICS: DRLK.S.F08 && DRLK.C.C1a.Tx verification: | - ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - verify on Reference app receives the right response for the data sent in the above commands - - [1657115673.129634][8804:8804] CHIP:DMG: InvokeRequestMessage = - [1657115673.129696][8804:8804] CHIP:DMG: { - [1657115673.129753][8804:8804] CHIP:DMG: suppressResponse = false, - [1657115673.129818][8804:8804] CHIP:DMG: timedRequest = true, - [1657115673.129877][8804:8804] CHIP:DMG: InvokeRequests = - [1657115673.129959][8804:8804] CHIP:DMG: [ - [1657115673.130019][8804:8804] CHIP:DMG: CommandDataIB = - [1657115673.130094][8804:8804] CHIP:DMG: { - [1657115673.130156][8804:8804] CHIP:DMG: CommandPathIB = - [1657115673.130230][8804:8804] CHIP:DMG: { - [1657115673.130311][8804:8804] CHIP:DMG: EndpointId = 0x1, - [1657115673.130392][8804:8804] CHIP:DMG: ClusterId = 0x101, - [1657115673.130470][8804:8804] CHIP:DMG: CommandId = 0x1a, - [1657115673.130545][8804:8804] CHIP:DMG: }, - [1657115673.130622][8804:8804] CHIP:DMG: - [1657115673.130687][8804:8804] CHIP:DMG: CommandFields = - [1657115673.130762][8804:8804] CHIP:DMG: { - [1657115673.130839][8804:8804] CHIP:DMG: 0x0 = 0, - [1657115673.130928][8804:8804] CHIP:DMG: 0x1 = 1, - [1657115673.131013][8804:8804] CHIP:DMG: 0x2 = "xxx", - [1657115673.131094][8804:8804] CHIP:DMG: 0x3 = 6452, - [1657115673.131183][8804:8804] CHIP:DMG: 0x4 = 1, - [1657115673.131264][8804:8804] CHIP:DMG: 0x5 = 0, - [1657115673.131345][8804:8804] CHIP:DMG: 0x6 = 0, - [1657115673.131423][8804:8804] CHIP:DMG: }, - [1657115673.131493][8804:8804] CHIP:DMG: }, - [1657115673.131572][8804:8804] CHIP:DMG: - [1657115673.131632][8804:8804] CHIP:DMG: ], - [1657115673.131708][8804:8804] CHIP:DMG: - [1657115673.131766][8804:8804] CHIP:DMG: InteractionModelRevision = 1 - [1657115673.131823][8804:8804] CHIP:DMG: }, - [1657115673.131976][8804:8804] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1657115673.132056][8804:8804] CHIP:DMG: AccessControl: allowed - [1657115673.132122][8804:8804] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001A - [1657115673.132232][8804:8804] CHIP:ZCL: [SetUser] Incoming command [endpointId=1,userIndex=1] - [1657115673.132324][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1657115673.132380][8804:8804] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=0] - [1657115673.132436][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=1,creator=1,modifier=1,userName="xxx",uniqueId=1934,userStatus=1,userType=0,credentialRule=0,credentials=(nil),totalCredentials=0] - [1657115673.132499][8804:8804] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=1,adjustedIndex=0] - [1657115673.132551][8804:8804] CHIP:ZCL: [createUser] User created [endpointId=1,creatorFabricId=1,userIndex=1,userName="xxx",userUniqueId=0x1934,userStatus=1,userType=0,credentialRule=0,totalCredentials=0] - [1657115673.132702][8804:8804] CHIP:EVL: LogEvent event number: 0x0000000000000003 priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x000000000221E52F - [1657115673.132770][8804:8804] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=3,dataType=2,operation=0,nodeId=112233,fabricIndex=1] + ./chip-tool doorlock set-user 0 2 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 + + Verify Test Harness receives the Set User Door command from the DUT on TH / lock app log: + + [1658398796.184936][3022:3027] CHIP:DMG: CommandPathIB = + [1658398796.184985][3022:3027] CHIP:DMG: { + [1658398796.185037][3022:3027] CHIP:DMG: EndpointId = 0x1, + [1658398796.185085][3022:3027] CHIP:DMG: ClusterId = 0x101, + [1658398796.185135][3022:3027] CHIP:DMG: CommandId = 0x1a, + [1658398796.185179][3022:3027] CHIP:DMG: }, + [1658398796.185233][3022:3027] CHIP:DMG: + [1658398796.185278][3022:3027] CHIP:DMG: StatusIB = + [1658398796.185331][3022:3027] CHIP:DMG: { + [1658398796.185379][3022:3027] CHIP:DMG: status = 0x00 (SUCCESS), + [1658398796.185429][3022:3027] CHIP:DMG: }, + [1658398796.185477][3022:3027] CHIP:DMG: + + DUT/ChipTool log: + + [1658398796.181348][2474:2474] CHIP:DMG: InvokeRequestMessage = + [1658398796.181385][2474:2474] CHIP:DMG: { + [1658398796.181419][2474:2474] CHIP:DMG: suppressResponse = false, + [1658398796.181457][2474:2474] CHIP:DMG: timedRequest = true, + [1658398796.181493][2474:2474] CHIP:DMG: InvokeRequests = + [1658398796.181542][2474:2474] CHIP:DMG: [ + [1658398796.181578][2474:2474] CHIP:DMG: CommandDataIB = + [1658398796.181618][2474:2474] CHIP:DMG: { + [1658398796.181656][2474:2474] CHIP:DMG: CommandPathIB = + [1658398796.181703][2474:2474] CHIP:DMG: { + [1658398796.181750][2474:2474] CHIP:DMG: EndpointId = 0x1, + [1658398796.181800][2474:2474] CHIP:DMG: ClusterId = 0x101, + [1658398796.181848][2474:2474] CHIP:DMG: CommandId = 0x1a, + [1658398796.181892][2474:2474] CHIP:DMG: }, + [1658398796.181939][2474:2474] CHIP:DMG: + [1658398796.181981][2474:2474] CHIP:DMG: CommandFields = + [1658398796.182026][2474:2474] CHIP:DMG: { + [1658398796.182072][2474:2474] CHIP:DMG: 0x0 = 0, + [1658398796.182120][2474:2474] CHIP:DMG: 0x1 = 2, + [1658398796.182171][2474:2474] CHIP:DMG: 0x2 = "xxx", + [1658398796.182220][2474:2474] CHIP:DMG: 0x3 = 6452, + [1658398796.182269][2474:2474] CHIP:DMG: 0x4 = 1, + [1658398796.182322][2474:2474] CHIP:DMG: 0x5 = 0, + [1658398796.182371][2474:2474] CHIP:DMG: 0x6 = 0, + [1658398796.182419][2474:2474] CHIP:DMG: }, + [1658398796.182462][2474:2474] CHIP:DMG: }, + [1658398796.182512][2474:2474] CHIP:DMG: + [1658398796.182547][2474:2474] CHIP:DMG: ], + [1658398796.182594][2474:2474] CHIP:DMG: + [1658398796.182629][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658398796.182664][2474:2474] CHIP:DMG: }, + [1658398796.182758][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a + [1658398796.182809][2474:2474] CHIP:DMG: AccessControl: allowed + [1658398796.182849][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001A + [1658398796.182918][2474:2474] CHIP:ZCL: [SetUser] Incoming command [endpointId=1,userIndex=2] + [1658398796.182977][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=2] + [1658398796.183011][2474:2474] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=1] + [1658398796.183043][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=2,creator=1,modifier=1,userName="xxx",uniqueId=1934,userStatus=1,userType=0,credentialRule=0,credentials=(nil),totalCredentials=0] + [1658398796.183081][2474:2474] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=2,adjustedIndex=1] disabled: true - label: "DUT sends Get User to TH." PICS: DRLK.S.F08 && DRLK.C.C1b.Tx verification: | - ./chip-tool doorlock get-user 1 1 1 --timedInteractionTimeoutMs 1000 - verify on Reference app receives the right response for the data sent in the above commands - - [1657115701.117285][8804:8804] CHIP:DMG: InvokeRequestMessage = - [1657115701.117346][8804:8804] CHIP:DMG: { - [1657115701.117403][8804:8804] CHIP:DMG: suppressResponse = false, - [1657115701.117467][8804:8804] CHIP:DMG: timedRequest = true, - [1657115701.117527][8804:8804] CHIP:DMG: InvokeRequests = - [1657115701.117601][8804:8804] CHIP:DMG: [ - [1657115701.117660][8804:8804] CHIP:DMG: CommandDataIB = - [1657115701.117779][8804:8804] CHIP:DMG: { - [1657115701.117851][8804:8804] CHIP:DMG: CommandPathIB = - [1657115701.117932][8804:8804] CHIP:DMG: { - [1657115701.118014][8804:8804] CHIP:DMG: EndpointId = 0x1, - [1657115701.118099][8804:8804] CHIP:DMG: ClusterId = 0x101, - [1657115701.118180][8804:8804] CHIP:DMG: CommandId = 0x1b, - [1657115701.118256][8804:8804] CHIP:DMG: }, - [1657115701.118336][8804:8804] CHIP:DMG: - [1657115701.118403][8804:8804] CHIP:DMG: CommandFields = - [1657115701.118482][8804:8804] CHIP:DMG: { - [1657115701.118564][8804:8804] CHIP:DMG: 0x0 = 1, - [1657115701.118645][8804:8804] CHIP:DMG: }, - [1657115701.118716][8804:8804] CHIP:DMG: }, - [1657115701.118789][8804:8804] CHIP:DMG: - [1657115701.118847][8804:8804] CHIP:DMG: ], - [1657115701.118919][8804:8804] CHIP:DMG: - [1657115701.118977][8804:8804] CHIP:DMG: InteractionModelRevision = 1 - [1657115701.119035][8804:8804] CHIP:DMG: }, - [1657115701.119186][8804:8804] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1657115701.119271][8804:8804] CHIP:DMG: AccessControl: allowed - [1657115701.119338][8804:8804] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001B - [1657115701.119416][8804:8804] CHIP:ZCL: [GetUser] Incoming command [endpointId=1,userIndex=1] + ./chip-tool doorlock get-user 2 1 1 --timedInteractionTimeoutMs 1000 + Verify Test Harness receives the Get User command from the DUT on TH / lock app log: + + [1658398920.382466][3033:3038] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001C + [1658398920.382524][3033:3038] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_001C + [1658398920.382637][3033:3038] CHIP:TOO: GetUserResponse: { + [1658398920.382679][3033:3038] CHIP:TOO: userIndex: 2 + [1658398920.382710][3033:3038] CHIP:TOO: userName: xxx + [1658398920.382740][3033:3038] CHIP:TOO: userUniqueId: 6452 + [1658398920.382770][3033:3038] CHIP:TOO: userStatus: 1 + [1658398920.382799][3033:3038] CHIP:TOO: userType: 0 + [1658398920.382827][3033:3038] CHIP:TOO: credentialRule: 0 + [1658398920.382856][3033:3038] CHIP:TOO: credentials: null + [1658398920.382885][3033:3038] CHIP:TOO: creatorFabricIndex: 1 + [1658398920.382914][3033:3038] CHIP:TOO: lastModifiedFabricIndex: 1 + [1658398920.382943][3033:3038] CHIP:TOO: nextUserIndex: null + [1658398920.382971][3033:3038] CHIP:TOO: } + + + DUT/ChipTool log: + + [1658398920.378963][2474:2474] CHIP:DMG: CommandPathIB = + [1658398920.378994][2474:2474] CHIP:DMG: { + [1658398920.379027][2474:2474] CHIP:DMG: EndpointId = 0x1, + [1658398920.379064][2474:2474] CHIP:DMG: ClusterId = 0x101, + [1658398920.379096][2474:2474] CHIP:DMG: CommandId = 0x1b, + [1658398920.379125][2474:2474] CHIP:DMG: }, + [1658398920.379156][2474:2474] CHIP:DMG: + [1658398920.379185][2474:2474] CHIP:DMG: CommandFields = + [1658398920.379281][2474:2474] CHIP:DMG: { + [1658398920.379315][2474:2474] CHIP:DMG: 0x0 = 2, + [1658398920.379348][2474:2474] CHIP:DMG: }, + [1658398920.379377][2474:2474] CHIP:DMG: }, + [1658398920.379408][2474:2474] CHIP:DMG: + [1658398920.379433][2474:2474] CHIP:DMG: ], + [1658398920.379463][2474:2474] CHIP:DMG: + [1658398920.379486][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658398920.379508][2474:2474] CHIP:DMG: }, + [1658398920.379573][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a + [1658398920.379611][2474:2474] CHIP:DMG: AccessControl: allowed + [1658398920.379637][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001B + [1658398920.379669][2474:2474] CHIP:ZCL: [GetUser] Incoming command [endpointId=1,userIndex=2] + [1658398920.379707][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=2] disabled: true - label: "DUT sends Clear User command to TH.a" PICS: DRLK.S.F08 && DRLK.C.C1d.Tx verification: | - ./chip-tool doorlock clear-user 1 1 1 --timedInteractionTimeoutMs 1000 - verify on Reference app receives the right response for the data sent in the above commands - - - [1657115759.636068][8804:8804] CHIP:DMG: InvokeRequestMessage = - [1657115759.636131][8804:8804] CHIP:DMG: { - [1657115759.636188][8804:8804] CHIP:DMG: suppressResponse = false, - [1657115759.636253][8804:8804] CHIP:DMG: timedRequest = true, - [1657115759.636314][8804:8804] CHIP:DMG: InvokeRequests = - [1657115759.636390][8804:8804] CHIP:DMG: [ - [1657115759.636450][8804:8804] CHIP:DMG: CommandDataIB = - [1657115759.636534][8804:8804] CHIP:DMG: { - [1657115759.636597][8804:8804] CHIP:DMG: CommandPathIB = - [1657115759.636686][8804:8804] CHIP:DMG: { - [1657115759.636769][8804:8804] CHIP:DMG: EndpointId = 0x1, - [1657115759.636902][8804:8804] CHIP:DMG: ClusterId = 0x101, - [1657115759.636989][8804:8804] CHIP:DMG: CommandId = 0x1d, - [1657115759.637074][8804:8804] CHIP:DMG: }, - [1657115759.637155][8804:8804] CHIP:DMG: - [1657115759.637221][8804:8804] CHIP:DMG: CommandFields = - [1657115759.637299][8804:8804] CHIP:DMG: { - [1657115759.637381][8804:8804] CHIP:DMG: 0x0 = 1, - [1657115759.637462][8804:8804] CHIP:DMG: }, - [1657115759.637534][8804:8804] CHIP:DMG: }, - [1657115759.637609][8804:8804] CHIP:DMG: - [1657115759.637667][8804:8804] CHIP:DMG: ], - [1657115759.637741][8804:8804] CHIP:DMG: - [1657115759.637800][8804:8804] CHIP:DMG: InteractionModelRevision = 1 - [1657115759.637859][8804:8804] CHIP:DMG: }, - [1657115759.638009][8804:8804] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1657115759.638099][8804:8804] CHIP:DMG: AccessControl: allowed - [1657115759.638167][8804:8804] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001D - [1657115759.638242][8804:8804] CHIP:ZCL: [ClearUser] Incoming command [endpointId=1,userIndex=1] + ./chip-tool doorlock clear-user 2 1 1 --timedInteractionTimeoutMs 1000 + Verify Test Harness receives the Clear User command from the DUT on TH / lock app log: + + [1658399299.380508][3074:3079] CHIP:DMG: CommandPathIB = + [1658399299.380542][3074:3079] CHIP:DMG: { + [1658399299.380573][3074:3079] CHIP:DMG: EndpointId = 0x1, + [1658399299.380608][3074:3079] CHIP:DMG: ClusterId = 0x101, + [1658399299.380639][3074:3079] CHIP:DMG: CommandId = 0x1d, + [1658399299.380671][3074:3079] CHIP:DMG: }, + [1658399299.380705][3074:3079] CHIP:DMG: + [1658399299.380735][3074:3079] CHIP:DMG: StatusIB = + [1658399299.380765][3074:3079] CHIP:DMG: { + [1658399299.380799][3074:3079] CHIP:DMG: status = 0x00 (SUCCESS), + [1658399299.380828][3074:3079] CHIP:DMG: }, + + DUT/ChipTool log: + + [1658399465.849095][2474:2474] CHIP:DMG: CommandPathIB = + [1658399465.849133][2474:2474] CHIP:DMG: { + [1658399465.849169][2474:2474] CHIP:DMG: EndpointId = 0x1, + [1658399465.849208][2474:2474] CHIP:DMG: ClusterId = 0x101, + [1658399465.849245][2474:2474] CHIP:DMG: CommandId = 0x1d, + [1658399465.849279][2474:2474] CHIP:DMG: }, + [1658399465.849316][2474:2474] CHIP:DMG: + [1658399465.849348][2474:2474] CHIP:DMG: CommandFields = + [1658399465.849386][2474:2474] CHIP:DMG: { + [1658399465.849422][2474:2474] CHIP:DMG: 0x0 = 2, + [1658399465.849459][2474:2474] CHIP:DMG: }, + [1658399465.849491][2474:2474] CHIP:DMG: }, + [1658399465.849528][2474:2474] CHIP:DMG: + [1658399465.849555][2474:2474] CHIP:DMG: ], + [1658399465.849589][2474:2474] CHIP:DMG: + [1658399465.849616][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658399465.849643][2474:2474] CHIP:DMG: }, + [1658399465.849717][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a + [1658399465.849757][2474:2474] CHIP:DMG: AccessControl: allowed + [1658399465.849787][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001D + [1658399465.849824][2474:2474] CHIP:ZCL: [ClearUser] Incoming command [endpointId=1,userIndex=2] + [1658399465.849871][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=2] + [1658399465.849898][2474:2474] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=1,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] + [1658399465.849942][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=2,creator=0,modifier=0,userName="",uniqueId=0,userStatus=0,userType=0,credentialRule=0,credentials=(nil),totalCredentials=0] + [1658399465.849973][2474:2474] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=2,adjustedIndex=1] disabled: true - label: "DUT sends Set Credential command to TH.a" PICS: DRLK.S.F08 && DRLK.C.C22.Tx verification: | ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - verify on Reference app receives the right response for the data sent in the above commands - - [1657115790.613466][8804:8804] CHIP:DMG: InvokeRequestMessage = - [1657115790.613528][8804:8804] CHIP:DMG: { - [1657115790.613584][8804:8804] CHIP:DMG: suppressResponse = false, - [1657115790.613649][8804:8804] CHIP:DMG: timedRequest = true, - [1657115790.613709][8804:8804] CHIP:DMG: InvokeRequests = - [1657115790.613793][8804:8804] CHIP:DMG: [ - [1657115790.613855][8804:8804] CHIP:DMG: CommandDataIB = - [1657115790.613936][8804:8804] CHIP:DMG: { - [1657115790.614008][8804:8804] CHIP:DMG: CommandPathIB = - [1657115790.614098][8804:8804] CHIP:DMG: { - [1657115790.614187][8804:8804] CHIP:DMG: EndpointId = 0x1, - [1657115790.614280][8804:8804] CHIP:DMG: ClusterId = 0x101, - [1657115790.614370][8804:8804] CHIP:DMG: CommandId = 0x22, - [1657115790.614455][8804:8804] CHIP:DMG: }, - [1657115790.614550][8804:8804] CHIP:DMG: - [1657115790.614621][8804:8804] CHIP:DMG: CommandFields = - [1657115790.614709][8804:8804] CHIP:DMG: { - [1657115790.614800][8804:8804] CHIP:DMG: 0x0 = 0, - [1657115790.614887][8804:8804] CHIP:DMG: 0x1 = - [1657115790.614976][8804:8804] CHIP:DMG: { - [1657115790.615069][8804:8804] CHIP:DMG: 0x0 = 1, - [1657115790.615164][8804:8804] CHIP:DMG: 0x1 = 1, - [1657115790.615231][8804:8804] CHIP:DMG: }, - [1657115790.615325][8804:8804] CHIP:DMG: 0x2 = [ - [1657115790.615417][8804:8804] CHIP:DMG: 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, - [1657115790.615514][8804:8804] CHIP:DMG: ] - [1657115790.615607][8804:8804] CHIP:DMG: 0x3 = 1, - [1657115790.615699][8804:8804] CHIP:DMG: 0x4 = 0, - [1657115790.615790][8804:8804] CHIP:DMG: 0x5 = 0, - [1657115790.615879][8804:8804] CHIP:DMG: }, - [1657115790.615959][8804:8804] CHIP:DMG: }, - [1657115790.616046][8804:8804] CHIP:DMG: - [1657115790.616107][8804:8804] CHIP:DMG: ], - [1657115790.616189][8804:8804] CHIP:DMG: - [1657115790.616248][8804:8804] CHIP:DMG: InteractionModelRevision = 1 - [1657115790.616305][8804:8804] CHIP:DMG: }, - [1657115790.616471][8804:8804] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1657115790.616551][8804:8804] CHIP:DMG: AccessControl: allowed - [1657115790.616619][8804:8804] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0022 - [1657115790.616725][8804:8804] CHIP:ZCL: [SetCredential] Incoming command [endpointId=1] - [1657115790.616810][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=2,credentialType=1] - [1657115790.616906][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=2] - [1657115790.616971][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] - [1657115790.617026][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] - [1657115790.617078][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=2,credentialType=1] - [1657115790.617129][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=2] - [1657115790.617179][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=3,credentialType=1] - [1657115790.617229][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=3] - [1657115790.617278][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=4,credentialType=1] - [1657115790.617328][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=4] - [1657115790.617378][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=5,credentialType=1] - [1657115790.617428][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=5] - [1657115790.617478][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=6,credentialType=1] - [1657115790.617528][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=6] - [1657115790.617578][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=7,credentialType=1] - [1657115790.617629][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=7] - [1657115790.617679][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=8,credentialType=1] - [1657115790.617730][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=8] - [1657115790.617780][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=9,credentialType=1] - [1657115790.617831][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=9] - [1657115790.617881][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=10,credentialType=1] - [1657115790.617933][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=10] - [1657115790.617983][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] - [1657115790.618034][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] - [1657115790.618095][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1657115790.618149][8804:8804] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=0] - [1657115790.618201][8804:8804] CHIP:ZCL: [SetCredential] Unable to add credential to user: user clot is empty [endpointId=1,credentialIndex=1,userIndex=1] + + Verify Test Harness receives the Set Credential command from the DUT on TH / lock app log: + + + [1658399006.374067][3044:3049] CHIP:DMG: }, + [1658399006.374147][3044:3049] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 + [1658399006.374210][3044:3049] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 + [1658399006.374284][3044:3049] CHIP:TOO: SetCredentialResponse: { + [1658399006.374330][3044:3049] CHIP:TOO: status: 0 + [1658399006.374362][3044:3049] CHIP:TOO: userIndex: null + [1658399006.374394][3044:3049] CHIP:TOO: nextCredentialIndex: 2 + [1658399006.374425][3044:3049] CHIP:TOO: } + + DUT/ChipTool log: + + [1658399006.369032][2474:2474] CHIP:DMG: CommandPathIB = + [1658399006.369075][2474:2474] CHIP:DMG: { + [1658399006.369119][2474:2474] CHIP:DMG: EndpointId = 0x1, + [1658399006.369164][2474:2474] CHIP:DMG: ClusterId = 0x101, + [1658399006.369209][2474:2474] CHIP:DMG: CommandId = 0x22, + [1658399006.369251][2474:2474] CHIP:DMG: }, + [1658399006.369299][2474:2474] CHIP:DMG: + [1658399006.369337][2474:2474] CHIP:DMG: CommandFields = + [1658399006.369379][2474:2474] CHIP:DMG: { + [1658399006.369421][2474:2474] CHIP:DMG: 0x0 = 0, + [1658399006.369468][2474:2474] CHIP:DMG: 0x1 = + [1658399006.369511][2474:2474] CHIP:DMG: { + [1658399006.369560][2474:2474] CHIP:DMG: 0x0 = 1, + [1658399006.369606][2474:2474] CHIP:DMG: 0x1 = 1, + [1658399006.369652][2474:2474] CHIP:DMG: }, + [1658399006.369697][2474:2474] CHIP:DMG: 0x2 = [ + [1658399006.369745][2474:2474] CHIP:DMG: 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, + [1658399006.369796][2474:2474] CHIP:DMG: ] + [1658399006.369841][2474:2474] CHIP:DMG: 0x3 = 1, + [1658399006.369889][2474:2474] CHIP:DMG: 0x4 = 0, + [1658399006.369937][2474:2474] CHIP:DMG: 0x5 = 0, + [1658399006.369979][2474:2474] CHIP:DMG: }, + [1658399006.370017][2474:2474] CHIP:DMG: }, + [1658399006.370063][2474:2474] CHIP:DMG: + [1658399006.370096][2474:2474] CHIP:DMG: ], + [1658399006.370140][2474:2474] CHIP:DMG: + [1658399006.370172][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658399006.370204][2474:2474] CHIP:DMG: }, + [1658399006.370297][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a + [1658399006.370344][2474:2474] CHIP:DMG: AccessControl: allowed + [1658399006.370379][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0022 + [1658399006.370446][2474:2474] CHIP:ZCL: [SetCredential] Incoming command [endpointId=1] + [1658399006.370498][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=2,credentialType=1] + [1658399006.370528][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=2] + [1658399006.370563][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] + [1658399006.370592][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] + [1658399006.370619][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=2,credentialType=1] + [1658399006.370646][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=2] + [1658399006.370672][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=3,credentialType=1] + [1658399006.370700][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=3] + [1658399006.370726][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=4,credentialType=1] + [1658399006.370753][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=4] + [1658399006.370780][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=5,credentialType=1] + [1658399006.370807][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=5] + [1658399006.370834][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=6,credentialType=1] + [1658399006.370861][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=6] + [1658399006.370888][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=7,credentialType=1] + [1658399006.370915][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=7] + [1658399006.370941][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=8,credentialType=1] + [1658399006.370968][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=8] + [1658399006.370995][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=9,credentialType=1] + [1658399006.371022][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=9] + [1658399006.371048][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=10,credentialType=1] + [1658399006.371076][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=10] + [1658399006.371102][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] + [1658399006.371130][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] + [1658399006.371164][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] + [1658399006.371194][2474:2474] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] + [1658399006.371255][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] + [1658399006.371284][2474:2474] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] + [1658399006.371321][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=1,creator=1,modifier=1,userName="xxx",uniqueId=1934,userStatus=1,userType=0,credentialRule=0,credentials=0xaaaae780f570,totalCredentials=1] + [1658399006.371357][2474:2474] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=1,adjustedIndex=0] + [1658399006.371385][2474:2474] CHIP:ZCL: [AddCredentialToUser] Credential added to user [endpointId=1,userIndex=1,credentialType=1,credentialIndex=1,userTotalCredentials=1] + [1658399006.371416][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::SetCredential [endpoint=1,credentialIndex=1,credentialStatus=1,credentialType=1,credentialDataSize=6,creator=1,modifier=1] + [1658399006.371447][2474:2474] CHIP:ZCL: Successfully set the credential [mEndpointId=1,index=1,credentialType=1,creator=1,modifier=1] disabled: true - label: "DUT sends Get Credential to TH." PICS: DRLK.S.F08 && DRLK.C.C24.Tx verification: | ./chip-tool doorlock get-credential-status '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 - verify on Reference app receives the right response for the data sent in the above commands - - [1657115826.641760][8804:8804] CHIP:DMG: InvokeRequestMessage = - [1657115826.641847][8804:8804] CHIP:DMG: { - [1657115826.641907][8804:8804] CHIP:DMG: suppressResponse = false, - [1657115826.641973][8804:8804] CHIP:DMG: timedRequest = true, - [1657115826.642057][8804:8804] CHIP:DMG: InvokeRequests = - [1657115826.642188][8804:8804] CHIP:DMG: [ - [1657115826.642251][8804:8804] CHIP:DMG: CommandDataIB = - [1657115826.642339][8804:8804] CHIP:DMG: { - [1657115826.642404][8804:8804] CHIP:DMG: CommandPathIB = - [1657115826.642502][8804:8804] CHIP:DMG: { - [1657115826.642586][8804:8804] CHIP:DMG: EndpointId = 0x1, - [1657115826.642700][8804:8804] CHIP:DMG: ClusterId = 0x101, - [1657115826.642805][8804:8804] CHIP:DMG: CommandId = 0x24, - [1657115826.642891][8804:8804] CHIP:DMG: }, - [1657115826.642996][8804:8804] CHIP:DMG: - [1657115826.643084][8804:8804] CHIP:DMG: CommandFields = - [1657115826.643174][8804:8804] CHIP:DMG: { - [1657115826.643270][8804:8804] CHIP:DMG: 0x0 = - [1657115826.643382][8804:8804] CHIP:DMG: { - [1657115826.643480][8804:8804] CHIP:DMG: 0x0 = 1, - [1657115826.643596][8804:8804] CHIP:DMG: 0x1 = 1, - [1657115826.643704][8804:8804] CHIP:DMG: }, - [1657115826.643795][8804:8804] CHIP:DMG: }, - [1657115826.643888][8804:8804] CHIP:DMG: }, - [1657115826.643989][8804:8804] CHIP:DMG: - [1657115826.644053][8804:8804] CHIP:DMG: ], - [1657115826.644148][8804:8804] CHIP:DMG: - [1657115826.644210][8804:8804] CHIP:DMG: InteractionModelRevision = 1 - [1657115826.644269][8804:8804] CHIP:DMG: }, - [1657115826.644470][8804:8804] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1657115826.644577][8804:8804] CHIP:DMG: AccessControl: allowed - [1657115826.644648][8804:8804] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0024 - [1657115826.644736][8804:8804] CHIP:ZCL: [GetCredentialStatus] Incoming command [endpointId=1] - [1657115826.644821][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] - [1657115826.645076][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] - [1657115826.645160][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=2,credentialType=1] - [1657115826.645219][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=2] - [1657115826.645270][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=3,credentialType=1] - [1657115826.645320][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=3] - [1657115826.645370][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=4,credentialType=1] - [1657115826.645444][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=4] - [1657115826.645496][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=5,credentialType=1] - [1657115826.645547][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=5] - [1657115826.645596][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=6,credentialType=1] - [1657115826.645648][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=6] - [1657115826.645697][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=7,credentialType=1] - [1657115826.645748][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=7] - [1657115826.645797][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=8,credentialType=1] - [1657115826.645848][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=8] - [1657115826.645897][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=9,credentialType=1] - [1657115826.645948][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=9] - [1657115826.645997][8804:8804] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=10,credentialType=1] - [1657115826.646048][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=10] - [1657115826.646124][8804:8804] CHIP:DMG: ICR moving to [ Preparing] - [1657115826.646199][8804:8804] CHIP:DMG: ICR moving to [AddingComm] - [1657115826.646272][8804:8804] CHIP:DMG: ICR moving to [AddedComma] - [1657115826.646326][8804:8804] CHIP:ZCL: [GetCredentialStatus] Prepared credential status [endpointId=1,credentialType=1,credentialIndex=1,userIndex=0,nextCredentialIndex=0] + Verify Test Harness receives the Get Credential command from the DUT on TH / lock app log: + + [1658399098.917347][3053:3058] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0025 + [1658399098.917400][3053:3058] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0025 + [1658399098.917469][3053:3058] CHIP:TOO: GetCredentialStatusResponse: { + [1658399098.917499][3053:3058] CHIP:TOO: credentialExists: TRUE + [1658399098.917535][3053:3058] CHIP:TOO: userIndex: 1 + [1658399098.917563][3053:3058] CHIP:TOO: creatorFabricIndex: 1 + [1658399098.917590][3053:3058] CHIP:TOO: lastModifiedFabricIndex: 1 + [1658399098.917616][3053:3058] CHIP:TOO: nextCredentialIndex: null + [1658399098.917642][3053:3058] CHIP:TOO: } + + DUT/ChipTool log: + + [1658399098.914006][2474:2474] CHIP:DMG: CommandPathIB = + [1658399098.914053][2474:2474] CHIP:DMG: { + [1658399098.914144][2474:2474] CHIP:DMG: EndpointId = 0x1, + [1658399098.914180][2474:2474] CHIP:DMG: ClusterId = 0x101, + [1658399098.914213][2474:2474] CHIP:DMG: CommandId = 0x24, + [1658399098.914243][2474:2474] CHIP:DMG: }, + [1658399098.914277][2474:2474] CHIP:DMG: + [1658399098.914305][2474:2474] CHIP:DMG: CommandFields = + [1658399098.914335][2474:2474] CHIP:DMG: { + [1658399098.914364][2474:2474] CHIP:DMG: 0x0 = + [1658399098.914395][2474:2474] CHIP:DMG: { + [1658399098.914428][2474:2474] CHIP:DMG: 0x0 = 1, + [1658399098.914462][2474:2474] CHIP:DMG: 0x1 = 1, + [1658399098.914496][2474:2474] CHIP:DMG: }, + [1658399098.914528][2474:2474] CHIP:DMG: }, + [1658399098.914556][2474:2474] CHIP:DMG: }, + [1658399098.914588][2474:2474] CHIP:DMG: + [1658399098.914612][2474:2474] CHIP:DMG: ], + [1658399098.914642][2474:2474] CHIP:DMG: + [1658399098.914666][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658399098.914689][2474:2474] CHIP:DMG: }, + [1658399098.914757][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a + [1658399098.914793][2474:2474] CHIP:DMG: AccessControl: allowed + [1658399098.914821][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0024 + [1658399098.914859][2474:2474] CHIP:ZCL: [GetCredentialStatus] Incoming command [endpointId=1] + [1658399098.914896][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] + [1658399098.914919][2474:2474] CHIP:ZCL: Found occupied credential [endpoint=1,index=1,type=1,dataSize=6,createdBy=1,modifiedBy=1] + [1658399098.914943][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] + [1658399098.914966][2474:2474] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=1,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] + [1658399098.914995][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=2,credentialType=1] + [1658399098.915016][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=2] + [1658399098.915036][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=3,credentialType=1] + [1658399098.915056][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=3] + [1658399098.915075][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=4,credentialType=1] + [1658399098.915095][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=4] + [1658399098.915115][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=5,credentialType=1] + [1658399098.915135][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=5] + [1658399098.915155][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=6,credentialType=1] + [1658399098.915174][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=6] + [1658399098.915194][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=7,credentialType=1] + [1658399098.915245][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=7] + [1658399098.915267][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=8,credentialType=1] + [1658399098.915287][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=8] + [1658399098.915307][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=9,credentialType=1] + [1658399098.915327][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=9] + [1658399098.915346][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=10,credentialType=1] + [1658399098.915366][2474:2474] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=10] disabled: true - label: "DUT sends Clear Credential command to TH." PICS: DRLK.S.F08 && DRLK.C.C26.Tx verification: | ./chip-tool doorlock clear-credential '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 - verify on Reference app receives the right response for the data sent in the above commands + Verify Test Harness receives the Clear Credential command from the DUT on TH / lock app log: + + [1658399249.225410][3066:3071] CHIP:DMG: CommandPathIB = + [1658399249.225445][3066:3071] CHIP:DMG: { + [1658399249.225491][3066:3071] CHIP:DMG: EndpointId = 0x1, + [1658399249.225542][3066:3071] CHIP:DMG: ClusterId = 0x101, + [1658399249.225588][3066:3071] CHIP:DMG: CommandId = 0x26, + [1658399249.225634][3066:3071] CHIP:DMG: }, + [1658399249.225684][3066:3071] CHIP:DMG: + [1658399249.225727][3066:3071] CHIP:DMG: StatusIB = + [1658399249.225763][3066:3071] CHIP:DMG: { + [1658399249.225798][3066:3071] CHIP:DMG: status = 0x00 (SUCCESS), + [1658399249.225846][3066:3071] CHIP:DMG: }, + [1658399249.225880][3066:3071] CHIP:DMG: + + DUT/ChipTool log: [1657115878.582559][8804:8804] CHIP:DMG: InvokeRequestMessage = [1657115878.582642][8804:8804] CHIP:DMG: { @@ -809,3 +1065,46 @@ tests: [1657115878.585752][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] [1657115878.585802][8804:8804] CHIP:ZCL: [clearCredential] Ignored attempt to clear unoccupied credential slot [endpointId=1,credentialType=1,credentialIndex=1,modifier=1] disabled: true + + - label: "DUT sends Clear Credential command to TH." + verification: | + ./chip-tool doorlock clear-user 1 1 1 --timedInteractionTimeoutMs 1000 + + [1658399779.248457][3141:3146] CHIP:DMG: CommandPathIB = + [1658399779.248494][3141:3146] CHIP:DMG: { + [1658399779.248528][3141:3146] CHIP:DMG: EndpointId = 0x1, + [1658399779.248566][3141:3146] CHIP:DMG: ClusterId = 0x101, + [1658399779.248600][3141:3146] CHIP:DMG: CommandId = 0x1d, + [1658399779.248633][3141:3146] CHIP:DMG: }, + [1658399779.248669][3141:3146] CHIP:DMG: + [1658399779.248698][3141:3146] CHIP:DMG: StatusIB = + [1658399779.248731][3141:3146] CHIP:DMG: { + [1658399779.248764][3141:3146] CHIP:DMG: status = 0x00 (SUCCESS), + [1658399779.248793][3141:3146] CHIP:DMG: }, + + DUT/ChipTool log: + + [1658399779.246157][2474:2474] CHIP:DMG: CommandDataIB = + [1658399779.246193][2474:2474] CHIP:DMG: { + [1658399779.246219][2474:2474] CHIP:DMG: CommandPathIB = + [1658399779.246258][2474:2474] CHIP:DMG: { + [1658399779.246301][2474:2474] CHIP:DMG: EndpointId = 0x1, + [1658399779.246336][2474:2474] CHIP:DMG: ClusterId = 0x101, + [1658399779.246381][2474:2474] CHIP:DMG: CommandId = 0x1d, + [1658399779.246411][2474:2474] CHIP:DMG: }, + [1658399779.246452][2474:2474] CHIP:DMG: + [1658399779.246480][2474:2474] CHIP:DMG: CommandFields = + [1658399779.246519][2474:2474] CHIP:DMG: { + [1658399779.246562][2474:2474] CHIP:DMG: 0x0 = 1, + [1658399779.246595][2474:2474] CHIP:DMG: }, + [1658399779.246631][2474:2474] CHIP:DMG: }, + [1658399779.246662][2474:2474] CHIP:DMG: + [1658399779.246694][2474:2474] CHIP:DMG: ], + [1658399779.246732][2474:2474] CHIP:DMG: + [1658399779.246757][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658399779.246788][2474:2474] CHIP:DMG: }, + [1658399779.246862][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a + [1658399779.246899][2474:2474] CHIP:DMG: AccessControl: allowed + [1658399779.246926][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001D + [1658399779.246958][2474:2474] CHIP:ZCL: [ClearUser] Incoming command [endpointId=1,userIndex=1] + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml index 31f196a504df7d..4838e1eadf5e6a 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml @@ -1,635 +1,574 @@ -# 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: - 113.3.3. [TC-DRLK-3.3] Verification for the Door Lock Events [DUT - Client] - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: "TH will initiate DoorLockAlarm Event (LockJammed scenario)" - PICS: DRLK.C.E00 - verification: | - ./chip-tool doorlock read-event door-lock-alarm 1 1 - - verify on Reference app receives the right response for the data sent in the above commands - - [1658143092.410930][3017:3023] CHIP:DMG: ReportDataMessage = - [1658143092.410964][3017:3023] CHIP:DMG: { - [1658143092.410994][3017:3023] CHIP:DMG: SuppressResponse = true, - [1658143092.411026][3017:3023] CHIP:DMG: InteractionModelRevision = 1 - [1658143092.411056][3017:3023] CHIP:DMG: } - disabled: true - - - label: "DUT sends the Unlock Door command to the TH with valid PINCode" - PICS: DRLK.C.C01.Tx - verification: | - ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - - verify on Reference app receives the right response for the data sent in the above commands - - [1658143230.937379][3029:3034] CHIP:DMG: StatusIB = - [1658143230.937412][3029:3034] CHIP:DMG: { - [1658143230.937446][3029:3034] CHIP:DMG: status = 0x00 (SUCCESS), - [1658143230.937478][3029:3034] CHIP:DMG: }, - - ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - - verify on Reference app receives the right response for the data sent in the above commands - - [1658143318.915533][3039:3044] CHIP:DMG: }, - [1658143318.915609][3039:3044] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 - [1658143318.915705][3039:3044] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 - [1658143318.915778][3039:3044] CHIP:TOO: SetCredentialResponse: { - [1658143318.915821][3039:3044] CHIP:TOO: status: 0 - [1658143318.915851][3039:3044] CHIP:TOO: userIndex: null - [1658143318.915880][3039:3044] CHIP:TOO: nextCredentialIndex: 2 - [1658143318.915909][3039:3044] CHIP:TOO: } - - - ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 123456 - - verify on Reference app receives the right response for the data sent in the above commands - - [1658143429.670361][3057:3062] CHIP:DMG: }, - [1658143429.670411][3057:3062] CHIP:DMG: - [1658143429.670451][3057:3062] CHIP:DMG: StatusIB = - [1658143429.670498][3057:3062] CHIP:DMG: { - [1658143429.670548][3057:3062] CHIP:DMG: status = 0x00 (SUCCESS), - [1658143429.670593][3057:3062] CHIP:DMG: }, - [1658143429.670637][3057:3062] CHIP:DMG: - [1658143429.670681][3057:3062] CHIP:DMG: }, - [1658143429.670725][3057:3062] CHIP:DMG: - [1658143429.670759][3057:3062] CHIP:DMG: }, - [1658143429.670799][3057:3062] CHIP:DMG: - [1658143429.670829][3057:3062] CHIP:DMG: ], - [1658143429.670867][3057:3062] CHIP:DMG: - [1658143429.670896][3057:3062] CHIP:DMG: InteractionModelRevision = 1 - [1658143429.670926][3057:3062] CHIP:DMG: }, - disabled: true - - - label: "TH initiates DoorStateChange event with Doorstate set to DoorOpen" - PICS: DRLK.C.F05 && DRLK.C.E01 - verification: | - ./chip-tool doorlock read-event door-state-change 1 1 - - verify on Reference app receives the right response for the data sent in the above commands - - [1658143492.705309][3065:3070] CHIP:DMG: ReportDataMessage = - [1658143492.705348][3065:3070] CHIP:DMG: { - [1658143492.705374][3065:3070] CHIP:DMG: SuppressResponse = true, - [1658143492.705402][3065:3070] CHIP:DMG: InteractionModelRevision = 1 - [1658143492.705427][3065:3070] CHIP:DMG: } - disabled: true - - - label: "DUT sends the Lock Door command to the TH with valid PINCode" - PICS: DRLK.C.C00.Tx - verification: | - ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 123456 - - verify on Reference app receives the right response for the data sent in the above commands - - [1658143612.854142][3083:3088] CHIP:DMG: - [1658143612.854178][3083:3088] CHIP:DMG: StatusIB = - [1658143612.854229][3083:3088] CHIP:DMG: { - [1658143612.854268][3083:3088] CHIP:DMG: status = 0x00 (SUCCESS), - [1658143612.854317][3083:3088] CHIP:DMG: }, - [1658143612.854365][3083:3088] CHIP:DMG: - [1658143612.854400][3083:3088] CHIP:DMG: }, - [1658143612.854448][3083:3088] CHIP:DMG: - [1658143612.854481][3083:3088] CHIP:DMG: }, - [1658143612.854528][3083:3088] CHIP:DMG: - [1658143612.854559][3083:3088] CHIP:DMG: ], - [1658143612.854604][3083:3088] CHIP:DMG: - [1658143612.854634][3083:3088] CHIP:DMG: InteractionModelRevision = 1 - [1658143612.854673][3083:3088] CHIP:DMG: }, - [1658143612.854756][3083:3088] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0000 Status=0x0 - disabled: true - - - label: - "TH will initiate LockOperation event with LockOperationType to Lock" - PICS: DRLK.C.E02 - verification: | - ./chip-tool doorlock read-event lock-operation 1 1 - - verify on Reference app receives the right response for the data sent in the above commands - - [1658143652.496054][3092:3097] CHIP:DMG: - [1658143652.496078][3092:3097] CHIP:DMG: SuppressResponse = true, - [1658143652.496103][3092:3097] CHIP:DMG: InteractionModelRevision = 1 - [1658143652.496126][3092:3097] CHIP:DMG: } - [1658143652.496628][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.496654][3092:3097] CHIP:TOO: Event number: 5 - [1658143652.496676][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.496697][3092:3097] CHIP:TOO: Timestamp: 799336 - [1658143652.496834][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.496911][3092:3097] CHIP:TOO: LockOperationType: 1 - [1658143652.496961][3092:3097] CHIP:TOO: OperationSource: 7 - [1658143652.496986][3092:3097] CHIP:TOO: UserIndex: 1 - [1658143652.497009][3092:3097] CHIP:TOO: FabricIndex: 1 - [1658143652.497034][3092:3097] CHIP:TOO: SourceNode: 112233 - [1658143652.497065][3092:3097] CHIP:TOO: Credentials: 1 entries - [1658143652.497099][3092:3097] CHIP:TOO: [1]: { - [1658143652.497122][3092:3097] CHIP:TOO: CredentialType: 1 - [1658143652.497146][3092:3097] CHIP:TOO: CredentialIndex: 1 - [1658143652.497168][3092:3097] CHIP:TOO: } - [1658143652.497192][3092:3097] CHIP:TOO: } - [1658143652.497297][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.497322][3092:3097] CHIP:TOO: Event number: 6 - [1658143652.497344][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.497365][3092:3097] CHIP:TOO: Timestamp: 859340 - [1658143652.497398][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.497423][3092:3097] CHIP:TOO: LockOperationType: 0 - [1658143652.497446][3092:3097] CHIP:TOO: OperationSource: 4 - [1658143652.497467][3092:3097] CHIP:TOO: UserIndex: null - [1658143652.497489][3092:3097] CHIP:TOO: FabricIndex: null - [1658143652.497511][3092:3097] CHIP:TOO: SourceNode: null - [1658143652.497532][3092:3097] CHIP:TOO: Credentials: null - [1658143652.497554][3092:3097] CHIP:TOO: } - [1658143652.497660][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.497683][3092:3097] CHIP:TOO: Event number: 7 - [1658143652.497704][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.497725][3092:3097] CHIP:TOO: Timestamp: 980898 - [1658143652.497761][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.497785][3092:3097] CHIP:TOO: LockOperationType: 0 - [1658143652.497808][3092:3097] CHIP:TOO: OperationSource: 7 - [1658143652.497830][3092:3097] CHIP:TOO: UserIndex: 1 - [1658143652.497851][3092:3097] CHIP:TOO: FabricIndex: 1 - [1658143652.497873][3092:3097] CHIP:TOO: SourceNode: 112233 - [1658143652.497899][3092:3097] CHIP:TOO: Credentials: 1 entries - [1658143652.497929][3092:3097] CHIP:TOO: [1]: { - [1658143652.497953][3092:3097] CHIP:TOO: CredentialType: 1 - [1658143652.497975][3092:3097] CHIP:TOO: CredentialIndex: 1 - [1658143652.497993][3092:3097] CHIP:TOO: } - [1658143652.498012][3092:3097] CHIP:TOO: } - [1658143652.498118][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.498138][3092:3097] CHIP:TOO: Event number: 8 - [1658143652.498156][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.498174][3092:3097] CHIP:TOO: Timestamp: 1103895 - [1658143652.498208][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.498233][3092:3097] CHIP:TOO: LockOperationType: 0 - [1658143652.498255][3092:3097] CHIP:TOO: OperationSource: 7 - [1658143652.498278][3092:3097] CHIP:TOO: UserIndex: 1 - [1658143652.498301][3092:3097] CHIP:TOO: FabricIndex: 1 - [1658143652.498323][3092:3097] CHIP:TOO: SourceNode: 112233 - [1658143652.498351][3092:3097] CHIP:TOO: Credentials: 1 entries - [1658143652.498380][3092:3097] CHIP:TOO: [1]: { - [1658143652.498403][3092:3097] CHIP:TOO: CredentialType: 1 - [1658143652.498425][3092:3097] CHIP:TOO: CredentialIndex: 1 - [1658143652.498447][3092:3097] CHIP:TOO: } - [1658143652.498470][3092:3097] CHIP:TOO: } - [1658143652.498581][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.498604][3092:3097] CHIP:TOO: Event number: 9 - [1658143652.498626][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.498647][3092:3097] CHIP:TOO: Timestamp: 1220546 - [1658143652.498682][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.498707][3092:3097] CHIP:TOO: LockOperationType: 1 - [1658143652.498730][3092:3097] CHIP:TOO: OperationSource: 7 - [1658143652.498751][3092:3097] CHIP:TOO: UserIndex: 1 - [1658143652.498773][3092:3097] CHIP:TOO: FabricIndex: 1 - [1658143652.498796][3092:3097] CHIP:TOO: SourceNode: 112233 - [1658143652.498822][3092:3097] CHIP:TOO: Credentials: 1 entries - [1658143652.498850][3092:3097] CHIP:TOO: [1]: { - [1658143652.498874][3092:3097] CHIP:TOO: CredentialType: 1 - [1658143652.498895][3092:3097] CHIP:TOO: CredentialIndex: 1 - [1658143652.498917][3092:3097] CHIP:TOO: } - [1658143652.498940][3092:3097] CHIP:TOO: } - [1658143652.499037][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.499060][3092:3097] CHIP:TOO: Event number: 10 - [1658143652.499082][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.499103][3092:3097] CHIP:TOO: Timestamp: 1280590 - [1658143652.499134][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.499157][3092:3097] CHIP:TOO: LockOperationType: 0 - [1658143652.499180][3092:3097] CHIP:TOO: OperationSource: 4 - [1658143652.499202][3092:3097] CHIP:TOO: UserIndex: null - [1658143652.499223][3092:3097] CHIP:TOO: FabricIndex: null - [1658143652.499245][3092:3097] CHIP:TOO: SourceNode: null - [1658143652.499267][3092:3097] CHIP:TOO: Credentials: null - [1658143652.499288][3092:3097] CHIP:TOO: } - [1658143652.499393][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.499416][3092:3097] CHIP:TOO: Event number: 11 - [1658143652.499438][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.499459][3092:3097] CHIP:TOO: Timestamp: 1399486 - [1658143652.499494][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.499518][3092:3097] CHIP:TOO: LockOperationType: 0 - [1658143652.499541][3092:3097] CHIP:TOO: OperationSource: 7 - [1658143652.499563][3092:3097] CHIP:TOO: UserIndex: 1 - [1658143652.499585][3092:3097] CHIP:TOO: FabricIndex: 1 - [1658143652.499606][3092:3097] CHIP:TOO: SourceNode: 112233 - [1658143652.499633][3092:3097] CHIP:TOO: Credentials: 1 entries - [1658143652.499685][3092:3097] CHIP:TOO: [1]: { - [1658143652.499708][3092:3097] CHIP:TOO: CredentialType: 1 - [1658143652.499731][3092:3097] CHIP:TOO: CredentialIndex: 1 - [1658143652.499752][3092:3097] CHIP:TOO: } - [1658143652.499775][3092:3097] CHIP:TOO: } - [1658143652.499886][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.499910][3092:3097] CHIP:TOO: Event number: 12 - [1658143652.499932][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.499953][3092:3097] CHIP:TOO: Timestamp: 2106609 - [1658143652.499987][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.500012][3092:3097] CHIP:TOO: LockOperationType: 1 - [1658143652.500034][3092:3097] CHIP:TOO: OperationSource: 7 - [1658143652.500057][3092:3097] CHIP:TOO: UserIndex: 1 - [1658143652.500078][3092:3097] CHIP:TOO: FabricIndex: 1 - [1658143652.500100][3092:3097] CHIP:TOO: SourceNode: 112233 - [1658143652.500127][3092:3097] CHIP:TOO: Credentials: 1 entries - [1658143652.500186][3092:3097] CHIP:TOO: [1]: { - [1658143652.500210][3092:3097] CHIP:TOO: CredentialType: 1 - [1658143652.500233][3092:3097] CHIP:TOO: CredentialIndex: 1 - [1658143652.500255][3092:3097] CHIP:TOO: } - [1658143652.500278][3092:3097] CHIP:TOO: } - [1658143652.500380][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.500403][3092:3097] CHIP:TOO: Event number: 13 - [1658143652.500424][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.500445][3092:3097] CHIP:TOO: Timestamp: 2166613 - [1658143652.500476][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.500500][3092:3097] CHIP:TOO: LockOperationType: 0 - [1658143652.500523][3092:3097] CHIP:TOO: OperationSource: 4 - [1658143652.500545][3092:3097] CHIP:TOO: UserIndex: null - [1658143652.500567][3092:3097] CHIP:TOO: FabricIndex: null - [1658143652.500589][3092:3097] CHIP:TOO: SourceNode: null - [1658143652.500611][3092:3097] CHIP:TOO: Credentials: null - [1658143652.500632][3092:3097] CHIP:TOO: } - [1658143652.500742][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.500766][3092:3097] CHIP:TOO: Event number: 14 - [1658143652.500787][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.500808][3092:3097] CHIP:TOO: Timestamp: 2285136 - [1658143652.500842][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.500867][3092:3097] CHIP:TOO: LockOperationType: 0 - [1658143652.500889][3092:3097] CHIP:TOO: OperationSource: 7 - [1658143652.500911][3092:3097] CHIP:TOO: UserIndex: 1 - [1658143652.500933][3092:3097] CHIP:TOO: FabricIndex: 1 - [1658143652.500956][3092:3097] CHIP:TOO: SourceNode: 112233 - [1658143652.500982][3092:3097] CHIP:TOO: Credentials: 1 entries - [1658143652.501011][3092:3097] CHIP:TOO: [1]: { - [1658143652.501033][3092:3097] CHIP:TOO: CredentialType: 1 - [1658143652.501056][3092:3097] CHIP:TOO: CredentialIndex: 1 - [1658143652.501077][3092:3097] CHIP:TOO: } - [1658143652.501100][3092:3097] CHIP:TOO: } - [1658143652.501202][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.501226][3092:3097] CHIP:TOO: Event number: 29 - [1658143652.501247][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.501268][3092:3097] CHIP:TOO: Timestamp: 4205225 - [1658143652.501303][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.501327][3092:3097] CHIP:TOO: LockOperationType: 1 - [1658143652.501350][3092:3097] CHIP:TOO: OperationSource: 7 - [1658143652.501372][3092:3097] CHIP:TOO: UserIndex: 1 - [1658143652.501395][3092:3097] CHIP:TOO: FabricIndex: 1 - [1658143652.501417][3092:3097] CHIP:TOO: SourceNode: 112233 - [1658143652.501443][3092:3097] CHIP:TOO: Credentials: 1 entries - [1658143652.501472][3092:3097] CHIP:TOO: [1]: { - [1658143652.501495][3092:3097] CHIP:TOO: CredentialType: 1 - [1658143652.501517][3092:3097] CHIP:TOO: CredentialIndex: 1 - [1658143652.501539][3092:3097] CHIP:TOO: } - [1658143652.501562][3092:3097] CHIP:TOO: } - [1658143652.501669][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.501692][3092:3097] CHIP:TOO: Event number: 30 - [1658143652.501714][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.501734][3092:3097] CHIP:TOO: Timestamp: 4223548 - [1658143652.501768][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.501792][3092:3097] CHIP:TOO: LockOperationType: 1 - [1658143652.501815][3092:3097] CHIP:TOO: OperationSource: 7 - [1658143652.501837][3092:3097] CHIP:TOO: UserIndex: 1 - [1658143652.501859][3092:3097] CHIP:TOO: FabricIndex: 1 - [1658143652.501881][3092:3097] CHIP:TOO: SourceNode: 112233 - [1658143652.501907][3092:3097] CHIP:TOO: Credentials: 1 entries - [1658143652.501936][3092:3097] CHIP:TOO: [1]: { - [1658143652.502063][3092:3097] CHIP:TOO: CredentialType: 1 - [1658143652.502088][3092:3097] CHIP:TOO: CredentialIndex: 1 - [1658143652.502110][3092:3097] CHIP:TOO: } - [1658143652.502134][3092:3097] CHIP:TOO: } - [1658143652.502237][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.502260][3092:3097] CHIP:TOO: Event number: 31 - [1658143652.502282][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.502302][3092:3097] CHIP:TOO: Timestamp: 4283567 - [1658143652.502334][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.502358][3092:3097] CHIP:TOO: LockOperationType: 0 - [1658143652.502381][3092:3097] CHIP:TOO: OperationSource: 4 - [1658143652.502402][3092:3097] CHIP:TOO: UserIndex: null - [1658143652.502424][3092:3097] CHIP:TOO: FabricIndex: null - [1658143652.502446][3092:3097] CHIP:TOO: SourceNode: null - [1658143652.502468][3092:3097] CHIP:TOO: Credentials: null - [1658143652.502489][3092:3097] CHIP:TOO: } - [1658143652.502595][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.502618][3092:3097] CHIP:TOO: Event number: 32 - [1658143652.502640][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.502661][3092:3097] CHIP:TOO: Timestamp: 4377177 - [1658143652.502695][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.502720][3092:3097] CHIP:TOO: LockOperationType: 0 - [1658143652.502742][3092:3097] CHIP:TOO: OperationSource: 7 - [1658143652.502764][3092:3097] CHIP:TOO: UserIndex: 1 - [1658143652.502785][3092:3097] CHIP:TOO: FabricIndex: 1 - [1658143652.502808][3092:3097] CHIP:TOO: SourceNode: 112233 - [1658143652.502834][3092:3097] CHIP:TOO: Credentials: 1 entries - [1658143652.502864][3092:3097] CHIP:TOO: [1]: { - [1658143652.502887][3092:3097] CHIP:TOO: CredentialType: 1 - [1658143652.502909][3092:3097] CHIP:TOO: CredentialIndex: 1 - [1658143652.502930][3092:3097] CHIP:TOO: } - [1658143652.502953][3092:3097] CHIP:TOO: } - [1658143652.503056][3092:3097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 - [1658143652.503079][3092:3097] CHIP:TOO: Event number: 33 - [1658143652.503100][3092:3097] CHIP:TOO: Priority: Critical - [1658143652.503121][3092:3097] CHIP:TOO: Timestamp: 4406732 - [1658143652.503155][3092:3097] CHIP:TOO: LockOperation: { - [1658143652.503179][3092:3097] CHIP:TOO: LockOperationType: 0 - [1658143652.503202][3092:3097] CHIP:TOO: OperationSource: 7 - [1658143652.503223][3092:3097] CHIP:TOO: UserIndex: 1 - [1658143652.503245][3092:3097] CHIP:TOO: FabricIndex: 1 - [1658143652.503268][3092:3097] CHIP:TOO: SourceNode: 112233 - [1658143652.503293][3092:3097] CHIP:TOO: Credentials: 1 entries - [1658143652.503322][3092:3097] CHIP:TOO: [1]: { - [1658143652.503345][3092:3097] CHIP:TOO: CredentialType: 1 - [1658143652.503367][3092:3097] CHIP:TOO: CredentialIndex: 1 - [1658143652.503389][3092:3097] CHIP:TOO: } - [1658143652.503415][3092:3097] CHIP:TOO: } - disabled: true - - - label: "DUT sends the Unlock Door command to the TH with Invalid PINCode" - PICS: DRLK.C.C01.Tx - verification: | - ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 12345678 - - verify on Reference app receives the right response for the data sent in the above commands - - [1658143767.123426][3101:3106] CHIP:DMG: }, - [1658143767.123464][3101:3106] CHIP:DMG: - [1658143767.123493][3101:3106] CHIP:DMG: StatusIB = - [1658143767.123527][3101:3106] CHIP:DMG: { - [1658143767.123559][3101:3106] CHIP:DMG: status = 0x01 (FAILURE), - [1658143767.123592][3101:3106] CHIP:DMG: }, - [1658143767.123626][3101:3106] CHIP:DMG: - [1658143767.123684][3101:3106] CHIP:DMG: }, - [1658143767.123720][3101:3106] CHIP:DMG: - [1658143767.123748][3101:3106] CHIP:DMG: }, - [1658143767.123780][3101:3106] CHIP:DMG: - [1658143767.123804][3101:3106] CHIP:DMG: ], - [1658143767.123834][3101:3106] CHIP:DMG: - [1658143767.123859][3101:3106] CHIP:DMG: InteractionModelRevision = 1 - [1658143767.123883][3101:3106] CHIP:DMG: }, - [1658143767.123943][3101:3106] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0001 Status=0x1 - [1658143767.123978][3101:3106] CHIP:TOO: Error: IM Error 0x00000501: General error: 0x01 (FAILURE) - disabled: true - - - label: - "TH will initiate LockOperationError event by causing Lock error using - invalid PIN" - PICS: DRLK.C.E03 - verification: | - ./chip-tool doorlock read-event lock-operation-error 1 1 - - verify on Reference app receives the right response for the data sent in the above commands - - [1658143824.787070][3109:3114] CHIP:DMG: SuppressResponse = true, - [1658143824.787101][3109:3114] CHIP:DMG: InteractionModelRevision = 1 - [1658143824.787130][3109:3114] CHIP:DMG: } - [1658143824.787437][3109:3114] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 - [1658143824.787468][3109:3114] CHIP:TOO: Event number: 15 - [1658143824.787495][3109:3114] CHIP:TOO: Priority: Critical - [1658143824.787523][3109:3114] CHIP:TOO: Timestamp: 2346777 - [1658143824.787682][3109:3114] CHIP:TOO: LockOperationError: { - [1658143824.787728][3109:3114] CHIP:TOO: LockOperationType: 0 - [1658143824.787758][3109:3114] CHIP:TOO: OperationSource: 7 - [1658143824.787787][3109:3114] CHIP:TOO: OperationError: 1 - [1658143824.787816][3109:3114] CHIP:TOO: UserIndex: 0 - [1658143824.787845][3109:3114] CHIP:TOO: FabricIndex: 1 - [1658143824.787876][3109:3114] CHIP:TOO: SourceNode: 112233 - [1658143824.787914][3109:3114] CHIP:TOO: Credentials: 1 entries - [1658143824.787956][3109:3114] CHIP:TOO: [1]: { - [1658143824.787985][3109:3114] CHIP:TOO: CredentialType: 1 - [1658143824.788014][3109:3114] CHIP:TOO: CredentialIndex: 0 - [1658143824.788042][3109:3114] CHIP:TOO: } - [1658143824.788071][3109:3114] CHIP:TOO: } - [1658143824.788215][3109:3114] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 - [1658143824.788247][3109:3114] CHIP:TOO: Event number: 16 - [1658143824.788274][3109:3114] CHIP:TOO: Priority: Critical - [1658143824.788301][3109:3114] CHIP:TOO: Timestamp: 2516979 - [1658143824.788347][3109:3114] CHIP:TOO: LockOperationError: { - [1658143824.788378][3109:3114] CHIP:TOO: LockOperationType: 1 - [1658143824.788406][3109:3114] CHIP:TOO: OperationSource: 7 - [1658143824.788434][3109:3114] CHIP:TOO: OperationError: 1 - [1658143824.788462][3109:3114] CHIP:TOO: UserIndex: 0 - [1658143824.788490][3109:3114] CHIP:TOO: FabricIndex: 1 - [1658143824.788519][3109:3114] CHIP:TOO: SourceNode: 112233 - [1658143824.788551][3109:3114] CHIP:TOO: Credentials: 1 entries - [1658143824.788587][3109:3114] CHIP:TOO: [1]: { - [1658143824.788617][3109:3114] CHIP:TOO: CredentialType: 1 - [1658143824.788644][3109:3114] CHIP:TOO: CredentialIndex: 0 - [1658143824.788672][3109:3114] CHIP:TOO: } - [1658143824.788701][3109:3114] CHIP:TOO: } - [1658143824.788837][3109:3114] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 - [1658143824.788866][3109:3114] CHIP:TOO: Event number: 17 - [1658143824.788893][3109:3114] CHIP:TOO: Priority: Critical - [1658143824.788922][3109:3114] CHIP:TOO: Timestamp: 2548044 - [1658143824.788968][3109:3114] CHIP:TOO: LockOperationError: { - [1658143824.788998][3109:3114] CHIP:TOO: LockOperationType: 1 - [1658143824.789026][3109:3114] CHIP:TOO: OperationSource: 7 - [1658143824.789054][3109:3114] CHIP:TOO: OperationError: 1 - [1658143824.789082][3109:3114] CHIP:TOO: UserIndex: 0 - [1658143824.789110][3109:3114] CHIP:TOO: FabricIndex: 1 - [1658143824.789138][3109:3114] CHIP:TOO: SourceNode: 112233 - [1658143824.789171][3109:3114] CHIP:TOO: Credentials: 1 entries - [1658143824.789207][3109:3114] CHIP:TOO: [1]: { - [1658143824.789236][3109:3114] CHIP:TOO: CredentialType: 1 - [1658143824.789264][3109:3114] CHIP:TOO: CredentialIndex: 0 - [1658143824.789292][3109:3114] CHIP:TOO: } - [1658143824.789321][3109:3114] CHIP:TOO: } - [1658143824.789528][3109:3114] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 - [1658143824.789643][3109:3114] CHIP:TOO: Event number: 34 - [1658143824.789673][3109:3114] CHIP:TOO: Priority: Critical - [1658143824.789700][3109:3114] CHIP:TOO: Timestamp: 4561002 - [1658143824.789750][3109:3114] CHIP:TOO: LockOperationError: { - [1658143824.789782][3109:3114] CHIP:TOO: LockOperationType: 1 - [1658143824.789811][3109:3114] CHIP:TOO: OperationSource: 7 - [1658143824.789839][3109:3114] CHIP:TOO: OperationError: 1 - [1658143824.789867][3109:3114] CHIP:TOO: UserIndex: 0 - [1658143824.789894][3109:3114] CHIP:TOO: FabricIndex: 1 - [1658143824.789923][3109:3114] CHIP:TOO: SourceNode: 112233 - [1658143824.789957][3109:3114] CHIP:TOO: Credentials: 1 entries - [1658143824.789993][3109:3114] CHIP:TOO: [1]: { - [1658143824.790022][3109:3114] CHIP:TOO: CredentialType: 1 - [1658143824.790051][3109:3114] CHIP:TOO: CredentialIndex: 0 - [1658143824.790079][3109:3114] CHIP:TOO: } - [1658143824.790107][3109:3114] CHIP:TOO: } - disabled: true - - - label: "DUT sends Set User command to TH" - PICS: DRLK.C.F08 && DRLK.C.C1a.Tx - verification: | - ./chip-tool doorlock set-user 0 3 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - - verify on Reference app receives the right response for the data sent in the above commands - - [1658143964.643101][3139:3144] CHIP:DMG: - [1658143964.643137][3139:3144] CHIP:DMG: StatusIB = - [1658143964.643179][3139:3144] CHIP:DMG: { - [1658143964.643220][3139:3144] CHIP:DMG: status = 0x00 (SUCCESS), - [1658143964.643263][3139:3144] CHIP:DMG: }, - [1658143964.643303][3139:3144] CHIP:DMG: - [1658143964.643343][3139:3144] CHIP:DMG: }, - [1658143964.643388][3139:3144] CHIP:DMG: - [1658143964.643421][3139:3144] CHIP:DMG: }, - [1658143964.643457][3139:3144] CHIP:DMG: - [1658143964.643486][3139:3144] CHIP:DMG: ], - [1658143964.643522][3139:3144] CHIP:DMG: - [1658143964.643551][3139:3144] CHIP:DMG: InteractionModelRevision = 1 - [1658143964.643580][3139:3144] CHIP:DMG: }, - [1658143964.643721][3139:3144] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001A Status=0x0 - disabled: true - - - label: - "TH initiates LockUserChange event by adding the UserIndex using Set - User command" - PICS: DRLK.C.E04 - verification: | - ./chip-tool doorlock read-event lock-user-change 1 1 - - verify on Reference app receives the right response for the data sent in the above commands - - - [1658144019.122968][3149:3154] CHIP:DMG: } - [1658144019.123380][3149:3154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658144019.123410][3149:3154] CHIP:TOO: Event number: 20 - [1658144019.123430][3149:3154] CHIP:TOO: Priority: Info - [1658144019.123451][3149:3154] CHIP:TOO: Timestamp: 2963226 - [1658144019.123575][3149:3154] CHIP:TOO: LockUserChange: { - [1658144019.123616][3149:3154] CHIP:TOO: LockDataType: 3 - [1658144019.123661][3149:3154] CHIP:TOO: DataOperationType: 0 - [1658144019.123687][3149:3154] CHIP:TOO: OperationSource: 7 - [1658144019.123714][3149:3154] CHIP:TOO: UserIndex: 1 - [1658144019.123739][3149:3154] CHIP:TOO: FabricIndex: 1 - [1658144019.123765][3149:3154] CHIP:TOO: SourceNode: 112233 - [1658144019.123800][3149:3154] CHIP:TOO: DataIndex: 1 - [1658144019.123824][3149:3154] CHIP:TOO: } - [1658144019.123956][3149:3154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658144019.123990][3149:3154] CHIP:TOO: Event number: 21 - [1658144019.124015][3149:3154] CHIP:TOO: Priority: Info - [1658144019.124038][3149:3154] CHIP:TOO: Timestamp: 3177054 - [1658144019.124075][3149:3154] CHIP:TOO: LockUserChange: { - [1658144019.124111][3149:3154] CHIP:TOO: LockDataType: 2 - [1658144019.124135][3149:3154] CHIP:TOO: DataOperationType: 1 - [1658144019.124168][3149:3154] CHIP:TOO: OperationSource: 7 - [1658144019.124192][3149:3154] CHIP:TOO: UserIndex: 1 - [1658144019.124225][3149:3154] CHIP:TOO: FabricIndex: 1 - [1658144019.124250][3149:3154] CHIP:TOO: SourceNode: 112233 - [1658144019.124274][3149:3154] CHIP:TOO: DataIndex: 1 - [1658144019.124308][3149:3154] CHIP:TOO: } - [1658144019.124432][3149:3154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658144019.124458][3149:3154] CHIP:TOO: Event number: 22 - [1658144019.124491][3149:3154] CHIP:TOO: Priority: Info - [1658144019.124514][3149:3154] CHIP:TOO: Timestamp: 3245726 - [1658144019.124549][3149:3154] CHIP:TOO: LockUserChange: { - [1658144019.124576][3149:3154] CHIP:TOO: LockDataType: 2 - [1658144019.124611][3149:3154] CHIP:TOO: DataOperationType: 1 - [1658144019.124636][3149:3154] CHIP:TOO: OperationSource: 7 - [1658144019.124672][3149:3154] CHIP:TOO: UserIndex: 1 - [1658144019.124696][3149:3154] CHIP:TOO: FabricIndex: 1 - [1658144019.124720][3149:3154] CHIP:TOO: SourceNode: 112233 - [1658144019.124754][3149:3154] CHIP:TOO: DataIndex: 1 - [1658144019.124777][3149:3154] CHIP:TOO: } - [1658144019.124902][3149:3154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658144019.124935][3149:3154] CHIP:TOO: Event number: 23 - [1658144019.124959][3149:3154] CHIP:TOO: Priority: Info - [1658144019.124981][3149:3154] CHIP:TOO: Timestamp: 3258719 - [1658144019.125017][3149:3154] CHIP:TOO: LockUserChange: { - [1658144019.125043][3149:3154] CHIP:TOO: LockDataType: 2 - [1658144019.125068][3149:3154] CHIP:TOO: DataOperationType: 0 - [1658144019.125092][3149:3154] CHIP:TOO: OperationSource: 7 - [1658144019.125126][3149:3154] CHIP:TOO: UserIndex: 1 - [1658144019.125150][3149:3154] CHIP:TOO: FabricIndex: 1 - [1658144019.125183][3149:3154] CHIP:TOO: SourceNode: 112233 - [1658144019.125208][3149:3154] CHIP:TOO: DataIndex: 1 - [1658144019.125231][3149:3154] CHIP:TOO: } - [1658144019.125367][3149:3154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658144019.125392][3149:3154] CHIP:TOO: Event number: 24 - [1658144019.125415][3149:3154] CHIP:TOO: Priority: Info - [1658144019.125438][3149:3154] CHIP:TOO: Timestamp: 3266228 - [1658144019.125473][3149:3154] CHIP:TOO: LockUserChange: { - [1658144019.125509][3149:3154] CHIP:TOO: LockDataType: 6 - [1658144019.125535][3149:3154] CHIP:TOO: DataOperationType: 0 - [1658144019.125559][3149:3154] CHIP:TOO: OperationSource: 7 - [1658144019.125592][3149:3154] CHIP:TOO: UserIndex: 1 - [1658144019.125616][3149:3154] CHIP:TOO: FabricIndex: 1 - [1658144019.125651][3149:3154] CHIP:TOO: SourceNode: 112233 - [1658144019.125675][3149:3154] CHIP:TOO: DataIndex: 1 - [1658144019.125708][3149:3154] CHIP:TOO: } - [1658144019.125835][3149:3154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658144019.125860][3149:3154] CHIP:TOO: Event number: 25 - [1658144019.125883][3149:3154] CHIP:TOO: Priority: Info - [1658144019.125906][3149:3154] CHIP:TOO: Timestamp: 3491768 - [1658144019.125942][3149:3154] CHIP:TOO: LockUserChange: { - [1658144019.125980][3149:3154] CHIP:TOO: LockDataType: 2 - [1658144019.126006][3149:3154] CHIP:TOO: DataOperationType: 1 - [1658144019.126039][3149:3154] CHIP:TOO: OperationSource: 7 - [1658144019.126063][3149:3154] CHIP:TOO: UserIndex: 1 - [1658144019.126087][3149:3154] CHIP:TOO: FabricIndex: 1 - [1658144019.126121][3149:3154] CHIP:TOO: SourceNode: 112233 - [1658144019.126145][3149:3154] CHIP:TOO: DataIndex: 1 - [1658144019.126177][3149:3154] CHIP:TOO: } - [1658144019.126299][3149:3154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658144019.126325][3149:3154] CHIP:TOO: Event number: 26 - [1658144019.126347][3149:3154] CHIP:TOO: Priority: Info - [1658144019.126370][3149:3154] CHIP:TOO: Timestamp: 3556371 - [1658144019.126403][3149:3154] CHIP:TOO: LockUserChange: { - [1658144019.126435][3149:3154] CHIP:TOO: LockDataType: 2 - [1658144019.126459][3149:3154] CHIP:TOO: DataOperationType: 1 - [1658144019.126481][3149:3154] CHIP:TOO: OperationSource: 7 - [1658144019.126503][3149:3154] CHIP:TOO: UserIndex: 1 - [1658144019.126525][3149:3154] CHIP:TOO: FabricIndex: 1 - [1658144019.126558][3149:3154] CHIP:TOO: SourceNode: 112233 - [1658144019.126580][3149:3154] CHIP:TOO: DataIndex: 1 - [1658144019.126611][3149:3154] CHIP:TOO: } - [1658144019.126717][3149:3154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658144019.126748][3149:3154] CHIP:TOO: Event number: 27 - [1658144019.126770][3149:3154] CHIP:TOO: Priority: Info - [1658144019.126791][3149:3154] CHIP:TOO: Timestamp: 4024816 - [1658144019.126823][3149:3154] CHIP:TOO: LockUserChange: { - [1658144019.126859][3149:3154] CHIP:TOO: LockDataType: 2 - [1658144019.126882][3149:3154] CHIP:TOO: DataOperationType: 0 - [1658144019.126905][3149:3154] CHIP:TOO: OperationSource: 7 - [1658144019.126936][3149:3154] CHIP:TOO: UserIndex: 1 - [1658144019.126958][3149:3154] CHIP:TOO: FabricIndex: 1 - [1658144019.126989][3149:3154] CHIP:TOO: SourceNode: 112233 - [1658144019.127012][3149:3154] CHIP:TOO: DataIndex: 1 - [1658144019.127042][3149:3154] CHIP:TOO: } - [1658144019.127158][3149:3154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658144019.127182][3149:3154] CHIP:TOO: Event number: 28 - [1658144019.127203][3149:3154] CHIP:TOO: Priority: Info - [1658144019.127224][3149:3154] CHIP:TOO: Timestamp: 4112793 - [1658144019.127257][3149:3154] CHIP:TOO: LockUserChange: { - [1658144019.127292][3149:3154] CHIP:TOO: LockDataType: 6 - [1658144019.127316][3149:3154] CHIP:TOO: DataOperationType: 0 - [1658144019.127346][3149:3154] CHIP:TOO: OperationSource: 7 - [1658144019.127369][3149:3154] CHIP:TOO: UserIndex: 1 - [1658144019.127392][3149:3154] CHIP:TOO: FabricIndex: 1 - [1658144019.127423][3149:3154] CHIP:TOO: SourceNode: 112233 - [1658144019.127445][3149:3154] CHIP:TOO: DataIndex: 1 - [1658144019.127475][3149:3154] CHIP:TOO: } - [1658144019.127592][3149:3154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1658144019.127615][3149:3154] CHIP:TOO: Event number: 35 - [1658144019.127649][3149:3154] CHIP:TOO: Priority: Info - [1658144019.127672][3149:3154] CHIP:TOO: Timestamp: 4758521 - [1658144019.127706][3149:3154] CHIP:TOO: LockUserChange: { - [1658144019.127739][3149:3154] CHIP:TOO: LockDataType: 2 - [1658144019.127763][3149:3154] CHIP:TOO: DataOperationType: 0 - [1658144019.127785][3149:3154] CHIP:TOO: OperationSource: 7 - [1658144019.127819][3149:3154] CHIP:TOO: UserIndex: 3 - [1658144019.127842][3149:3154] CHIP:TOO: FabricIndex: 1 - [1658144019.127872][3149:3154] CHIP:TOO: SourceNode: 112233 - [1658144019.127895][3149:3154] CHIP:TOO: DataIndex: 3 - [1658144019.127924][3149:3154] CHIP:TOO: } - disabled: true +# 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: + 114.3.3. [TC-DRLK-3.3] Verification for the Door Lock Events [DUT - Client] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "TH will initiate DoorLockAlarm Event (LockJammed scenario)" + PICS: DRLK.C.E00 + verification: | + ./chip-tool doorlock read-event door-lock-alarm 1 1 + + Verify DUT receives the DoorLockAlarm event on TH / lock app log: + + [1658143092.410930][3017:3023] CHIP:DMG: ReportDataMessage = + [1658143092.410964][3017:3023] CHIP:DMG: { + [1658143092.410994][3017:3023] CHIP:DMG: SuppressResponse = true, + [1658143092.411026][3017:3023] CHIP:DMG: InteractionModelRevision = 1 + [1658143092.411056][3017:3023] CHIP:DMG: } + + DUT/ChipTool log: + + [1658399559.467861][2474:2474] CHIP:IM: Received Read request + [1658399559.467960][2474:2474] CHIP:DMG: ReadRequestMessage = + [1658399559.467994][2474:2474] CHIP:DMG: { + [1658399559.468022][2474:2474] CHIP:DMG: EventPathIBs = + [1658399559.468054][2474:2474] CHIP:DMG: [ + [1658399559.468084][2474:2474] CHIP:DMG: EventPath = + [1658399559.468118][2474:2474] CHIP:DMG: { + [1658399559.468154][2474:2474] CHIP:DMG: Endpoint = 0x1, + [1658399559.468200][2474:2474] CHIP:DMG: Cluster = 0x101, + [1658399559.468238][2474:2474] CHIP:DMG: Event = 0x0, + [1658399559.468274][2474:2474] CHIP:DMG: }, + [1658399559.468308][2474:2474] CHIP:DMG: + [1658399559.468337][2474:2474] CHIP:DMG: ], + [1658399559.468371][2474:2474] CHIP:DMG: + [1658399559.468403][2474:2474] CHIP:DMG: isFabricFiltered = true, + [1658399559.468434][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658399559.468463][2474:2474] CHIP:DMG: }, + [1658399559.468543][2474:2474] CHIP:DMG: IM RH moving to [GeneratingReports] + disabled: true + + - label: "DUT sends the Unlock Door command to the TH with valid PINCode" + PICS: DRLK.C.C01.Tx + verification: | + ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 + + Verify Test Harness receives the Set User Door command from the DUT on TH / lock app log: + + [1658143230.937379][3029:3034] CHIP:DMG: StatusIB = + [1658143230.937412][3029:3034] CHIP:DMG: { + [1658143230.937446][3029:3034] CHIP:DMG: status = 0x00 (SUCCESS), + [1658143230.937478][3029:3034] CHIP:DMG: }, + + DUT/ChipTool log: + + [1658399917.774631][2474:2474] CHIP:DMG: CommandFields = + [1658399917.774662][2474:2474] CHIP:DMG: { + [1658399917.774694][2474:2474] CHIP:DMG: 0x0 = 0, + [1658399917.774727][2474:2474] CHIP:DMG: 0x1 = 1, + [1658399917.774763][2474:2474] CHIP:DMG: 0x2 = "xxx", + [1658399917.774799][2474:2474] CHIP:DMG: 0x3 = 6452, + [1658399917.774835][2474:2474] CHIP:DMG: 0x4 = 1, + [1658399917.774872][2474:2474] CHIP:DMG: 0x5 = 0, + [1658399917.774907][2474:2474] CHIP:DMG: 0x6 = 0, + [1658399917.774940][2474:2474] CHIP:DMG: }, + [1658399917.774968][2474:2474] CHIP:DMG: }, + [1658399917.775002][2474:2474] CHIP:DMG: + [1658399917.775025][2474:2474] CHIP:DMG: ], + [1658399917.775058][2474:2474] CHIP:DMG: + [1658399917.775082][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658399917.775107][2474:2474] CHIP:DMG: }, + [1658399917.775179][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a + [1658399917.775241][2474:2474] CHIP:DMG: AccessControl: allowed + [1658399917.775273][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001A + [1658399917.775327][2474:2474] CHIP:ZCL: [SetUser] Incoming command [endpointId=1,userIndex=1] + + ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 0 0 1 1 --timedInteractionTimeoutMs 1000 + + Verify Test Harness receives the Set Credential command from the DUT on TH / lock app log: + + [1658143318.915533][3039:3044] CHIP:DMG: }, + [1658143318.915609][3039:3044] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 + [1658143318.915705][3039:3044] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 + [1658143318.915778][3039:3044] CHIP:TOO: SetCredentialResponse: { + [1658143318.915821][3039:3044] CHIP:TOO: status: 0 + [1658143318.915851][3039:3044] CHIP:TOO: userIndex: null + [1658143318.915880][3039:3044] CHIP:TOO: nextCredentialIndex: 2 + [1658143318.915909][3039:3044] CHIP:TOO: } + + DUT/ChipTool log: + + [1658400025.688730][2474:2474] CHIP:DMG: CommandFields = + [1658400025.688777][2474:2474] CHIP:DMG: { + [1658400025.688822][2474:2474] CHIP:DMG: 0x0 = 0, + [1658400025.688873][2474:2474] CHIP:DMG: 0x1 = + [1658400025.688922][2474:2474] CHIP:DMG: { + [1658400025.688964][2474:2474] CHIP:DMG: 0x0 = 1, + [1658400025.689016][2474:2474] CHIP:DMG: 0x1 = 1, + [1658400025.689058][2474:2474] CHIP:DMG: }, + [1658400025.689110][2474:2474] CHIP:DMG: 0x2 = [ + [1658400025.689161][2474:2474] CHIP:DMG: 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, + [1658400025.689209][2474:2474] CHIP:DMG: ] + [1658400025.689261][2474:2474] CHIP:DMG: 0x3 = 1, + [1658400025.689312][2474:2474] CHIP:DMG: 0x4 = 0, + [1658400025.689353][2474:2474] CHIP:DMG: 0x5 = 0, + [1658400025.689403][2474:2474] CHIP:DMG: }, + [1658400025.689436][2474:2474] CHIP:DMG: }, + [1658400025.689477][2474:2474] CHIP:DMG: + [1658400025.689529][2474:2474] CHIP:DMG: ], + [1658400025.689575][2474:2474] CHIP:DMG: + [1658400025.689619][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658400025.689648][2474:2474] CHIP:DMG: }, + [1658400025.689747][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a + [1658400025.689802][2474:2474] CHIP:DMG: AccessControl: allowed + [1658400025.689836][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0022 + [1658400025.689909][2474:2474] CHIP:ZCL: [SetCredential] Incoming command [endpointId=1] + + + ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 123456 + + Verify Test Harness receives the Unlock Door command from the DUT on TH / lock app log: + + [1658143429.670361][3057:3062] CHIP:DMG: }, + [1658143429.670411][3057:3062] CHIP:DMG: + [1658143429.670451][3057:3062] CHIP:DMG: StatusIB = + [1658143429.670498][3057:3062] CHIP:DMG: { + [1658143429.670548][3057:3062] CHIP:DMG: status = 0x00 (SUCCESS), + [1658143429.670593][3057:3062] CHIP:DMG: }, + [1658143429.670637][3057:3062] CHIP:DMG: + [1658143429.670681][3057:3062] CHIP:DMG: }, + [1658143429.670725][3057:3062] CHIP:DMG: + [1658143429.670759][3057:3062] CHIP:DMG: }, + [1658143429.670799][3057:3062] CHIP:DMG: + [1658143429.670829][3057:3062] CHIP:DMG: ], + [1658143429.670867][3057:3062] CHIP:DMG: + [1658143429.670896][3057:3062] CHIP:DMG: InteractionModelRevision = 1 + [1658143429.670926][3057:3062] CHIP:DMG: }, + + DUT/ChipTool log: + + [1658400115.693300][2474:2474] CHIP:DMG: CommandDataIB = + [1658400115.693328][2474:2474] CHIP:DMG: { + [1658400115.693353][2474:2474] CHIP:DMG: CommandPathIB = + [1658400115.693387][2474:2474] CHIP:DMG: { + [1658400115.693421][2474:2474] CHIP:DMG: EndpointId = 0x1, + [1658400115.693456][2474:2474] CHIP:DMG: ClusterId = 0x101, + [1658400115.693489][2474:2474] CHIP:DMG: CommandId = 0x1, + [1658400115.693519][2474:2474] CHIP:DMG: }, + [1658400115.693552][2474:2474] CHIP:DMG: + [1658400115.693579][2474:2474] CHIP:DMG: CommandFields = + [1658400115.693609][2474:2474] CHIP:DMG: { + [1658400115.693641][2474:2474] CHIP:DMG: 0x0 = [ + [1658400115.693675][2474:2474] CHIP:DMG: 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, + [1658400115.693709][2474:2474] CHIP:DMG: ] + [1658400115.693742][2474:2474] CHIP:DMG: }, + [1658400115.693771][2474:2474] CHIP:DMG: }, + [1658400115.693801][2474:2474] CHIP:DMG: + [1658400115.693825][2474:2474] CHIP:DMG: ], + [1658400115.693855][2474:2474] CHIP:DMG: + [1658400115.693879][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658400115.693902][2474:2474] CHIP:DMG: }, + [1658400115.693971][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=o + [1658400115.694008][2474:2474] CHIP:DMG: AccessControl: allowed + [1658400115.694035][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0001 + [1658400115.694070][2474:2474] CHIP:ZCL: Received command: UnlockDoor + [1658400115.694114][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] + [1658400115.694139][2474:2474] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=1,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] + [1658400115.694212][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] + [1658400115.694240][2474:2474] CHIP:ZCL: Found occupied credential [endpoint=1,index=1,type=1,dataSize=6,createdBy=1,modifiedBy=1] + [1658400115.694266][2474:2474] CHIP:ZCL: Lock App: specified PIN code was found in the database, setting door lock state to "Unlocked" [endpointId=1] + disabled: true + + - label: "TH initiates DoorStateChange event with Doorstate set to DoorOpen" + PICS: DRLK.C.F05 && DRLK.C.E01 + verification: | + ./chip-tool doorlock read-event door-state-change 1 1 + + Verify DUT receives the DoorStateChange event on TH / lock app log: + + [1658143492.705309][3065:3070] CHIP:DMG: ReportDataMessage = + [1658143492.705348][3065:3070] CHIP:DMG: { + [1658143492.705374][3065:3070] CHIP:DMG: SuppressResponse = true, + [1658143492.705402][3065:3070] CHIP:DMG: InteractionModelRevision = 1 + [1658143492.705427][3065:3070] CHIP:DMG: } + + DUT/ChipTool log: + + [1658400265.159396][2474:2474] CHIP:IM: Received Read request + [1658400265.159485][2474:2474] CHIP:DMG: ReadRequestMessage = + [1658400265.159518][2474:2474] CHIP:DMG: { + [1658400265.159544][2474:2474] CHIP:DMG: EventPathIBs = + [1658400265.159574][2474:2474] CHIP:DMG: [ + [1658400265.159602][2474:2474] CHIP:DMG: EventPath = + [1658400265.159633][2474:2474] CHIP:DMG: { + [1658400265.159665][2474:2474] CHIP:DMG: Endpoint = 0x1, + [1658400265.159703][2474:2474] CHIP:DMG: Cluster = 0x101, + [1658400265.159738][2474:2474] CHIP:DMG: Event = 0x1, + [1658400265.159770][2474:2474] CHIP:DMG: }, + [1658400265.159803][2474:2474] CHIP:DMG: + [1658400265.159830][2474:2474] CHIP:DMG: ], + [1658400265.159862][2474:2474] CHIP:DMG: + [1658400265.159891][2474:2474] CHIP:DMG: isFabricFiltered = true, + [1658400265.159920][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658400265.159947][2474:2474] CHIP:DMG: }, + [1658400265.160024][2474:2474] CHIP:DMG: IM RH moving to [GeneratingReports] + disabled: true + + - label: "DUT sends the Lock Door command to the TH with valid PINCode" + PICS: DRLK.C.C00.Tx + verification: | + ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 123456 + + Verify Test Harness receives the lock Door command from the DUT on TH / lock app log: + + [1658143612.854142][3083:3088] CHIP:DMG: + [1658143612.854178][3083:3088] CHIP:DMG: StatusIB = + [1658143612.854229][3083:3088] CHIP:DMG: { + [1658143612.854268][3083:3088] CHIP:DMG: status = 0x00 (SUCCESS), + [1658143612.854317][3083:3088] CHIP:DMG: }, + [1658143612.854365][3083:3088] CHIP:DMG: + [1658143612.854400][3083:3088] CHIP:DMG: }, + [1658143612.854448][3083:3088] CHIP:DMG: + [1658143612.854481][3083:3088] CHIP:DMG: }, + [1658143612.854528][3083:3088] CHIP:DMG: + [1658143612.854559][3083:3088] CHIP:DMG: ], + [1658143612.854604][3083:3088] CHIP:DMG: + [1658143612.854634][3083:3088] CHIP:DMG: InteractionModelRevision = 1 + [1658143612.854673][3083:3088] CHIP:DMG: }, + [1658143612.854756][3083:3088] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0000 Status=0x0 + + DUT/ChipTool log: + + [1658400315.379482][2474:2474] CHIP:DMG: CommandPathIB = + [1658400315.379524][2474:2474] CHIP:DMG: { + [1658400315.379559][2474:2474] CHIP:DMG: EndpointId = 0x1, + [1658400315.379608][2474:2474] CHIP:DMG: ClusterId = 0x101, + [1658400315.379650][2474:2474] CHIP:DMG: CommandId = 0x0, + [1658400315.379694][2474:2474] CHIP:DMG: }, + [1658400315.379734][2474:2474] CHIP:DMG: + [1658400315.379769][2474:2474] CHIP:DMG: CommandFields = + [1658400315.379807][2474:2474] CHIP:DMG: { + [1658400315.379845][2474:2474] CHIP:DMG: 0x0 = [ + [1658400315.379886][2474:2474] CHIP:DMG: 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, + [1658400315.379931][2474:2474] CHIP:DMG: ] + [1658400315.379976][2474:2474] CHIP:DMG: }, + [1658400315.380010][2474:2474] CHIP:DMG: }, + [1658400315.380049][2474:2474] CHIP:DMG: + [1658400315.380079][2474:2474] CHIP:DMG: ], + [1658400315.380116][2474:2474] CHIP:DMG: + [1658400315.380145][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658400315.380174][2474:2474] CHIP:DMG: }, + [1658400315.380251][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=o + [1658400315.380293][2474:2474] CHIP:DMG: AccessControl: allowed + [1658400315.380327][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0000 + [1658400315.380369][2474:2474] CHIP:ZCL: Received command: LockDoor + [1658400315.380419][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] + [1658400315.380449][2474:2474] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=1,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] + [1658400315.380479][2474:2474] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] + [1658400315.380506][2474:2474] CHIP:ZCL: Found occupied credential [endpoint=1,index=1,type=1,dataSize=6,createdBy=1,modifiedBy=1] + [1658400315.380537][2474:2474] CHIP:ZCL: Lock App: specified PIN code was found in the database, setting door lock state to "Locked" [endpointId=1] + disabled: true + + - label: + "TH will initiate LockOperation event with LockOperationType to Lock" + PICS: DRLK.C.E02 + verification: | + ./chip-tool doorlock read-event lock-operation 1 1 + + Verify DUT receives the LockOperation event on TH / lock app log: + + [1658220863.460617][4105:4110] CHIP:DMG: } + [1658220863.460814][4105:4110] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1658220863.460844][4105:4110] CHIP:TOO: Event number: 5 + [1658220863.460869][4105:4110] CHIP:TOO: Priority: Critical + [1658220863.460894][4105:4110] CHIP:TOO: Timestamp: 12367237 + [1658220863.461015][4105:4110] CHIP:TOO: LockOperation: { + [1658220863.461057][4105:4110] CHIP:TOO: LockOperationType: 0 + [1658220863.461085][4105:4110] CHIP:TOO: OperationSource: 7 + [1658220863.461112][4105:4110] CHIP:TOO: UserIndex: 1 + [1658220863.461139][4105:4110] CHIP:TOO: FabricIndex: 1 + [1658220863.461169][4105:4110] CHIP:TOO: SourceNode: 112233 + [1658220863.461202][4105:4110] CHIP:TOO: Credentials: 1 entries + [1658220863.461242][4105:4110] CHIP:TOO: [1]: { + [1658220863.461269][4105:4110] CHIP:TOO: CredentialType: 1 + [1658220863.461296][4105:4110] CHIP:TOO: CredentialIndex: 1 + [1658220863.461321][4105:4110] CHIP:TOO: } + [1658220863.461348][4105:4110] CHIP:TOO: } + + DUT/ChipTool log: + + [1658400639.617399][3227:3227] CHIP:IM: Received Read request + [1658400639.617491][3227:3227] CHIP:DMG: ReadRequestMessage = + [1658400639.617535][3227:3227] CHIP:DMG: { + [1658400639.617561][3227:3227] CHIP:DMG: EventPathIBs = + [1658400639.617592][3227:3227] CHIP:DMG: [ + [1658400639.617632][3227:3227] CHIP:DMG: EventPath = + [1658400639.617669][3227:3227] CHIP:DMG: { + [1658400639.617716][3227:3227] CHIP:DMG: Endpoint = 0x1, + [1658400639.617765][3227:3227] CHIP:DMG: Cluster = 0x101, + [1658400639.617801][3227:3227] CHIP:DMG: Event = 0x2, + [1658400639.617843][3227:3227] CHIP:DMG: }, + [1658400639.617878][3227:3227] CHIP:DMG: + [1658400639.617916][3227:3227] CHIP:DMG: ], + [1658400639.617949][3227:3227] CHIP:DMG: + [1658400639.617988][3227:3227] CHIP:DMG: isFabricFiltered = true, + [1658400639.618016][3227:3227] CHIP:DMG: InteractionModelRevision = 1 + [1658400639.618055][3227:3227] CHIP:DMG: }, + [1658400639.618145][3227:3227] CHIP:DMG: IM RH moving to [GeneratingReports] + [1658400639.618271][3227:3227] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1658400639.618520][3227:3227] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1658400639.618573][3227:3227] CHIP:DMG: AccessControl: allowed + [1658400639.618651][3227:3227] CHIP:DMG: Fetched 1 events + disabled: true + + - label: "DUT sends the Unlock Door command to the TH with Invalid PINCode" + PICS: DRLK.C.C01.Tx + verification: | + ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 12345678 + + Verify Test Harness receives the Unlock Door command from the DUT on TH / lock app log: + + [1658143767.123426][3101:3106] CHIP:DMG: }, + [1658143767.123464][3101:3106] CHIP:DMG: + [1658143767.123493][3101:3106] CHIP:DMG: StatusIB = + [1658143767.123527][3101:3106] CHIP:DMG: { + [1658143767.123559][3101:3106] CHIP:DMG: status = 0x01 (FAILURE), + [1658143767.123592][3101:3106] CHIP:DMG: }, + [1658143767.123626][3101:3106] CHIP:DMG: + [1658143767.123684][3101:3106] CHIP:DMG: }, + [1658143767.123720][3101:3106] CHIP:DMG: + [1658143767.123748][3101:3106] CHIP:DMG: }, + [1658143767.123780][3101:3106] CHIP:DMG: + [1658143767.123804][3101:3106] CHIP:DMG: ], + [1658143767.123834][3101:3106] CHIP:DMG: + [1658143767.123859][3101:3106] CHIP:DMG: InteractionModelRevision = 1 + [1658143767.123883][3101:3106] CHIP:DMG: }, + [1658143767.123943][3101:3106] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0001 Status=0x1 + [1658143767.123978][3101:3106] CHIP:TOO: Error: IM Error 0x00000501: General error: 0x01 (FAILURE) + + + DUT/ChipTool log: + + [1658400708.187116][3227:3227] CHIP:DMG: CommandPathIB = + [1658400708.187205][3227:3227] CHIP:DMG: { + [1658400708.187337][3227:3227] CHIP:DMG: EndpointId = 0x1, + [1658400708.187439][3227:3227] CHIP:DMG: ClusterId = 0x101, + [1658400708.187540][3227:3227] CHIP:DMG: CommandId = 0x1, + [1658400708.187637][3227:3227] CHIP:DMG: }, + [1658400708.187729][3227:3227] CHIP:DMG: + [1658400708.187806][3227:3227] CHIP:DMG: CommandFields = + [1658400708.187894][3227:3227] CHIP:DMG: { + [1658400708.187983][3227:3227] CHIP:DMG: 0x0 = [ + [1658400708.188083][3227:3227] CHIP:DMG: 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, + [1658400708.188205][3227:3227] CHIP:DMG: ] + [1658400708.188311][3227:3227] CHIP:DMG: }, + [1658400708.188400][3227:3227] CHIP:DMG: }, + [1658400708.188481][3227:3227] CHIP:DMG: + [1658400708.188544][3227:3227] CHIP:DMG: ], + [1658400708.188615][3227:3227] CHIP:DMG: + [1658400708.188672][3227:3227] CHIP:DMG: InteractionModelRevision = 1 + [1658400708.188743][3227:3227] CHIP:DMG: }, + [1658400708.188836][3227:3227] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=o + [1658400708.188891][3227:3227] CHIP:DMG: AccessControl: allowed + disabled: true + + - label: + "TH will initiate LockOperationError event by causing Lock error using + invalid PIN" + PICS: DRLK.C.E03 + verification: | + ./chip-tool doorlock read-event lock-operation-error 1 1 + + Verify DUT receives the LockOperationError event on TH / lock app log: + + [1658221172.148732][4132:4137] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 + [1658221172.148764][4132:4137] CHIP:TOO: Event number: 6 + [1658221172.148790][4132:4137] CHIP:TOO: Priority: Critical + [1658221172.148815][4132:4137] CHIP:TOO: Timestamp: 12682848 + [1658221172.148936][4132:4137] CHIP:TOO: LockOperationError: { + [1658221172.149056][4132:4137] CHIP:TOO: LockOperationType: 1 + [1658221172.149085][4132:4137] CHIP:TOO: OperationSource: 7 + [1658221172.149112][4132:4137] CHIP:TOO: OperationError: 1 + [1658221172.149139][4132:4137] CHIP:TOO: UserIndex: 0 + [1658221172.149166][4132:4137] CHIP:TOO: FabricIndex: 1 + [1658221172.149197][4132:4137] CHIP:TOO: SourceNode: 112233 + [1658221172.149233][4132:4137] CHIP:TOO: Credentials: 1 entries + [1658221172.149272][4132:4137] CHIP:TOO: [1]: { + [1658221172.149300][4132:4137] CHIP:TOO: CredentialType: 1 + [1658221172.149327][4132:4137] CHIP:TOO: CredentialIndex: 0 + [1658221172.149353][4132:4137] CHIP:TOO: } + [1658221172.149380][4132:4137] CHIP:TOO: } + + DUT/ChipTool log: + + [1658400788.866836][3227:3227] CHIP:IM: Received Read request + [1658400788.866927][3227:3227] CHIP:DMG: ReadRequestMessage = + [1658400788.866961][3227:3227] CHIP:DMG: { + [1658400788.867001][3227:3227] CHIP:DMG: EventPathIBs = + [1658400788.867033][3227:3227] CHIP:DMG: [ + [1658400788.867059][3227:3227] CHIP:DMG: EventPath = + [1658400788.867099][3227:3227] CHIP:DMG: { + [1658400788.867130][3227:3227] CHIP:DMG: Endpoint = 0x1, + [1658400788.867171][3227:3227] CHIP:DMG: Cluster = 0x101, + [1658400788.867205][3227:3227] CHIP:DMG: Event = 0x3, + [1658400788.867271][3227:3227] CHIP:DMG: }, + [1658400788.867304][3227:3227] CHIP:DMG: + [1658400788.867330][3227:3227] CHIP:DMG: ], + [1658400788.867359][3227:3227] CHIP:DMG: + [1658400788.867385][3227:3227] CHIP:DMG: isFabricFiltered = true, + [1658400788.867414][3227:3227] CHIP:DMG: InteractionModelRevision = 1 + [1658400788.867439][3227:3227] CHIP:DMG: }, + [1658400788.867515][3227:3227] CHIP:DMG: IM RH moving to [GeneratingReports] + [1658400788.867623][3227:3227] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1658400788.867883][3227:3227] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1658400788.867931][3227:3227] CHIP:DMG: AccessControl: allowed + [1658400788.868004][3227:3227] CHIP:DMG: Fetched 1 events + disabled: true + + - label: "DUT sends Set User command to TH" + PICS: DRLK.C.F08 && DRLK.C.C1a.Tx + verification: | + ./chip-tool doorlock set-user 0 3 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 + + Verify Test Harness receives the Set User Door command from the DUT on TH / lock app log: + + [1658143964.643101][3139:3144] CHIP:DMG: + [1658143964.643137][3139:3144] CHIP:DMG: StatusIB = + [1658143964.643179][3139:3144] CHIP:DMG: { + [1658143964.643220][3139:3144] CHIP:DMG: status = 0x00 (SUCCESS), + [1658143964.643263][3139:3144] CHIP:DMG: }, + [1658143964.643303][3139:3144] CHIP:DMG: + [1658143964.643343][3139:3144] CHIP:DMG: }, + [1658143964.643388][3139:3144] CHIP:DMG: + [1658143964.643421][3139:3144] CHIP:DMG: }, + [1658143964.643457][3139:3144] CHIP:DMG: + [1658143964.643486][3139:3144] CHIP:DMG: ], + [1658143964.643522][3139:3144] CHIP:DMG: + [1658143964.643551][3139:3144] CHIP:DMG: InteractionModelRevision = 1 + [1658143964.643580][3139:3144] CHIP:DMG: }, + [1658143964.643721][3139:3144] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001A Status=0x0 + + DUT/ChipTool log: + + [1658400855.689218][3227:3227] CHIP:DMG: CommandPathIB = + [1658400855.689259][3227:3227] CHIP:DMG: { + [1658400855.689302][3227:3227] CHIP:DMG: EndpointId = 0x1, + [1658400855.689347][3227:3227] CHIP:DMG: ClusterId = 0x101, + [1658400855.689390][3227:3227] CHIP:DMG: CommandId = 0x1a, + [1658400855.689435][3227:3227] CHIP:DMG: }, + [1658400855.689479][3227:3227] CHIP:DMG: + [1658400855.689514][3227:3227] CHIP:DMG: CommandFields = + [1658400855.689554][3227:3227] CHIP:DMG: { + [1658400855.689597][3227:3227] CHIP:DMG: 0x0 = 0, + [1658400855.689640][3227:3227] CHIP:DMG: 0x1 = 3, + [1658400855.689686][3227:3227] CHIP:DMG: 0x2 = "xxx", + [1658400855.689734][3227:3227] CHIP:DMG: 0x3 = 6452, + [1658400855.689781][3227:3227] CHIP:DMG: 0x4 = 1, + [1658400855.689829][3227:3227] CHIP:DMG: 0x5 = 0, + [1658400855.689872][3227:3227] CHIP:DMG: 0x6 = 0, + [1658400855.689915][3227:3227] CHIP:DMG: }, + [1658400855.689954][3227:3227] CHIP:DMG: }, + [1658400855.689996][3227:3227] CHIP:DMG: + [1658400855.690027][3227:3227] CHIP:DMG: ], + [1658400855.690071][3227:3227] CHIP:DMG: + [1658400855.690102][3227:3227] CHIP:DMG: InteractionModelRevision = 1 + [1658400855.690133][3227:3227] CHIP:DMG: }, + [1658400855.690221][3227:3227] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a + [1658400855.690267][3227:3227] CHIP:DMG: AccessControl: allowed + [1658400855.690302][3227:3227] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001A + [1658400855.690367][3227:3227] CHIP:ZCL: [SetUser] Incoming command [endpointId=1,userIndex=3] + [1658400855.690424][3227:3227] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=3] + [1658400855.690455][3227:3227] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=2] + [1658400855.690485][3227:3227] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=3,creator=1,modifier=1,userName="xxx",uniqueId=1934,userStatus=1,userType=0,credentialRule=0,credentials=(nil),totalCredentials=0] + [1658400855.690519][3227:3227] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=3,adjustedIndex=2] + [1658400855.690547][3227:3227] CHIP:ZCL: [createUser] User created [endpointId=1,creatorFabricId=1,userIndex=3,userName="xxx",userUniqueId=0x1934,userStatus=1,userType=0,credentialRule=0,totalCredentials=0] + disabled: true + + - label: + "TH initiates LockUserChange event by adding the UserIndex using Set + User command" + PICS: DRLK.C.E04 + verification: | + ./chip-tool doorlock read-event lock-user-change 1 1 + + verify DUT receives LockUserChange from TH on TH / lock app log: + + [1658400921.180741][3300:3305] CHIP:DMG: } + [1658400921.181012][3300:3305] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1658400921.181047][3300:3305] CHIP:TOO: Event number: 3 + [1658400921.181075][3300:3305] CHIP:TOO: Priority: Info + [1658400921.181104][3300:3305] CHIP:TOO: Timestamp: 4919184 + [1658400921.181240][3300:3305] CHIP:TOO: LockUserChange: { + [1658400921.181288][3300:3305] CHIP:TOO: LockDataType: 2 + [1658400921.181322][3300:3305] CHIP:TOO: DataOperationType: 0 + [1658400921.181354][3300:3305] CHIP:TOO: OperationSource: 7 + [1658400921.181386][3300:3305] CHIP:TOO: UserIndex: 1 + [1658400921.181418][3300:3305] CHIP:TOO: FabricIndex: 1 + [1658400921.181452][3300:3305] CHIP:TOO: SourceNode: 112233 + [1658400921.181483][3300:3305] CHIP:TOO: DataIndex: 1 + [1658400921.181513][3300:3305] CHIP:TOO: } + [1658400921.181654][3300:3305] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1658400921.181686][3300:3305] CHIP:TOO: Event number: 4 + [1658400921.181716][3300:3305] CHIP:TOO: Priority: Info + [1658400921.181745][3300:3305] CHIP:TOO: Timestamp: 4928528 + [1658400921.181791][3300:3305] CHIP:TOO: LockUserChange: { + [1658400921.181825][3300:3305] CHIP:TOO: LockDataType: 6 + [1658400921.181856][3300:3305] CHIP:TOO: DataOperationType: 0 + [1658400921.181886][3300:3305] CHIP:TOO: OperationSource: 7 + [1658400921.181916][3300:3305] CHIP:TOO: UserIndex: 1 + [1658400921.181945][3300:3305] CHIP:TOO: FabricIndex: 1 + [1658400921.181975][3300:3305] CHIP:TOO: SourceNode: 112233 + [1658400921.182006][3300:3305] CHIP:TOO: DataIndex: 1 + [1658400921.182035][3300:3305] CHIP:TOO: } + [1658400921.182174][3300:3305] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1658400921.182206][3300:3305] CHIP:TOO: Event number: 7 + [1658400921.182235][3300:3305] CHIP:TOO: Priority: Info + [1658400921.182263][3300:3305] CHIP:TOO: Timestamp: 5193731 + [1658400921.182400][3300:3305] CHIP:TOO: LockUserChange: { + [1658400921.182435][3300:3305] CHIP:TOO: LockDataType: 2 + [1658400921.182467][3300:3305] CHIP:TOO: DataOperationType: 0 + [1658400921.182497][3300:3305] CHIP:TOO: OperationSource: 7 + [1658400921.182527][3300:3305] CHIP:TOO: UserIndex: 3 + [1658400921.182557][3300:3305] CHIP:TOO: FabricIndex: 1 + [1658400921.182587][3300:3305] CHIP:TOO: SourceNode: 112233 + [1658400921.182617][3300:3305] CHIP:TOO: DataIndex: 3 + [1658400921.182645][3300:3305] CHIP:TOO: } + + DUT/ChipTool log: + + [1658400921.173789][3227:3227] CHIP:IM: Received Read request + [1658400921.173921][3227:3227] CHIP:DMG: ReadRequestMessage = + [1658400921.173978][3227:3227] CHIP:DMG: { + [1658400921.174015][3227:3227] CHIP:DMG: EventPathIBs = + [1658400921.174078][3227:3227] CHIP:DMG: [ + [1658400921.174110][3227:3227] CHIP:DMG: EventPath = + [1658400921.174164][3227:3227] CHIP:DMG: { + [1658400921.174214][3227:3227] CHIP:DMG: Endpoint = 0x1, + [1658400921.174257][3227:3227] CHIP:DMG: Cluster = 0x101, + [1658400921.174308][3227:3227] CHIP:DMG: Event = 0x4, + [1658400921.174351][3227:3227] CHIP:DMG: }, + [1658400921.174402][3227:3227] CHIP:DMG: + [1658400921.174436][3227:3227] CHIP:DMG: ], + [1658400921.174486][3227:3227] CHIP:DMG: + [1658400921.174519][3227:3227] CHIP:DMG: isFabricFiltered = true, + [1658400921.174565][3227:3227] CHIP:DMG: InteractionModelRevision = 1 + [1658400921.174596][3227:3227] CHIP:DMG: }, + [1658400921.174712][3227:3227] CHIP:DMG: IM RH moving to [GeneratingReports] + [1658400921.174844][3227:3227] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1658400921.175067][3227:3227] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1658400921.175116][3227:3227] CHIP:DMG: AccessControl: allowed + [1658400921.175254][3227:3227] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1658400921.175305][3227:3227] CHIP:DMG: AccessControl: allowed + [1658400921.175494][3227:3227] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1658400921.175531][3227:3227] CHIP:DMG: AccessControl: allowed + [1658400921.175603][3227:3227] CHIP:DMG: Fetched 3 events + disabled: true 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 1d58d50196d9f3..3bc234e80b85c3 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 @@ -34,7 +34,7 @@ tests: response: value: 3 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,10 +42,9 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: " !FLW.S.A0003 " command: "readAttribute" attribute: "AttributeList" response: @@ -53,14 +52,14 @@ tests: type: list contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] - - label: "Read the global attribute: AttributeList" + - label: "Read the optional attribute(Tolerance) in AttributeList" PICS: FLW.S.A0003 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] + contains: [3] - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml index 63013e0ee27d8e..8f8abadc6dcbad 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "MeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -44,7 +44,7 @@ tests: attribute: "MinMeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -54,16 +54,16 @@ tests: attribute: "MaxMeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "read the optional attribute: Tolerance" + - label: "Read the optional attribute: Tolerance" PICS: FLW.S.A0003 command: "readAttribute" attribute: "Tolerance" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 2048 diff --git a/src/app/tests/suites/certification/Test_TC_FLW_2_2.yaml b/src/app/tests/suites/certification/Test_TC_FLW_2_2.yaml index 0ad7b2405f308a..d2ca220cf4519f 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_2_2.yaml @@ -35,7 +35,7 @@ tests: response: saveAs: ValueBeforeChange constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -51,12 +51,12 @@ tests: value: "y" - label: "read the mandatory attribute: MeasuredValue" - PICS: FLW.S.A0000 + PICS: FLW.S.A0000 && FLW.M.FlowChange command: "readAttribute" attribute: "MeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 notValue: ValueBeforeChange 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 493d400835c2e2..7485514d80498c 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 121.2.3. [TC-G-2.3] Commands - GetGroupMembership, AddGroupIfIdentifying + 123.2.3. [TC-G-2.3] Commands - GetGroupMembership, AddGroupIfIdentifying [DUT-Server] config: @@ -23,6 +23,145 @@ config: endpoint: 0 tests: + - label: "TH is commissioned with DUT" + verification: | + + disabled: true + + - label: + "TH reads the MaxGroupsPerFabric from Group key Management Cluster and + saves it as maxgroups" + verification: | + + disabled: true + + - label: + "If maxgroups>0, proceed with the following steps TH generates + fabric-unique GroupID, GroupName, random key, EpochKey0 and + GroupKeySetID. TH generates an EpochKey and saves as + epoch_key_set1_epoch0 TH sends a KeySetWriteCommand to the Group Key + Management cluster with the following fields set in the GroupKeySet + struct: GroupKeySetId is 1 EpochKey0 is epoch_key_set0_epoch0 + GroupKeySecurityPolicy = TrustFirst (1) GroupKeyMulticastPolicy = + PerGroupID (0) EpochStartTime0 = 0 TH binds GroupId(0x0002 to + (maxgroups+1)) with GroupKeySetID in the GroupKeyMap attribute list on + GroupKeyManagement cluster with the values provided in the above steps" + 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 the status is success on the TH Log: + + [1658316948.574526][4039:4044] CHIP:DMG: StatusIB = + [1658316948.574561][4039:4044] CHIP:DMG: { + [1658316948.574597][4039:4044] CHIP:DMG: status = 0x00 (SUCCESS), + [1658316948.574632][4039:4044] CHIP:DMG: }, + + Before adding the Group0x0006 execute this command + + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 6, "groupKeySetID": 1, "fabricIndex": 1}]' 1 0 + + Verify the status is success on the TH Log: + + [1658319830.074631][4759:4764] CHIP:DMG: WriteClient moving to [ResponseRe] + [1658319830.075186][4759:4764] CHIP:DMG: + [1658319830.075223][4759:4764] CHIP:DMG: StatusIB = + [1658319830.075262][4759:4764] CHIP:DMG: { + [1658319830.075298][4759:4764] CHIP:DMG: status = 0x00 (SUCCESS), + [1658319830.075337][4759:4764] CHIP:DMG: }, + [1658319830.075373][4759:4764] CHIP:DMG: + [1658319830.075404][4759:4764] CHIP:DMG: }, + [1658319830.075795][4759:4764] CHIP:DMG: + [1658319830.075832][4759:4764] CHIP:DMG: StatusIB = + [1658319830.075870][4759:4764] CHIP:DMG: { + [1658319830.075908][4759:4764] CHIP:DMG: status = 0x00 (SUCCESS), + [1658319830.075946][4759:4764] CHIP:DMG: }, + + Before adding the Group0x0007 execute this command + + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 7, "groupKeySetID": 1, "fabricIndex": 1}]' 1 0 + + Verify the status is success on the TH Log: + + [1658319901.401644][4768:4773] CHIP:DMG: StatusIB = + [1658319901.401674][4768:4773] CHIP:DMG: { + [1658319901.401706][4768:4773] CHIP:DMG: status = 0x00 (SUCCESS), + [1658319901.401829][4768:4773] CHIP:DMG: }, + [1658319901.401029][4768:4773] CHIP:DMG: StatusIB = + [1658319901.401068][4768:4773] CHIP:DMG: { + [1658319901.401108][4768:4773] CHIP:DMG: status = 0x00 (SUCCESS), + [1658319901.401147][4768:4773] CHIP:DMG: }, + + + Before adding the Group0x0008 execute this command + + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 8, "groupKeySetID": 1, "fabricIndex": 1}]' 1 0 + + Verify the status is success on the TH Log: + + [1658319969.849079][4777:4782] CHIP:DMG: StatusIB = + [1658319969.849119][4777:4782] CHIP:DMG: { + [1658319969.849158][4777:4782] CHIP:DMG: status = 0x00 (SUCCESS), + [1658319969.849194][4777:4782] CHIP:DMG: }, + [1658319969.849704][4777:4782] CHIP:DMG: StatusIB = + [1658319969.849739][4777:4782] CHIP:DMG: { + [1658319969.849774][4777:4782] CHIP:DMG: status = 0x00 (SUCCESS), + [1658319969.849814][4777:4782] CHIP:DMG: }, + + Before adding the Group0x0009 execute this command + + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 9, "groupKeySetID": 1, "fabricIndex": 1}]' 1 0 + + Verify the status is success on the TH Log: + + [1658319969.849079][4777:4782] CHIP:DMG: StatusIB = + [1658319969.849119][4777:4782] CHIP:DMG: { + [1658319969.849158][4777:4782] CHIP:DMG: status = 0x00 (SUCCESS), + [1658319969.849194][4777:4782] CHIP:DMG: }, + [1658319969.849704][4777:4782] CHIP:DMG: StatusIB = + [1658319969.849739][4777:4782] CHIP:DMG: { + [1658319969.849774][4777:4782] CHIP:DMG: status = 0x00 (SUCCESS), + [1658319969.849814][4777:4782] CHIP:DMG: }, + + Before adding the Group0x0002 execute this command + + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 2, "groupKeySetID": 1, "fabricIndex": 1}]' 1 0 + + Verify the status is success on the TH Log: + + [1658323452.116449][4965:4970] CHIP:DMG: StatusIB = + [1658323452.116487][4965:4970] CHIP:DMG: { + [1658323452.116524][4965:4970] CHIP:DMG: status = 0x00 (SUCCESS), + [1658323452.116563][4965:4970] CHIP:DMG: }, + [1658323452.115827][4965:4970] CHIP:DMG: StatusIB = + [1658323452.115863][4965:4970] CHIP:DMG: { + [1658323452.115899][4965:4970] CHIP:DMG: status = 0x00 (SUCCESS), + [1658323452.115935][4965:4970] CHIP:DMG: }, + + Before adding the Group0x0003 execute this command + + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 3, "groupKeySetID": 1, "fabricIndex": 1}]' 1 0 + + Verify the status is success on the TH Log: + + [1658323495.618885][4975:4980] CHIP:DMG: StatusIB = + [1658323495.618916][4975:4980] CHIP:DMG: { + [1658323495.618949][4975:4980] CHIP:DMG: status = 0x00 (SUCCESS), + [1658323495.618979][4975:4980] CHIP:DMG: }, + [1658323495.618330][4975:4980] CHIP:DMG: StatusIB = + [1658323495.618364][4975:4980] CHIP:DMG: { + [1658323495.618397][4975:4980] CHIP:DMG: status = 0x00 (SUCCESS), + [1658323495.618430][4975:4980] CHIP:DMG: }, + disabled: true + + - label: "DUT supports Identify cluster" + verification: | + + disabled: true + - label: "TH sends AddGroup command to DUT as unicast with the following fields : GroupID as 0x0002 GroupName as Gp2" @@ -30,7 +169,7 @@ tests: verification: | ./chip-tool groups add-group 0x0002 gp2 1 1 - Verify on the TH Log: + Verify the status is success and groupid on the TH Log: [1653552285.195099][2464:2469] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 [1653552285.197783][2464:2469] CHIP:TOO: AddGroupResponse: { @@ -39,14 +178,12 @@ tests: [1653552285.197933][2464:2469] CHIP:TOO: } disabled: true - - label: - "TH reads GroupTable attribute from the GroupKeyManagement cluster - from DUT" + - label: "TH reads GroupTable attribute from the GroupKeyManagement cluster" PICS: GRPKEY.S.A0001 verification: | ./chip-tool groupkeymanagement read group-table 1 0 - Verify on the TH Log: + Verify the grouptable entries on the TH Log: [1653552351.250570][2474:2479] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 1424397362 [1653552351.253012][2474:2479] CHIP:TOO: GroupTable: 1 entries @@ -60,13 +197,13 @@ tests: disabled: true - label: - "TH sends AddGroup command to DUT as unicast with the following fields - : GroupID as 0x0003 GroupName as Gp3" + "If maxgroups > 1 TH sends AddGroup command to DUT as unicast with the + following fields : GroupID as 0x0003 GroupName as Gp3" PICS: G.S.C00.Rsp && G.S.C00.Tx verification: | ./chip-tool groups add-group 0x0003 gp3 1 1 - Verify on the TH Log: + Verify the status is success and groupid on the TH Log: [1653552417.870291][2482:2487] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 [1653552417.870407][2482:2487] CHIP:TOO: AddGroupResponse: { @@ -76,13 +213,13 @@ tests: disabled: true - label: - "TH reads GroupTable attribute from the GroupKeyManagement cluster - from DUT" - PICS: GRPKEY.S.A0001 + "If maxgroups > 1, TH reads GroupTable attribute from the + GroupKeyManagement cluster" + PICS: GRPKEY.S.A0001 && G.S.F00 verification: | ./chip-tool groupkeymanagement read group-table 1 0 - Verify on the TH Log: + Verify the grouptable entries on the TH Log: [1653552448.373558][2491:2496] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 1424397362 [1653552448.373710][2491:2496] CHIP:TOO: GroupTable: 2 entries @@ -103,13 +240,13 @@ tests: disabled: true - label: - "TH sends GetGroupMembership command to DUT with the following fields - : GroupList as NULL" + "TH sends GetGroupMembership command to DUT on PIXIT.G.ENDPOINT with + the following fields : GroupList as NULL" PICS: G.S.C02.Rsp && G.S.C02.Tx verification: | ./chip-tool groups get-group-membership [] 1 1 - Verify on the TH Log: + Verify the grouplist on the TH Log: [1653552493.052711][2501:2506] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0002 [1653552493.052792][2501:2506] CHIP:TOO: GetGroupMembershipResponse: { @@ -121,13 +258,14 @@ tests: disabled: true - label: - "TH sends GetGroupMembership command to DUT with the following fields - : GroupList as [0x0002]" + "TH sends GetGroupMembership command to DUT on PIXIT.G.ENDPOINT with + the following fields : GroupList as [0x0002]" PICS: G.S.C02.Rsp && G.S.C02.Tx verification: | ./chip-tool groups get-group-membership [0002] 1 1 - Verify on the TH Log: + Verify the grouplist on the TH Log: + [1653294426.515523][3638:3643] CHIP:TOO: GetGroupMembershipResponse: { [1653294426.515571][3638:3643] CHIP:TOO: capacity: null @@ -137,14 +275,15 @@ tests: disabled: true - label: - "TH sends GetGroupMembership command to DUT as unicast with the - following fields : GroupList as [0x0002, 0x0003]" + "if maxgroups > 1, TH sends GetGroupMembership command to DUT on + PIXIT.G.ENDPOINT as unicast with the following fields : GroupList as + [0x0002, 0x0003]" PICS: G.S.C02.Rsp && G.S.C02.Tx verification: | ./chip-tool groups get-group-membership [0002,0003] 1 1 - Verify on the TH Log: + Verify grouplist entries on the TH Log: [1653294490.030740][3646:3651] CHIP:TOO: GetGroupMembershipResponse: { [1653294490.030775][3646:3651] CHIP:TOO: capacity: null @@ -159,7 +298,7 @@ tests: verification: | ./chip-tool groups remove-all-groups 1 1 - Verify on the TH Log: + Verify the status is success on the TH Log: [1651224377.831704][2989:2994] CHIP:DMG: StatusIB = [1651224377.831757][2989:2994] CHIP:DMG: { @@ -169,13 +308,40 @@ tests: disabled: true - label: - "TH sends AddGroupIfIdentifying command to DUT as unicast method with - the following fields: GroupID as 0x0006 GroupName as Gp6" + "TH sends Identify command to DUT with the IdentifyTime as (0x0078) + 120 seconds" + PICS: I.S.C00.Rsp + verification: | + ./chip-tool identify identify 0x0078 1 1 + + Verify the status is success on the TH Log: + + [1658306666.592846][3044:3049] CHIP:DMG: StatusIB = + [1658306666.592889][3044:3049] CHIP:DMG: { + [1658306666.592962][3044:3049] CHIP:DMG: status = 0x00 (SUCCESS), + [1658306666.593007][3044:3049] CHIP:DMG: }, + disabled: true + + - label: "TH reads immediately IdentifyTime attribute from DUT" + PICS: I.S.A0000 + verification: | + ./chip-tool identify read identify-time 1 1 + + Verify the identifytime on the TH Log: + + [1658306684.629338][3050:3055] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 3871913205 + [1658306684.629394][3050:3055] CHIP:TOO: identify time: 102 + disabled: true + + - label: + "If maxgroups>0, TH sends AddGroupIfIdentifying command to DUT as + unicast method with the following fields: GroupID as 0x0006 GroupName + as Gp6" PICS: G.S.C05.Rsp verification: | ./chip-tool groups add-group-if-identifying 0x0006 gp6 1 1 - Verify on the TH Log: + Verify the status is success on the TH Log: [1653552667.307794][2571:2576] CHIP:DMG: StatusIB = [1653552667.307831][2571:2576] CHIP:DMG: { @@ -183,6 +349,95 @@ tests: [1653552667.307922][2571:2576] CHIP:DMG: }, disabled: true + - label: "TH reads GroupTable attribute from the GroupKeyManagement cluster" + PICS: GRPKEY.S.A0001 && G.S.F00 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 + + Verify grouplist entries on the TH Log: + + [1658306579.092336][3028:3033] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 656741762 + [1658306579.094919][3028:3033] CHIP:TOO: GroupTable: 1 entries + [1658306579.095045][3028:3033] CHIP:TOO: [1]: { + [1658306579.095075][3028:3033] CHIP:TOO: GroupId: 6 + [1658306579.095103][3028:3033] CHIP:TOO: Endpoints: 1 entries + [1658306579.095133][3028:3033] CHIP:TOO: [1]: 1 + [1658306579.095161][3028:3033] CHIP:TOO: GroupName: gp6 + [1658306579.095187][3028:3033] CHIP:TOO: FabricIndex: 1 + [1658306579.095210][3028:3033] CHIP:TOO: } + disabled: true + + - label: + "If maxgroups>1, TH sends AddGroupIfIdentifying command to DUT as + unicast method with the following fields: GroupID as 0x0007 GroupName + as Gp7" + PICS: G.S.C05.Rsp + verification: | + ./chip-tool groups add-group-if-identifying 0x0007 gp7 1 1 + + Verify the status is success on the TH Log: + + [1658306847.237724][3125:3130] CHIP:DMG: StatusIB = + [1658306847.237765][3125:3130] CHIP:DMG: { + [1658306847.237818][3125:3130] CHIP:DMG: status = 0x00 (SUCCESS), + [1658306847.237869][3125:3130] CHIP:DMG: }, + disabled: true + + - label: "TH reads GroupTable attribute from the GroupKeyManagement cluster" + PICS: GRPKEY.S.A0001 && G.S.F00 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 + + Verify the grouplist entries on the TH Log: + + [1658306870.013290][3132:3137] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 656741774 + [1658306870.013392][3132:3137] CHIP:TOO: GroupTable: 2 entries + [1658306870.013485][3132:3137] CHIP:TOO: [1]: { + [1658306870.013517][3132:3137] CHIP:TOO: GroupId: 6 + [1658306870.013550][3132:3137] CHIP:TOO: Endpoints: 1 entries + [1658306870.013586][3132:3137] CHIP:TOO: [1]: 1 + [1658306870.013619][3132:3137] CHIP:TOO: GroupName: gp6 + [1658306870.013650][3132:3137] CHIP:TOO: FabricIndex: 1 + [1658306870.013678][3132:3137] CHIP:TOO: } + [1658306870.013718][3132:3137] CHIP:TOO: [2]: { + [1658306870.013747][3132:3137] CHIP:TOO: GroupId: 7 + [1658306870.013777][3132:3137] CHIP:TOO: Endpoints: 1 entries + [1658306870.013810][3132:3137] CHIP:TOO: [1]: 1 + [1658306870.013841][3132:3137] CHIP:TOO: GroupName: gp7 + [1658306870.013871][3132:3137] CHIP:TOO: FabricIndex: 1 + [1658306870.013899][3132:3137] CHIP:TOO: } + disabled: true + + - label: + "If maxgroups > 2, TH sends AddGroupIfIdentifying command to DUT with + (maxgroups - 2) groups, incrementing the GroupId each time." + PICS: G.S.C05.Rsp + verification: | + ./chip-tool groups add-group-if-identifying 0x0008 gp8 1 1 + + Verify the status is success on the TH Log: + + [1653552667.307794][2571:2576] CHIP:DMG: StatusIB = + [1653552667.307831][2571:2576] CHIP:DMG: { + [1653552667.307881][2571:2576] CHIP:DMG: status = 0x00 (SUCCESS), + [1653552667.307922][2571:2576] CHIP:DMG: }, + disabled: true + + - label: + "If maxgroups>0, TH sends AddGroupIfIdentifying command to DUT + (maxgroups+2) times as unicast method with different GroupID" + PICS: G.S.C05.Rsp + verification: | + ./chip-tool groups add-group-if-identifying 0x0009 gp9 1 1 + + Verify the status is success on the TH Log: + + [1658317372.589336][4296:4301] CHIP:DMG: StatusIB = + [1658317372.589363][4296:4301] CHIP:DMG: { + [1658317372.589399][4296:4301] CHIP:DMG: status = 0x89 (RESOURCE_EXHAUSTED), + [1658317372.589432][4296:4301] CHIP:DMG: }, + disabled: true + - label: "TH reads GroupTable attribute from the GroupKeyManagement cluster from DUT" @@ -190,22 +445,45 @@ tests: verification: | ./chip-tool groupkeymanagement read group-table 1 0 - Verify on the TH Log: - - [1653560429.549196][3373:3378] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 55663962 - [1653560429.549335][3373:3378] CHIP:TOO: GroupTable: 2 entries - [1653560429.549432][3373:3378] CHIP:TOO: [1]: { - [1653560429.549484][3373:3378] CHIP:TOO: GroupId: 2 - [1653560429.549522][3373:3378] CHIP:TOO: Endpoints: 0 entries - [1653560429.549562][3373:3378] CHIP:TOO: GroupName: gp2 - [1653560429.549598][3373:3378] CHIP:TOO: FabricIndex: 1 - [1653560429.549632][3373:3378] CHIP:TOO: } - [1653560429.549678][3373:3378] CHIP:TOO: [2]: { - [1653560429.549712][3373:3378] CHIP:TOO: GroupId: 3 - [1653560429.549746][3373:3378] CHIP:TOO: Endpoints: 0 entries - [1653560429.549783][3373:3378] CHIP:TOO: GroupName: gp3 - [1653560429.549817][3373:3378] CHIP:TOO: FabricIndex: 1 - [1653560429.549849][3373:3378] CHIP:TOO: } + Verify the grouptable entries on the TH Log: + + [1658309507.902666][3452:3457] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 656741784 + [1658309507.902779][3452:3457] CHIP:TOO: GroupTable: 3 entries + [1658309507.902873][3452:3457] CHIP:TOO: [1]: { + [1658309507.902906][3452:3457] CHIP:TOO: GroupId: 6 + [1658309507.902940][3452:3457] CHIP:TOO: Endpoints: 1 entries + [1658309507.902975][3452:3457] CHIP:TOO: [1]: 1 + [1658309507.903010][3452:3457] CHIP:TOO: GroupName: gp6 + [1658309507.903040][3452:3457] CHIP:TOO: FabricIndex: 1 + [1658309507.903069][3452:3457] CHIP:TOO: } + [1658309507.903108][3452:3457] CHIP:TOO: [2]: { + [1658309507.903137][3452:3457] CHIP:TOO: GroupId: 7 + [1658309507.903168][3452:3457] CHIP:TOO: Endpoints: 1 entries + [1658309507.903201][3452:3457] CHIP:TOO: [1]: 1 + [1658309507.903231][3452:3457] CHIP:TOO: GroupName: gp7 + [1658309507.903260][3452:3457] CHIP:TOO: FabricIndex: 1 + [1658309507.903287][3452:3457] CHIP:TOO: } + [1658309507.903326][3452:3457] CHIP:TOO: [3]: { + [1658309507.903355][3452:3457] CHIP:TOO: GroupId: 8 + [1658309507.903385][3452:3457] CHIP:TOO: Endpoints: 1 entries + [1658309507.903418][3452:3457] CHIP:TOO: [1]: 1 + [1658309507.903448][3452:3457] CHIP:TOO: GroupName: gp8 + [1658309507.903477][3452:3457] CHIP:TOO: FabricIndex: 1 + [1658309507.903505][3452:3457] CHIP:TOO: } + disabled: true + + - label: "TH sends RemoveAllGroups command to DUT as unicast method" + PICS: G.S.C04.Rsp + verification: | + ./chip-tool groups remove-all-groups 1 1 + + Verify the status is success on the TH Log: + + [1651224377.831704][2989:2994] CHIP:DMG: StatusIB = + [1651224377.831757][2989:2994] CHIP:DMG: { + [1651224377.831812][2989:2994] CHIP:DMG: status = 0x00 (SUCCESS), + [1651224377.831866][2989:2994] CHIP:DMG: }, + [1651224377.832439][2989:2994] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_0004 Command=0x0000_0004 Status=0x0 disabled: true - label: @@ -216,22 +494,63 @@ tests: ./chip-tool groups add-group-if-identifying 0x0000 gp45 1 1 - Verify on the TH Log: + Verify the status is constraint error on the TH Log: + + [1658307266.719438][3251:3256] CHIP:DMG: StatusIB = + [1658307266.719482][3251:3256] CHIP:DMG: { + [1658307266.719527][3251:3256] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), + [1658307266.719573][3251:3256] CHIP:DMG: }, + disabled: true + + - label: + "TH sends AddGroupIfIdentifying command to DUT as unicast method with + the following fields: GroupId as 0x0046 GroupName as Gp46" + PICS: G.S.C05.Rsp + verification: | + ./chip-tool groups add-group-if-identifying 0x0045 gp46 1 1 + + Verify the status is unsupported access on the TH Log: + + [1658307298.568727][3257:3262] CHIP:DMG: StatusIB = + [1658307298.568761][3257:3262] CHIP:DMG: { + [1658307298.568807][3257:3262] CHIP:DMG: status = 0x7e (UNSUPPORTED_ACCESS), + [1658307298.568840][3257:3262] CHIP:DMG: }, + disabled: true + + - label: + "TH sends Identify command to DUT with the IdentifyTime as 0x0000 + (stop identifying)" + PICS: I.S.C00.Rsp + verification: | + ./chip-tool identify identify 0x0000 1 1 - [1653552769.643278][2589:2594] CHIP:DMG: StatusIB = - [1653552769.643330][2589:2594] CHIP:DMG: { - [1653552769.643400][2589:2594] CHIP:DMG: status = 0x00 (SUCCESS), - [1653552769.643459][2589:2594] CHIP:DMG: }, + Verify the status is success on the TH Log: + + [1658307387.097433][3268:3273] CHIP:DMG: StatusIB = + [1658307387.097464][3268:3273] CHIP:DMG: { + [1658307387.097502][3268:3273] CHIP:DMG: status = 0x00 (SUCCESS), + [1658307387.097533][3268:3273] CHIP:DMG: }, + disabled: true + + - label: "TH reads immediately IdentifyTime attribute from DUT" + PICS: I.S.A0000 + verification: | + ./chip-tool identify read identify-time 1 1 + + Verify the identify time on the TH Log: + + [1658307393.820520][3274:3279] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 3871913767 + [1658307393.820575][3274:3279] CHIP:TOO: identify time: 0 disabled: true - label: - "TH sends AddGroupIfIdentifying command to DUT (n+1) times as unicast - method with different GroupID each time" + "TH sends AddGroupIfIdentifying command to DUT as unicast method with + the following fields: GroupId as 0x0004 GroupName as Gp4" PICS: G.S.C05.Rsp verification: | - ./chip-tool groups add-group-if-identifying 0x0067 gp31 1 1 + ./chip-tool groups add-group-if-identifying 0x0004 gp4 1 1 - Verify on the TH Log: + Verify the status is success on the TH Log: [1651224746.146005][3038:3043] CHIP:DMG: StatusIB = [1651224746.146038][3038:3043] CHIP:DMG: { @@ -239,27 +558,13 @@ tests: [1651224746.146106][3038:3043] CHIP:DMG: }, disabled: true - - label: - "TH reads GroupTable attribute from the GroupKeyManagement cluster - from DUT" - PICS: GRPKEY.S.A0001 + - label: "TH reads GroupTable attribute from the GroupKeyManagement cluster" + PICS: GRPKEY.S.A0001 && G.S.F00 verification: | ./chip-tool groupkeymanagement read group-table 1 0 - Verify on the TH Log: - - [1653552886.221667][2625:2630] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 1424397362 - [1653552886.221787][2625:2630] CHIP:TOO: GroupTable: 2 entries - [1653552886.221925][2625:2630] CHIP:TOO: [1]: { - [1653552886.221966][2625:2630] CHIP:TOO: GroupId: 2 - [1653552886.222002][2625:2630] CHIP:TOO: Endpoints: 0 entries - [1653552886.222057][2625:2630] CHIP:TOO: GroupName: gp2 - [1653552886.222103][2625:2630] CHIP:TOO: FabricIndex: 1 - [1653552886.222135][2625:2630] CHIP:TOO: } - [1653552886.222177][2625:2630] CHIP:TOO: [2]: { - [1653552886.222222][2625:2630] CHIP:TOO: GroupId: 3 - [1653552886.222255][2625:2630] CHIP:TOO: Endpoints: 0 entries - [1653552886.222288][2625:2630] CHIP:TOO: GroupName: gp3 - [1653552886.222330][2625:2630] CHIP:TOO: FabricIndex: 1 - [1653552886.222361][2625:2630] CHIP:TOO: } + Verify the grouptable entries on the TH Log: + + [1658317914.656772][4650:4655] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 3844079664 + [1658317914.656843][4650:4655] CHIP:TOO: GroupTable: 0 entries disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_1_1.yaml index 9244fb77e99e4a..8ad6f966270767 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_1_1.yaml @@ -30,8 +30,8 @@ tests: ./chip-tool onoff on 1 1 - Verify we are getting EndpointID, CommandID, ClusterID in the response data (as below) matching with the data sent in the above command - Verify TH all-clusters-app Log + On TH all-clusters-app, Verify we are getting EndpointID, CommandID, ClusterID in the response data (as below) matching with the data sent in the above command + [1655717373.046081][10909:10909] CHIP:DMG: InvokeRequestMessage = [1655717373.046137][10909:10909] CHIP:DMG: { [1655717373.046185][10909:10909] CHIP:DMG: suppressResponse = false, @@ -58,6 +58,13 @@ tests: [1655717373.047482][10909:10909] CHIP:DMG: }, [1655717373.047599][10909:10909] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0006 e=1 p=o [1655717373.047665][10909:10909] CHIP:DMG: AccessControl: allowed + + On DUT as a client side, verify that TH all-clusters-app sent success response + + [1657867897.521090][2728:2733] CHIP:DMG: }, + [1657867897.521162][2728:2733] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x0 + [1657867897.521212][2728:2733] CHIP:DMG: ICR moving to [AwaitingDe] + [1657867897.521275][2728:2733] CHIP:EM: Sending Standalone Ack for MessageCounter:30068876 on exchange 7104i disabled: true - label: @@ -86,10 +93,7 @@ tests: In case of chip tool, here is an example command to use ./chip-tool onoff off 1 1 - Verify we are getting EndpointID, CommandID, ClusterID in the response data (as below) matching with the data sent in the above command - - Verify TH all-clusters-app Log - + On TH all-clusters-app, verify that we are getting EndpointID, CommandID, ClusterID in the response data (as below) matching with the data sent in the above command [1655717456.105815][10909:10909] CHIP:DMG: InvokeRequestMessage = [1655717456.105853][10909:10909] CHIP:DMG: { [1655717456.105887][10909:10909] CHIP:DMG: suppressResponse = false, @@ -118,6 +122,16 @@ tests: [1655717456.106954][10909:10909] CHIP:DMG: AccessControl: allowed + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657868210.442226][2746:2751] CHIP:DMG: + [1657868210.442265][2746:2751] CHIP:DMG: InteractionModelRevision = 1 + [1657868210.442306][2746:2751] CHIP:DMG: }, + [1657868210.442398][2746:2751] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0000 Status=0x0 + [1657868210.442463][2746:2751] CHIP:DMG: ICR moving to [AwaitingDe] + [1657868210.442539][2746:2751] CHIP:EM: Sending Standalone Ack for MessageCounter:19470563 on exchange 18884i + + + ./chip-tool onoff off 1 1 Verify we are getting EndpointID, CommandID, ClusterID in the response data (as below) matching with the data sent in the above command diff --git a/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml index b45d044c68a746..d5e51573696be2 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml @@ -75,17 +75,20 @@ tests: To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 ./chip-tool onoff on 1 1 On TH, verify DUT responsds as UNSUPPORTED_ACCESS for the data sent in the above command + [1657869005.834700][2816:2821] CHIP:DMG: }, + [1657869005.834790][2816:2821] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x7e + [1657869005.834841][2816:2821] CHIP:TOO: Error: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + [1657869005.834899][2816:2821] CHIP:DMG: ICR moving to [AwaitingDe] - [1654079683.774619][14540:14546] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x7e - [1654079683.774630][14540:14546] CHIP:TOO: Error: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) - [1654079683.774643][14540:14546] CHIP:DMG: ICR moving to [AwaitingDe] + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -95,7 +98,11 @@ tests: verification: | To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 + The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool generalcommissioning commissioning-complete 1 0 @@ -105,6 +112,8 @@ tests: [1654079608.667986][14525:14530] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0004 Status=0x7e [1654079608.668000][14525:14530] CHIP:TOO: Error: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) [1654079608.668011][14525:14530] CHIP:DMG: ICR moving to [AwaitingDe] + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -161,17 +170,21 @@ tests: CommandDataIB and SuppressResponse set to True" verification: | Out of Scope for V1.0 + https://github.com/project-chip/connectedhomeip/issues/8043 disabled: true - label: "TH sends a Invoke Request Message to the DUT with the TimedRequest set as TRUE.(There should be no previous Timed Invoke action.)" verification: | - To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command + The cluster used in the below command is an example, User can use any supported chip cluster. + + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 - The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool onoff on 1 1 --timedInteractionTimeoutMs 100 On TH, verify DUT responsds as UNSUPPORTED_ACCESS for the data sent in the above command @@ -180,6 +193,8 @@ tests: [1657613026.975513][10484:10489] CHIP:TOO: Error: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) [1657613026.975556][10484:10489] CHIP:DMG: ICR moving to [AwaitingDe] [1657613026.975622][10484:10489] CHIP:EM: Sending Standalone Ack for MessageCounter:99688132 on exchange 24183i + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -187,7 +202,13 @@ tests: path that requires a Timed Invoke transaction to invoke and this action is not part of a Timed Invoke transaction" verification: | + As in the previous step, we enabled accesscontrol to a specific cluster, we need to remove the accesscontrol using below command. + As the EP used here is an example, user needs to provide the endpoint id, which they use. + + + The cluster used in the below command is an example, User can use any supported chip cluster. + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 On TH, verify DUT responsds as NEEDS_TIMED_INTERACTION for the data sent in the above command diff --git a/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml index 40ef36126ba94e..2ba56f2cf32c0a 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml @@ -52,6 +52,13 @@ tests: [1655720917.721101][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655720917.721144][10909:10909] CHIP:DMG: }, [1655720917.721267][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent success response + + [1657881522.001890][2575:2580] CHIP:DMG: } + [1657881522.002053][2575:2580] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 3999381333 + [1657881522.002133][2575:2580] CHIP:TOO: identify time: 0 + [1657881522.002227][2575:2580] CHIP:EM: Sending Standalone Ack for MessageCounter:54477998 on exchange 6586i disabled: true - label: @@ -86,6 +93,35 @@ tests: [1655721163.412212][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655721163.412236][10909:10909] CHIP:DMG: }, [1655721163.412312][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657881584.166241][2584:2589] CHIP:DMG: } + [1657881584.166599][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 4079829024 + [1657881584.166672][2584:2589] CHIP:TOO: identify time: 0 + [1657881584.166734][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 4079829024 + [1657881584.166761][2584:2589] CHIP:TOO: identify type: 2 + [1657881584.166817][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 4079829024 + [1657881584.166844][2584:2589] CHIP:TOO: FeatureMap: 0 + [1657881584.166900][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 4079829024 + [1657881584.166940][2584:2589] CHIP:TOO: ClusterRevision: 4 + [1657881584.167054][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF8 DataVersion: 4079829024 + [1657881584.167101][2584:2589] CHIP:TOO: GeneratedCommandList: 0 entries + [1657881584.167276][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF9 DataVersion: 4079829024 + [1657881584.167309][2584:2589] CHIP:TOO: AcceptedCommandList: 2 entries + [1657881584.167337][2584:2589] CHIP:TOO: [1]: 0 + [1657881584.167362][2584:2589] CHIP:TOO: [2]: 64 + [1657881584.167690][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 4079829024 + [1657881584.167725][2584:2589] CHIP:TOO: AttributeList: 7 entries + [1657881584.167752][2584:2589] CHIP:TOO: [1]: 0 + [1657881584.167777][2584:2589] CHIP:TOO: [2]: 1 + [1657881584.167801][2584:2589] CHIP:TOO: [3]: 65528 + [1657881584.167825][2584:2589] CHIP:TOO: [4]: 65529 + [1657881584.167850][2584:2589] CHIP:TOO: [5]: 65531 + [1657881584.167874][2584:2589] CHIP:TOO: [6]: 65532 + [1657881584.167898][2584:2589] CHIP:TOO: [7]: 65533 + [1657881584.168029][2584:2589] CHIP:EM: Sending Standalone Ack for MessageCounter:84499870 on exchange 45190i disabled: true - label: @@ -98,7 +134,8 @@ tests: ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF - verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command and + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values disabled: true - label: @@ -127,6 +164,8 @@ tests: [1655721447.463334][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655721447.463382][10909:10909] CHIP:DMG: }, [1655721447.463503][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values disabled: true - label: @@ -158,6 +197,56 @@ tests: [1655721586.588310][10909:10909] CHIP:DMG: }, [1655721586.588403][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] [1655721586.588510][10909:10909] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657881729.900518][2608:2613] CHIP:DMG: } + [1657881729.901108][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 4079829024 + [1657881729.901182][2608:2613] CHIP:TOO: identify time: 0 + [1657881729.901245][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 4079829024 + [1657881729.901273][2608:2613] CHIP:TOO: identify type: 2 + [1657881729.901331][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 4079829024 + [1657881729.901359][2608:2613] CHIP:TOO: FeatureMap: 0 + [1657881729.901431][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 4079829024 + [1657881729.901472][2608:2613] CHIP:TOO: ClusterRevision: 4 + [1657881729.901586][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF8 DataVersion: 4079829024 + [1657881729.901632][2608:2613] CHIP:TOO: GeneratedCommandList: 0 entries + [1657881729.901806][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF9 DataVersion: 4079829024 + [1657881729.901840][2608:2613] CHIP:TOO: AcceptedCommandList: 2 entries + [1657881729.901868][2608:2613] CHIP:TOO: [1]: 0 + [1657881729.901893][2608:2613] CHIP:TOO: [2]: 64 + [1657881729.902242][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 4079829024 + [1657881729.902279][2608:2613] CHIP:TOO: AttributeList: 7 entries + [1657881729.902305][2608:2613] CHIP:TOO: [1]: 0 + [1657881729.902329][2608:2613] CHIP:TOO: [2]: 1 + [1657881729.902354][2608:2613] CHIP:TOO: [3]: 65528 + [1657881729.902378][2608:2613] CHIP:TOO: [4]: 65529 + [1657881729.902402][2608:2613] CHIP:TOO: [5]: 65531 + [1657881729.902426][2608:2613] CHIP:TOO: [6]: 65532 + [1657881729.902451][2608:2613] CHIP:TOO: [7]: 65533 + [1657881729.902474][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 3999381333 + [1657881729.902500][2608:2613] CHIP:TOO: identify time: 0 + [1657881729.902556][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 3999381333 + [1657881729.902583][2608:2613] CHIP:TOO: identify type: 2 + [1657881729.902640][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 3999381333 + [1657881729.902665][2608:2613] CHIP:TOO: FeatureMap: 0 + [1657881729.902721][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 3999381333 + [1657881729.902746][2608:2613] CHIP:TOO: ClusterRevision: 4 + [1657881729.902843][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFF8 DataVersion: 3999381333 + [1657881729.902872][2608:2613] CHIP:TOO: GeneratedCommandList: 0 entries + [1657881729.903021][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFF9 DataVersion: 3999381333 + [1657881729.903053][2608:2613] CHIP:TOO: AcceptedCommandList: 2 entries + [1657881729.903079][2608:2613] CHIP:TOO: [1]: 0 + [1657881729.903104][2608:2613] CHIP:TOO: [2]: 64 + [1657881729.903427][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 3999381333 + [1657881729.903462][2608:2613] CHIP:TOO: AttributeList: 7 entries + [1657881729.903488][2608:2613] CHIP:TOO: [1]: 0 + [1657881729.903513][2608:2613] CHIP:TOO: [2]: 1 + [1657881729.903537][2608:2613] CHIP:TOO: [3]: 65528 + [1657881729.903561][2608:2613] CHIP:TOO: [4]: 65529 + [1657881729.903586][2608:2613] CHIP:TOO: [5]: 65531 + [1657881729.903610][2608:2613] CHIP:TOO: [6]: 65532 + [1657881729.903634][2608:2613] CHIP:TOO: [7]: 65533 + [1657881729.903843][2608:2613] CHIP:EM: Sending Standalone Ack for MessageCounter:174033086 on exchange 10540i disabled: true - label: @@ -189,6 +278,15 @@ tests: [1655721699.305827][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655721699.305870][10909:10909] CHIP:DMG: }, [1655721699.305990][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657881792.350417][2616:2621] CHIP:DMG: } + [1657881792.350641][2616:2621] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 4079829024 + [1657881792.350742][2616:2621] CHIP:TOO: identify type: 2 + [1657881792.350845][2616:2621] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 3999381333 + [1657881792.350891][2616:2621] CHIP:TOO: identify type: 2 + [1657881792.351000][2616:2621] CHIP:EM: Sending Standalone Ack for MessageCounter:222990264 on exchange 23721i disabled: true - label: @@ -220,6 +318,10 @@ tests: [1655721846.894594][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655721846.894628][10909:10909] CHIP:DMG: }, [1655721846.894724][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values disabled: true - label: @@ -233,7 +335,7 @@ tests: ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFD 1 0 - verify TH receives the right Read Request Message for the data sent in the above command + verify TH(reference app) receives the right Read Request Message for the data sent in the above command [1655721935.483404][10909:10909] CHIP:EM: Handling via exchange: 59853r, Delegate: 0xaaaac37ce418 [1655721935.483474][10909:10909] CHIP:IM: Received Read request @@ -253,6 +355,63 @@ tests: [1655721935.484392][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655721935.484450][10909:10909] CHIP:DMG: }, [1655721935.484595][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657881935.225146][2631:2636] CHIP:DMG: } + [1657881935.225620][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 4079829024 + [1657881935.225700][2631:2636] CHIP:TOO: ClusterRevision: 4 + [1657881935.225763][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFD DataVersion: 130355893 + [1657881935.225790][2631:2636] CHIP:TOO: ClusterRevision: 4 + [1657881935.225846][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 2043826222 + [1657881935.225872][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.225928][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFD DataVersion: 539126375 + [1657881935.225954][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226010][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_FFFD DataVersion: 821022762 + [1657881935.226037][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226093][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFFD DataVersion: 745595402 + [1657881935.226120][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226175][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Attribute 0x0000_FFFD DataVersion: 2914015802 + [1657881935.226201][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226258][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFD DataVersion: 2733214794 + [1657881935.226284][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226340][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 3273895737 + [1657881935.226365][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226420][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFD DataVersion: 2449855749 + [1657881935.226447][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226504][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002E Attribute 0x0000_FFFD DataVersion: 2597243070 + [1657881935.226530][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226586][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_FFFD DataVersion: 714742425 + [1657881935.226611][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226667][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_FFFD DataVersion: 3643421834 + [1657881935.226693][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226747][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFD DataVersion: 3610511831 + [1657881935.226773][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226831][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFD DataVersion: 3399712075 + [1657881935.226857][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226916][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_FFFD DataVersion: 4165139953 + [1657881935.226941][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226996][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_FFFD DataVersion: 3623073226 + [1657881935.227022][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227077][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0035 Attribute 0x0000_FFFD DataVersion: 3137436487 + [1657881935.227103][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227159][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFFD DataVersion: 1172053040 + [1657881935.227185][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227241][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_FFFD DataVersion: 3832336232 + [1657881935.227267][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227325][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_FFFD DataVersion: 4072501061 + [1657881935.227350][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227407][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_FFFD DataVersion: 1112172817 + [1657881935.227433][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227488][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFFD DataVersion: 2917149142 + [1657881935.227515][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227572][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFD DataVersion: 1676181270 + [1657881935.227611][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227669][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_FFFD DataVersion: 4002139741 + [1657881935.227695][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227752][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0405 Attribute 0x0000_FFFD DataVersion: 2945088432 + [1657881935.227778][2631:2636] CHIP:TOO: ClusterRevision: 3 + [1657881935.227936][2631:2636] CHIP:EM: Sending Standalone Ack for MessageCounter:199380325 on exchange 6370i disabled: true - label: @@ -284,6 +443,13 @@ tests: [1655722298.459581][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655722298.459659][10909:10909] CHIP:DMG: }, [1655722298.459820][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657881978.415828][2640:2645] CHIP:DMG: } + [1657881978.416014][2640:2645] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 4019194565 + [1657881978.416091][2640:2645] CHIP:TOO: OnOff: FALSE + [1657881978.416245][2640:2645] CHIP:EM: Sending Standalone Ack for MessageCounter:144208215 on exchange 38107i disabled: true - label: @@ -314,6 +480,13 @@ tests: [1655722750.453268][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655722750.453316][10909:10909] CHIP:DMG: }, [1655722750.453457][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882077.867099][2655:2660] CHIP:DMG: } + [1657882077.867278][2655:2660] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000 DataVersion: 321966114 + [1657882077.867352][2655:2660] CHIP:TOO: Description: Coffee + [1657882077.867466][2655:2660] CHIP:EM: Sending Standalone Ack for MessageCounter:62608362 on exchange 57811i disabled: true - label: @@ -344,6 +517,14 @@ tests: [1655722980.957477][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655722980.957506][10909:10909] CHIP:DMG: }, [1655722980.957605][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882043.053353][2648:2653] CHIP:DMG: } + [1657882043.053561][2648:2653] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 4079829024 + [1657882043.053662][2648:2653] CHIP:TOO: identify type: 2 + [1657882043.053774][2648:2653] CHIP:EM: Sending Standalone Ack for MessageCounter:228608905 on exchange 11019i disabled: true - label: @@ -374,6 +555,14 @@ tests: [1655723021.113318][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655723021.113349][10909:10909] CHIP:DMG: }, [1655723021.113441][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882152.821695][2665:2670] CHIP:DMG: } + [1657882152.821886][2665:2670] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0403 Attribute 0x0000_0000 DataVersion: 1184750328 + [1657882152.821981][2665:2670] CHIP:TOO: MeasuredValue: 0 + [1657882152.822099][2665:2670] CHIP:EM: Sending Standalone Ack for MessageCounter:178527554 on exchange 52092i disabled: true - label: @@ -412,6 +601,14 @@ tests: [1655723062.691441][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655723062.691494][10909:10909] CHIP:DMG: }, [1655723062.691635][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882197.831561][2673:2678] CHIP:DMG: } + [1657882197.831802][2673:2678] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0004 DataVersion: 1112172817 + [1657882197.831892][2673:2678] CHIP:TOO: TrustedRootCertificates: 1 entries + [1657882197.831940][2673:2678] CHIP:TOO: [1]: 1530010100240201370324140018260480228127260580254D3A37062414001824070124080130094104EC98F1D5F8E4FF3B2B1B23B154C016A02843600C0D3073EFA38123BBFC62056CA4C90C591C80D1D66206DB31F3C0FA2E2A3B11377C28D1A2D5E3ED9C79B3DD75370A3501290118240260300414D3A7631B0D05BF3D059263A09502826A7E02768F300514D3A7631B0D05BF3D059263A09502826A7E02768F18300B401A2FD4DAE286A0C0E7F2A54014D19C3AA7F8A814664B14D4EDFE6D6366746B5EF86A677807BCCE30A71A1C112FF843B88044D4212197281859CED7D21D39A42418 + [1657882197.832044][2673:2678] CHIP:EM: Sending Standalone Ack for MessageCounter:182457329 on exchange 8706i disabled: true - label: @@ -443,6 +640,17 @@ tests: [1655723112.902618][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655723112.902664][10909:10909] CHIP:DMG: }, [1655723112.902782][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882247.469521][2681:2686] CHIP:DMG: InteractionModelRevision = 1 + [1657882247.469553][2681:2686] CHIP:DMG: } + [1657882247.469732][2681:2686] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0001 DataVersion: 3643421834 + [1657882247.469825][2681:2686] CHIP:TOO: BasicCommissioningInfo: { + [1657882247.469886][2681:2686] CHIP:TOO: FailSafeExpiryLengthSeconds: 60 + [1657882247.469921][2681:2686] CHIP:TOO: MaxCumulativeFailsafeSeconds: 900 + [1657882247.469952][2681:2686] CHIP:TOO: } + [1657882247.470043][2681:2686] CHIP:EM: Sending Standalone Ack for MessageCounter:52322886 on exchange 1487i disabled: true - label: @@ -474,6 +682,41 @@ tests: [1655723151.160110][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655723151.160147][10909:10909] CHIP:DMG: }, [1655723151.160243][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + + [1657882339.679133][2701:2706] CHIP:DMG: } + [1657882339.679605][2701:2706] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 321966114 + [1657882339.679722][2701:2706] CHIP:TOO: SupportedModes: 3 entries + [1657882339.679786][2701:2706] CHIP:TOO: [1]: { + [1657882339.679813][2701:2706] CHIP:TOO: Label: Black + [1657882339.679852][2701:2706] CHIP:TOO: Mode: 0 + [1657882339.679883][2701:2706] CHIP:TOO: SemanticTags: 1 entries + [1657882339.679918][2701:2706] CHIP:TOO: [1]: { + [1657882339.679943][2701:2706] CHIP:TOO: MfgCode: 0 + [1657882339.679966][2701:2706] CHIP:TOO: Value: 0 + [1657882339.679986][2701:2706] CHIP:TOO: } + [1657882339.680006][2701:2706] CHIP:TOO: } + [1657882339.680040][2701:2706] CHIP:TOO: [2]: { + [1657882339.680065][2701:2706] CHIP:TOO: Label: Cappuccino + [1657882339.680088][2701:2706] CHIP:TOO: Mode: 4 + [1657882339.680131][2701:2706] CHIP:TOO: SemanticTags: 1 entries + [1657882339.680163][2701:2706] CHIP:TOO: [1]: { + [1657882339.680188][2701:2706] CHIP:TOO: MfgCode: 0 + [1657882339.680212][2701:2706] CHIP:TOO: Value: 0 + [1657882339.680236][2701:2706] CHIP:TOO: } + [1657882339.680261][2701:2706] CHIP:TOO: } + [1657882339.680296][2701:2706] CHIP:TOO: [3]: { + [1657882339.680320][2701:2706] CHIP:TOO: Label: Espresso + [1657882339.680344][2701:2706] CHIP:TOO: Mode: 7 + [1657882339.680371][2701:2706] CHIP:TOO: SemanticTags: 1 entries + [1657882339.680402][2701:2706] CHIP:TOO: [1]: { + [1657882339.680427][2701:2706] CHIP:TOO: MfgCode: 0 + [1657882339.680451][2701:2706] CHIP:TOO: Value: 0 + [1657882339.680474][2701:2706] CHIP:TOO: } + [1657882339.680499][2701:2706] CHIP:TOO: } + [1657882339.680600][2701:2706] CHIP:EM: Sending Standalone Ack for MessageCounter:207994304 on exchange 48282i disabled: true - label: @@ -504,6 +747,12 @@ tests: [1655723234.549038][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655723234.549097][10909:10909] CHIP:DMG: }, [1655723234.549241][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882403.876372][2715:2720] CHIP:DMG: } + [1657882403.876514][2715:2720] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0001 DataVersion: 737072536 + [1657882403.876595][2715:2720] CHIP:TOO: occupancy sensor type: 0 + [1657882403.876679][2715:2720] CHIP:EM: Sending Standalone Ack for MessageCounter:153370776 on exchange 37640i disabled: true - label: @@ -534,6 +783,14 @@ tests: [1655723282.098112][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655723282.098134][10909:10909] CHIP:DMG: }, [1655723282.098206][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882440.996840][2725:2730] CHIP:DMG: InteractionModelRevision = 1 + [1657882440.996862][2725:2730] CHIP:DMG: } + [1657882440.997003][2725:2730] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_000F DataVersion: 3900213102 + [1657882440.997084][2725:2730] CHIP:TOO: options: 0 + [1657882440.997170][2725:2730] CHIP:EM: Sending Standalone Ack for MessageCounter:250919190 on exchange 53994i disabled: true - label: @@ -565,6 +822,14 @@ tests: [1655723372.329162][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657883628.582877][2780:2785] CHIP:DMG: InteractionModelRevision = 1 + [1657883628.582909][2780:2785] CHIP:DMG: } + [1657883628.583066][2780:2785] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0000 DataVersion: 737072536 + [1657883628.583146][2780:2785] CHIP:TOO: occupancy: 0 + [1657883628.583225][2780:2785] CHIP:EM: Sending Standalone Ack for MessageCounter:68376422 on exchange 7437i + + ./chip-tool occupancysensing read occupancy 1 1 verify TH receives the right Read Request Message for the data sent in the above command @@ -579,4 +844,29 @@ tests: the last one, DUT sends a status response." verification: | DUT implementation required to verify read an attribute which is is larger than 1 MTU(1280 bytes) + Below sample wildcard read command will read all the attributes from the all-clusters-app and generates 1 MTU size of data. + If the dut doesn't support generating the large chunk data, then this test step can be skipped. + Verify the last chunked data is having Suppress response True & TH will not send the Ack message. + + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF + + The message flow can expect as mentioned below + TH -> DUT ReadRequest + DUT -> TH ReportData, not last chunk + TH -> DUT StatusResponse + Possibly repeat steps 2 & 3 a few times + DUT -> TH ReportData, last chunk, SuppressResponse set to true + TH -> DUT standalone ack + + On TH verify that The last chunked message should not receive any status response from the DUT + + [1658396687.401934][3726:3731] CHIP:DMG: + [1658396687.401958][3726:3731] CHIP:DMG: }, + [1658396687.401987][3726:3731] CHIP:DMG: + [1658396687.402010][3726:3731] CHIP:DMG: ], + [1658396687.402048][3726:3731] CHIP:DMG: + [1658396687.402072][3726:3731] CHIP:DMG: SuppressResponse = true, + [1658396687.402097][3726:3731] CHIP:DMG: InteractionModelRevision = 1 + [1658396687.402119][3726:3731] CHIP:DMG: } + [1658396687.402400][3726:3731] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_FFFB DataVersion: 3456275847 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml index 0aec602e9d8e06..6036888ff00dd5 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml @@ -73,9 +73,9 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. - sudo ./chip-tool any read-by-id 0x03 0xFFFFFFFF 1 0xFFFF + sudo ./chip-tool any read-by-id 0x03 0xFFFFFFFF 1 0 - Verify on TH , DUT responds the right attribute value for above command + on TH , Verify that DUT responds the right attribute value for above command [1655727546.354466][5286:5291] CHIP:DMG: [1655727546.354512][5286:5291] CHIP:DMG: SuppressResponse = true, @@ -104,30 +104,6 @@ tests: [1655727546.356716][5286:5291] CHIP:TOO: [5]: 65531 [1655727546.356741][5286:5291] CHIP:TOO: [6]: 65532 [1655727546.356766][5286:5291] CHIP:TOO: [7]: 65533 - [1655727546.356790][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 236949823 - [1655727546.356815][5286:5291] CHIP:TOO: identify time: 0 - [1655727546.356895][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 236949823 - [1655727546.356946][5286:5291] CHIP:TOO: identify type: 2 - [1655727546.357022][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 236949823 - [1655727546.357065][5286:5291] CHIP:TOO: FeatureMap: 0 - [1655727546.357143][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 236949823 - [1655727546.357171][5286:5291] CHIP:TOO: ClusterRevision: 4 - [1655727546.357312][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFF8 DataVersion: 236949823 - [1655727546.357362][5286:5291] CHIP:TOO: GeneratedCommandList: 0 entries - [1655727546.357555][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFF9 DataVersion: 236949823 - [1655727546.357610][5286:5291] CHIP:TOO: AcceptedCommandList: 2 entries - [1655727546.357638][5286:5291] CHIP:TOO: [1]: 0 - [1655727546.357662][5286:5291] CHIP:TOO: [2]: 64 - [1655727546.358014][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 236949823 - [1655727546.358052][5286:5291] CHIP:TOO: AttributeList: 7 entries - [1655727546.358078][5286:5291] CHIP:TOO: [1]: 0 - [1655727546.358103][5286:5291] CHIP:TOO: [2]: 1 - [1655727546.358127][5286:5291] CHIP:TOO: [3]: 65528 - [1655727546.358152][5286:5291] CHIP:TOO: [4]: 65529 - [1655727546.358176][5286:5291] CHIP:TOO: [5]: 65531 - [1655727546.358200][5286:5291] CHIP:TOO: [6]: 65532 - [1655727546.358225][5286:5291] CHIP:TOO: [7]: 65533 - [1655727546.358492][5286:5291] CHIP:EM: Sending Standalone Ack for MessageCounter:220291395 on exchange 53799i disabled: true - label: @@ -597,7 +573,11 @@ tests: the path that requires a privilege that is not granted for the cluster in the path. DUT responds with the report data action." verification: | - To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 @@ -612,6 +592,9 @@ tests: [1652964769.384668][39268:39273] CHIP:DMG: InteractionModelRevision = 1 [1652964769.384682][39268:39273] CHIP:DMG: } [1652964769.384788][39268:39273] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -1046,7 +1029,10 @@ tests: The cluster used in the below command is an example, User can use any supported chip cluster. - To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command + + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 @@ -1081,6 +1067,9 @@ tests: [1657537120.035342][9438:9443] CHIP:TOO: [6]: 65532 [1657537120.035405][9438:9443] CHIP:TOO: [7]: 65533 [1657537120.035801][9438:9443] CHIP:EM: Sending Standalone Ack for MessageCounter:64174919 on exchange 48017i + + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml index 533e21320f81e3..ff0f7947a2e31a 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml @@ -30,7 +30,7 @@ tests: sudo ./chip-tool levelcontrol write on-level 2 1 1 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655795552.551487][7331:7331] CHIP:EM: Handling via exchange: 41640r, Delegate: 0xaaaad9aed418 [1655795552.551552][7331:7331] CHIP:IM: Received Write request @@ -59,7 +59,57 @@ tests: [1655795552.552647][7331:7331] CHIP:DMG: InteractionModelRevision = 1 [1655795552.552686][7331:7331] CHIP:DMG: }, + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657883782.721742][2796:2801] CHIP:DMG: WriteResponseMessage = + [1657883782.721783][2796:2801] CHIP:DMG: { + [1657883782.721819][2796:2801] CHIP:DMG: AttributeStatusIBs = + [1657883782.721874][2796:2801] CHIP:DMG: [ + [1657883782.721914][2796:2801] CHIP:DMG: AttributeStatusIB = + [1657883782.721959][2796:2801] CHIP:DMG: { + [1657883782.722002][2796:2801] CHIP:DMG: AttributePathIB = + [1657883782.722054][2796:2801] CHIP:DMG: { + [1657883782.722112][2796:2801] CHIP:DMG: Endpoint = 0x1, + [1657883782.722172][2796:2801] CHIP:DMG: Cluster = 0x8, + [1657883782.722227][2796:2801] CHIP:DMG: Attribute = 0x0000_0011, + [1657883782.722278][2796:2801] CHIP:DMG: } + [1657883782.722335][2796:2801] CHIP:DMG: + [1657883782.722384][2796:2801] CHIP:DMG: StatusIB = + [1657883782.722435][2796:2801] CHIP:DMG: { + [1657883782.722493][2796:2801] CHIP:DMG: status = 0x00 (SUCCESS), + [1657883782.722547][2796:2801] CHIP:DMG: }, + [1657883782.722605][2796:2801] CHIP:DMG: + [1657883782.722648][2796:2801] CHIP:DMG: }, + [1657883782.722697][2796:2801] CHIP:DMG: + [1657883782.722736][2796:2801] CHIP:DMG: ], + [1657883782.722783][2796:2801] CHIP:DMG: + [1657883782.722823][2796:2801] CHIP:DMG: InteractionModelRevision = 1 + [1657883782.722860][2796:2801] CHIP:DMG: } + [1657883782.722967][2796:2801] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657883782.723047][2796:2801] CHIP:EM: Sending Standalone Ack for MessageCounter:76592104 on exchange 56753i + + sudo ./chip-tool levelcontrol read on-level 1 1 + verify on TH(reference app) receives the right write Request Message for the data sent in the above command + [1657883808.062792][2457:2457] CHIP:IM: Received Read request + [1657883808.062871][2457:2457] CHIP:DMG: ReadRequestMessage = + [1657883808.062900][2457:2457] CHIP:DMG: { + [1657883808.062922][2457:2457] CHIP:DMG: AttributePathIBs = + [1657883808.062949][2457:2457] CHIP:DMG: [ + [1657883808.062972][2457:2457] CHIP:DMG: AttributePathIB = + [1657883808.063000][2457:2457] CHIP:DMG: { + [1657883808.063028][2457:2457] CHIP:DMG: Endpoint = 0x1, + [1657883808.063068][2457:2457] CHIP:DMG: Cluster = 0x8, + [1657883808.063105][2457:2457] CHIP:DMG: Attribute = 0x0000_0011, + [1657883808.063138][2457:2457] CHIP:DMG: } + [1657883808.063167][2457:2457] CHIP:DMG: + [1657883808.063192][2457:2457] CHIP:DMG: ], + [1657883808.063221][2457:2457] CHIP:DMG: + [1657883808.063247][2457:2457] CHIP:DMG: isFabricFiltered = true, + [1657883808.063272][2457:2457] CHIP:DMG: InteractionModelRevision = 1 + [1657883808.063295][2457:2457] CHIP:DMG: }, + [1657883808.063369][2457:2457] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent success response [1655795604.755214][6880:6885] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 737039636 [1655795604.755363][6880:6885] CHIP:TOO: on level: 2 [1655795604.755460][6880:6885] CHIP:EM: Sending Standalone Ack for MessageCounter:83198098 on exchange 53763i @@ -81,7 +131,7 @@ tests: ./chip-tool basic write local-config-disabled 1 1 0 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655795795.033946][7331:7331] CHIP:EM: Handling via exchange: 11668r, Delegate: 0xaaaad9aed418 [1655795795.034011][7331:7331] CHIP:IM: Received Write request @@ -111,7 +161,62 @@ tests: [1655795795.035138][7331:7331] CHIP:DMG: }, [1655795795.035259][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=m + + + On DUT as a client side, verify that TH all-clusters-app sent success response + + [1657883938.394965][2822:2827] CHIP:DMG: WriteResponseMessage = + [1657883938.394995][2822:2827] CHIP:DMG: { + [1657883938.395022][2822:2827] CHIP:DMG: AttributeStatusIBs = + [1657883938.395060][2822:2827] CHIP:DMG: [ + [1657883938.395090][2822:2827] CHIP:DMG: AttributeStatusIB = + [1657883938.395127][2822:2827] CHIP:DMG: { + [1657883938.395158][2822:2827] CHIP:DMG: AttributePathIB = + [1657883938.395196][2822:2827] CHIP:DMG: { + [1657883938.395241][2822:2827] CHIP:DMG: Endpoint = 0x0, + [1657883938.395283][2822:2827] CHIP:DMG: Cluster = 0x28, + [1657883938.395324][2822:2827] CHIP:DMG: Attribute = 0x0000_0010, + [1657883938.395363][2822:2827] CHIP:DMG: } + [1657883938.395406][2822:2827] CHIP:DMG: + [1657883938.395446][2822:2827] CHIP:DMG: StatusIB = + [1657883938.395485][2822:2827] CHIP:DMG: { + [1657883938.395522][2822:2827] CHIP:DMG: status = 0x00 (SUCCESS), + [1657883938.395561][2822:2827] CHIP:DMG: }, + [1657883938.395603][2822:2827] CHIP:DMG: + [1657883938.395636][2822:2827] CHIP:DMG: }, + [1657883938.395672][2822:2827] CHIP:DMG: + [1657883938.395700][2822:2827] CHIP:DMG: ], + [1657883938.395735][2822:2827] CHIP:DMG: + [1657883938.395765][2822:2827] CHIP:DMG: InteractionModelRevision = 1 + [1657883938.395794][2822:2827] CHIP:DMG: } + [1657883938.395875][2822:2827] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657883938.395940][2822:2827] CHIP:EM: Sending Standalone Ack for MessageCounter:157043526 on exchange 18989i + + ./chip-tool basic read local-config-disabled 1 0 + + verify on TH(reference app) receives the right write Request Message for the data sent in the above command + [1657884119.522809][2748:2748] CHIP:IM: Received Read request + [1657884119.522885][2748:2748] CHIP:DMG: ReadRequestMessage = + [1657884119.522911][2748:2748] CHIP:DMG: { + [1657884119.522933][2748:2748] CHIP:DMG: AttributePathIBs = + [1657884119.522959][2748:2748] CHIP:DMG: [ + [1657884119.522982][2748:2748] CHIP:DMG: AttributePathIB = + [1657884119.523009][2748:2748] CHIP:DMG: { + [1657884119.523037][2748:2748] CHIP:DMG: Endpoint = 0x0, + [1657884119.523067][2748:2748] CHIP:DMG: Cluster = 0x28, + [1657884119.523097][2748:2748] CHIP:DMG: Attribute = 0x0000_0010, + [1657884119.523126][2748:2748] CHIP:DMG: } + [1657884119.523153][2748:2748] CHIP:DMG: + [1657884119.523179][2748:2748] CHIP:DMG: ], + [1657884119.523207][2748:2748] CHIP:DMG: + [1657884119.523233][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657884119.523257][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657884119.523280][2748:2748] CHIP:DMG: }, + + + + On DUT as a client side, verify that TH all-clusters-app sent success response [1655795843.336042][6902:6907] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 1263909562 [1655795843.336093][6902:6907] CHIP:TOO: LocalConfigDisabled: TRUE [1655795843.336251][6902:6907] CHIP:EM: Sending Standalone Ack for MessageCounter:108030495 on exchange 43207i @@ -127,7 +232,7 @@ tests: ./chip-tool basic write node-label node 1 0 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655796035.022296][7331:7331] CHIP:EM: Handling via exchange: 64908r, Delegate: 0xaaaad9aed418 [1655796035.022365][7331:7331] CHIP:IM: Received Write request @@ -158,7 +263,58 @@ tests: [1655796035.023791][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=m [1655796035.023851][7331:7331] CHIP:DMG: AccessControl: allowed + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657884155.221193][2865:2870] CHIP:DMG: WriteResponseMessage = + [1657884155.221246][2865:2870] CHIP:DMG: { + [1657884155.221292][2865:2870] CHIP:DMG: AttributeStatusIBs = + [1657884155.221356][2865:2870] CHIP:DMG: [ + [1657884155.221406][2865:2870] CHIP:DMG: AttributeStatusIB = + [1657884155.221464][2865:2870] CHIP:DMG: { + [1657884155.221518][2865:2870] CHIP:DMG: AttributePathIB = + [1657884155.221588][2865:2870] CHIP:DMG: { + [1657884155.221635][2865:2870] CHIP:DMG: Endpoint = 0x0, + [1657884155.221673][2865:2870] CHIP:DMG: Cluster = 0x28, + [1657884155.221710][2865:2870] CHIP:DMG: Attribute = 0x0000_0005, + [1657884155.221798][2865:2870] CHIP:DMG: } + [1657884155.221837][2865:2870] CHIP:DMG: + [1657884155.221868][2865:2870] CHIP:DMG: StatusIB = + [1657884155.221900][2865:2870] CHIP:DMG: { + [1657884155.221932][2865:2870] CHIP:DMG: status = 0x00 (SUCCESS), + [1657884155.221965][2865:2870] CHIP:DMG: }, + [1657884155.221996][2865:2870] CHIP:DMG: + [1657884155.222022][2865:2870] CHIP:DMG: }, + [1657884155.222052][2865:2870] CHIP:DMG: + [1657884155.222077][2865:2870] CHIP:DMG: ], + [1657884155.222108][2865:2870] CHIP:DMG: + [1657884155.222132][2865:2870] CHIP:DMG: InteractionModelRevision = 1 + [1657884155.222157][2865:2870] CHIP:DMG: } + [1657884155.222229][2865:2870] CHIP:DMG: WriteClient moving to [AwaitingDe] + + ./chip-tool basic read node-label 1 0 + verify on TH(reference app) receives the right write Request Message for the data sent in the above command + [1657884173.738798][2748:2748] CHIP:IM: Received Read request + [1657884173.738877][2748:2748] CHIP:DMG: ReadRequestMessage = + [1657884173.738904][2748:2748] CHIP:DMG: { + [1657884173.738926][2748:2748] CHIP:DMG: AttributePathIBs = + [1657884173.738952][2748:2748] CHIP:DMG: [ + [1657884173.738975][2748:2748] CHIP:DMG: AttributePathIB = + [1657884173.739009][2748:2748] CHIP:DMG: { + [1657884173.739041][2748:2748] CHIP:DMG: Endpoint = 0x0, + [1657884173.739073][2748:2748] CHIP:DMG: Cluster = 0x28, + [1657884173.739105][2748:2748] CHIP:DMG: Attribute = 0x0000_0005, + [1657884173.739134][2748:2748] CHIP:DMG: } + [1657884173.739162][2748:2748] CHIP:DMG: + [1657884173.739188][2748:2748] CHIP:DMG: ], + [1657884173.739215][2748:2748] CHIP:DMG: + [1657884173.739241][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657884173.739266][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657884173.739288][2748:2748] CHIP:DMG: }, + + + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1655796082.079468][6918:6923] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 1263909563 [1655796082.079509][6918:6923] CHIP:TOO: NodeLabel: node [1655796082.079608][6918:6923] CHIP:EM: Sending Standalone Ack for MessageCounter:256008218 on exchange 23185i @@ -173,7 +329,7 @@ tests: ./chip-tool any write-by-id 0x0008 0x0010 1 1 1 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655796141.166846][7331:7331] CHIP:IM: Received Write request [1655796141.166889][7331:7331] CHIP:DMG: IM WH moving to [Initialized] @@ -203,8 +359,59 @@ tests: [1655796141.168253][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o [1655796141.168313][7331:7331] CHIP:DMG: AccessControl: allowed + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657884204.951658][2878:2883] CHIP:DMG: WriteResponseMessage = + [1657884204.951700][2878:2883] CHIP:DMG: { + [1657884204.951736][2878:2883] CHIP:DMG: AttributeStatusIBs = + [1657884204.951786][2878:2883] CHIP:DMG: [ + [1657884204.951826][2878:2883] CHIP:DMG: AttributeStatusIB = + [1657884204.951871][2878:2883] CHIP:DMG: { + [1657884204.951913][2878:2883] CHIP:DMG: AttributePathIB = + [1657884204.951965][2878:2883] CHIP:DMG: { + [1657884204.952018][2878:2883] CHIP:DMG: Endpoint = 0x1, + [1657884204.952075][2878:2883] CHIP:DMG: Cluster = 0x8, + [1657884204.952173][2878:2883] CHIP:DMG: Attribute = 0x0000_0010, + [1657884204.952226][2878:2883] CHIP:DMG: } + [1657884204.952286][2878:2883] CHIP:DMG: + [1657884204.952340][2878:2883] CHIP:DMG: StatusIB = + [1657884204.952396][2878:2883] CHIP:DMG: { + [1657884204.952449][2878:2883] CHIP:DMG: status = 0x00 (SUCCESS), + [1657884204.952500][2878:2883] CHIP:DMG: }, + [1657884204.952552][2878:2883] CHIP:DMG: + [1657884204.952597][2878:2883] CHIP:DMG: }, + [1657884204.952645][2878:2883] CHIP:DMG: + [1657884204.952684][2878:2883] CHIP:DMG: ], + [1657884204.952731][2878:2883] CHIP:DMG: + [1657884204.952770][2878:2883] CHIP:DMG: InteractionModelRevision = 1 + [1657884204.952808][2878:2883] CHIP:DMG: } + [1657884204.952914][2878:2883] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657884204.952998][2878:2883] CHIP:EM: Sending Standalone Ack for MessageCounter:264044678 + ./chip-tool any read-by-id 0x0008 0x0010 1 1 + + verify on TH(reference app) receives the read Request Message for the data sent in the above command + [1657884227.859836][2748:2748] CHIP:IM: Received Read request + [1657884227.859916][2748:2748] CHIP:DMG: ReadRequestMessage = + [1657884227.859942][2748:2748] CHIP:DMG: { + [1657884227.859964][2748:2748] CHIP:DMG: AttributePathIBs = + [1657884227.859989][2748:2748] CHIP:DMG: [ + [1657884227.860012][2748:2748] CHIP:DMG: AttributePathIB = + [1657884227.860045][2748:2748] CHIP:DMG: { + [1657884227.860076][2748:2748] CHIP:DMG: Endpoint = 0x1, + [1657884227.860112][2748:2748] CHIP:DMG: Cluster = 0x8, + [1657884227.860147][2748:2748] CHIP:DMG: Attribute = 0x0000_0010, + [1657884227.860181][2748:2748] CHIP:DMG: } + [1657884227.860211][2748:2748] CHIP:DMG: + [1657884227.860239][2748:2748] CHIP:DMG: ], + [1657884227.860266][2748:2748] CHIP:DMG: + [1657884227.860292][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657884227.860316][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657884227.860339][2748:2748] CHIP:DMG: }, + [1657884227.860413][2748:2748] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response [1655796192.032715][6931:6936] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 737039637 [1655796192.032807][6931:6936] CHIP:TOO: on off transition time: 1 [1655796192.032908][6931:6936] CHIP:EM: Sending Standalone Ack for MessageCounter:249349258 on exchange 7433i @@ -253,7 +460,7 @@ tests: ./chip-tool any write-by-id 0x0204 0 1 1 1 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH (reference app) receives the right write Request Message for the data sent in the above command [1655796297.607841][7331:7331] CHIP:EM: Handling via exchange: 37495r, Delegate: 0xaaaad9aed418 [1655796297.607911][7331:7331] CHIP:IM: Received Write request @@ -284,7 +491,43 @@ tests: [1655796297.609342][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=o [1655796297.609403][7331:7331] CHIP:DMG: AccessControl: allowed + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657884258.383116][2892:2897] CHIP:DMG: WriteResponseMessage = + [1657884258.383157][2892:2897] CHIP:DMG: { + [1657884258.383192][2892:2897] CHIP:DMG: AttributeStatusIBs = + [1657884258.383255][2892:2897] CHIP:DMG: [ + [1657884258.383295][2892:2897] CHIP:DMG: AttributeStatusIB = + [1657884258.383339][2892:2897] CHIP:DMG: { + [1657884258.383381][2892:2897] CHIP:DMG: AttributePathIB = + [1657884258.383431][2892:2897] CHIP:DMG: { + [1657884258.383482][2892:2897] CHIP:DMG: Endpoint = 0x1, + [1657884258.383538][2892:2897] CHIP:DMG: Cluster = 0x204, + [1657884258.383592][2892:2897] CHIP:DMG: Attribute = 0x0000_0000, + [1657884258.383647][2892:2897] CHIP:DMG: } + [1657884258.383703][2892:2897] CHIP:DMG: + [1657884258.383750][2892:2897] CHIP:DMG: StatusIB = + [1657884258.383800][2892:2897] CHIP:DMG: { + [1657884258.383851][2892:2897] CHIP:DMG: status = 0x00 (SUCCESS), + [1657884258.383905][2892:2897] CHIP:DMG: }, + [1657884258.383955][2892:2897] CHIP:DMG: + [1657884258.383996][2892:2897] CHIP:DMG: }, + [1657884258.384043][2892:2897] CHIP:DMG: + [1657884258.384081][2892:2897] CHIP:DMG: ], + [1657884258.384170][2892:2897] CHIP:DMG: + [1657884258.384212][2892:2897] CHIP:DMG: InteractionModelRevision = 1 + [1657884258.384249][2892:2897] CHIP:DMG: } + [1657884258.384358][2892:2897] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657884258.384441][2892:2897] CHIP:EM: Sending Standalone Ack for MessageCounter:255796912 on exchange 26584i + + ./chip-tool any read-by-id 0x0204 0 1 1 + verify on TH (reference app) receives the right write Request Message for the data sent in the above command + [1657884282.303557][2898:2903] CHIP:DMG: } + [1657884282.303695][2898:2903] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 2387607084 + [1657884282.303778][2898:2903] CHIP:TOO: temperature display mode: 1 + [1657884282.303862][2898:2903] CHIP:EM: Sending Standalone Ack for MessageCounter:147756485 on exchange 42871i + + On DUT as a client side, verify that TH all-clusters-app sent success response [1655796341.132655][6946:6951] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 3165945391 [1655796341.132864][6946:6951] CHIP:TOO: temperature display mode: 1 [1655796341.132973][6946:6951] CHIP:EM: Sending Standalone Ack for MessageCounter:245498041 on exchange 51992i @@ -300,7 +543,7 @@ tests: ./chip-tool colorcontrol write-by-id 0x000f 1 1 1 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655796429.696904][7331:7331] CHIP:IM: Received Write request [1655796429.696947][7331:7331] CHIP:DMG: IM WH moving to [Initialized] @@ -331,7 +574,61 @@ tests: [1655796429.698446][7331:7331] CHIP:DMG: AccessControl: allowed - sudo ./chip-tool colorcontrol read-by-id 0x000f 1 1 + On DUT as a client side, verify that TH all-clusters-app sent success response + + [1657884309.994598][2907:2912] CHIP:DMG: WriteResponseMessage = + [1657884309.994627][2907:2912] CHIP:DMG: { + [1657884309.994652][2907:2912] CHIP:DMG: AttributeStatusIBs = + [1657884309.994688][2907:2912] CHIP:DMG: [ + [1657884309.994715][2907:2912] CHIP:DMG: AttributeStatusIB = + [1657884309.994754][2907:2912] CHIP:DMG: { + [1657884309.994787][2907:2912] CHIP:DMG: AttributePathIB = + [1657884309.994823][2907:2912] CHIP:DMG: { + [1657884309.994861][2907:2912] CHIP:DMG: Endpoint = 0x1, + [1657884309.994902][2907:2912] CHIP:DMG: Cluster = 0x300, + [1657884309.994941][2907:2912] CHIP:DMG: Attribute = 0x0000_000F, + [1657884309.994977][2907:2912] CHIP:DMG: } + [1657884309.995021][2907:2912] CHIP:DMG: + [1657884309.995057][2907:2912] CHIP:DMG: StatusIB = + [1657884309.995096][2907:2912] CHIP:DMG: { + [1657884309.995132][2907:2912] CHIP:DMG: status = 0x00 (SUCCESS), + [1657884309.995168][2907:2912] CHIP:DMG: }, + [1657884309.995203][2907:2912] CHIP:DMG: + [1657884309.995234][2907:2912] CHIP:DMG: }, + [1657884309.995268][2907:2912] CHIP:DMG: + [1657884309.995295][2907:2912] CHIP:DMG: ], + [1657884309.995329][2907:2912] CHIP:DMG: + [1657884309.995356][2907:2912] CHIP:DMG: InteractionModelRevision = 1 + [1657884309.995383][2907:2912] CHIP:DMG: } + [1657884309.995461][2907:2912] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657884309.995524][2907:2912] CHIP:EM: Sending Standalone Ack for MessageCounter:243574725 on exchange 27981i + + + + ./chip-tool colorcontrol read-by-id 0x000f 1 1 + + verify on TH (reference app) receives the right write Request Message for the data sent in the above command + [1657884334.613535][2748:2748] CHIP:IM: Received Read request + [1657884334.613615][2748:2748] CHIP:DMG: ReadRequestMessage = + [1657884334.613641][2748:2748] CHIP:DMG: { + [1657884334.613663][2748:2748] CHIP:DMG: AttributePathIBs = + [1657884334.613685][2748:2748] CHIP:DMG: [ + [1657884334.613746][2748:2748] CHIP:DMG: AttributePathIB = + [1657884334.613775][2748:2748] CHIP:DMG: { + [1657884334.613803][2748:2748] CHIP:DMG: Endpoint = 0x1, + [1657884334.613834][2748:2748] CHIP:DMG: Cluster = 0x300, + [1657884334.613869][2748:2748] CHIP:DMG: Attribute = 0x0000_000F, + [1657884334.613898][2748:2748] CHIP:DMG: } + [1657884334.613926][2748:2748] CHIP:DMG: + [1657884334.613952][2748:2748] CHIP:DMG: ], + [1657884334.613980][2748:2748] CHIP:DMG: + [1657884334.614005][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657884334.614030][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657884334.614053][2748:2748] CHIP:DMG: }, + [1657884334.614128][2748:2748] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response [1655796493.233673][6961:6966] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_000F DataVersion: 2788050502 [1655796493.233761][6961:6966] CHIP:TOO: Options: 1 [1655796493.233865][6961:6966] CHIP:EM: Sending Standalone Ack for MessageCounter:185730221 on exchange 37136i @@ -342,6 +639,8 @@ tests: attribute data which has to be sent in multiple messages." verification: | DUT implementation required to verify write an attribute which is is larger than 1 MTU(1280 bytes) + Here is an example command to verify the write functionality. User must choose an attribute which has large list of attribute data. + ./chip-tool basic write node-label node 1 0 disabled: true - label: @@ -353,7 +652,7 @@ tests: ./chip-tool any write-by-id 0x0204 0 1 1 1 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655796724.510633][7331:7331] CHIP:EM: Handling via exchange: 51058r, Delegate: 0xaaaad9aed418 [1655796724.510711][7331:7331] CHIP:IM: Received Write request @@ -383,7 +682,60 @@ tests: [1655796724.512195][7331:7331] CHIP:DMG: }, [1655796724.512344][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=o - ./chip-tool any read-by-id 0x0204 0 1 1 + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657884369.932192][2923:2928] CHIP:DMG: WriteResponseMessage = + [1657884369.932226][2923:2928] CHIP:DMG: { + [1657884369.932255][2923:2928] CHIP:DMG: AttributeStatusIBs = + [1657884369.932297][2923:2928] CHIP:DMG: [ + [1657884369.932329][2923:2928] CHIP:DMG: AttributeStatusIB = + [1657884369.932366][2923:2928] CHIP:DMG: { + [1657884369.932400][2923:2928] CHIP:DMG: AttributePathIB = + [1657884369.932446][2923:2928] CHIP:DMG: { + [1657884369.932490][2923:2928] CHIP:DMG: Endpoint = 0x1, + [1657884369.932534][2923:2928] CHIP:DMG: Cluster = 0x204, + [1657884369.932579][2923:2928] CHIP:DMG: Attribute = 0x0000_0000, + [1657884369.932621][2923:2928] CHIP:DMG: } + [1657884369.932667][2923:2928] CHIP:DMG: + [1657884369.932711][2923:2928] CHIP:DMG: StatusIB = + [1657884369.932753][2923:2928] CHIP:DMG: { + [1657884369.932794][2923:2928] CHIP:DMG: status = 0x00 (SUCCESS), + [1657884369.932835][2923:2928] CHIP:DMG: }, + [1657884369.932876][2923:2928] CHIP:DMG: + [1657884369.932912][2923:2928] CHIP:DMG: }, + [1657884369.932952][2923:2928] CHIP:DMG: + [1657884369.932983][2923:2928] CHIP:DMG: ], + [1657884369.933022][2923:2928] CHIP:DMG: + [1657884369.933054][2923:2928] CHIP:DMG: InteractionModelRevision = 1 + [1657884369.933085][2923:2928] CHIP:DMG: } + [1657884369.933178][2923:2928] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657884369.933244][2923:2928] CHIP:EM: Sending Standalone Ack for MessageCounter:101663641 on exchange 44315i + + + + + ./chip-tool any read-by-id 0x0204 0 1 1 + verify on TH (reference app) receives the right write Request Message for the data sent in the above command + [1657884399.502355][2748:2748] CHIP:IM: Received Read request + [1657884399.502442][2748:2748] CHIP:DMG: ReadRequestMessage = + [1657884399.502473][2748:2748] CHIP:DMG: { + [1657884399.502497][2748:2748] CHIP:DMG: AttributePathIBs = + [1657884399.502530][2748:2748] CHIP:DMG: [ + [1657884399.502558][2748:2748] CHIP:DMG: AttributePathIB = + [1657884399.502589][2748:2748] CHIP:DMG: { + [1657884399.502621][2748:2748] CHIP:DMG: Endpoint = 0x1, + [1657884399.502658][2748:2748] CHIP:DMG: Cluster = 0x204, + [1657884399.502693][2748:2748] CHIP:DMG: Attribute = 0x0000_0000, + [1657884399.502730][2748:2748] CHIP:DMG: } + [1657884399.502762][2748:2748] CHIP:DMG: + [1657884399.502791][2748:2748] CHIP:DMG: ], + [1657884399.502822][2748:2748] CHIP:DMG: + [1657884399.502852][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657884399.502881][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657884399.502907][2748:2748] CHIP:DMG: }, + [1657884399.502989][2748:2748] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response [1655796786.513406][6976:6981] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 3165945392 [1655796786.513496][6976:6981] CHIP:TOO: temperature display mode: 1 [1655796786.513593][6976:6981] CHIP:EM: Sending Standalone Ack for MessageCounter:190446058 on exchange 28240i diff --git a/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml index 59975fb0312591..4ab23bcd230c99 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml @@ -26,7 +26,7 @@ tests: a given cluster and endpoint. On receipt of this message, DUT should send a write response action." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. @@ -78,7 +78,7 @@ tests: "[Optional] TH sends the WriteRequestMessage to the DUT to write an attribute of data type bool." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool basic write local-config-disabled 1 1 0 @@ -122,7 +122,7 @@ tests: "[Optional] TH sends the WriteRequestMessage to the DUT to write an attribute of data type string." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool basic write node-label new 1 0 @@ -166,7 +166,7 @@ tests: "[Optional] TH sends the WriteRequestMessage to the DUT to write an attribute of data type unsigned integer." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool any write-by-id 0x0008 0x0010 1 1 1 @@ -245,7 +245,7 @@ tests: "[Optional] TH sends the WriteRequestMessage to the DUT to write an attribute of data type enum." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool any write-by-id 0x0204 0 1 1 1 @@ -289,7 +289,7 @@ tests: "[Optional] TH sends the WriteRequestMessage to the DUT to write an attribute of data type bitmap." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool colorcontrol write-by-id 0x000f 1 1 1 @@ -339,7 +339,7 @@ tests: "TH sends the WriteRequestMessage to the DUT to write any attribute on an unsupported Endpoint. DUT responds with the Write Response action" verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool levelcontrol write on-level 2 1 20 @@ -378,7 +378,7 @@ tests: "TH sends the WriteRequestMessage to the DUT to write any attribute on an unsupported cluster. DUT responds with the Write Response action" verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool thermostat write unoccupied-heating-setpoint 1200 1 0 @@ -416,7 +416,7 @@ tests: "TH sends the WriteRequestMessage to the DUT to write an unsupported attribute DUT responds with the Write Response action" verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool thermostat write unoccupied-heating-setpoint 1200 1 1 @@ -454,7 +454,7 @@ tests: "TH sends the WriteRequestMessage to the DUT to write an attribute which is not writable. DUT responds with the Write Response action" verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool basic write-by-id 0x7 2 1 0 @@ -494,11 +494,12 @@ tests: in the path that requires a privilege that is not granted for the cluster in the path. DUT responds with the Write Response action" verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. - To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 sudo ./chip-tool thermostatuserinterfaceconfiguration write temperature-display-mode 2 1 1 @@ -529,14 +530,16 @@ tests: [1650552778.853780][17227:17232] CHIP:DMG: InteractionModelRevision = 1 [1650552778.853813][17227:17232] CHIP:DMG: } [1650552778.853890][17227:17232] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) - [1650552778.853935][17227:17232] CHIP:DMG: WriteClient moving to [AwaitingDe]" + [1650552778.853935][17227:17232] CHIP:DMG: WriteClient moving to [AwaitingDe] + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: "TH sends the WriteRequestMessage to the DUT to write one attribute on a given cluster and endpoint. Repeat the above steps 3 times." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool levelcontrol write on-level 2 1 1 @@ -642,7 +645,7 @@ tests: WriteRequestMessage to the DUT to modify the value of one attribute with the DataVersion field set to the one received in the prior step." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool levelcontrol read on-level 1 1 @@ -724,7 +727,7 @@ tests: DUT to modify the value of an attribute with the dataversion field set to the value received earlier." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml index d45d10e3f8aa4e..025efaa968ad8f 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml @@ -55,6 +55,52 @@ tests: [1657446108.598241][11525:11525] CHIP:DMG: }, [1657446108.598388][11525:11525] CHIP:DMG: Final negotiated min/max parameters: Min = 10s, Max = 80s [1657446108.598559][11525:11525] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657884469.617473][2938:2943] CHIP:DMG: ReportDataMessage = + [1657884469.617508][2938:2943] CHIP:DMG: { + [1657884469.617538][2938:2943] CHIP:DMG: SubscriptionId = 0x2d030a2b, + [1657884469.617572][2938:2943] CHIP:DMG: AttributeReportIBs = + [1657884469.617610][2938:2943] CHIP:DMG: [ + [1657884469.617641][2938:2943] CHIP:DMG: AttributeReportIB = + [1657884469.617680][2938:2943] CHIP:DMG: { + [1657884469.617712][2938:2943] CHIP:DMG: AttributeDataIB = + [1657884469.617749][2938:2943] CHIP:DMG: { + [1657884469.617790][2938:2943] CHIP:DMG: DataVersion = 0x42da0cab, + [1657884469.617830][2938:2943] CHIP:DMG: AttributePathIB = + [1657884469.617875][2938:2943] CHIP:DMG: { + [1657884469.617918][2938:2943] CHIP:DMG: Endpoint = 0x1, + [1657884469.617961][2938:2943] CHIP:DMG: Cluster = 0x6, + [1657884469.618006][2938:2943] CHIP:DMG: Attribute = 0x0000_0000, + [1657884469.618051][2938:2943] CHIP:DMG: } + [1657884469.618094][2938:2943] CHIP:DMG: + [1657884469.618137][2938:2943] CHIP:DMG: Data = false, + [1657884469.618176][2938:2943] CHIP:DMG: }, + [1657884469.618216][2938:2943] CHIP:DMG: + [1657884469.618250][2938:2943] CHIP:DMG: }, + [1657884469.618288][2938:2943] CHIP:DMG: + [1657884469.618317][2938:2943] CHIP:DMG: ], + [1657884469.618354][2938:2943] CHIP:DMG: + [1657884469.618384][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884469.618413][2938:2943] CHIP:DMG: } + [1657884469.618568][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1121586347 + [1657884469.618632][2938:2943] CHIP:TOO: OnOff: FALSE + [1657884469.618690][2938:2943] CHIP:DMG: MoveToState ReadClient[0xffffa40091f0]: Moving to [AwaitingSu] + [1657884469.618749][2938:2943] CHIP:EM: Piggybacking Ack for MessageCounter:137911467 on exchange: 45823i + [1657884469.618817][2938:2943] CHIP:IN: Prepared secure message 0xffffa4000d48 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 45823i with MessageCounter:83158075. + [1657884469.618860][2938:2943] CHIP:IN: Sending encrypted msg 0xffffa4000d48 with MessageCounter:83158075 to 0x0000000000000001 (1) at monotonic time: 00000000006D764A msec + [1657884469.620359][2938:2943] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:137911468 on exchange 45823i + [1657884469.620401][2938:2943] CHIP:EM: Found matching exchange: 45823i, Delegate: 0xffffa40091f0 + [1657884469.620439][2938:2943] CHIP:EM: Rxd Ack; Removing MessageCounter:83158075 from Retrans Table on exchange 45823i + [1657884469.620469][2938:2943] CHIP:EM: Removed CHIP MessageCounter:83158075 from RetransTable on exchange 45823i + [1657884469.620523][2938:2943] CHIP:DMG: SubscribeResponseMessage = + [1657884469.620557][2938:2943] CHIP:DMG: { + [1657884469.620587][2938:2943] CHIP:DMG: SubscriptionId = 0x2d030a2b, + [1657884469.620619][2938:2943] CHIP:DMG: MaxInterval = 0x50, + [1657884469.620650][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884469.620679][2938:2943] CHIP:DMG: } + [1657884469.620711][2938:2943] CHIP:DMG: Subscription established with SubscriptionID = 0x2d030a2b MinInterval = 10s MaxInterval = 80s Peer = 01:0000000000000001 disabled: true - label: @@ -76,6 +122,51 @@ tests: [1657446108.604614][11525:11525] CHIP:DMG: } [1657446108.604672][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) [1657446108.604755][11525:11525] CHIP:DMG: Refresh Subscribe Sync Timer with max 80 seconds + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657884569.751004][2938:2943] CHIP:DMG: ReportDataMessage = + [1657884569.751034][2938:2943] CHIP:DMG: { + [1657884569.751059][2938:2943] CHIP:DMG: SubscriptionId = 0x47cd6fdb, + [1657884569.751111][2938:2943] CHIP:DMG: AttributeReportIBs = + [1657884569.751147][2938:2943] CHIP:DMG: [ + [1657884569.751173][2938:2943] CHIP:DMG: AttributeReportIB = + [1657884569.751219][2938:2943] CHIP:DMG: { + [1657884569.751259][2938:2943] CHIP:DMG: AttributeDataIB = + [1657884569.751304][2938:2943] CHIP:DMG: { + [1657884569.751351][2938:2943] CHIP:DMG: DataVersion = 0x42da0cab, + [1657884569.751395][2938:2943] CHIP:DMG: AttributePathIB = + [1657884569.751441][2938:2943] CHIP:DMG: { + [1657884569.751493][2938:2943] CHIP:DMG: Endpoint = 0x1, + [1657884569.751544][2938:2943] CHIP:DMG: Cluster = 0x6, + [1657884569.751596][2938:2943] CHIP:DMG: Attribute = 0x0000_0000, + [1657884569.751645][2938:2943] CHIP:DMG: } + [1657884569.751696][2938:2943] CHIP:DMG: + [1657884569.751749][2938:2943] CHIP:DMG: Data = false, + [1657884569.751796][2938:2943] CHIP:DMG: }, + [1657884569.751843][2938:2943] CHIP:DMG: + [1657884569.751874][2938:2943] CHIP:DMG: }, + [1657884569.751915][2938:2943] CHIP:DMG: + [1657884569.751941][2938:2943] CHIP:DMG: ], + [1657884569.751971][2938:2943] CHIP:DMG: + [1657884569.751996][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884569.752022][2938:2943] CHIP:DMG: } + [1657884569.752174][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1121586347 + [1657884569.752217][2938:2943] CHIP:TOO: OnOff: FALSE + [1657884569.752255][2938:2943] CHIP:DMG: MoveToState ReadClient[0xffffa40092e0]: Moving to [AwaitingSu] + [1657884569.752319][2938:2943] CHIP:EM: Piggybacking Ack for MessageCounter:137911471 on exchange: 45824i + [1657884569.752393][2938:2943] CHIP:IN: Prepared secure message 0xaaaafe09b548 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 45824i with MessageCounter:83158079. + [1657884569.752435][2938:2943] CHIP:IN: Sending encrypted msg 0xaaaafe09b548 with MessageCounter:83158079 to 0x0000000000000001 (1) at monotonic time: 00000000006EFD70 msec + [1657884569.754254][2938:2943] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:137911472 on exchange 45824i + [1657884569.754333][2938:2943] CHIP:EM: Found matching exchange: 45824i, Delegate: 0xffffa40092e0 + [1657884569.754372][2938:2943] CHIP:EM: Rxd Ack; Removing MessageCounter:83158079 from Retrans Table on exchange 45824i + [1657884569.754397][2938:2943] CHIP:EM: Removed CHIP MessageCounter:83158079 from RetransTable on exchange 45824i + [1657884569.754449][2938:2943] CHIP:DMG: SubscribeResponseMessage = + [1657884569.754478][2938:2943] CHIP:DMG: { + [1657884569.754502][2938:2943] CHIP:DMG: SubscriptionId = 0x47cd6fdb, + [1657884569.754533][2938:2943] CHIP:DMG: MaxInterval = 0x50, + [1657884569.754559][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884569.754581][2938:2943] CHIP:DMG: } + [1657884569.754610][2938:2943] CHIP:DMG: Subscription established with SubscriptionID = 0x47cd6fdb MinInterval = 10s MaxInterval = 80s Peer = 01:0000000000000001 disabled: true - label: @@ -109,6 +200,53 @@ tests: [1657445962.258950][11525:11525] CHIP:DMG: } [1657445962.258975][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) [1657445962.259002][11525:11525] CHIP:DMG: OnReportConfirm: NumReports = 0 + + + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657884643.152038][2938:2943] CHIP:DMG: ReportDataMessage = + [1657884643.152141][2938:2943] CHIP:DMG: { + [1657884643.152206][2938:2943] CHIP:DMG: SubscriptionId = 0x2e0592e3, + [1657884643.152276][2938:2943] CHIP:DMG: AttributeReportIBs = + [1657884643.152353][2938:2943] CHIP:DMG: [ + [1657884643.152414][2938:2943] CHIP:DMG: AttributeReportIB = + [1657884643.152497][2938:2943] CHIP:DMG: { + [1657884643.152565][2938:2943] CHIP:DMG: AttributeDataIB = + [1657884643.152640][2938:2943] CHIP:DMG: { + [1657884643.152722][2938:2943] CHIP:DMG: DataVersion = 0xe411d149, + [1657884643.152809][2938:2943] CHIP:DMG: AttributePathIB = + [1657884643.152898][2938:2943] CHIP:DMG: { + [1657884643.152989][2938:2943] CHIP:DMG: Endpoint = 0x0, + [1657884643.153069][2938:2943] CHIP:DMG: Cluster = 0x28, + [1657884643.153134][2938:2943] CHIP:DMG: Attribute = 0x0000_0010, + [1657884643.153282][2938:2943] CHIP:DMG: } + [1657884643.153349][2938:2943] CHIP:DMG: + [1657884643.153412][2938:2943] CHIP:DMG: Data = true, + [1657884643.153471][2938:2943] CHIP:DMG: }, + [1657884643.153529][2938:2943] CHIP:DMG: + [1657884643.153576][2938:2943] CHIP:DMG: }, + [1657884643.153631][2938:2943] CHIP:DMG: + [1657884643.153675][2938:2943] CHIP:DMG: ], + [1657884643.153731][2938:2943] CHIP:DMG: + [1657884643.153776][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884643.153821][2938:2943] CHIP:DMG: } + [1657884643.153988][2938:2943] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3826372937 + [1657884643.154049][2938:2943] CHIP:TOO: LocalConfigDisabled: TRUE + [1657884643.154117][2938:2943] CHIP:DMG: MoveToState ReadClient[0xffffa40064f0]: Moving to [AwaitingSu] + [1657884643.154200][2938:2943] CHIP:EM: Piggybacking Ack for MessageCounter:137911473 on exchange: 45825i + [1657884643.154295][2938:2943] CHIP:IN: Prepared secure message 0xffffa4000d48 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 45825i with MessageCounter:83158082. + [1657884643.154361][2938:2943] CHIP:IN: Sending encrypted msg 0xffffa4000d48 with MessageCounter:83158082 to 0x0000000000000001 (1) at monotonic time: 0000000000701C2A msec + [1657884643.155638][2938:2943] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:137911474 on exchange 45825i + [1657884643.155696][2938:2943] CHIP:EM: Found matching exchange: 45825i, Delegate: 0xffffa40064f0 + [1657884643.155750][2938:2943] CHIP:EM: Rxd Ack; Removing MessageCounter:83158082 from Retrans Table on exchange 45825i + [1657884643.155794][2938:2943] CHIP:EM: Removed CHIP MessageCounter:83158082 from RetransTable on exchange 45825i + [1657884643.155865][2938:2943] CHIP:DMG: SubscribeResponseMessage = + [1657884643.155913][2938:2943] CHIP:DMG: { + [1657884643.155957][2938:2943] CHIP:DMG: SubscriptionId = 0x2e0592e3, + [1657884643.156005][2938:2943] CHIP:DMG: MaxInterval = 0x64, + [1657884643.156051][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884643.156093][2938:2943] CHIP:DMG: } + [1657884643.156176][2938:2943] CHIP:DMG: Subscription established with SubscriptionID = 0x2e0592e3 MinInterval = 10s MaxInterval = 100s Peer = 01:0000000000000001 disabled: true - label: @@ -138,6 +276,8 @@ tests: basic write node-label label 1 0 + + On TH (On the reference app) Verify if DUT is responding with the below status response for the above command [1657446721.226280][11525:11525] CHIP:DMG: StatusResponseMessage = [1657446721.226345][11525:11525] CHIP:DMG: { [1657446721.226431][11525:11525] CHIP:DMG: Status = 0x00 (SUCCESS), @@ -146,6 +286,37 @@ tests: [1657446721.226628][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) [1657446721.226711][11525:11525] CHIP:DMG: OnReportConfirm: NumReports = 0 [1657446721.226773][11525:11525] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657884902.175205][2938:2943] CHIP:DMG: ReportDataMessage = + [1657884902.175255][2938:2943] CHIP:DMG: { + [1657884902.175299][2938:2943] CHIP:DMG: SubscriptionId = 0x6a6457a1, + [1657884902.175343][2938:2943] CHIP:DMG: AttributeReportIBs = + [1657884902.175399][2938:2943] CHIP:DMG: [ + [1657884902.175444][2938:2943] CHIP:DMG: AttributeReportIB = + [1657884902.175509][2938:2943] CHIP:DMG: { + [1657884902.175560][2938:2943] CHIP:DMG: AttributeDataIB = + [1657884902.175615][2938:2943] CHIP:DMG: { + [1657884902.175674][2938:2943] CHIP:DMG: DataVersion = 0xe411d14c, + [1657884902.175733][2938:2943] CHIP:DMG: AttributePathIB = + [1657884902.175798][2938:2943] CHIP:DMG: { + [1657884902.175866][2938:2943] CHIP:DMG: Endpoint = 0x0, + [1657884902.175936][2938:2943] CHIP:DMG: Cluster = 0x28, + [1657884902.176007][2938:2943] CHIP:DMG: Attribute = 0x0000_0005, + [1657884902.176067][2938:2943] CHIP:DMG: } + [1657884902.176147][2938:2943] CHIP:DMG: + [1657884902.176215][2938:2943] CHIP:DMG: Data = "label", + [1657884902.176265][2938:2943] CHIP:DMG: }, + [1657884902.176322][2938:2943] CHIP:DMG: + [1657884902.176369][2938:2943] CHIP:DMG: }, + [1657884902.176424][2938:2943] CHIP:DMG: + [1657884902.176467][2938:2943] CHIP:DMG: ], + [1657884902.176522][2938:2943] CHIP:DMG: + [1657884902.176568][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884902.176610][2938:2943] CHIP:DMG: } + [1657884902.176771][2938:2943] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3826372940 + [1657884902.176833][2938:2943] CHIP:TOO: NodeLabel: label + [1657884902.176910][2938:2943] CHIP:DMG: Refresh LivenessCheckTime for 225000 milliseconds with SubscriptionId = 0x6a6457a1 Peer = 01:0000000000000001 disabled: true - label: @@ -156,10 +327,9 @@ tests: verification: | In the case of chip tool as a client, here is an example command the client can subscribe to the TH - Verify DUT is responsds with status response for the data sent in the all below commands - On TH (On the reference app) any subscribe-by-id 0x0008 0x0010 10 100 1 1 + On TH (On the reference app) Verify if DUT is responding with the below status response for the above command [1657448410.108491][11525:11525] CHIP:EM: Removed CHIP MessageCounter:11055857 from RetransTable on exchange 33616r [1657448410.108543][11525:11525] CHIP:DMG: StatusResponseMessage = [1657448410.108571][11525:11525] CHIP:DMG: { @@ -168,12 +338,59 @@ tests: [1657448410.108650][11525:11525] CHIP:DMG: } [1657448410.108674][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) - + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657884929.244585][2938:2943] CHIP:DMG: ReportDataMessage = + [1657884929.244654][2938:2943] CHIP:DMG: { + [1657884929.244716][2938:2943] CHIP:DMG: SubscriptionId = 0x6cee9660, + [1657884929.244791][2938:2943] CHIP:DMG: AttributeReportIBs = + [1657884929.244873][2938:2943] CHIP:DMG: [ + [1657884929.244935][2938:2943] CHIP:DMG: AttributeReportIB = + [1657884929.245032][2938:2943] CHIP:DMG: { + [1657884929.245098][2938:2943] CHIP:DMG: AttributeDataIB = + [1657884929.245170][2938:2943] CHIP:DMG: { + [1657884929.245245][2938:2943] CHIP:DMG: DataVersion = 0xccfe0684, + [1657884929.245319][2938:2943] CHIP:DMG: AttributePathIB = + [1657884929.245395][2938:2943] CHIP:DMG: { + [1657884929.245474][2938:2943] CHIP:DMG: Endpoint = 0x1, + [1657884929.245556][2938:2943] CHIP:DMG: Cluster = 0x8, + [1657884929.245638][2938:2943] CHIP:DMG: Attribute = 0x0000_0010, + [1657884929.245696][2938:2943] CHIP:DMG: } + [1657884929.245773][2938:2943] CHIP:DMG: + [1657884929.245841][2938:2943] CHIP:DMG: Data = 1, + [1657884929.245897][2938:2943] CHIP:DMG: }, + [1657884929.245955][2938:2943] CHIP:DMG: + [1657884929.246003][2938:2943] CHIP:DMG: }, + [1657884929.246059][2938:2943] CHIP:DMG: + [1657884929.246104][2938:2943] CHIP:DMG: ], + [1657884929.246160][2938:2943] CHIP:DMG: + [1657884929.246207][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884929.246252][2938:2943] CHIP:DMG: } + [1657884929.246416][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 3439199876 + [1657884929.246496][2938:2943] CHIP:TOO: on off transition time: 0 + [1657884929.246565][2938:2943] CHIP:DMG: MoveToState ReadClient[0xffffa40064f0]: Moving to [AwaitingSu] + [1657884929.246666][2938:2943] CHIP:EM: Piggybacking Ack for MessageCounter:137911484 on exchange: 45830i + [1657884929.246777][2938:2943] CHIP:IN: Prepared secure message 0xffffa4000db8 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 45830i with MessageCounter:83158096. + [1657884929.246851][2938:2943] CHIP:IN: Sending encrypted msg 0xffffa4000db8 with MessageCounter:83158096 to 0x0000000000000001 (1) at monotonic time: 00000000007479B6 msec + [1657884929.248540][2938:2943] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:137911485 on exchange 45830i + [1657884929.248614][2938:2943] CHIP:EM: Found matching exchange: 45830i, Delegate: 0xffffa40064f0 + [1657884929.248678][2938:2943] CHIP:EM: Rxd Ack; Removing MessageCounter:83158096 from Retrans Table on exchange 45830i + [1657884929.248724][2938:2943] CHIP:EM: Removed CHIP MessageCounter:83158096 from RetransTable on exchange 45830i + [1657884929.248809][2938:2943] CHIP:DMG: SubscribeResponseMessage = + [1657884929.248858][2938:2943] CHIP:DMG: { + [1657884929.248904][2938:2943] CHIP:DMG: SubscriptionId = 0x6cee9660, + [1657884929.248953][2938:2943] CHIP:DMG: MaxInterval = 0x64, + [1657884929.249003][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884929.249047][2938:2943] CHIP:DMG: } + [1657884929.249098][2938:2943] CHIP:DMG: Subscription established with SubscriptionID = 0x6cee9660 MinInterval = 10s MaxInterval = 100s Peer = 01:0000000000000001 In the case of chip tool as a client, here is an example command the client can write an attribute in the basic cluster in the TH to change the value that the client subscribed in the above command. + + In the case of chip tool as a client, here is an example command the client can write an attribute in the basic cluster in the TH to change the value that the client subscribed in the above command. + any write-by-id 0x0008 0x0010 1 1 1 + [1657448453.234310][11525:11525] CHIP:EM: Removed CHIP MessageCounter:11055860 from RetransTable on exchange 8514i [1657448453.234372][11525:11525] CHIP:DMG: StatusResponseMessage = [1657448453.234409][11525:11525] CHIP:DMG: { @@ -184,6 +401,36 @@ tests: [1657448453.234577][11525:11525] CHIP:DMG: OnReportConfirm: NumReports = 0 + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657884955.073466][2938:2943] CHIP:DMG: ReportDataMessage = + [1657884955.073516][2938:2943] CHIP:DMG: { + [1657884955.073562][2938:2943] CHIP:DMG: SubscriptionId = 0x6cee9660, + [1657884955.073608][2938:2943] CHIP:DMG: AttributeReportIBs = + [1657884955.073666][2938:2943] CHIP:DMG: [ + [1657884955.073711][2938:2943] CHIP:DMG: AttributeReportIB = + [1657884955.073770][2938:2943] CHIP:DMG: { + [1657884955.073818][2938:2943] CHIP:DMG: AttributeDataIB = + [1657884955.073882][2938:2943] CHIP:DMG: { + [1657884955.073943][2938:2943] CHIP:DMG: DataVersion = 0xccfe0685, + [1657884955.074003][2938:2943] CHIP:DMG: AttributePathIB = + [1657884955.074064][2938:2943] CHIP:DMG: { + [1657884955.074128][2938:2943] CHIP:DMG: Endpoint = 0x1, + [1657884955.074199][2938:2943] CHIP:DMG: Cluster = 0x8, + [1657884955.074263][2938:2943] CHIP:DMG: Attribute = 0x0000_0010, + [1657884955.074329][2938:2943] CHIP:DMG: } + [1657884955.074393][2938:2943] CHIP:DMG: + [1657884955.074455][2938:2943] CHIP:DMG: Data = 1, + [1657884955.074512][2938:2943] CHIP:DMG: }, + [1657884955.074574][2938:2943] CHIP:DMG: + [1657884955.074625][2938:2943] CHIP:DMG: }, + [1657884955.074684][2938:2943] CHIP:DMG: + [1657884955.074732][2938:2943] CHIP:DMG: ], + [1657884955.074788][2938:2943] CHIP:DMG: + [1657884955.074833][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884955.074877][2938:2943] CHIP:DMG: } + [1657884955.075032][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 3439199877 + [1657884955.075095][2938:2943] CHIP:TOO: on off transition time: 1 + [1657884955.075170][2938:2943] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0x6cee9660 Peer = 01:0000000000000001 Verify the above command multiple times by changing attribute value(3 times) @@ -264,30 +511,7 @@ tests: [1657449168.666488][11525:11525] CHIP:DMG: InteractionModelRevision = 1 [1657449168.666545][11525:11525] CHIP:DMG: }, [1657449168.666762][11525:11525] CHIP:DMG: Final negotiated min/max parameters: Min = 10s, Max = 100s - [1657449168.666949][11525:11525] CHIP:DMG: IM RH moving to [GeneratingReports] - [1657449168.667136][11525:11525] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1657449168.667204][11525:11525] CHIP:DMG: Cluster 3, Attribute 0 is dirty - [1657449168.667256][11525:11525] CHIP:DMG: Reading attribute: Cluster=0x0000_0003 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1657449168.667317][11525:11525] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v - [1657449168.667388][11525:11525] CHIP:DMG: AccessControl: allowed - [1657449168.667523][11525:11525] CHIP:DMG: Cluster 8, Attribute 1 is dirty - [1657449168.667580][11525:11525] CHIP:DMG: Reading attribute: Cluster=0x0000_0008 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) - [1657449168.667636][11525:11525] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=v - [1657449168.667696][11525:11525] CHIP:DMG: AccessControl: allowed - [1657449168.667768][11525:11525] CHIP:DMG: Cluster 6, Attribute 0 is dirty - [1657449168.667824][11525:11525] CHIP:DMG: Reading attribute: Cluster=0x0000_0006 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1657449168.667882][11525:11525] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0006 e=1 p=v - [1657449168.667941][11525:11525] CHIP:DMG: AccessControl: allowed - [1657449168.668024][11525:11525] CHIP:DMG: Sending report (payload has 91 bytes)... - [1657449168.668092][11525:11525] CHIP:DMG: IM RH moving to [AwaitingReportResponse] - [1657449168.668168][11525:11525] CHIP:EM: Piggybacking Ack for MessageCounter:190733016 on exchange: 33620r - [1657449168.668301][11525:11525] CHIP:IN: Prepared secure message 0xaaab1651a358 to 0x000000000001B669 (1) of type 0x5 and protocolId (0, 1) on exchange 33620r with MessageCounter:11055871. - [1657449168.668386][11525:11525] CHIP:IN: Sending encrypted msg 0xaaab1651a358 with MessageCounter:11055871 to 0x000000000001B669 (1) at monotonic time: 000000000096B758 msec - [1657449168.668756][11525:11525] CHIP:DMG: ReportsInFlight = 1 with readHandler 1, RE has no more messages - [1657449168.668827][11525:11525] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet - [1657449168.674031][11525:11525] CHIP:EM: Received message of type 0x1 with protocolId (0, 1) and MessageCounter:190733017 on exchange 33620r - [1657449168.674074][11525:11525] CHIP:EM: Found matching exchange: 33620r, Delegate: 0xaaab16517540 - [1657449168.674114][11525:11525] CHIP:EM: Rxd Ack; Removing MessageCounter:11055871 from Retrans Table on exchange 33620r + [1657449168.674140][11525:11525] CHIP:EM: Removed CHIP MessageCounter:11055871 from RetransTable on exchange 33620r [1657449168.674191][11525:11525] CHIP:DMG: StatusResponseMessage = [1657449168.674220][11525:11525] CHIP:DMG: { @@ -296,6 +520,36 @@ tests: [1657449168.674297][11525:11525] CHIP:DMG: } [1657449168.674324][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) [1657449168.674365][11525:11525] CHIP:DMG: Refresh Subscribe Sync Timer with max 100 seconds + + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + 884990.165955][2938:2943] CHIP:DMG: }, + [1657884990.166021][2938:2943] CHIP:DMG: + [1657884990.166072][2938:2943] CHIP:DMG: ], + [1657884990.166149][2938:2943] CHIP:DMG: + [1657884990.166201][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884990.166255][2938:2943] CHIP:DMG: } + [1657884990.166480][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 2311319147 + [1657884990.166551][2938:2943] CHIP:TOO: identify time: 0 + [1657884990.166667][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0001 DataVersion: 3439199877 + [1657884990.166727][2938:2943] CHIP:TOO: remaining time: 0 + [1657884990.166850][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1121586347 + [1657884990.166907][2938:2943] CHIP:TOO: OnOff: FALSE + [1657884990.166994][2938:2943] CHIP:DMG: MoveToState ReadClient[0xffffa40091f0]: Moving to [AwaitingSu] + [1657884990.167092][2938:2943] CHIP:EM: Piggybacking Ack for MessageCounter:137911489 on exchange: 45832i + [1657884990.167206][2938:2943] CHIP:IN: Prepared secure message 0xffffa4000db8 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 45832i with MessageCounter:83158102. + [1657884990.167277][2938:2943] CHIP:IN: Sending encrypted msg 0xffffa4000db8 with MessageCounter:83158102 to 0x0000000000000001 (1) at monotonic time: 00000000007567AF msec + [1657884990.169637][2938:2943] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:137911490 on exchange 45832i + [1657884990.169705][2938:2943] CHIP:EM: Found matching exchange: 45832i, Delegate: 0xffffa40091f0 + [1657884990.169769][2938:2943] CHIP:EM: Rxd Ack; Removing MessageCounter:83158102 from Retrans Table on exchange 45832i + [1657884990.169821][2938:2943] CHIP:EM: Removed CHIP MessageCounter:83158102 from RetransTable on exchange 45832i + [1657884990.169905][2938:2943] CHIP:DMG: SubscribeResponseMessage = + [1657884990.169960][2938:2943] CHIP:DMG: { + [1657884990.170011][2938:2943] CHIP:DMG: SubscriptionId = 0x496bb4cf, + [1657884990.170067][2938:2943] CHIP:DMG: MaxInterval = 0x64, + [1657884990.170120][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884990.170169][2938:2943] CHIP:DMG: } + [1657884990.170223][2938:2943] CHIP:DMG: Subscription established with SubscriptionID = 0x496bb4cf MinInterval = 10s MaxInterval = 100s Peer = 01:0000000000000001 disabled: true - label: @@ -316,62 +570,126 @@ tests: verification: | In the case of chip tool as a client, here is an example command the client can subscribe to the TH - onoff subscribe on-off 10 100 1 - [1657461297.413790][12604:12609] CHIP:DMG: ReportDataMessage = - [1657461297.413859][12604:12609] CHIP:DMG: { - [1657461297.413895][12604:12609] CHIP:DMG: SubscriptionId = 0x4a7b129e, - [1657461297.413933][12604:12609] CHIP:DMG: AttributeReportIBs = - [1657461297.413975][12604:12609] CHIP:DMG: [ - [1657461297.414009][12604:12609] CHIP:DMG: AttributeReportIB = - [1657461297.414053][12604:12609] CHIP:DMG: { - [1657461297.414088][12604:12609] CHIP:DMG: AttributeDataIB = - [1657461297.414130][12604:12609] CHIP:DMG: { - [1657461297.414174][12604:12609] CHIP:DMG: DataVersion = 0x1979c48, - [1657461297.414218][12604:12609] CHIP:DMG: AttributePathIB = - [1657461297.414263][12604:12609] CHIP:DMG: { - [1657461297.414309][12604:12609] CHIP:DMG: Endpoint = 0x1, - [1657461297.414358][12604:12609] CHIP:DMG: Cluster = 0x6, - [1657461297.414406][12604:12609] CHIP:DMG: Attribute = 0x0000_0000, - [1657461297.414455][12604:12609] CHIP:DMG: } - [1657461297.414503][12604:12609] CHIP:DMG: - [1657461297.414670][12604:12609] CHIP:DMG: Data = false, - [1657461297.414718][12604:12609] CHIP:DMG: }, - [1657461297.414765][12604:12609] CHIP:DMG: - [1657461297.414837][12604:12609] CHIP:DMG: }, - [1657461297.414884][12604:12609] CHIP:DMG: - [1657461297.414917][12604:12609] CHIP:DMG: ], - [1657461297.414958][12604:12609] CHIP:DMG: - [1657461297.414992][12604:12609] CHIP:DMG: InteractionModelRevision = 1 - [1657461297.415025][12604:12609] CHIP:DMG: } - [1657461297.415190][12604:12609] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 26713160 - [1657461297.415237][12604:12609] CHIP:TOO: OnOff: FALSE - [1657461297.415289][12604:12609] CHIP:DMG: MoveToState ReadClient[0xffff80008e40]: Moving to [AwaitingSu] - - - - onoff subscribe on-off 100 1000 1 1 --data-version 0x32c52d73 - - On Reference app verify Attribute data is not sent for the second subscription, when Start another subscription with the DataVersionFilter field set to the data version received above - - [1655890477.269305][1518:1523] CHIP:EM: Removed CHIP MessageCounter:196305006 from RetransTable on exchange 43437i - [1655890477.269385][1518:1523] CHIP:DMG: ReportDataMessage = - [1655890477.269425][1518:1523] CHIP:DMG: { - [1655890477.269473][1518:1523] CHIP:DMG: SubscriptionId = 0x72322357, - [1655890477.269523][1518:1523] CHIP:DMG: InteractionModelRevision = 1 - [1655890477.269577][1518:1523] CHIP:DMG: } - [1655890477.269643][1518:1523] CHIP:DMG: MoveToState ReadClient[0xffff98002df0]: Moving to [AwaitingSu] - [1655890477.269707][1518:1523] CHIP:EM: Piggybacking Ack for MessageCounter:19565255 on exchange: 43437i - [1655890477.269794][1518:1523] CHIP:IN: Prepared secure message 0xaaaaca508b78 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 43437i with MessageCounter:196305007. - [1655890477.269858][1518:1523] CHIP:IN: Sending encrypted msg 0xaaaaca508b78 with MessageCounter:196305007 to 0x0000000000000001 (1) at monotonic time: 00000000000F351F msec - [1655890477.271312][1518:1523] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:19565256 on exchange 43437i - [1655890477.271359][1518:1523] CHIP:EM: Found matching exchange: 43437i, Delegate: 0xffff98002df0 - [1655890477.271405][1518:1523] CHIP:EM: Rxd Ack; Removing MessageCounter:196305007 from Retrans Table on exchange 43437i - [1655890477.271440][1518:1523] CHIP:EM: Removed CHIP MessageCounter:196305007 from RetransTable on exchange 43437i - [1655890477.271497][1518:1523] CHIP:DMG: SubscribeResponseMessage = - [1655890477.271549][1518:1523] CHIP:DMG: { - [1655890477.271586][1518:1523] CHIP:DMG: SubscriptionId = 0x72322357, - [1655890477.271644][1518:1523] CHIP:DMG: MaxInterval = 0x3e8, - [1655890477.271681][1518:1523] CHIP:DMG: InteractionModelRevision = 1 - [1655890477.271732][1518:1523] CHIP:DMG: } - [1655890477.271771][1518:1523] CHIP:DMG: Subscription established with SubscriptionID = 0x72322357 MinInterval = 0s MaxInterval = 1000s Peer = 01:0000000000000001 + onoff subscribe on-off 10 80 1 1 + + On TH(Reference app) verify the report data action with the data of the attribute along with the data version + [1657885412.662766][2748:2748] CHIP:DMG: SubscribeRequestMessage = + [1657885412.662793][2748:2748] CHIP:DMG: { + [1657885412.662816][2748:2748] CHIP:DMG: KeepSubscriptions = false, + [1657885412.662842][2748:2748] CHIP:DMG: MinIntervalFloorSeconds = 0xa, + [1657885412.662868][2748:2748] CHIP:DMG: MaxIntervalCeilingSeconds = 0x50, + [1657885412.662892][2748:2748] CHIP:DMG: AttributePathIBs = + [1657885412.662917][2748:2748] CHIP:DMG: [ + [1657885412.662941][2748:2748] CHIP:DMG: AttributePathIB = + [1657885412.662967][2748:2748] CHIP:DMG: { + [1657885412.662995][2748:2748] CHIP:DMG: Endpoint = 0x1, + [1657885412.663030][2748:2748] CHIP:DMG: Cluster = 0x6, + [1657885412.663061][2748:2748] CHIP:DMG: Attribute = 0x0000_0000, + [1657885412.663089][2748:2748] CHIP:DMG: } + [1657885412.663119][2748:2748] CHIP:DMG: + [1657885412.663145][2748:2748] CHIP:DMG: ], + [1657885412.663172][2748:2748] CHIP:DMG: + [1657885412.663199][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657885412.663223][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657885412.663245][2748:2748] CHIP:DMG: }, + [1657885412.663314][2748:2748] CHIP:DMG: Final negotiated min/max parameters: Min = 10s, Max = 80s + + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657885412.620231][2979:2984] CHIP:DMG: ReportDataMessage = + [1657885412.620274][2979:2984] CHIP:DMG: { + [1657885412.620300][2979:2984] CHIP:DMG: SubscriptionId = 0x5ccc5161, + [1657885412.620326][2979:2984] CHIP:DMG: AttributeReportIBs = + [1657885412.620368][2979:2984] CHIP:DMG: [ + [1657885412.620393][2979:2984] CHIP:DMG: AttributeReportIB = + [1657885412.620442][2979:2984] CHIP:DMG: { + [1657885412.620480][2979:2984] CHIP:DMG: AttributeDataIB = + [1657885412.620510][2979:2984] CHIP:DMG: { + [1657885412.620551][2979:2984] CHIP:DMG: DataVersion = 0x42da0cab, + [1657885412.620581][2979:2984] CHIP:DMG: AttributePathIB = + [1657885412.620622][2979:2984] CHIP:DMG: { + [1657885412.620655][2979:2984] CHIP:DMG: Endpoint = 0x1, + [1657885412.620699][2979:2984] CHIP:DMG: Cluster = 0x6, + [1657885412.620742][2979:2984] CHIP:DMG: Attribute = 0x0000_0000, + [1657885412.620773][2979:2984] CHIP:DMG: } + [1657885412.620816][2979:2984] CHIP:DMG: + [1657885412.620859][2979:2984] CHIP:DMG: Data = false, + [1657885412.620889][2979:2984] CHIP:DMG: }, + [1657885412.620929][2979:2984] CHIP:DMG: + [1657885412.620955][2979:2984] CHIP:DMG: }, + [1657885412.620996][2979:2984] CHIP:DMG: + [1657885412.621021][2979:2984] CHIP:DMG: ], + [1657885412.621063][2979:2984] CHIP:DMG: + [1657885412.621087][2979:2984] CHIP:DMG: InteractionModelRevision = 1 + [1657885412.621120][2979:2984] CHIP:DMG: } + [1657885412.621284][2979:2984] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1121586347 + [1657885412.621346][2979:2984] CHIP:TOO: OnOff: FALSE + [1657885412.621399][2979:2984] CHIP:DMG: MoveToState ReadClient[0xffffa40091f0]: Moving to [AwaitingSu] + + + On TH(Reference app) verify Attribute data is not sent for the second subscription, when Start another subscription with the DataVersionFilter field set to the data version received above + + onoff subscribe on-off 10 50 1 1 --data-version 0x42da0cab + + + On TH (On the reference app) Verify if DUT is responding with the below status response for the above command + [1657885449.497461][2748:2748] CHIP:DMG: SubscribeRequestMessage = + [1657885449.497490][2748:2748] CHIP:DMG: { + [1657885449.497514][2748:2748] CHIP:DMG: KeepSubscriptions = false, + [1657885449.497540][2748:2748] CHIP:DMG: MinIntervalFloorSeconds = 0xa, + [1657885449.497567][2748:2748] CHIP:DMG: MaxIntervalCeilingSeconds = 0x32, + [1657885449.497592][2748:2748] CHIP:DMG: AttributePathIBs = + [1657885449.497617][2748:2748] CHIP:DMG: [ + [1657885449.497641][2748:2748] CHIP:DMG: AttributePathIB = + [1657885449.497668][2748:2748] CHIP:DMG: { + [1657885449.497696][2748:2748] CHIP:DMG: Endpoint = 0x1, + [1657885449.497742][2748:2748] CHIP:DMG: Cluster = 0x6, + [1657885449.497772][2748:2748] CHIP:DMG: Attribute = 0x0000_0000, + [1657885449.497799][2748:2748] CHIP:DMG: } + [1657885449.497827][2748:2748] CHIP:DMG: + [1657885449.497853][2748:2748] CHIP:DMG: ], + [1657885449.497880][2748:2748] CHIP:DMG: + [1657885449.497906][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657885449.497930][2748:2748] CHIP:DMG: DataVersionFilterIBs = + [1657885449.497960][2748:2748] CHIP:DMG: [ + [1657885449.497984][2748:2748] CHIP:DMG: DataVersionFilterIB = + [1657885449.498011][2748:2748] CHIP:DMG: { + [1657885449.498036][2748:2748] CHIP:DMG: ClusterPathIB = + [1657885449.498064][2748:2748] CHIP:DMG: { + [1657885449.498093][2748:2748] CHIP:DMG: Endpoint = 0x1, + [1657885449.498122][2748:2748] CHIP:DMG: Cluster = 0x6, + [1657885449.498150][2748:2748] CHIP:DMG: } + [1657885449.498180][2748:2748] CHIP:DMG: + [1657885449.498209][2748:2748] CHIP:DMG: DataVersion = 0x42da0cab, + [1657885449.498236][2748:2748] CHIP:DMG: }, + [1657885449.498263][2748:2748] CHIP:DMG: + [1657885449.498287][2748:2748] CHIP:DMG: ], + [1657885449.498315][2748:2748] CHIP:DMG: + [1657885449.498339][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657885449.498362][2748:2748] CHIP:DMG: }, + [1657885449.498459][2748:2748] CHIP:DMG: Final negotiated min/max parameters: Min = 10s, Max = 50s + + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657885449.455150][2979:2984] CHIP:EM: Removed CHIP MessageCounter:157900434 from RetransTable on exchange 50588i + [1657885449.455222][2979:2984] CHIP:DMG: ReportDataMessage = + [1657885449.455284][2979:2984] CHIP:DMG: { + [1657885449.455321][2979:2984] CHIP:DMG: SubscriptionId = 0xd9b77c33, + [1657885449.455375][2979:2984] CHIP:DMG: InteractionModelRevision = 1 + [1657885449.455410][2979:2984] CHIP:DMG: } + [1657885449.455480][2979:2984] CHIP:DMG: MoveToState ReadClient[0xffffa40092e0]: Moving to [AwaitingSu] + [1657885449.455561][2979:2984] CHIP:EM: Piggybacking Ack for MessageCounter:260146719 on exchange: 50588i + [1657885449.455651][2979:2984] CHIP:IN: Prepared secure message 0xffffa4000d48 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 50588i with MessageCounter:157900435. + [1657885449.455704][2979:2984] CHIP:IN: Sending encrypted msg 0xffffa4000d48 with MessageCounter:157900435 to 0x0000000000000001 (1) at monotonic time: 00000000007C69C7 msec + [1657885449.456845][2979:2984] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:260146720 on exchange 50588i + [1657885449.456892][2979:2984] CHIP:EM: Found matching exchange: 50588i, Delegate: 0xffffa40092e0 + [1657885449.456937][2979:2984] CHIP:EM: Rxd Ack; Removing MessageCounter:157900435 from Retrans Table on exchange 50588i + [1657885449.456973][2979:2984] CHIP:EM: Removed CHIP MessageCounter:157900435 from RetransTable on exchange 50588i + [1657885449.457029][2979:2984] CHIP:DMG: SubscribeResponseMessage = + [1657885449.457068][2979:2984] CHIP:DMG: { + [1657885449.457106][2979:2984] CHIP:DMG: SubscriptionId = 0xd9b77c33, + [1657885449.457148][2979:2984] CHIP:DMG: MaxInterval = 0x32, + [1657885449.457186][2979:2984] CHIP:DMG: InteractionModelRevision = 1 + [1657885449.457221][2979:2984] CHIP:DMG: } + [1657885449.457260][2979:2984] CHIP:DMG: Subscription established with SubscriptionID = 0xd9b77c33 MinInterval = 10s MaxInterval = 50s Peer = 01:0000000000000001 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml index 5b5f2aedd4d0d5..c7cfe9dfee7b1c 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 @@ -146,11 +146,12 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 - To Setup the TH2 such that there is no accessing fabric, 1st we need to send below mentioned ACL command - accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{"cluster": null, "endpoint": 0, "deviceType": null}]}, {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": null, "targets": [{"cluster": 0006 , "endpoint": 1 , "deviceType": null}]}]' 1 0 - The cluster used in the below command is an example, User can use any supported chip cluster. any subscribe-by-id 0006 0 10 100 2 1 verify DUT is responsds with UNSUPPORTED_ACCESS for the data sent in the above command @@ -185,6 +186,10 @@ tests: [1657450420.474128][8713:8718] CHIP:DMG: } [1657450420.474229][8713:8718] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) [1657450420.474271][8713:8718] CHIP:DMG: MoveToState ReadClient[0xffffa4008e40]: Moving to [AwaitingSu] + + + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -193,13 +198,16 @@ tests: on a specific Endpoint for which it does not have access. AttributePath = [[ Endpoint = EndpointID ]]." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. - accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{"cluster": null, "endpoint": 0, "deviceType": null}]}, {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": null, "targets": [{"cluster": null , "endpoint": 1 , "deviceType": null}]}]' 1 0 + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. - sudo ./chip-tool thermostatuserinterfaceconfiguration subscribe temperature-display-mode 100 1000 1 1 + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 - verify DUT is responsds with UNSUPPORTED_ACCESS for the data sent in the above command + thermostatuserinterfaceconfiguration subscribe temperature-display-mode 100 1000 1 1 + + on TH verify DUT is responsds with UNSUPPORTED_ACCESS for the data sent in the above command [1654862486.785468][32309:32314] CHIP:DMG: ReportDataMessage = [1654862486.785508][32309:32314] CHIP:DMG: { @@ -232,6 +240,9 @@ tests: [1654862486.786720][32309:32314] CHIP:DMG: } [1654862486.786862][32309:32314] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) [1654862486.786918][32309:32314] CHIP:DMG: MoveToState ReadClient[0xffff840040e0]: Moving to + + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -254,7 +265,7 @@ tests: onoff subscribe start-up-on-off 50 800 1 1 - On reference app verify subscription is activated between TH and DUT + On reference app verify that subscription is activated between TH and DUT [1657450742.453824][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733047 from RetransTable on exchange 33629i [1657450742.453885][11635:11640] CHIP:DMG: ReportDataMessage = 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 c7fb9ebb5391c7..b906bce117696b 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 @@ -40,7 +40,7 @@ tests: The cluster used in the below command is an example, User can use any supported chip cluster. onoff subscribe start-up-on-off 30 100 1 1 - Verify on TH , DUT is responds right attribute value for above command + on TH, verify that DUT is responds right attribute value for above command [1657451357.177831][11635:11640] CHIP:DMG: { [1657451357.177894][11635:11640] CHIP:DMG: SubscriptionId = 0xf3aa49ef, @@ -115,8 +115,7 @@ tests: The cluster used in the below command is an example, User can use any supported chip cluster. onoff subscribe on-off 10 200 1 1 - - Verify on TH , DUT is responds right attribute value for above command + on TH verify Verify that DUT is responds right attribute value for above command [1657451491.078934][11635:11640] CHIP:DMG: ReportDataMessage = [1657451491.079004][11635:11640] CHIP:DMG: { @@ -179,7 +178,7 @@ tests: The cluster used in the below command is an example, User can use any supported chip cluster. - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. + on TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. basic subscribe local-config-disabled 100 200 1 0 [1657451690.259096][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733078 from RetransTable on exchange 33639i @@ -266,7 +265,7 @@ tests: basic subscribe node-label 10 100 1 0 - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. + on TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. 1657452002.280167][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733100 from RetransTable on exchange 33648i [1657452002.280291][11635:11640] CHIP:DMG: ReportDataMessage = @@ -348,7 +347,7 @@ tests: any subscribe-by-id 0x0008 0x0010 10 100 1 1 - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. + on TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. [1657452196.617935][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733107 from RetransTable on exchange 33650i [1657452196.618061][11635:11640] CHIP:DMG: ReportDataMessage = @@ -451,8 +450,7 @@ tests: userlabel subscribe label-list 100 500 1 0 - - Verify on TH , DUT is responds right attribute value for above command + On TH verify that DUT is responds right attribute value for above command [1655896309.160632][1885:1890] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_0000 DataVersion: 3773922725 [1655896309.160795][1885:1890] CHIP:TOO: label list: 0 entries [1655896309.160851][1885:1890] CHIP:DMG: MoveToState ReadClient[0xffffa0005710]: Moving to [AwaitingSu] @@ -488,8 +486,7 @@ tests: basic subscribe local-config-disabled 10 100 1 0 --keepSubscriptions 0 - - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. + on TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. [1657453109.707943][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733139 from RetransTable on exchange 33658i [1657453109.708065][11635:11640] CHIP:DMG: ReportDataMessage = @@ -600,7 +597,7 @@ tests: levelcontrol subscribe on-level 10 80 1 1 - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. + On TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. [1657453503.538054][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733149 from RetransTable on exchange 33661i @@ -725,7 +722,7 @@ tests: >>> onoff subscribe off-wait-time 10 500 1 1 --keepSubscriptions 1 - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not for both attributes + On TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not for both attributes [1657454078.091825][11635:11640] CHIP:DMG: ReportDataMessage = @@ -864,7 +861,7 @@ tests: onoff subscribe on-time 10 100 1 1 --keepSubscriptions 1 - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not for both attributes. Verify that the first subscription is terminated after the MaxInterval of the first subscription is reached. + On TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not for both attributes. Verify that the first subscription is terminated after the MaxInterval of the first subscription is reached. 1657454443.310644][11635:11640] CHIP:DMG: ReportDataMessage = @@ -1039,7 +1036,89 @@ tests: Attribute, Cluster = ClusterID ]]. Set the MinIntervalFloor to some value say "N"(seconds). Change the attribute on the DUT' verification: | - Out of Scope for V1.0 + onoff subscribe-by-id 0x4001 200 700 1 0xFFFF + on TH, verify that DUT is responds right attribute value for command and then send write command to change the attribute value, + [1658322253.825601][4866:4871] CHIP:DMG: ReportDataMessage = + [1658322253.825662][4866:4871] CHIP:DMG: { + [1658322253.825714][4866:4871] CHIP:DMG: SubscriptionId = 0x42baa1, + [1658322253.825767][4866:4871] CHIP:DMG: AttributeReportIBs = + [1658322253.825831][4866:4871] CHIP:DMG: [ + [1658322253.825904][4866:4871] CHIP:DMG: AttributeReportIB = + [1658322253.825998][4866:4871] CHIP:DMG: { + [1658322253.826055][4866:4871] CHIP:DMG: AttributeDataIB = + [1658322253.826137][4866:4871] CHIP:DMG: { + [1658322253.826209][4866:4871] CHIP:DMG: DataVersion = 0xa6fa1c6d, + [1658322253.826295][4866:4871] CHIP:DMG: AttributePathIB = + [1658322253.826391][4866:4871] CHIP:DMG: { + [1658322253.826465][4866:4871] CHIP:DMG: Endpoint = 0x1, + [1658322253.826557][4866:4871] CHIP:DMG: Cluster = 0x6, + [1658322253.826650][4866:4871] CHIP:DMG: Attribute = 0x0000_4001, + [1658322253.826722][4866:4871] CHIP:DMG: } + [1658322253.826810][4866:4871] CHIP:DMG: + [1658322253.826882][4866:4871] CHIP:DMG: Data = 1, + [1658322253.826967][4866:4871] CHIP:DMG: }, + [1658322253.827054][4866:4871] CHIP:DMG: + [1658322253.827110][4866:4871] CHIP:DMG: }, + [1658322253.827204][4866:4871] CHIP:DMG: + [1658322253.827258][4866:4871] CHIP:DMG: AttributeReportIB = + [1658322253.827341][4866:4871] CHIP:DMG: { + [1658322253.827397][4866:4871] CHIP:DMG: AttributeDataIB = + [1658322253.827478][4866:4871] CHIP:DMG: { + [1658322253.827545][4866:4871] CHIP:DMG: DataVersion = 0x73700d2f, + [1658322253.827612][4866:4871] CHIP:DMG: AttributePathIB = + [1658322253.827680][4866:4871] CHIP:DMG: { + [1658322253.827750][4866:4871] CHIP:DMG: Endpoint = 0x2, + [1658322253.827823][4866:4871] CHIP:DMG: Cluster = 0x6, + [1658322253.827896][4866:4871] CHIP:DMG: Attribute = 0x0000_4001, + [1658322253.827964][4866:4871] CHIP:DMG: } + [1658322253.828034][4866:4871] CHIP:DMG: + [1658322253.828105][4866:4871] CHIP:DMG: Data = 0, + [1658322253.828169][4866:4871] CHIP:DMG: }, + [1658322253.828237][4866:4871] CHIP:DMG: + [1658322253.828294][4866:4871] CHIP:DMG: }, + [1658322253.828357][4866:4871] CHIP:DMG: + [1658322253.828407][4866:4871] CHIP:DMG: ], + [1658322253.828479][4866:4871] CHIP:DMG: + [1658322253.828529][4866:4871] CHIP:DMG: InteractionModelRevision = 1 + [1658322253.828579][4866:4871] CHIP:DMG: } + [1658322253.828785][4866:4871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 2801409133 + [1658322253.828857][4866:4871] CHIP:TOO: OnTime: 0 + [1658322253.829013][4866:4871] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1936723247 + [1658322253.829073][4866:4871] CHIP:TOO: OnTime: 0 + [1658322253.829154][4866:4871] CHIP:DMG: MoveToState ReadClient[0xffffa4003810]: Moving to [AwaitingSu] + + + onoff write-by-id 0x4001 1 1 1 + On TH, Verify that the DUT sends reports for all the attributes that have changed after N(200) seconds + [1658322453.896805][4866:4871] CHIP:DMG: ReportDataMessage = + [1658322453.896834][4866:4871] CHIP:DMG: { + [1658322453.896859][4866:4871] CHIP:DMG: SubscriptionId = 0x42baa1, + [1658322453.896884][4866:4871] CHIP:DMG: AttributeReportIBs = + [1658322453.896915][4866:4871] CHIP:DMG: [ + [1658322453.896974][4866:4871] CHIP:DMG: AttributeReportIB = + [1658322453.897009][4866:4871] CHIP:DMG: { + [1658322453.897074][4866:4871] CHIP:DMG: AttributeDataIB = + [1658322453.897155][4866:4871] CHIP:DMG: { + [1658322453.897235][4866:4871] CHIP:DMG: DataVersion = 0xa6fa1c6e, + [1658322453.897321][4866:4871] CHIP:DMG: AttributePathIB = + [1658322453.897412][4866:4871] CHIP:DMG: { + [1658322453.897501][4866:4871] CHIP:DMG: Endpoint = 0x1, + [1658322453.897588][4866:4871] CHIP:DMG: Cluster = 0x6, + [1658322453.897675][4866:4871] CHIP:DMG: Attribute = 0x0000_4001, + [1658322453.897757][4866:4871] CHIP:DMG: } + [1658322453.897842][4866:4871] CHIP:DMG: + [1658322453.897934][4866:4871] CHIP:DMG: Data = 1, + [1658322453.898011][4866:4871] CHIP:DMG: }, + [1658322453.898095][4866:4871] CHIP:DMG: + [1658322453.898158][4866:4871] CHIP:DMG: }, + [1658322453.898232][4866:4871] CHIP:DMG: + [1658322453.898292][4866:4871] CHIP:DMG: ], + [1658322453.898367][4866:4871] CHIP:DMG: + [1658322453.898427][4866:4871] CHIP:DMG: InteractionModelRevision = 1 + [1658322453.898486][4866:4871] CHIP:DMG: } + [1658322453.898693][4866:4871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 2801409134 + [1658322453.898777][4866:4871] CHIP:TOO: OnTime: 1 + [1658322453.898879][4866:4871] CHIP:DMG: Refresh LivenessCheckTime for 725000 milliseconds with SubscriptionId = 0x0042baa1 Peer = 01:0000000000000001 disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_IDM_5_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_5_1.yaml index 7ec4ee63f413b7..c389ba63df59ba 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_5_1.yaml @@ -30,9 +30,7 @@ tests: In the case of chip tool as a client, here is an example command the client can send invoke request to the TH ./chip-tool onoff on 1 1 --timedInteractionTimeoutMs 200 - Verify that the DUT sent the invoke message to the TH after the specified timeout value for above command - - on the TH (reference all cluster app) you should see + On TH (On the reference app) Verify if DUT is responding with the below status response for the above command [1655797318.624018][7331:7331] CHIP:EM: Handling via exchange: 28067r, Delegate: 0xaaaad9aed418 [1655797318.624129][7331:7331] CHIP:DMG: TimedRequestMessage = [1655797318.624185][7331:7331] CHIP:DMG: { @@ -67,6 +65,49 @@ tests: [1655797318.627383][7331:7331] CHIP:DMG: InteractionModelRevision = 1 [1655797318.627406][7331:7331] CHIP:DMG: }, [1655797318.627467][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0006 e=1 p=o + + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657886182.184612][3396:3401] CHIP:DMG: StatusResponseMessage = + [1657886182.184642][3396:3401] CHIP:DMG: { + [1657886182.184667][3396:3401] CHIP:DMG: Status = 0x00 (SUCCESS), + [1657886182.184693][3396:3401] CHIP:DMG: InteractionModelRevision = 1 + [1657886182.184716][3396:3401] CHIP:DMG: } + [1657886182.184742][3396:3401] CHIP:IM: Received status response, status is 0x00 (SUCCESS) + + + 61453140 from RetransTable on exchange 17901i + [1657886182.190976][3396:3401] CHIP:DMG: ICR moving to [ResponseRe] + [1657886182.191027][3396:3401] CHIP:DMG: InvokeResponseMessage = + [1657886182.191052][3396:3401] CHIP:DMG: { + [1657886182.191076][3396:3401] CHIP:DMG: suppressResponse = false, + [1657886182.191101][3396:3401] CHIP:DMG: InvokeResponseIBs = + [1657886182.191132][3396:3401] CHIP:DMG: [ + [1657886182.191157][3396:3401] CHIP:DMG: InvokeResponseIB = + [1657886182.191190][3396:3401] CHIP:DMG: { + [1657886182.191216][3396:3401] CHIP:DMG: CommandStatusIB = + [1657886182.191253][3396:3401] CHIP:DMG: { + [1657886182.191286][3396:3401] CHIP:DMG: CommandPathIB = + [1657886182.191325][3396:3401] CHIP:DMG: { + [1657886182.191365][3396:3401] CHIP:DMG: EndpointId = 0x1, + [1657886182.191400][3396:3401] CHIP:DMG: ClusterId = 0x6, + [1657886182.191439][3396:3401] CHIP:DMG: CommandId = 0x1, + [1657886182.191472][3396:3401] CHIP:DMG: }, + [1657886182.191510][3396:3401] CHIP:DMG: + [1657886182.191541][3396:3401] CHIP:DMG: StatusIB = + [1657886182.191575][3396:3401] CHIP:DMG: { + [1657886182.191613][3396:3401] CHIP:DMG: status = 0x00 (SUCCESS), + [1657886182.191649][3396:3401] CHIP:DMG: }, + [1657886182.191683][3396:3401] CHIP:DMG: + [1657886182.191712][3396:3401] CHIP:DMG: }, + [1657886182.191746][3396:3401] CHIP:DMG: + [1657886182.191772][3396:3401] CHIP:DMG: }, + [1657886182.191802][3396:3401] CHIP:DMG: + [1657886182.191826][3396:3401] CHIP:DMG: ], + [1657886182.191856][3396:3401] CHIP:DMG: + [1657886182.191880][3396:3401] CHIP:DMG: InteractionModelRevision = 1 + [1657886182.191903][3396:3401] CHIP:DMG: }, + [1657886182.191963][3396:3401] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x0 disabled: true - label: @@ -78,8 +119,7 @@ tests: Chip-tool as controller , here is the example command you can use ./chip-tool onoff write on-time 2 1 1 --timedInteractionTimeoutMs 200 - Verify that the DUT sent the writerequest message to the TH after the specified timeout value for above command - + On TH (On the reference app) Verify if DUT is responding with the below status response for the above command [1657459639.597900][11525:11525] CHIP:EM: Handling via exchange: 17116r, Delegate: 0xaaaae00c1430 [1657459639.598014][11525:11525] CHIP:DMG: TimedRequestMessage = @@ -118,6 +158,44 @@ tests: [1657459639.600842][11525:11525] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0006 e=1 p=o [1657459639.600888][11525:11525] CHIP:DMG: AccessControl: allowed [1657459639.600936][11525:11525] CHIP:DMG: Endpoint 1, Cluster 0x0000_0006 update version to 1979c48 + + + On DUT as a client side, verify that TH all-clusters-app sent success response + + [1657886272.645704][3404:3409] CHIP:DMG: StatusResponseMessage = + [1657886272.645751][3404:3409] CHIP:DMG: { + [1657886272.645792][3404:3409] CHIP:DMG: Status = 0x00 (SUCCESS), + [1657886272.645839][3404:3409] CHIP:DMG: InteractionModelRevision = 1 + [1657886272.645878][3404:3409] CHIP:DMG: } + [1657886272.645918][3404:3409] CHIP:IM: Received status response, status is 0x00 (SUCCESS) + + [1657886272.648220][3404:3409] CHIP:DMG: WriteClient moving to [ResponseRe] + [1657886272.648285][3404:3409] CHIP:DMG: WriteResponseMessage = + [1657886272.648326][3404:3409] CHIP:DMG: { + [1657886272.648361][3404:3409] CHIP:DMG: AttributeStatusIBs = + [1657886272.648410][3404:3409] CHIP:DMG: [ + [1657886272.648450][3404:3409] CHIP:DMG: AttributeStatusIB = + [1657886272.648494][3404:3409] CHIP:DMG: { + [1657886272.648535][3404:3409] CHIP:DMG: AttributePathIB = + [1657886272.648593][3404:3409] CHIP:DMG: { + [1657886272.648644][3404:3409] CHIP:DMG: Endpoint = 0x1, + [1657886272.648698][3404:3409] CHIP:DMG: Cluster = 0x6, + [1657886272.648752][3404:3409] CHIP:DMG: Attribute = 0x0000_4001, + [1657886272.648803][3404:3409] CHIP:DMG: } + [1657886272.648860][3404:3409] CHIP:DMG: + [1657886272.648910][3404:3409] CHIP:DMG: StatusIB = + [1657886272.648959][3404:3409] CHIP:DMG: { + [1657886272.649011][3404:3409] CHIP:DMG: status = 0x00 (SUCCESS), + [1657886272.649067][3404:3409] CHIP:DMG: }, + [1657886272.649115][3404:3409] CHIP:DMG: + [1657886272.649161][3404:3409] CHIP:DMG: }, + [1657886272.649212][3404:3409] CHIP:DMG: + [1657886272.649250][3404:3409] CHIP:DMG: ], + [1657886272.649283][3404:3409] CHIP:DMG: + [1657886272.649308][3404:3409] CHIP:DMG: InteractionModelRevision = 1 + [1657886272.649333][3404:3409] CHIP:DMG: } + [1657886272.649415][3404:3409] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657886272.649481][3404:3409] CHIP:EM: Sending Standalone Ack for MessageCounter:137181137 on exchange 234i disabled: true - label: @@ -127,4 +205,5 @@ tests: the received timed request." verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. + https://github.com/CHIP-Specifications/chip-test-plans/issues/1885 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_1.yaml index dabd2edd4d8ee9..c5fc410b9ac5e6 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_1.yaml @@ -27,7 +27,8 @@ tests: specific node that is, [Node = Specific, Endpoint = Specific, Cluster = Specific, Event = Specific]." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. + sudo ./chip-tool basic read-event start-up 1 0 @@ -79,7 +80,7 @@ tests: node that is, [Node = Specific, Endpoint = Specific, Cluster = Specific, Event = Wildcard]." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool any read-event-by-id 0x0028 0x0FFFFFFFF 1 0 On TH verify DUT sends Report Data Message with the data for specific event in Read Request Message. @@ -129,8 +130,6 @@ tests: that is, [Node = Specific, Endpoint = Specific, Cluster = Wildcard, Event = Wildcard]." verification: | - In case of chip tool, here is an example command to use - ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0 On TH verify DUT sends Report Data Message with the data for specific event in Read Request Message. @@ -174,7 +173,7 @@ tests: node that is, [Node = Specific, Endpoint = Wildcard, Cluster = Specific, Event = Specific]." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool basic read-event start-up 1 0xFFFF @@ -226,7 +225,7 @@ tests: that is, [Node = Specific, Endpoint = Wildcard, Cluster = Specific, Event = Wildcard]." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool basic read-event-by-id 0xFFFFFFFF 1 0xFFFF On TH verify DUT sends Report Data Message with the data for specific event in Read Request Message. @@ -277,8 +276,6 @@ tests: [Node = Specific, Endpoint = Wildcard, Cluster = Wildcard, Event = Wildcard]." verification: | - In case of chip tool, here is an example command to use - sudo ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF On TH verify DUT sends Report Data Message with the data for specific event in Read Request Message. [1653051769.144914][11706:11711] CHIP:DMG: ReportDataMessage = @@ -415,11 +412,13 @@ tests: which requires a privilege that is not granted for the cluster in the path." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. - To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 ./chip-tool any read-event-by-id 0x28 0 1 0 verify DUT is responsds with UNSUPPORTED_ACCESS for the data sent in the above command @@ -453,6 +452,8 @@ tests: [1653054249.515083][12265:12270] CHIP:DMG: SuppressResponse = true, [1653054249.515090][12265:12270] CHIP:DMG: InteractionModelRevision = 1 [1653054249.515102][12265:12270] CHIP:DMG: } + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -460,8 +461,6 @@ tests: Wildcard path where reading an event in the path requires a privilege that is not granted for the cluster in the path." verification: | - In case of chip tool, here is an example command to use - To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 @@ -473,6 +472,9 @@ tests: [1653054297.608292][12300:12305] CHIP:DMG: SuppressResponse = true, [1653054297.608306][12300:12305] CHIP:DMG: InteractionModelRevision = 1 [1653054297.608317][12300:12305] CHIP:DMG: } + + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -482,8 +484,6 @@ tests: EventMin field set to a number less than what was received in the previous step." verification: | - here is the example command you can use - sudo ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF @@ -556,8 +556,7 @@ tests: EventMin field set to a number much greater than what was received in the previous step." verification: | - In case of chip tool, here is an example command to use - + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool basic read-event start-up 1 0 --event-min 131073 On TH verify that the DUT sends Report Data Message with empty EventReports @@ -574,15 +573,78 @@ tests: event data. For every chunked data message received, DUT sends a status response." verification: | - tried in doorlock app, Sent wildcard read-event command from TH to DUT to verify this test-step, - On TH verify that The last chunked message should not receive any status response from the DUT. + Try to verify this step in doorlock app, below mentioned wildcard command to read-event from TH to DUT. ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF - The message flow I would expect here is: + The message flow can expect as mentioned below TH -> DUT ReadRequest DUT -> TH ReportData, not last chunk TH -> DUT StatusResponse Possibly repeat steps 2 & 3 a few times DUT -> TH ReportData, last chunk, SuppressResponse set to true TH -> DUT standalone ack + + On TH verify that The last chunked message should not receive any status response from the DUT + + [1656510389.524811][20396:20396] CHIP:DMG: Fetched 16 events + [1656510389.524838][20396:20396] CHIP:DMG: Sending report (payload has 973 bytes)... + [1656510389.524864][20396:20396] CHIP:DMG: IM RH moving to [AwaitingReportResponse] + + [1656510389.553113][20396:20396] CHIP:EM: Found matching exchange: 51910r, Delegate: 0xaaab0b90c330 + [1656510389.553190][20396:20396] CHIP:EM: Rxd Ack; Removing MessageCounter:206023646 from Retrans Table on exchange 51910r + [1656510389.553248][20396:20396] CHIP:EM: Removed CHIP MessageCounter:206023646 from RetransTable on exchange 51910r + [1656510389.553347][20396:20396] CHIP:DMG: StatusResponseMessage = + [1656510389.553413][20396:20396] CHIP:DMG: { + [1656510389.553472][20396:20396] CHIP:DMG: Status = 0x00 (SUCCESS), + [1656510389.553534][20396:20396] CHIP:DMG: InteractionModelRevision = 1 + [1656510389.553592][20396:20396] CHIP:DMG: } + [1656510389.553648][20396:20396] CHIP:IM: Received status response, status is 0x00 (SUCCESS) + [1656510389.553711][20396:20396] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1656510389.553770][20396:20396] CHIP:DMG: IM RH moving to [GeneratingReports] + [1656510389.553924][20396:20396] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1656510389.555237][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.555318][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.555503][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.555570][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.555749][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.555814][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.555990][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.556054][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.556221][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.556285][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.556456][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.556627][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.556808][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.556875][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.557055][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.557122][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.557300][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.557365][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.557538][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.557602][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.557777][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.557842][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.558015][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.558081][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.558288][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.558332][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.558515][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.558561][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.558677][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.558721][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.558836][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.558878][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.558964][20396:20396] CHIP:DMG: Fetched 16 events + [1656510389.559007][20396:20396] CHIP:DMG: Sending report (payload has 911 bytes)... + [1656510389.559061][20396:20396] CHIP:EM: Piggybacking Ack for MessageCounter:90464643 on exchange: 51910r + [1656510389.559228][20396:20396] CHIP:IN: Prepared secure message 0xaaab0b95c688 to 0x000000000001B669 (1) of type 0x5 and protocolId (0, 1) on exchange 51910r with MessageCounter:206023647. + [1656510389.559287][20396:20396] CHIP:IN: Sending encrypted msg 0xaaab0b95c688 with MessageCounter:206023647 to 0x000000000001B669 (1) at monotonic time: 0000000001ECA505 msec + [1656510389.559519][20396:20396] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1656510389.559563][20396:20396] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1656510389.559597][20396:20396] CHIP:DMG: IM RH moving to [AwaitingDestruction] + [1656510389.559639][20396:20396] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet + [1656510389.586362][20396:20396] CHIP:EM: Received message of type 0x10 with protocolId (0, 0) and MessageCounter:90464644 on exchange 51910r + [1656510389.586431][20396:20396] CHIP:EM: Found matching exchange: 51910r, Delegate: (nil) + [1656510389.586492][20396:20396] CHIP:EM: Rxd Ack; Removing MessageCounter:206023647 from Retrans Table on exchange 51910r + [1656510389.586535][20396:20396] CHIP:EM: Removed CHIP MessageCounter:206023647 from RetransTable on exchange 51910r disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml index e1b9e4470d4853..66eb73a15f99de 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml @@ -29,7 +29,11 @@ tests: specific node that is, [Node = Specific, Endpoint = Specific, Cluster = Specific, Event = Specific]." verification: | - chip tool is used as TH and send the below command from TH + The cluster used in the below command is an example, User can use any supported chip cluster on DUT. + + Pls run this test in chip tool interactive mode ./chip-tool interactive start + + On the TH (chip-tool) pls subscribe to start-up event (below command), right after you power on the DUT. If DUT vendor is subscribing to any other event, Pls use appropriate steps on the DUT to generate that event and use subscribe to that event from TH. basic subscribe-event start-up 20 100 1 0 @@ -85,6 +89,7 @@ tests: = Specific, Event = Wildcard]." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Pls run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event-by-id 0xFFFFFFFF 10 100 1 0 @@ -141,7 +146,7 @@ tests: Event = Wildcard]." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. - + Please run this test in chip tool interactive mode ./chip-tool interactive start any subscribe-event-by-id 0xFFFFFFFF 0xFFFFFFFF 20 100 1 0 On TH verify that the Report Data Message with SubscriptionId which uniquely identifies this subscription on the publisher and data for events in Subscribe Request Message from DUT @@ -248,6 +253,7 @@ tests: Specific, Event = Specific]." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event-by-id 0x00 10 700 1 0xFFFF On TH verify that the Report Data Message with SubscriptionId which uniquely identifies this subscription on the publisher and data for events in Subscribe Request Message from DUT @@ -300,6 +306,7 @@ tests: Event = Wildcard]." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event-by-id 0xFFFFFFFF 10 100 1 0xFFFF On TH verify that the Report Data Message with SubscriptionId which uniquely identifies this subscription on the publisher and data for events in Subscribe Request Message from DUT @@ -353,6 +360,8 @@ tests: is, [Node = Specific, Endpoint = Wildcard, Cluster = Wildcard, Event = Wildcard]." verification: | + Please run this test in chip tool interactive mode ./chip-tool interactive start + any subscribe-event-by-id 0xFFFFFFFF 0xFFFFFFFF 100 1000 1 0xFFFF On TH verify that the Report Data Message with SubscriptionId which uniquely identifies this subscription on the publisher and data for events in Subscribe Request Message from DUT [1657456221.167627][11635:11640] CHIP:DMG: ReportDataMessage = @@ -571,7 +580,7 @@ tests: is, [Node = Specific, Endpoint = Wildcard, Cluster = Wildcard, Event = Wildcard]." verification: | - Repeat the above Test step + test step repeated, needs to be removed from test plan, https://github.com/CHIP-Specifications/chip-test-plans/issues/1888 disabled: true - label: @@ -579,6 +588,7 @@ tests: event on the DUT before minimum interval." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event-by-id 0x000 100 1000 1 0 @@ -633,6 +643,7 @@ tests: SubscribeRequestMessage." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event start-up 30 100 1 0 --is-urgent true @@ -683,10 +694,10 @@ tests: triggering attribute values before maximum interval." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event start-up 20 100 1 0 - On TH verify that the Report Data Message from DUT to TH [1656586853.121700][3433:3438] CHIP:EM: Removed CHIP MessageCounter:63910370 from RetransTable on exchange 37869i @@ -736,6 +747,7 @@ tests: Subscribe Request Message to DUT with KeepSubscriptions as False." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event-by-id 0x000 10 500 1 0 @@ -830,6 +842,7 @@ tests: code." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event-by-id 0x000 20 400 1 0 @@ -850,14 +863,14 @@ tests: Status." verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. - This test is not testable. + https://github.com/CHIP-Specifications/chip-test-plans/issues/1885 disabled: true - label: "TH sends Subscribe Request Message to DUT with EventRequests set to path which indicates a cluster event that is not supported." verification: | - Out of Scope for V1.0 + Mark this as not testable /NA. Out of Scope for V1.0 disabled: true - label: @@ -866,10 +879,14 @@ tests: the path." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start - To Setup the TH such that there is no accessing fabric, 1st we need to send the below mentioned ACL command - accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 + basic subscribe-event-by-id 0x000 100 1000 1 0 In TH log verify DUT responds with UNSUPPORTED_ACCESS for the data sent in the above command @@ -905,6 +922,9 @@ tests: [1653479886.551532][22629:22634] CHIP:DMG: InteractionModelRevision = 1 [1653479886.551538][22629:22634] CHIP:DMG: } [1653479886.551583][22629:22634] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -914,13 +934,15 @@ tests: verification: | chip tool is used as TH and send the below command from TH + Please run this test in chip tool interactive mode ./chip-tool interactive start + To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 - any subscribe-event-by-id 0xFFFFFFFF 0xFFFFFFFF 100 1000 1 0xFFFF + any subscribe-event-by-id 0xFFFFFFFF 0xFFFFFFFF 100 1000 1 0xFFFF - verify DUT is responsds with Report Data Message with no entry for that event in EventReports list. for the data sent in the above command + verify DUT is responds with Report Data Message with no entry for that event in the EventReports list. for the data sent in the above command [1653480007.965861][22654:22659] CHIP:DMG: ReportDataMessage = [1653480007.965882][22654:22659] CHIP:DMG: { @@ -928,6 +950,8 @@ tests: [1653480007.965916][22654:22659] CHIP:DMG: InteractionModelRevision = 1 [1653480007.965929][22654:22659] CHIP:DMG: } [1653480007.965969][22654:22659] CHIP:DMG: MoveToState ReadClient[0x7efe84002fd0]: Moving to [AwaitingSu] + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -937,10 +961,15 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + + Please run this test in chip tool interactive mode ./chip-tool interactive start + accesscontrol subscribe-event access-control-entry-changed 5 10 1 0 + + On TH, verify that the Report Data Message with EventReports for event numbers higher than the EventMin field and Verify that the subsequent ReportData actions as part of the subscription include the latest EventNo associated with each node generating new events - accesscontrol subscribe-event access-control-entry-changed 5 10 1 0 + [1655979825.174136][4566:4571] CHIP:DMG: ReportDataMessage = [1655979825.174177][4566:4571] CHIP:DMG: { [1655979825.174213][4566:4571] CHIP:DMG: SubscriptionId = 0xd263227e, @@ -1006,8 +1035,7 @@ tests: [1655979825.177433][4566:4571] CHIP:DMG: MoveToState ReadClient[0xffff84006d40]: Moving to [AwaitingSu] - - sudo ./chip-tool accesscontrol subscribe-event access-control-entry-changed 5 10 1 0 --event-min 0 + accesscontrol subscribe-event access-control-entry-changed 5 10 1 0 --event-min 0 [1655979915.863156][4607:4612] CHIP:DMG: ReportDataMessage = [1655979915.863196][4607:4612] CHIP:DMG: { [1655979915.863232][4607:4612] CHIP:DMG: SubscriptionId = 0xeb39dedd, @@ -1144,6 +1172,9 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + + Please run this test in chip tool interactive mode ./chip-tool interactive start + basic subscribe-event-by-id 0x000 100 1000 1 0 --event-min 1 @@ -1164,145 +1195,127 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. - Provision DUT and TH. - - To generate the software fault event, execute the following - 1. Get the PID of the DUT & KIll it . - ps -aef|grep all-clusters-app - sudo kill -SIGUSR1 - - - On TH, Verify that each event record is assigned a number that is exactly 1 greater than the last created event record on that Node. by sending the below command - softwarediagnostics subscribe-event software-fault 1 0 - [1656509949.252105][1593:1598] CHIP:DMG: InteractionModelRevision = 1 - [1656509949.252131][1593:1598] CHIP:DMG: } - [1656509949.252482][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.252514][1593:1598] CHIP:TOO: Event number: 7 - [1656509949.252540][1593:1598] CHIP:TOO: Priority: Info - [1656509949.252564][1593:1598] CHIP:TOO: Timestamp: 1667389 - [1656509949.252673][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.252726][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.252755][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.252785][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33343A353220323032320A - [1656509949.252812][1593:1598] CHIP:TOO: } - [1656509949.252919][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.252946][1593:1598] CHIP:TOO: Event number: 8 - [1656509949.252970][1593:1598] CHIP:TOO: Priority: Info - [1656509949.252994][1593:1598] CHIP:TOO: Timestamp: 1668865 - [1656509949.253028][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.253054][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.253079][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.253106][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33343A353420323032320A - [1656509949.253131][1593:1598] CHIP:TOO: } - [1656509949.253235][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.253262][1593:1598] CHIP:TOO: Event number: 9 - [1656509949.253286][1593:1598] CHIP:TOO: Priority: Info - [1656509949.253310][1593:1598] CHIP:TOO: Timestamp: 1671097 - [1656509949.253343][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.253370][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.253394][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.253420][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33343A353620323032320A - [1656509949.253445][1593:1598] CHIP:TOO: } - [1656509949.253552][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.253578][1593:1598] CHIP:TOO: Event number: 10 - [1656509949.253602][1593:1598] CHIP:TOO: Priority: Info - [1656509949.253626][1593:1598] CHIP:TOO: Timestamp: 1899745 - [1656509949.253658][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.253685][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.253708][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.253734][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A343520323032320A - [1656509949.253755][1593:1598] CHIP:TOO: } - [1656509949.253856][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.253883][1593:1598] CHIP:TOO: Event number: 11 - [1656509949.253904][1593:1598] CHIP:TOO: Priority: Info - [1656509949.253924][1593:1598] CHIP:TOO: Timestamp: 1901573 - [1656509949.253954][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.253977][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.253997][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.254020][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A343620323032320A - [1656509949.254042][1593:1598] CHIP:TOO: } - [1656509949.254132][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.254155][1593:1598] CHIP:TOO: Event number: 12 - [1656509949.254176][1593:1598] CHIP:TOO: Priority: Info - [1656509949.254196][1593:1598] CHIP:TOO: Timestamp: 1903174 - [1656509949.254225][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.254247][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.254268][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.254291][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A343820323032320A - [1656509949.254313][1593:1598] CHIP:TOO: } - [1656509949.254403][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.254426][1593:1598] CHIP:TOO: Event number: 13 - [1656509949.254447][1593:1598] CHIP:TOO: Priority: Info - [1656509949.254468][1593:1598] CHIP:TOO: Timestamp: 1904273 - [1656509949.254496][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.254519][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.254540][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.254563][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A343920323032320A - [1656509949.254584][1593:1598] CHIP:TOO: } - [1656509949.254674][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.254697][1593:1598] CHIP:TOO: Event number: 14 - [1656509949.254718][1593:1598] CHIP:TOO: Priority: Info - [1656509949.254739][1593:1598] CHIP:TOO: Timestamp: 1905286 - [1656509949.254766][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.254789][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.254810][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.254833][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353020323032320A - [1656509949.254854][1593:1598] CHIP:TOO: } - [1656509949.254945][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.254967][1593:1598] CHIP:TOO: Event number: 15 - [1656509949.254988][1593:1598] CHIP:TOO: Priority: Info - [1656509949.255008][1593:1598] CHIP:TOO: Timestamp: 1907173 - [1656509949.255036][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.255059][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.255080][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.255103][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353220323032320A - [1656509949.255125][1593:1598] CHIP:TOO: } - [1656509949.255214][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.255236][1593:1598] CHIP:TOO: Event number: 16 - [1656509949.255257][1593:1598] CHIP:TOO: Priority: Info - [1656509949.255277][1593:1598] CHIP:TOO: Timestamp: 1908021 - [1656509949.255305][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.255328][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.255349][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.255372][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353320323032320A - [1656509949.255393][1593:1598] CHIP:TOO: } - [1656509949.255484][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.255506][1593:1598] CHIP:TOO: Event number: 17 - [1656509949.255527][1593:1598] CHIP:TOO: Priority: Info - [1656509949.255548][1593:1598] CHIP:TOO: Timestamp: 1908798 - [1656509949.255575][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.255598][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.255618][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.255641][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353420323032320A - [1656509949.255663][1593:1598] CHIP:TOO: } - [1656509949.255752][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.255774][1593:1598] CHIP:TOO: Event number: 18 - [1656509949.255796][1593:1598] CHIP:TOO: Priority: Info - [1656509949.255816][1593:1598] CHIP:TOO: Timestamp: 1909478 - [1656509949.255844][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.255866][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.255887][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.255910][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353420323032320A - [1656509949.255931][1593:1598] CHIP:TOO: } - [1656509949.256022][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.256044][1593:1598] CHIP:TOO: Event number: 19 - [1656509949.256065][1593:1598] CHIP:TOO: Priority: Info - [1656509949.256086][1593:1598] CHIP:TOO: Timestamp: 1910178 - [1656509949.256114][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.256136][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.256157][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.256193][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353520323032320A - [1656509949.256216][1593:1598] CHIP:TOO: } - [1656509949.256306][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.256328][1593:1598] CHIP:TOO: Event number: 20 - [1656509949.256349][1593:1598] CHIP:TOO: Priority: Info - [1656509949.256370][1593:1598] CHIP:TOO: Timestamp: 1911229 - [1656509949.256398][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.256420][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.256442][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.256464][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353620323032320A - [1656509949.256486][1593:1598] CHIP:TOO: } - [1656509949.256679][1593:1598] CHIP:DMG: MoveToState ReadClient[0xffff74004470]: Moving to [AwaitingSu] + Please run this test in chip tool interactive mode ./chip-tool interactive start + + accesscontrol subscribe-event access-control-entry-changed 20 500 1 0 + On TH verify that each event number + [1658405014.975407][4236:4241] CHIP:DMG: } + [1658405014.975582][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405014.975608][4236:4241] CHIP:TOO: Event number: 2 + [1658405014.975632][4236:4241] CHIP:TOO: Priority: Info + [1658405014.975656][4236:4241] CHIP:TOO: Timestamp: 24429982 + [1658405014.975774][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405014.975802][4236:4241] CHIP:TOO: AdminNodeID: null + [1658405014.975837][4236:4241] CHIP:TOO: AdminPasscodeID: 0 + [1658405014.975864][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405014.975889][4236:4241] CHIP:TOO: LatestValue: { + [1658405014.975913][4236:4241] CHIP:TOO: Privilege: 5 + [1658405014.975938][4236:4241] CHIP:TOO: AuthMode: 2 + [1658405014.975968][4236:4241] CHIP:TOO: Subjects: 1 entries + [1658405014.975999][4236:4241] CHIP:TOO: [1]: 112233 + [1658405014.976027][4236:4241] CHIP:TOO: Targets: null + [1658405014.976052][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405014.976075][4236:4241] CHIP:TOO: } + [1658405014.976100][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405014.976124][4236:4241] CHIP:TOO: } + [1658405014.976188][4236:4241] CHIP:DMG: MoveToState ReadClient[0xffffa4008e30]: Moving to [AwaitingSu] + + By sending the command mentioned below, change attribute values on DUT to create events multiple times. + + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]' 1 0 + + On TH Verify that each event record is assigned a number that is exactly 1 greater than the last created event record on that Node. + + [1658405515.109232][4236:4241] CHIP:DMG: } + [1658405515.109475][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.109503][4236:4241] CHIP:TOO: Event number: 3 + [1658405515.109529][4236:4241] CHIP:TOO: Priority: Info + [1658405515.109555][4236:4241] CHIP:TOO: Timestamp: 24557931 + [1658405515.109621][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.109654][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.109682][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.109710][4236:4241] CHIP:TOO: ChangeType: 2 + [1658405515.109736][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.109762][4236:4241] CHIP:TOO: Privilege: 5 + [1658405515.109788][4236:4241] CHIP:TOO: AuthMode: 2 + [1658405515.109819][4236:4241] CHIP:TOO: Subjects: 1 entries + [1658405515.109852][4236:4241] CHIP:TOO: [1]: 112233 + [1658405515.109881][4236:4241] CHIP:TOO: Targets: null + [1658405515.109907][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.109933][4236:4241] CHIP:TOO: } + [1658405515.109960][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.109985][4236:4241] CHIP:TOO: } + [1658405515.110118][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.110146][4236:4241] CHIP:TOO: Event number: 4 + [1658405515.110171][4236:4241] CHIP:TOO: Priority: Info + [1658405515.110196][4236:4241] CHIP:TOO: Timestamp: 24557933 + [1658405515.110240][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.110269][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.110296][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.110322][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405515.110348][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.110373][4236:4241] CHIP:TOO: Privilege: 5 + [1658405515.110399][4236:4241] CHIP:TOO: AuthMode: 2 + [1658405515.110427][4236:4241] CHIP:TOO: Subjects: 1 entries + [1658405515.110457][4236:4241] CHIP:TOO: [1]: 112233 + [1658405515.110485][4236:4241] CHIP:TOO: Targets: null + [1658405515.110511][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.110536][4236:4241] CHIP:TOO: } + [1658405515.110562][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.110587][4236:4241] CHIP:TOO: } + [1658405515.110735][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.110762][4236:4241] CHIP:TOO: Event number: 5 + [1658405515.110788][4236:4241] CHIP:TOO: Priority: Info + [1658405515.110813][4236:4241] CHIP:TOO: Timestamp: 24557935 + [1658405515.110861][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.110890][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.110917][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.110943][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405515.110969][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.110994][4236:4241] CHIP:TOO: Privilege: 1 + [1658405515.111020][4236:4241] CHIP:TOO: AuthMode: 3 + [1658405515.111050][4236:4241] CHIP:TOO: Subjects: 4 entries + [1658405515.111080][4236:4241] CHIP:TOO: [1]: 111 + [1658405515.111109][4236:4241] CHIP:TOO: [2]: 222 + [1658405515.111137][4236:4241] CHIP:TOO: [3]: 333 + [1658405515.111166][4236:4241] CHIP:TOO: [4]: 444 + [1658405515.111198][4236:4241] CHIP:TOO: Targets: 1 entries + [1658405515.111240][4236:4241] CHIP:TOO: [1]: { + [1658405515.111268][4236:4241] CHIP:TOO: Cluster: 11 + [1658405515.111296][4236:4241] CHIP:TOO: Endpoint: 22 + [1658405515.111322][4236:4241] CHIP:TOO: DeviceType: null + [1658405515.111348][4236:4241] CHIP:TOO: } + [1658405515.111376][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.111402][4236:4241] CHIP:TOO: } + [1658405515.111428][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.111453][4236:4241] CHIP:TOO: } + [1658405515.111600][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.111628][4236:4241] CHIP:TOO: Event number: 6 + [1658405515.111653][4236:4241] CHIP:TOO: Priority: Info + [1658405515.111678][4236:4241] CHIP:TOO: Timestamp: 24557937 + [1658405515.111726][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.111755][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.111781][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.111807][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405515.111833][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.111859][4236:4241] CHIP:TOO: Privilege: 3 + [1658405515.111884][4236:4241] CHIP:TOO: AuthMode: 3 + [1658405515.111914][4236:4241] CHIP:TOO: Subjects: 4 entries + [1658405515.111944][4236:4241] CHIP:TOO: [1]: 555 + [1658405515.111973][4236:4241] CHIP:TOO: [2]: 666 + [1658405515.112002][4236:4241] CHIP:TOO: [3]: 777 + [1658405515.112030][4236:4241] CHIP:TOO: [4]: 888 + [1658405515.112063][4236:4241] CHIP:TOO: Targets: 1 entries + [1658405515.112097][4236:4241] CHIP:TOO: [1]: { + [1658405515.112125][4236:4241] CHIP:TOO: Cluster: 55 + [1658405515.112151][4236:4241] CHIP:TOO: Endpoint: 66 + [1658405515.112177][4236:4241] CHIP:TOO: DeviceType: null + [1658405515.112203][4236:4241] CHIP:TOO: } + [1658405515.112231][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.112257][4236:4241] CHIP:TOO: } + [1658405515.112283][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.112308][4236:4241] CHIP:TOO: } + [1658405515.112462][4236:4241] CHIP:DMG: Refresh LivenessCheckTime for 525000 milliseconds with SubscriptionId = 0x0a5a629c Peer = 01:0000000000000001 disabled: true - label: @@ -1311,5 +1324,131 @@ tests: reset on DUT, re-subscribe to events and continue to change attribute values on DUT to create events multiple times." verification: | - https://github.com/CHIP-Specifications/chip-test-plans/issues/1700 + The cluster used in the below command is an example, User can use any supported chip cluster. + + Please run this test in chip tool interactive mode ./chip-tool interactive start + + On Raspi platform the event is triggered with this command, Pls use equivalent command on the respective DUT + + accesscontrol subscribe-event access-control-entry-changed 20 500 1 0 + On TH verify that each event number + [1658405014.975407][4236:4241] CHIP:DMG: } + [1658405014.975582][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405014.975608][4236:4241] CHIP:TOO: Event number: 2 + [1658405014.975632][4236:4241] CHIP:TOO: Priority: Info + [1658405014.975656][4236:4241] CHIP:TOO: Timestamp: 24429982 + [1658405014.975774][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405014.975802][4236:4241] CHIP:TOO: AdminNodeID: null + [1658405014.975837][4236:4241] CHIP:TOO: AdminPasscodeID: 0 + [1658405014.975864][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405014.975889][4236:4241] CHIP:TOO: LatestValue: { + [1658405014.975913][4236:4241] CHIP:TOO: Privilege: 5 + [1658405014.975938][4236:4241] CHIP:TOO: AuthMode: 2 + [1658405014.975968][4236:4241] CHIP:TOO: Subjects: 1 entries + [1658405014.975999][4236:4241] CHIP:TOO: [1]: 112233 + [1658405014.976027][4236:4241] CHIP:TOO: Targets: null + [1658405014.976052][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405014.976075][4236:4241] CHIP:TOO: } + [1658405014.976100][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405014.976124][4236:4241] CHIP:TOO: } + [1658405014.976188][4236:4241] CHIP:DMG: MoveToState ReadClient[0xffffa4008e30]: Moving to [AwaitingSu] + + By sending the command mentioned below, change attribute values on DUT to create events multiple times. + + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]' 1 0 + + On TH Verify that each event record is assigned a number that is exactly 1 greater than the last created event record on that Node. + + [1658405515.109232][4236:4241] CHIP:DMG: } + [1658405515.109475][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.109503][4236:4241] CHIP:TOO: Event number: 3 + [1658405515.109529][4236:4241] CHIP:TOO: Priority: Info + [1658405515.109555][4236:4241] CHIP:TOO: Timestamp: 24557931 + [1658405515.109621][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.109654][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.109682][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.109710][4236:4241] CHIP:TOO: ChangeType: 2 + [1658405515.109736][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.109762][4236:4241] CHIP:TOO: Privilege: 5 + [1658405515.109788][4236:4241] CHIP:TOO: AuthMode: 2 + [1658405515.109819][4236:4241] CHIP:TOO: Subjects: 1 entries + [1658405515.109852][4236:4241] CHIP:TOO: [1]: 112233 + [1658405515.109881][4236:4241] CHIP:TOO: Targets: null + [1658405515.109907][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.109933][4236:4241] CHIP:TOO: } + [1658405515.109960][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.109985][4236:4241] CHIP:TOO: } + [1658405515.110118][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.110146][4236:4241] CHIP:TOO: Event number: 4 + [1658405515.110171][4236:4241] CHIP:TOO: Priority: Info + [1658405515.110196][4236:4241] CHIP:TOO: Timestamp: 24557933 + [1658405515.110240][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.110269][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.110296][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.110322][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405515.110348][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.110373][4236:4241] CHIP:TOO: Privilege: 5 + [1658405515.110399][4236:4241] CHIP:TOO: AuthMode: 2 + [1658405515.110427][4236:4241] CHIP:TOO: Subjects: 1 entries + [1658405515.110457][4236:4241] CHIP:TOO: [1]: 112233 + [1658405515.110485][4236:4241] CHIP:TOO: Targets: null + [1658405515.110511][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.110536][4236:4241] CHIP:TOO: } + [1658405515.110562][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.110587][4236:4241] CHIP:TOO: } + [1658405515.110735][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.110762][4236:4241] CHIP:TOO: Event number: 5 + [1658405515.110788][4236:4241] CHIP:TOO: Priority: Info + [1658405515.110813][4236:4241] CHIP:TOO: Timestamp: 24557935 + [1658405515.110861][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.110890][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.110917][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.110943][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405515.110969][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.110994][4236:4241] CHIP:TOO: Privilege: 1 + [1658405515.111020][4236:4241] CHIP:TOO: AuthMode: 3 + [1658405515.111050][4236:4241] CHIP:TOO: Subjects: 4 entries + [1658405515.111080][4236:4241] CHIP:TOO: [1]: 111 + [1658405515.111109][4236:4241] CHIP:TOO: [2]: 222 + [1658405515.111137][4236:4241] CHIP:TOO: [3]: 333 + [1658405515.111166][4236:4241] CHIP:TOO: [4]: 444 + [1658405515.111198][4236:4241] CHIP:TOO: Targets: 1 entries + [1658405515.111240][4236:4241] CHIP:TOO: [1]: { + [1658405515.111268][4236:4241] CHIP:TOO: Cluster: 11 + [1658405515.111296][4236:4241] CHIP:TOO: Endpoint: 22 + [1658405515.111322][4236:4241] CHIP:TOO: DeviceType: null + [1658405515.111348][4236:4241] CHIP:TOO: } + [1658405515.111376][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.111402][4236:4241] CHIP:TOO: } + [1658405515.111428][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.111453][4236:4241] CHIP:TOO: } + [1658405515.111600][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.111628][4236:4241] CHIP:TOO: Event number: 6 + [1658405515.111653][4236:4241] CHIP:TOO: Priority: Info + [1658405515.111678][4236:4241] CHIP:TOO: Timestamp: 24557937 + [1658405515.111726][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.111755][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.111781][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.111807][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405515.111833][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.111859][4236:4241] CHIP:TOO: Privilege: 3 + [1658405515.111884][4236:4241] CHIP:TOO: AuthMode: 3 + [1658405515.111914][4236:4241] CHIP:TOO: Subjects: 4 entries + [1658405515.111944][4236:4241] CHIP:TOO: [1]: 555 + [1658405515.111973][4236:4241] CHIP:TOO: [2]: 666 + [1658405515.112002][4236:4241] CHIP:TOO: [3]: 777 + [1658405515.112030][4236:4241] CHIP:TOO: [4]: 888 + [1658405515.112063][4236:4241] CHIP:TOO: Targets: 1 entries + [1658405515.112097][4236:4241] CHIP:TOO: [1]: { + [1658405515.112125][4236:4241] CHIP:TOO: Cluster: 55 + [1658405515.112151][4236:4241] CHIP:TOO: Endpoint: 66 + [1658405515.112177][4236:4241] CHIP:TOO: DeviceType: null + [1658405515.112203][4236:4241] CHIP:TOO: } + [1658405515.112231][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.112257][4236:4241] CHIP:TOO: } + [1658405515.112283][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.112308][4236:4241] CHIP:TOO: } + [1658405515.112462][4236:4241] CHIP:DMG: Refresh LivenessCheckTime for 525000 milliseconds with SubscriptionId = 0x0a5a629c Peer = 01:0000000000000001 + + After this test step you need to factory reset the DUT and reprovision the DUT again, and re-subscribe the events to continue to change attribute values on DUT to create events multiple times disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml index 1ce970e0ad4f63..44bb587c90dc6e 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml @@ -25,9 +25,12 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + + Please run this test in chip tool interactive mode ./chip-tool interactive start + sudo ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF - On TH verify that Read Request Message received has these fields EventRequests, EventFilters, and FabricFiltered. + On TH(Reference app) verify that Read Request Message received has these fields EventRequests, EventFilters, and FabricFiltered. diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml index 1ba94a0351a97c..b9e12087952bcf 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml @@ -27,6 +27,9 @@ tests: "DUT sends Subscribe Request Message to the TH for a supported event." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + + Please run this test in chip tool interactive mode ./chip-tool interactive start + basic subscribe-event start-up 10 100 1 0 On TH (On the reference app), On reference app verify that the subscription message received has the all fields which mentioned in expected outcome @@ -57,6 +60,49 @@ tests: [1657455555.195593][11525:11525] CHIP:DMG: Final negotiated min/max parameters: Min = 10s, Max = 100s [1657455555.195766][11525:11525] CHIP:DMG: IM RH moving to [GeneratingReports] [1657455555.195955][11525:11525] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + + On DUT as a client side, verify that TH all-clusters-app sent ReportDataMessage + + [1657886501.456822][3430:3435] CHIP:DMG: ReportDataMessage = + [1657886501.456851][3430:3435] CHIP:DMG: { + [1657886501.456886][3430:3435] CHIP:DMG: SubscriptionId = 0xb746e9ed, + [1657886501.456911][3430:3435] CHIP:DMG: EventReportIBs = + [1657886501.456944][3430:3435] CHIP:DMG: [ + [1657886501.456979][3430:3435] CHIP:DMG: EventReportIB = + [1657886501.457015][3430:3435] CHIP:DMG: { + [1657886501.457049][3430:3435] CHIP:DMG: EventDataIB = + [1657886501.457091][3430:3435] CHIP:DMG: { + [1657886501.457118][3430:3435] CHIP:DMG: EventPath = + [1657886501.457162][3430:3435] CHIP:DMG: { + [1657886501.457199][3430:3435] CHIP:DMG: Endpoint = 0x0, + [1657886501.457245][3430:3435] CHIP:DMG: Cluster = 0x28, + [1657886501.457288][3430:3435] CHIP:DMG: Event = 0x0, + [1657886501.457329][3430:3435] CHIP:DMG: }, + [1657886501.457365][3430:3435] CHIP:DMG: + [1657886501.457404][3430:3435] CHIP:DMG: EventNumber = 0x0, + [1657886501.457437][3430:3435] CHIP:DMG: PriorityLevel = 0x2, + [1657886501.457479][3430:3435] CHIP:DMG: SystemTimestamp = 0xa1de6f, + [1657886501.457519][3430:3435] CHIP:DMG: EventData = + [1657886501.457584][3430:3435] CHIP:DMG: { + [1657886501.457632][3430:3435] CHIP:DMG: 0x0 = 1, + [1657886501.457666][3430:3435] CHIP:DMG: }, + [1657886501.457696][3430:3435] CHIP:DMG: }, + [1657886501.457738][3430:3435] CHIP:DMG: + [1657886501.457766][3430:3435] CHIP:DMG: }, + [1657886501.457806][3430:3435] CHIP:DMG: + [1657886501.457830][3430:3435] CHIP:DMG: ], + [1657886501.457873][3430:3435] CHIP:DMG: + [1657886501.457897][3430:3435] CHIP:DMG: InteractionModelRevision = 1 + [1657886501.457929][3430:3435] CHIP:DMG: } + [1657886501.458091][3430:3435] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Event 0x0000_0000 + [1657886501.458116][3430:3435] CHIP:TOO: Event number: 0 + [1657886501.458139][3430:3435] CHIP:TOO: Priority: Critical + [1657886501.458160][3430:3435] CHIP:TOO: Timestamp: 10608239 + [1657886501.458237][3430:3435] CHIP:TOO: StartUp: { + [1657886501.458284][3430:3435] CHIP:TOO: SoftwareVersion: 1 + [1657886501.458309][3430:3435] CHIP:TOO: } + [1657886501.458358][3430:3435] CHIP:DMG: MoveToState ReadClient[0xffff6c0091f0]: Moving to [AwaitingSu] + [1657886501.458420][3430:3435] CHIP:EM: Piggybacking Ack for MessageCounter:245754654 on exchange: 20326i disabled: true - label: @@ -65,6 +111,8 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start + basic subscribe-event-by-id 0x000 20 400 1 0 Verify DUT is responsds with status response for the data sent in the above command On TH (On the reference app) @@ -77,6 +125,32 @@ tests: [1657455691.695574][11525:11525] CHIP:DMG: } [1657455691.695600][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) [1657455691.695643][11525:11525] CHIP:DMG: Refresh Subscribe Sync Timer with max 400 seconds + + On DUT as a client side, verify that TH all-clusters-app sent ReportDataMessage + + [1657886532.588762][3430:3435] CHIP:DMG: } + [1657886532.588882][3430:3435] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Event 0x0000_0000 + [1657886532.588908][3430:3435] CHIP:TOO: Event number: 0 + [1657886532.588930][3430:3435] CHIP:TOO: Priority: Critical + [1657886532.588952][3430:3435] CHIP:TOO: Timestamp: 10608239 + [1657886532.588986][3430:3435] CHIP:TOO: StartUp: { + [1657886532.589013][3430:3435] CHIP:TOO: SoftwareVersion: 1 + [1657886532.589036][3430:3435] CHIP:TOO: } + [1657886532.589085][3430:3435] CHIP:DMG: MoveToState ReadClient[0xffff6c0092e0]: Moving to [AwaitingSu] + [1657886532.589143][3430:3435] CHIP:EM: Piggybacking Ack for MessageCounter:245754656 on exchange: 20327i + [1657886532.589207][3430:3435] CHIP:IN: Prepared secure message 0xaaab13395548 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 20327i with MessageCounter:216322285. + [1657886532.589245][3430:3435] CHIP:IN: Sending encrypted msg 0xaaab13395548 with MessageCounter:216322285 to 0x0000000000000001 (1) at monotonic time: 00000000008CF0C5 msec + [1657886532.590633][3430:3435] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:245754657 on exchange 20327i + [1657886532.590669][3430:3435] CHIP:EM: Found matching exchange: 20327i, Delegate: 0xffff6c0092e0 + [1657886532.590700][3430:3435] CHIP:EM: Rxd Ack; Removing MessageCounter:216322285 from Retrans Table on exchange 20327i + [1657886532.590726][3430:3435] CHIP:EM: Removed CHIP MessageCounter:216322285 from RetransTable on exchange 20327i + [1657886532.590772][3430:3435] CHIP:DMG: SubscribeResponseMessage = + [1657886532.590811][3430:3435] CHIP:DMG: { + [1657886532.590836][3430:3435] CHIP:DMG: SubscriptionId = 0x84d07a37, + [1657886532.590862][3430:3435] CHIP:DMG: MaxInterval = 0x190, + [1657886532.590887][3430:3435] CHIP:DMG: InteractionModelRevision = 1 + [1657886532.590910][3430:3435] CHIP:DMG: } + [1657886532.590935][3430:3435] CHIP:DMG: Subscription established with SubscriptionID = 0x84d07a37 MinInterval = 20s MaxInterval = 400s Peer = 01:0000000000000001 disabled: true - label: @@ -84,6 +158,7 @@ tests: with Report Data message to DUT." verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. + https://github.com/CHIP-Specifications/chip-test-plans/issues/1885 disabled: true - label: @@ -92,6 +167,7 @@ tests: not respond with Subscribe Response message to DUT." verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. + https://github.com/CHIP-Specifications/chip-test-plans/issues/1885 disabled: true - label: @@ -99,6 +175,7 @@ tests: Data message to DUT with an inactive SubscriptionId." verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. + https://github.com/CHIP-Specifications/chip-test-plans/issues/1885 disabled: true - label: @@ -107,4 +184,5 @@ tests: Data." verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. + https://github.com/CHIP-Specifications/chip-test-plans/issues/1885 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml index 5c8ffe96cbdcfa..df77dc9aa46c5e 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 @@ -29,6 +29,9 @@ tests: the attributes that have been subscribed or trigger an action on the DUT to generate an event." verification: | + Please run this test in chip tool interactive mode ./chip-tool interactive start + + Send 3 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT and verify all the subscription requests are succes, and change the value of all the attributes by sending write command, after sending write commanfd @@ -639,6 +642,8 @@ tests: contain 3 different paths. The subscription request from RD1 should contain 4 paths." verification: | + Please run this test in chip tool interactive mode ./chip-tool interactive start + Send 3 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT and verify all the subscription requests are succes. and in The subscription request from RD1 should contain 4 paths, Verify that the subscriptions from RD2, RD3, RD4 and RD5 are not affected. @@ -981,6 +986,8 @@ tests: Requests are activated, RD1 sends 6 subscription request messages with each of them having 3 different paths." verification: | + Please run this test in chip tool interactive mode ./chip-tool interactive start + Send 3 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT and verify all the subscription requests are succes. and in The subscription request from RD1 should contain 6 paths, Verify that the subscriptions from RD2, RD3, RD4 and @@ -988,9 +995,6 @@ tests: Example commands given below are using 3 reference device (User can use 5 reference device and send the below command in from each reference device) - on the first reference deice enter: - - on the first reference deice enter: levelcontrol subscribe min-level 10 100 1 1 @@ -1427,12 +1431,15 @@ tests: Subscription Requests are activated, send a Subscribe request messages having 3 different paths from RD1A to the DUT." verification: | + Please run this test in chip tool interactive mode ./chip-tool interactive start + Send 3 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT and verify all the subscription requests are succes, then send a Subscribe request messages having 3 different paths from RD1A to the DUT. Example commands given below are using 3 reference device (User can use 5 reference device and send the below command in from each reference device) + on the 1st reference deice enter: onoff subscribe start-up-on-off 10 100 1 1 [1657716965.736576][6034:6039] CHIP:EM: Removed CHIP MessageCounter:12313969 from RetransTable on exchange 50225i @@ -1608,237 +1615,6 @@ tests: [1657716911.281338][6034:6039] CHIP:DMG: { [1657716911.281408][6034:6039] CHIP:DMG: AttributeDataIB = [1657716911.281487][6034:6039] CHIP:DMG: { - on the first reference deice enter: - - levelcontrol subscribe min-level 10 100 1 1 - [1657717758.176398][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717758.176466][6034:6039] CHIP:DMG: { - [1657717758.176545][6034:6039] CHIP:DMG: SubscriptionId = 0xbf960b6c, - [1657717758.176619][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717758.176698][6034:6039] CHIP:DMG: [ - [1657717758.176750][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717758.176818][6034:6039] CHIP:DMG: { - [1657717758.176872][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717758.176959][6034:6039] CHIP:DMG: { - [1657717758.177034][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657717758.177136][6034:6039] CHIP:DMG: AttributePathIB = - [1657717758.177206][6034:6039] CHIP:DMG: { - [1657717758.177269][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717758.177377][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657717758.177429][6034:6039] CHIP:DMG: Attribute = 0x0000_0002, - [1657717758.177488][6034:6039] CHIP:DMG: } - [1657717758.177551][6034:6039] CHIP:DMG: - [1657717758.177600][6034:6039] CHIP:DMG: Data = 1, - [1657717758.177655][6034:6039] CHIP:DMG: }, - [1657717758.177716][6034:6039] CHIP:DMG: - [1657717758.177755][6034:6039] CHIP:DMG: }, - [1657717758.177813][6034:6039] CHIP:DMG: - [1657717758.177850][6034:6039] CHIP:DMG: ], - [1657717758.177896][6034:6039] CHIP:DMG: - [1657717758.177933][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717758.177969][6034:6039] CHIP:DMG: } - [1657717758.178105][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0002 DataVersion: 832499115 - [1657717758.178156][6034:6039] CHIP:TOO: min level: 1 - [1657717758.178215][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c004100]: Moving to [AwaitingSu] - - - - onoff subscribe global-scene-control 10 100 1 1 - [1657717721.303602][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717721.303670][6034:6039] CHIP:DMG: { - [1657717721.303730][6034:6039] CHIP:DMG: SubscriptionId = 0x2b768ffd, - [1657717721.303791][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717721.303867][6034:6039] CHIP:DMG: [ - [1657717721.303928][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717721.304007][6034:6039] CHIP:DMG: { - [1657717721.304071][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717721.304149][6034:6039] CHIP:DMG: { - [1657717721.304225][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657717721.304297][6034:6039] CHIP:DMG: AttributePathIB = - [1657717721.304372][6034:6039] CHIP:DMG: { - [1657717721.304454][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717721.304542][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657717721.304628][6034:6039] CHIP:DMG: Attribute = 0x0000_4000, - [1657717721.304711][6034:6039] CHIP:DMG: } - [1657717721.304797][6034:6039] CHIP:DMG: - [1657717721.304881][6034:6039] CHIP:DMG: Data = true, - [1657717721.304958][6034:6039] CHIP:DMG: }, - [1657717721.305039][6034:6039] CHIP:DMG: - [1657717721.305102][6034:6039] CHIP:DMG: }, - [1657717721.305178][6034:6039] CHIP:DMG: - [1657717721.305238][6034:6039] CHIP:DMG: ], - [1657717721.305348][6034:6039] CHIP:DMG: - [1657717721.305412][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717721.305470][6034:6039] CHIP:DMG: } - [1657717721.305679][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4000 DataVersion: 1934241157 - [1657717721.305761][6034:6039] CHIP:TOO: GlobalSceneControl: TRUE - [1657717721.305849][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - temperaturemeasurement subscribe tolerance 10 100 1 1 - [1657717893.368431][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717893.368514][6034:6039] CHIP:DMG: { - [1657717893.368562][6034:6039] CHIP:DMG: SubscriptionId = 0x87e778d7, - [1657717893.368649][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717893.368744][6034:6039] CHIP:DMG: [ - [1657717893.368837][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717893.368943][6034:6039] CHIP:DMG: { - [1657717893.369046][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717893.369138][6034:6039] CHIP:DMG: { - [1657717893.369231][6034:6039] CHIP:DMG: DataVersion = 0x8ca282b3, - [1657717893.369359][6034:6039] CHIP:DMG: AttributePathIB = - [1657717893.369461][6034:6039] CHIP:DMG: { - [1657717893.369563][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717893.369674][6034:6039] CHIP:DMG: Cluster = 0x402, - [1657717893.369786][6034:6039] CHIP:DMG: Attribute = 0x0000_0003, - [1657717893.369896][6034:6039] CHIP:DMG: } - [1657717893.370000][6034:6039] CHIP:DMG: - [1657717893.370094][6034:6039] CHIP:DMG: Data = 0, - [1657717893.370192][6034:6039] CHIP:DMG: }, - [1657717893.370284][6034:6039] CHIP:DMG: - [1657717893.370359][6034:6039] CHIP:DMG: }, - [1657717893.370439][6034:6039] CHIP:DMG: - [1657717893.370504][6034:6039] CHIP:DMG: ], - [1657717893.370575][6034:6039] CHIP:DMG: - [1657717893.370630][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717893.370699][6034:6039] CHIP:DMG: } - [1657717893.370819][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0402 Attribute 0x0000_0003 DataVersion: 2359460531 - [1657717893.370888][6034:6039] CHIP:TOO: Tolerance: 0 - [1657717893.370929][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - - - - any subscribe-by-id 0x0008 0x0010 10 100 1 1 - - [1657716563.242433][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716563.242475][6034:6039] CHIP:DMG: { - [1657716563.242507][6034:6039] CHIP:DMG: SubscriptionId = 0xebc26cc4, - [1657716563.242538][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716563.242577][6034:6039] CHIP:DMG: [ - [1657716563.242607][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716563.242648][6034:6039] CHIP:DMG: { - [1657716563.242680][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716563.242721][6034:6039] CHIP:DMG: { - [1657716563.242762][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716563.242801][6034:6039] CHIP:DMG: AttributePathIB = - [1657716563.242842][6034:6039] CHIP:DMG: { - [1657716563.242883][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716563.242928][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716563.242971][6034:6039] CHIP:DMG: Attribute = 0x0000_0010, - [1657716563.243012][6034:6039] CHIP:DMG: } - [1657716563.243056][6034:6039] CHIP:DMG: - [1657716563.243100][6034:6039] CHIP:DMG: Data = 1, - [1657716563.243138][6034:6039] CHIP:DMG: }, - [1657716563.243179][6034:6039] CHIP:DMG: - [1657716563.243213][6034:6039] CHIP:DMG: }, - [1657716563.243251][6034:6039] CHIP:DMG: - [1657716563.243280][6034:6039] CHIP:DMG: ], - [1657716563.243318][6034:6039] CHIP:DMG: - [1657716563.243348][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716563.243377][6034:6039] CHIP:DMG: } - [1657716563.243531][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 832499115 - [1657716563.243601][6034:6039] CHIP:TOO: on off transition time: 1 - [1657716563.243648][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008e30]: Moving to [AwaitingSu] - - - - basic subscribe node-label 10 100 1 0 - [1657716599.928585][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716599.928652][6034:6039] CHIP:DMG: { - [1657716599.928825][6034:6039] CHIP:DMG: SubscriptionId = 0x3d9f1c1, - [1657716599.928890][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716599.928968][6034:6039] CHIP:DMG: [ - [1657716599.929029][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716599.929122][6034:6039] CHIP:DMG: { - [1657716599.929192][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716599.929278][6034:6039] CHIP:DMG: { - [1657716599.929399][6034:6039] CHIP:DMG: DataVersion = 0x1b93dc36, - [1657716599.929476][6034:6039] CHIP:DMG: AttributePathIB = - [1657716599.929687][6034:6039] CHIP:DMG: { - [1657716599.929774][6034:6039] CHIP:DMG: Endpoint = 0x0, - [1657716599.929861][6034:6039] CHIP:DMG: Cluster = 0x28, - [1657716599.929949][6034:6039] CHIP:DMG: Attribute = 0x0000_0005, - [1657716599.930031][6034:6039] CHIP:DMG: } - [1657716599.930115][6034:6039] CHIP:DMG: - [1657716599.930285][6034:6039] CHIP:DMG: Data = "1", - [1657716599.930370][6034:6039] CHIP:DMG: }, - [1657716599.930454][6034:6039] CHIP:DMG: - [1657716599.930578][6034:6039] CHIP:DMG: }, - [1657716599.930660][6034:6039] CHIP:DMG: - [1657716599.930720][6034:6039] CHIP:DMG: ], - [1657716599.930796][6034:6039] CHIP:DMG: - [1657716599.930856][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716599.930914][6034:6039] CHIP:DMG: } - [1657716599.931131][6034:6039] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 462674998 - [1657716599.931326][6034:6039] CHIP:TOO: NodeLabel: 1 - [1657716599.931420][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] - - onoff subscribe on-time 10 100 1 1 - [1657716634.400468][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716634.400499][6034:6039] CHIP:DMG: { - [1657716634.400525][6034:6039] CHIP:DMG: SubscriptionId = 0xf9b815a2, - [1657716634.400551][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716634.400585][6034:6039] CHIP:DMG: [ - [1657716634.400610][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716634.400647][6034:6039] CHIP:DMG: { - [1657716634.400674][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716634.400705][6034:6039] CHIP:DMG: { - [1657716634.400739][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657716634.400775][6034:6039] CHIP:DMG: AttributePathIB = - [1657716634.400809][6034:6039] CHIP:DMG: { - [1657716634.400847][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716634.400883][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657716634.400920][6034:6039] CHIP:DMG: Attribute = 0x0000_4001, - [1657716634.400950][6034:6039] CHIP:DMG: } - [1657716634.400987][6034:6039] CHIP:DMG: - [1657716634.401024][6034:6039] CHIP:DMG: Data = 1, - [1657716634.401058][6034:6039] CHIP:DMG: }, - [1657716634.401092][6034:6039] CHIP:DMG: - [1657716634.401117][6034:6039] CHIP:DMG: }, - [1657716634.401148][6034:6039] CHIP:DMG: - [1657716634.401172][6034:6039] CHIP:DMG: ], - [1657716634.401202][6034:6039] CHIP:DMG: - [1657716634.401227][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716634.401250][6034:6039] CHIP:DMG: } - [1657716634.401383][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1934241157 - [1657716634.401428][6034:6039] CHIP:TOO: OnTime: 1 - [1657716634.401466][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008c70]: Moving to [AwaitingSu] - - - levelcontrol subscribe on-level 10 100 1 1 - [1657716667.237484][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716667.237515][6034:6039] CHIP:DMG: { - [1657716667.237541][6034:6039] CHIP:DMG: SubscriptionId = 0xe457240d, - [1657716667.237571][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716667.237738][6034:6039] CHIP:DMG: [ - [1657716667.237768][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716667.237819][6034:6039] CHIP:DMG: { - [1657716667.237850][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716667.237897][6034:6039] CHIP:DMG: { - [1657716667.237944][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716667.237993][6034:6039] CHIP:DMG: AttributePathIB = - [1657716667.238044][6034:6039] CHIP:DMG: { - [1657716667.238094][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716667.238145][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716667.238196][6034:6039] CHIP:DMG: Attribute = 0x0000_0011, - [1657716667.238244][6034:6039] CHIP:DMG: } - [1657716667.238294][6034:6039] CHIP:DMG: - [1657716667.238345][6034:6039] CHIP:DMG: Data = 1, - [1657716667.238391][6034:6039] CHIP:DMG: }, - [1657716667.238437][6034:6039] CHIP:DMG: - [1657716667.238467][6034:6039] CHIP:DMG: }, - [1657716667.238509][6034:6039] CHIP:DMG: - [1657716667.238535][6034:6039] CHIP:DMG: ], - [1657716667.238567][6034:6039] CHIP:DMG: - [1657716667.238591][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716667.238614][6034:6039] CHIP:DMG: } - [1657716667.238709][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 832499115 - [1657716667.238752][6034:6039] CHIP:TOO: on level: 1 - [1657716667.238790][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - [1657716911.281570][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, [1657716911.281649][6034:6039] CHIP:DMG: AttributePathIB = [1657716911.281723][6034:6039] CHIP:DMG: { @@ -1861,7 +1637,6 @@ tests: [1657716911.283172][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] - on the 3rd reference deice enter: levelcontrol subscribe min-level 10 100 1 1 @@ -1963,7 +1738,8 @@ tests: - After all above mentioned subscription are activated send below mentioned command in 1st reference device + After all above mentioned subscription are activated send below mentioned command in 4th reference device which is having same same fabric as 1st reference device + any subscribe-by-id 0x0008 0x0010 10 100 1 1 [1657716563.242433][6034:6039] CHIP:DMG: ReportDataMessage = @@ -2059,36 +1835,4 @@ tests: [1657716634.401383][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1934241157 [1657716634.401428][6034:6039] CHIP:TOO: OnTime: 1 [1657716634.401466][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008c70]: Moving to [AwaitingSu] - - - levelcontrol subscribe on-level 10 100 1 1 - [1657716667.237484][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716667.237515][6034:6039] CHIP:DMG: { - [1657716667.237541][6034:6039] CHIP:DMG: SubscriptionId = 0xe457240d, - [1657716667.237571][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716667.237738][6034:6039] CHIP:DMG: [ - [1657716667.237768][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716667.237819][6034:6039] CHIP:DMG: { - [1657716667.237850][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716667.237897][6034:6039] CHIP:DMG: { - [1657716667.237944][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716667.237993][6034:6039] CHIP:DMG: AttributePathIB = - [1657716667.238044][6034:6039] CHIP:DMG: { - [1657716667.238094][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716667.238145][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716667.238196][6034:6039] CHIP:DMG: Attribute = 0x0000_0011, - [1657716667.238244][6034:6039] CHIP:DMG: } - [1657716667.238294][6034:6039] CHIP:DMG: - [1657716667.238345][6034:6039] CHIP:DMG: Data = 1, - [1657716667.238391][6034:6039] CHIP:DMG: }, - [1657716667.238437][6034:6039] CHIP:DMG: - [1657716667.238467][6034:6039] CHIP:DMG: }, - [1657716667.238509][6034:6039] CHIP:DMG: - [1657716667.238535][6034:6039] CHIP:DMG: ], - [1657716667.238567][6034:6039] CHIP:DMG: - [1657716667.238591][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716667.238614][6034:6039] CHIP:DMG: } - [1657716667.238709][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 832499115 - [1657716667.238752][6034:6039] CHIP:TOO: on level: 1 - [1657716667.238790][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_8_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_8_1.yaml index 9e2fed69ccd143..47465af39f617e 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_8_1.yaml @@ -26,8 +26,11 @@ tests: attribute, which is a fabric scoped list, from the DUT. Fabric filtered should be set to false." verification: | - ./chip-tool accesscontrol read acl 1 0 --fabric-filtered 0 + On RC1 and RC2, Verify that the number of entries returned by the DUT for both the reads are same.By sending below commands + + ./chip-tool accesscontrol read acl 1 0 --fabric-filtered 0 + On RC1, verify that the number of entries [1657779742.905642][2620:2625] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 4140182590 [1657779742.905736][2620:2625] CHIP:TOO: ACL: 2 entries [1657779742.905794][2620:2625] CHIP:TOO: [1]: { @@ -50,7 +53,7 @@ tests: ./chip-tool accesscontrol read acl 2 0 --fabric-filtered 0 - + On RC2, verify that the number of entries [1657777306.528148][2474:2479] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3942609879 [1657777306.529101][2474:2479] CHIP:TOO: ACL: 2 entries [1657777306.529144][2474:2479] CHIP:TOO: [1]: { @@ -80,8 +83,10 @@ tests: fabric-filtered Read Request Message from each of RC1 and RC2 to read the fabric scoped list from the DUT." verification: | - ./chip-tool accesscontrol read acl 1 0 --commissioner-name beta + By sending the command mentioned below, change attribute values on DUT to create events multiple times.Send a fabric-filtered Read Request Message from each of RC1 and RC2 + ./chip-tool accesscontrol read acl 1 0 --commissioner-name beta + On RC1, verify that acl atrribute reading an entries from DUT [1657781757.866389][2878:2883] CHIP:DMG: } [1657781757.866649][2878:2883] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 4140182590 [1657781757.866722][2878:2883] CHIP:TOO: ACL: 1 entries @@ -97,6 +102,7 @@ tests: ./chip-tool accesscontrol read acl 2 0 --commissioner-name gamma + On RC2, verify that acl atrribute reading an entries from DUT [1657781810.474993][2821:2826] CHIP:DMG: } [1657781810.475304][2821:2826] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 4140182590 [1657781810.475389][2821:2826] CHIP:TOO: ACL: 1 entries @@ -111,7 +117,12 @@ tests: [1657781810.475763][2821:2826] CHIP:EM: Sending Standalone Ack for MessageCounter:227198602 on exchange 37948i + From RC1 send a Write Request message to the DUT to write to an entry in the fabric scoped list associated with its own fabric. + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 --commissioner-name beta + + On RC1, Verify that DUT responds as success + [1657782547.448455][2974:2979] CHIP:DMG: WriteResponseMessage = [1657782547.448486][2974:2979] CHIP:DMG: { [1657782547.448513][2974:2979] CHIP:DMG: AttributeStatusIBs = @@ -157,11 +168,10 @@ tests: - - + Send a fabric-filtered Read Request Message from each of RC1 and RC2 to read the fabric scoped list from the DUT. ./chip-tool accesscontrol read acl 2 0 --fabric-filtered 0 --commissioner-name gamma - + On RC2, Verify that the data received from DUT is same as the data received in first read request [1657782203.827787][2957:2962] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 4140182592 [1657782203.827866][2957:2962] CHIP:TOO: ACL: 2 entries [1657782203.827914][2957:2962] CHIP:TOO: [1]: { @@ -183,8 +193,10 @@ tests: ./chip-tool accesscontrol read acl 1 0 --commissioner-name beta - [1657782688.737945][2996:3001] CHIP:DMG: SuppressResponse = true, - [1657782688.737974][2996:3001] CHIP:DMG: InteractionModelRevision = 1 + + On RC1, Verify that DUT responds as UNSUPPORTED_ACCESS + [1657782688.737945][2996:3001] CHIP:DMG: SuppressResponse = true, + [1657782688.737974][2996:3001] CHIP:DMG: InteractionModelRevision = 1 [1657782688.737999][2996:3001] CHIP:DMG: } [1657782688.738108][2996:3001] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) [1657782688.738197][2996:3001] CHIP:EM: Sending Standalone Ack for MessageCounter:110177776 on exchange 22939i @@ -198,7 +210,10 @@ tests: non-filtered Read Request Message from RC1 and RC2 to read the fabric scoped list from the DUT.' verification: | + Send a Read Request Message to the DUT from RC1 and RC2 to read the fabric scoped list "Fabrics" from OperationalCredentialsCluster. Fabric filtered should be set to false. + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 --commissioner-name beta + [1657780124.975404][2664:2669] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 1307873919 [1657780124.975642][2664:2669] CHIP:TOO: Fabrics: 2 entries [1657780124.975710][2664:2669] CHIP:TOO: [1]: { @@ -330,7 +345,30 @@ tests: whose value is a list of structs which contain some fabric-sensitive data. Modify attribute1 on the DUT." verification: | - + Please run this test in chip tool interactive mode ./chip-tool interactive start + + + operationalcredentials subscribe nocs 10 100 1 0 + + [1657802879.008816][4548:4553] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 567747175 + [1657802879.008927][4548:4553] CHIP:TOO: NOCs: 1 entries + [1657802879.009017][4548:4553] CHIP:TOO: [1]: { + [1657802879.009105][4548:4553] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411011824070124080130094104EA61A44385992E365092182D59E3DAF164D2B2F1818B071779A8A0C8832720B52691E4100925D0427C7643BDB43D4ECBCF3D740B0DA0D5E00517143E88676E87370A350128011824020136030402040118300414668A31137585F054F68F571251E644FECF98BEEB3005142179BF06A074A00549577FF0F68071038C6019A118300B407E6F0AFEFAF6EA93D8F39B077C97F175B9C417E37816F229C39D2A36F46576E52787E4610075270222053BFDDE853F06EF52F5C4BCC1102A25F089AFA675200418 + [1657802879.009203][4548:4553] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A37062413011824070124080130094104E02FFF23357C6B135568AA3E456204672E5BDDF5B68B1A9B39E670E56B9982298B1BBEEBD9F3723C2B58944A11ACD9B2CD8DE7C94DC6FEEFA67E2CBF0A8CCDBC370A35012901182402603004142179BF06A074A00549577FF0F68071038C6019A130051474B77548C9D04E936F951F0775C7AE9F88AF9FA318300B405AB8763179CF1E865E20E19F81E1286EF7B9D417BDC85D536406230816A438EDB48E946D5821FE54D97D1C337505AA6DEC1746C884344A769F63E9DC8318186918 + [1657802879.009273][4548:4553] CHIP:TOO: FabricIndex: 1 + [1657802879.009329][4548:4553] CHIP:TOO: } + [1657802879.009426][4548:4553] CHIP:DMG: MoveToState ReadClient[0xffff7c008e40]: Moving to [AwaitingSu] + + operationalcredentials subscribe nocs 10 100 2 0 --commissioner-name beta + [1657803363.013803][5522:5527] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 567747179 + [1657803363.013897][5522:5527] CHIP:TOO: NOCs: 1 entries + [1657803363.013971][5522:5527] CHIP:TOO: [1]: { + [1657803363.014015][5522:5527] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415022411021824070124080130094104CBB7ECF6D0E5814461597F9EA23B2616F55CA3144225CAFDFA651E88C0C6E79B6E02A734F61F8DA0D0A286C9C6E3C786680E8419C505F07DF431D86F7D900A10370A350128011824020136030402040118300414FE58E8B6E61BD3B492E81DF99EC967B0C26BF711300514A75280F34A91D76EA45936672A84D498FB1D67B418300B40175ECC1BA10A4F90D408468F4E212534B74537AE0178B22E05DBD14048748AD50CB7C5324FFE28356E7D37717384EA500B9B6423D12E64D3B825C4E72CCE199918 + [1657803363.014077][5522:5527] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A3706241301182407012408013009410434E10386BC3B08489513C394AC3EFB2151EEAEFC929D157586DD31838D79A2FCED41CCB036D312EBBC879504CA7C5889E447E1F602141F9C9531D6A3178A0B91370A3501290118240260300414A75280F34A91D76EA45936672A84D498FB1D67B43005144DC5ED208AA1EEC31D5C5A52F95EAC45FE6AFA0D18300B40702DEDF1A21987C4675D53F050024AC51BE975CCAC09BC6398522FF337E023AA20185E9D68D7CA22A26B937FD4A9644015AF75EAAB2F43E8415E17F698A48CEA18 + [1657803363.014113][5522:5527] CHIP:TOO: FabricIndex: 2 + [1657803363.014141][5522:5527] CHIP:TOO: } + [1657803363.014189][5522:5527] CHIP:DMG: MoveToState ReadClient[0xffff6c008e70]: Moving to [AwaitingSu] + [1657803363.014248][5522:5527] CHIP:EM: Piggybacking Ack for MessageCounter:84457338 on exchange: 56555i disabled: true - label: @@ -339,7 +377,115 @@ tests: same Event1 which is fabric sensitive. Trigger Event1 on DUT on the fabric where RC1 is present." verification: | - + Please run this test in chip tool interactive mode ./chip-tool interactive start + + + Activate the subscription between RC1 and DUT for an Event1 which is fabric sensitive + accesscontrol subscribe-event access-control-entry-changed 20 500 1 0 + + + [1657887424.932830][3496:3501] CHIP:DMG: } + [1657887424.933020][3496:3501] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1657887424.933049][3496:3501] CHIP:TOO: Event number: 1 + [1657887424.933075][3496:3501] CHIP:TOO: Priority: Info + [1657887424.933100][3496:3501] CHIP:TOO: Timestamp: 10640831 + [1657887424.933204][3496:3501] CHIP:TOO: AccessControlEntryChanged: { + [1657887424.933247][3496:3501] CHIP:TOO: AdminNodeID: null + [1657887424.933287][3496:3501] CHIP:TOO: AdminPasscodeID: 0 + [1657887424.933315][3496:3501] CHIP:TOO: ChangeType: 1 + [1657887424.933342][3496:3501] CHIP:TOO: LatestValue: { + [1657887424.933368][3496:3501] CHIP:TOO: Privilege: 5 + [1657887424.933395][3496:3501] CHIP:TOO: AuthMode: 2 + [1657887424.933426][3496:3501] CHIP:TOO: Subjects: 1 entries + [1657887424.933460][3496:3501] CHIP:TOO: [1]: 112233 + [1657887424.933489][3496:3501] CHIP:TOO: Targets: null + [1657887424.933515][3496:3501] CHIP:TOO: FabricIndex: 1 + [1657887424.933541][3496:3501] CHIP:TOO: } + [1657887424.933567][3496:3501] CHIP:TOO: AdminFabricIndex: 1 + [1657887424.933593][3496:3501] CHIP:TOO: } + [1657887424.933661][3496:3501] CHIP:DMG: MoveToState ReadClient[0xffff940091f0]: Moving to [AwaitingSu] + [1657887424.933717][3496:3501] CHIP:EM: Piggybacking Ack for MessageCounter:100554100 on exchange: 44633i + + + accesscontrol subscribe-event access-control-entry-changed 20 700 2 0 --commissioner-name beta + [1657887441.417553][2862:2867] CHIP:DMG: } + [1657887441.417766][2862:2867] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1657887441.417796][2862:2867] CHIP:TOO: Event number: 2 + [1657887441.417822][2862:2867] CHIP:TOO: Priority: Info + [1657887441.417849][2862:2867] CHIP:TOO: Timestamp: 13545202 + [1657887441.417964][2862:2867] CHIP:TOO: AccessControlEntryChanged: { + [1657887441.418020][2862:2867] CHIP:TOO: AdminNodeID: null + [1657887441.418061][2862:2867] CHIP:TOO: AdminPasscodeID: 0 + [1657887441.418090][2862:2867] CHIP:TOO: ChangeType: 1 + [1657887441.418128][2862:2867] CHIP:TOO: LatestValue: { + [1657887441.418156][2862:2867] CHIP:TOO: Privilege: 5 + [1657887441.418193][2862:2867] CHIP:TOO: AuthMode: 2 + [1657887441.418228][2862:2867] CHIP:TOO: Subjects: 1 entries + [1657887441.418273][2862:2867] CHIP:TOO: [1]: 112233 + [1657887441.418305][2862:2867] CHIP:TOO: Targets: null + [1657887441.418344][2862:2867] CHIP:TOO: FabricIndex: 2 + [1657887441.418371][2862:2867] CHIP:TOO: } + [1657887441.418409][2862:2867] CHIP:TOO: AdminFabricIndex: 2 + [1657887441.418436][2862:2867] CHIP:TOO: } + [1657887441.418517][2862:2867] CHIP:DMG: MoveToState ReadClient[0xffff74009260]: Moving to [AwaitingSu] + [1657887441.418591][2862:2867] CHIP:EM: Piggybacking Ack for MessageCounter:217452290 on exchange: 44658i + + + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 + [1658231022.614323][2305:2310] CHIP:DMG: } + [1658231022.614489][2305:2310] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + [1658231022.614598][2305:2310] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + [1658231022.614699][2305:2310] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + [1658231022.614795][2305:2310] CHIP:DMG: MoveToState ReadClient[0xffff88008e70]: Moving to [AwaitingSu] + [1658231022.614873][2305:2310] CHIP:EM: Piggybacking Ack for MessageCounter:177580574 on exchange: 34289i + [1658231022.614987][2305:2310] CHIP:IN: Prepared secure message 0xffff880057e8 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 34289i with MessageCounter:134890885. + [1658231022.615047][2305:2310] CHIP:IN: Sending encrypted msg 0xffff880057e8 with MessageCounter:134890885 to 0x0000000000000001 (1) at monotonic time: 00000000000C7D98 msec + [1658231022.616881][2305:2310] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:177580575 on exchange 34289i + [1658231022.616932][2305:2310] CHIP:EM: Found matching exchange: 34289i, Delegate: 0xffff88008e70 + [1658231022.616983][2305:2310] CHIP:EM: Rxd Ack; Removing MessageCounter:134890885 from Retrans Table on exchange 34289i + [1658231022.617023][2305:2310] CHIP:EM: Removed CHIP MessageCounter:134890885 from RetransTable on exchange 34289i + [1658231022.617085][2305:2310] CHIP:DMG: SubscribeResponseMessage = + [1658231022.617129][2305:2310] CHIP:DMG: { + [1658231022.617169][2305:2310] CHIP:DMG: SubscriptionId = 0x1cf72de7, + [1658231022.617214][2305:2310] CHIP:DMG: MaxInterval = 0x1f4, + [1658231022.617257][2305:2310] CHIP:DMG: InteractionModelRevision = 1 + [1658231022.617297][2305:2310] CHIP:DMG: } + [1658231022.617340][2305:2310] CHIP:DMG: Subscription established with SubscriptionID = 0x1cf72de7 MinInterval = 20s MaxInterval = 500s Peer = 01:0000000000000001 + + + [1658231053.511709][10291:10296] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658231053.511772][10291:10296] CHIP:TOO: Event number: 3 + [1658231053.511828][10291:10296] CHIP:TOO: Priority: Info + [1658231053.511879][10291:10296] CHIP:TOO: Timestamp: 386270 + [1658231053.511997][10291:10296] CHIP:TOO: AccessControlEntryChanged: { + [1658231053.512038][10291:10296] CHIP:TOO: AdminNodeID: null + [1658231053.512076][10291:10296] CHIP:TOO: AdminPasscodeID: 0 + [1658231053.512183][10291:10296] CHIP:TOO: ChangeType: 1 + [1658231053.512222][10291:10296] CHIP:TOO: LatestValue: { + [1658231053.512256][10291:10296] CHIP:TOO: Privilege: 5 + [1658231053.512291][10291:10296] CHIP:TOO: AuthMode: 2 + [1658231053.512333][10291:10296] CHIP:TOO: Subjects: 1 entries + [1658231053.512376][10291:10296] CHIP:TOO: [1]: 112233 + [1658231053.512415][10291:10296] CHIP:TOO: Targets: null + [1658231053.512450][10291:10296] CHIP:TOO: FabricIndex: 2 + [1658231053.512484][10291:10296] CHIP:TOO: } + [1658231053.512519][10291:10296] CHIP:TOO: AdminFabricIndex: 2 + [1658231053.512553][10291:10296] CHIP:TOO: } + [1658231053.512642][10291:10296] CHIP:DMG: MoveToState ReadClient[0xffff98009000]: Moving to [AwaitingSu] + [1658231053.512715][10291:10296] CHIP:EM: Piggybacking Ack for MessageCounter:36331302 on exchange: 58513i + [1658231053.512799][10291:10296] CHIP:IN: Prepared secure message 0xaaaac4ba0828 to 0x0000000000000002 (2) of type 0x1 and protocolId (0, 1) on exchange 58513i with MessageCounter:160830417. + [1658231053.512853][10291:10296] CHIP:IN: Sending encrypted msg 0xaaaac4ba0828 with MessageCounter:160830417 to 0x0000000000000002 (2) at monotonic time: 0000000001A6A793 msec + [1658231053.514813][10291:10296] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:36331303 on exchange 58513i + [1658231053.514863][10291:10296] CHIP:EM: Found matching exchange: 58513i, Delegate: 0xffff98009000 + [1658231053.514909][10291:10296] CHIP:EM: Rxd Ack; Removing MessageCounter:160830417 from Retrans Table on exchange 58513i + [1658231053.514946][10291:10296] CHIP:EM: Removed CHIP MessageCounter:160830417 from RetransTable on exchange 58513i + [1658231053.515006][10291:10296] CHIP:DMG: SubscribeResponseMessage = + [1658231053.515046][10291:10296] CHIP:DMG: { + [1658231053.515082][10291:10296] CHIP:DMG: SubscriptionId = 0x8260b5, + [1658231053.515121][10291:10296] CHIP:DMG: MaxInterval = 0x2bc, + [1658231053.515160][10291:10296] CHIP:DMG: InteractionModelRevision = 1 + [1658231053.515195][10291:10296] CHIP:DMG: } + [1658231053.515235][10291:10296] CHIP:DMG: Subscription established with SubscriptionID = 0x008260b5 MinInterval = 20s MaxInterval = 700s Peer = 02:0000000000000002 disabled: true - label: 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 b5c7f29532ce5d..66e4cf05eb1f44 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 @@ -34,7 +34,7 @@ tests: response: value: 3 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_ILL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_ILL_2_1.yaml index 1d209e6a774514..4f6348cde9a247 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "MeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65534 @@ -44,7 +44,7 @@ tests: attribute: "MinMeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 1 maxValue: 65533 @@ -54,7 +54,7 @@ tests: attribute: "MaxMeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 2 maxValue: 65534 @@ -64,7 +64,7 @@ tests: attribute: "Tolerance" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 2048 diff --git a/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml index 9d49bf8beaf9f1..1f025a4a4593c3 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml @@ -32,17 +32,15 @@ tests: MaxMeasuredValue attribute from DUT." PICS: ILL.S.A0001 && ILL.S.A0002 verification: | - Verify in TH Log - - - ./chip-tool illuminancemeasurement read min-measured-value 1 1 - + ./chip-tool illuminancemeasurement read min-measured-value 1 1 + On TH verify that value for MinMeasuredValue attribute [1650881571.375482][2777:2782] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0400 Attribute 0x0000_0001 DataVersion: 1034665079 [1650881571.375596][2777:2782] CHIP:TOO: MinMeasuredValue: 1 ./chip-tool illuminancemeasurement read max-measured-value 1 1 - + On TH verify that value for MaxMeasuredValue attribute [1650881715.935533][2791:2797] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0400 Attribute 0x0000_0002 DataVersion: 1034665079 + Verify in TH Log [1650881715.935645][2791:2797] CHIP:TOO: MaxMeasuredValue: 65534 disabled: true 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 2d5c16e3e89b9f..ba3faef871404c 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 @@ -34,7 +34,7 @@ tests: response: value: 4 constraints: - type: uint16 + type: int16u - label: "TH reads the FeatureMap attribute from the DUT" PICS: " !I.S.F00 " @@ -43,7 +43,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "TH reads the FeatureMap attribute from the DUT" PICS: I.S.F00 @@ -52,7 +52,7 @@ tests: response: value: 1 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" @@ -63,22 +63,21 @@ tests: contains: [0, 1, 65528, 65529, 65531, 65532, 65533] - label: "Read the global attribute: AcceptedCommandList" - PICS: I.C.C40.Tx command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0, 64] + contains: [0] - - label: "Read the global attribute: AcceptedCommandList" - PICS: " !I.C.C40.Tx " + - label: "Read the optional command(TriggerEffect) in AcceptedCommandList" + PICS: I.C.C40.Tx command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0] + contains: [64] - label: "Read the optional attribute(IdentifyQuery) in AcceptedCommandList" PICS: I.C.C01.Tx @@ -90,20 +89,21 @@ tests: contains: [1] - label: "Read the global attribute: GeneratedCommandList" - PICS: I.S.C00.Tx command: "readAttribute" attribute: "GeneratedCommandList" response: - value: [0] + value: [] constraints: type: list - - label: "Read the global attribute: GeneratedCommandList" - PICS: " !I.S.C00.Tx " + - label: + "Read the optional attribute(IdentifyQueryResponse) in + GeneratedCommandList" + PICS: I.S.C00.Tx command: "readAttribute" attribute: "GeneratedCommandList" response: - value: [] + value: [0] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_I_2_1.yaml b/src/app/tests/suites/certification/Test_TC_I_2_1.yaml index d34a86313d7fdf..695e0ba4b057cc 100644 --- a/src/app/tests/suites/certification/Test_TC_I_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_2_1.yaml @@ -33,7 +33,7 @@ tests: attribute: "identify time" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 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 2326a6c0f11b62..0f9a7c4105b788 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 @@ -39,14 +39,14 @@ tests: - name: "IdentifyTime" value: 60 - - label: "TH reads immediately IdentifyTime attribute from DUT1" + - label: "TH reads immediately IdentifyTime attribute from DUT" PICS: I.S.A0000 command: "readAttribute" attribute: "identify time" response: constraints: - minValue: 55 - maxValue: 65 + minValue: 51 + maxValue: 69 - label: "Wait 10000ms" cluster: "DelayCommands" @@ -62,8 +62,8 @@ tests: attribute: "identify time" response: constraints: - minValue: 45 - maxValue: 55 + minValue: 43 + maxValue: 57 - label: "TH sends IdentifyQuery command to DUT and Verify @@ -73,7 +73,7 @@ tests: IdentifyQuery is not supported by Matter cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx arguments: values: - name: "message" @@ -91,7 +91,7 @@ tests: - name: "IdentifyTime" value: 0 - - label: "TH reads immediately IdentifyTime attribute from DUT2" + - label: "TH reads immediately IdentifyTime attribute from DUT" PICS: I.S.A0000 command: "readAttribute" attribute: "identify time" @@ -104,7 +104,7 @@ tests: IdentifyQuery is not supported by Matter cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_I_3_1.yaml b/src/app/tests/suites/certification/Test_TC_I_3_1.yaml index 6f7373b461ca3e..f9eaebb4744a10 100644 --- a/src/app/tests/suites/certification/Test_TC_I_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_3_1.yaml @@ -25,11 +25,8 @@ tests: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" verification: | - verify on Reference app receives the right response for the data sent in the above commands - - Verify in TH all-clusters-app log - ./chip-tool identify read identify-time 1 1 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command [1648015371.159715][2506:2506] CHIP:IM: Received Read request [1648015371.159805][2506:2506] CHIP:DMG: ReadRequestMessage = @@ -49,7 +46,16 @@ tests: [1648015371.160300][2506:2506] CHIP:DMG: InteractionModelRevision = 1 [1648015371.160324][2506:2506] CHIP:DMG: }, + On DUT as a client side, verify that TH all-clusters-app sent identify time attribute value + [1658144129.651688][8964:8969] CHIP:DMG: } + [1658144129.651919][8964:8969] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 774797081 + [1658144129.652113][8964:8969] CHIP:TOO: identify time: 0 + [1658144129.652237][8964:8969] CHIP:EM: Sending Standalone Ack for MessageCounter:17091478 on exchange 42014i + + ./chip-tool identify read identify-type 1 1 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + [1648015519.017225][2506:2506] CHIP:IM: Received Read request [1648015519.017293][2506:2506] CHIP:DMG: ReadRequestMessage = [1648015519.017332][2506:2506] CHIP:DMG: { @@ -67,6 +73,12 @@ tests: [1648015519.017932][2506:2506] CHIP:DMG: isFabricFiltered = true, [1648015519.017969][2506:2506] CHIP:DMG: InteractionModelRevision = 1 [1648015519.018003][2506:2506] CHIP:DMG: }, + + On DUT as a client side, verify that TH all-clusters-app sent identify type attribute value + [1658144152.172514][8970:8975] CHIP:DMG: } + [1658144152.172661][8970:8975] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 774797081 + [1658144152.172726][8970:8975] CHIP:TOO: identify type: 2 + [1658144152.172813][8970:8975] CHIP:EM: Sending Standalone Ack for MessageCounter:190112026 on exchange 9214i disabled: true - label: @@ -80,12 +92,9 @@ tests: "DUT writes a suitable value to all supported mandatory attributes on the TH one at a time in a manufacturer specific order" verification: | - verify on Reference app receives the right response for the data sent in the above commands + ./chip-tool identify write identify-time 1 1 1 - Verify in TH all-clusters-app log - - On TestHarnes (all-cluster-app) a received write request looks like this (f.e identify-time (id 0) value 60): - ./chip-tool identify write identify-time 1 1 1 + verify On TH(Reference app) receives the right write Request Message for the data sent in the above command [1646012277.591912][33190:33190] CHIP:IM: Received Write request [1646012277.591936][33190:33190] CHIP:DMG: IM WH moving to [Initialized] [1646012277.591987][33190:33190] CHIP:DMG: WriteRequestMessage = @@ -112,6 +121,13 @@ tests: [1646012277.592589][33190:33190] CHIP:DMG: }, [1646012277.592669][33190:33190] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=o [1646012277.592721][33190:33190] CHIP:DMG: Endpoint 1, Cluster 0x0000_0003 update version to d4fdf520 + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1658144181.287676][8979:8984] CHIP:DMG: + [1658144181.287736][8979:8984] CHIP:DMG: StatusIB = + [1658144181.287792][8979:8984] CHIP:DMG: { + [1658144181.287849][8979:8984] CHIP:DMG: status = 0x00 (SUCCESS), + [1658144181.287907][8979:8984] CHIP:DMG: }, disabled: true - label: @@ -127,31 +143,8 @@ tests: also reflects this in global attributes such as FeatureMap and AttributeList. Commission DUT to TH again" verification: | - verify on Reference app receives the right response for the data sent in the above commands - - Verify in TH all-clusters-app log - - ./chip-tool identify read attribute-list 1 1 - - [1654242827039] [91286:3990827] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 2002457420 - [1654242827039] [91286:3990827] CHIP: [TOO] AttributeList: 7 entries - [1654242827039] [91286:3990827] CHIP: [TOO] [1]: 0 - [1654242827039] [91286:3990827] CHIP: [TOO] [2]: 1 - [1654242827039] [91286:3990827] CHIP: [TOO] [3]: 65528 - [1654242827039] [91286:3990827] CHIP: [TOO] [4]: 65529 - [1654242827040] [91286:3990827] CHIP: [TOO] [5]: 65531 - [1654242827040] [91286:3990827] CHIP: [TOO] [6]: 65532 - [1654242827040] [91286:3990827] CHIP: [TOO] [7]: 65533 - - ./chip-tool identify read feature-map 1 1 - - [1656477452568] [49420:5728891] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 2109194160 - [1656477452569] [49420:5728891] CHIP: [TOO] FeatureMap: 0 - - - - - "./chip-tool identify read identify-time 1 1 + ./chip-tool identify read identify-time 1 1 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command [1648015371.159715][2506:2506] CHIP:IM: Received Read request [1648015371.159805][2506:2506] CHIP:DMG: ReadRequestMessage = @@ -171,7 +164,16 @@ tests: [1648015371.160300][2506:2506] CHIP:DMG: InteractionModelRevision = 1 [1648015371.160324][2506:2506] CHIP:DMG: }, + On DUT as a client side, verify that TH all-clusters-app sent identify time attribute value + [1658144129.651688][8964:8969] CHIP:DMG: } + [1658144129.651919][8964:8969] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 774797081 + [1658144129.652113][8964:8969] CHIP:TOO: identify time: 0 + [1658144129.652237][8964:8969] CHIP:EM: Sending Standalone Ack for MessageCounter:17091478 on exchange 42014i + + ./chip-tool identify read identify-type 1 1 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + [1648015519.017225][2506:2506] CHIP:IM: Received Read request [1648015519.017293][2506:2506] CHIP:DMG: ReadRequestMessage = [1648015519.017332][2506:2506] CHIP:DMG: { @@ -188,7 +190,13 @@ tests: [1648015519.017894][2506:2506] CHIP:DMG: [1648015519.017932][2506:2506] CHIP:DMG: isFabricFiltered = true, [1648015519.017969][2506:2506] CHIP:DMG: InteractionModelRevision = 1 - [1648015519.018003][2506:2506] CHIP:DMG: }," + [1648015519.018003][2506:2506] CHIP:DMG: }, + + On DUT as a client side, verify that TH all-clusters-app sent identify type attribute value + [1658144152.172514][8970:8975] CHIP:DMG: } + [1658144152.172661][8970:8975] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 774797081 + [1658144152.172726][8970:8975] CHIP:TOO: identify type: 2 + [1658144152.172813][8970:8975] CHIP:EM: Sending Standalone Ack for MessageCounter:190112026 on exchange 9214i disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_I_3_2.yaml b/src/app/tests/suites/certification/Test_TC_I_3_2.yaml index d54b8da50e3b4a..abd1f94b73ae6e 100644 --- a/src/app/tests/suites/certification/Test_TC_I_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_3_2.yaml @@ -27,10 +27,8 @@ tests: that is supported by the DUT." PICS: I.C.C00.Tx verification: | - On TestHarnes (all-cluster-app) a received Identify command with f.e. 60 as IdentifyTime looks like this: - Verify in TH all-clusters-app log - ./chip-tool identify identify 60 1 1 + verify On TH(Reference app) receives the right invoke Request Message for the data sent in the above command [1646010972.583498][33190:33190] CHIP:EM: Handling via exchange: 60250r, Delegate: 0xaaaace1730c8 [1646010972.583578][33190:33190] CHIP:DMG: InvokeRequestMessage = [1646010972.583611][33190:33190] CHIP:DMG: { @@ -60,6 +58,13 @@ tests: [1646010972.584359][33190:33190] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=o [1646010972.584430][33190:33190] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0003 Command=0x0000_0000 [1646010972.584474][33190:33190] CHIP:DMG: Endpoint 1, Cluster 0x0000_0003 update version to d4fdf424 + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1658144469.552560][8995:9000] CHIP:DMG: + [1658144469.552589][8995:9000] CHIP:DMG: StatusIB = + [1658144469.552626][8995:9000] CHIP:DMG: { + [1658144469.552663][8995:9000] CHIP:DMG: status = 0x00 (SUCCESS), + [1658144469.552698][8995:9000] CHIP:DMG: }, disabled: true - label: @@ -75,11 +80,8 @@ tests: IdentifyTime argument set to 0x0000 (Stop)." PICS: I.C.C00.Tx verification: | - On TestHarnes (all-cluster-app) a received Identify command with an IdentifyTime of 0 looks like this: - - Verify in TH all-clusters-app log - ./chip-tool identify identify 0 1 1 + verify On TH(Reference app) receives the right invoke Request Message for the data sent in the above command [1646011311.206353][33190:33190] CHIP:EM: Handling via exchange: 12024r, Delegate: 0xaaaace1730c8 [1646011311.206436][33190:33190] CHIP:DMG: InvokeRequestMessage = [1646011311.206462][33190:33190] CHIP:DMG: { @@ -110,6 +112,12 @@ tests: [1646011311.207295][33190:33190] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0003 Command=0x0000_0000 [1646011311.207342][33190:33190] CHIP:DMG: Endpoint 1, Cluster 0x0000_0003 update version to d4fdf4a5 [1646011311.207377][33190:33190] CHIP:ZCL: OnIdentifyStop + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1658144495.036737][9002:9007] CHIP:DMG: }, + [1658144495.036829][9002:9007] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0003 Command=0x0000_0000 Status=0x0 + [1658144495.036893][9002:9007] CHIP:DMG: ICR moving to [AwaitingDe] + [1658144495.036970][9002:9007] CHIP:EM: Sending Standalone Ack for MessageCounter:97481310 on exchange 7554i disabled: true - label: @@ -117,11 +125,8 @@ tests: supported EffectIdentifier argument and EffectVariant set to 0." PICS: I.C.C40.Tx verification: | - On TestHarnes (all-cluster-app) a received Identify command with f.e. 1 as EffectIdentifier looks like this: - - Verify in TH all-clusters-app log - ./chip-tool identify trigger-effect 0 0 1 1 + verify On TH(Reference app) receives the right invoke Request Message for the data sent in the above command [1646011549.034604][33190:33190] CHIP:EM: Received message of type 0x8 with protocolId (0, 1) and MessageCounter:3605482 on exchange 36067r [1646011549.034646][33190:33190] CHIP:EM: Handling via exchange: 36067r, Delegate: 0xaaaace1730c8 [1646011549.034790][33190:33190] CHIP:DMG: InvokeRequestMessage = @@ -153,4 +158,10 @@ tests: [1646011549.035975][33190:33190] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=o [1646011549.036017][33190:33190] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0003 Command=0x0000_0040 [1646011549.036052][33190:33190] CHIP:ZCL: RX identify:trigger effect 0x1 variant 0x0 + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1658144515.570727][9010:9015] CHIP:DMG: }, + [1658144515.570854][9010:9015] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0003 Command=0x0000_0040 Status=0x0 + [1658144515.570922][9010:9015] CHIP:DMG: ICR moving to [AwaitingDe] + [1658144515.570999][9010:9015] CHIP:EM: Sending Standalone Ack for MessageCounter:226820812 on exchange 14189i disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml index c2df2b48e3e2ed..aa7df448634208 100644 --- a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml @@ -36,15 +36,15 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - - label: "Read the optional global attribute: FeatureMap" + - label: "Read the global attribute: FeatureMap" PICS: KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK command: "readAttribute" attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 7 diff --git a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_3_2.yaml b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_3_2.yaml index 34634381342c21..7b532f34c1b37e 100644 --- a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_3_2.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 19.3.1. [TC-KEYPADINPUT-3.1] Send Key Command Verification (DUT as Client) +name: 19.3.2. [TC-KEYPADINPUT-3.2] Location Keys Verification config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml index 20b2c0eee07a59..d15f832437166a 100644 --- a/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml @@ -28,10 +28,9 @@ tests: - label: "TH reads from the DUT the (0xFFFD) ClusterRevision attribute" verification: | - Verify in TH Log - ./chip-tool localizationconfiguration read cluster-revision 1 0 + On TH, verify that DUT sends ClusterRevision attribute value as 1 [1649330698.587235][4440:4445] CHIP:DMG: [1649330698.587269][4440:4445] CHIP:DMG: SuppressResponse = true, @@ -43,11 +42,9 @@ tests: - label: "TH reads from the DUT the (0xFFFC) FeatureMap attribute" verification: | - Verify in TH Log - ./chip-tool localizationconfiguration read feature-map 1 0 - + On TH, verify that DUT sends FeatureMap attribute value as 0 [1653462414.221894][29485:29490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFC DataVersion: 2352052086 [1653462414.222033][29485:29490] CHIP:TOO: FeatureMap: 0 [1653462414.222207][29485:29490] CHIP:EM: Sending Standalone Ack for MessageCounter:4940181 on exchange 7821i @@ -55,9 +52,8 @@ tests: - label: "TH reads from the DUT the (0xFFFB) AttributeList attribute" verification: | - Verify in TH Log - ./chip-tool localizationconfiguration read attribute-list 1 0 + On TH, verify that DUT sends a list of supported attributes [1653462309.061114][29477:29482] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFB DataVersion: 2352052086 [1653462309.061199][29477:29482] CHIP:TOO: AttributeList: 7 entries @@ -78,10 +74,8 @@ tests: - label: "TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute" verification: | - Verify in TH Log - ./chip-tool localizationconfiguration read accepted-command-list 1 0 - + On TH, verify that DUT responsds as list of Accepted Command as 0 entries. [1649331020.031045][4520:4525] CHIP:DMG: [1649331020.031081][4520:4525] CHIP:DMG: SuppressResponse = true, @@ -93,10 +87,8 @@ tests: - label: "TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute" verification: | - Verify in TH Log - ./chip-tool localizationconfiguration read generated-command-list 1 0 - + On TH, verify that DUT responsds as list of GeneratedCommandList as 0 entries. [1649330937.798986][4508:4513] CHIP:DMG: [1649330937.799022][4508:4513] CHIP:DMG: SuppressResponse = true, 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 12baf83eeb97db..ef4d728528e5dd 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 @@ -26,9 +26,8 @@ tests: - label: "TH reads SupportedLocales attribute from DUT" PICS: LCFG.S.A0001 verification: | - Verify in TH Log - ./chip-tool localizationconfiguration read supported-locales 1 0 + On TH verify that the entry values in the SupportedLocales attribute are not repeated [1651129546.170573][174082:174087] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_0002 DataVersion: 3111654481 [1651129546.170622][174082:174087] CHIP:TOO: SupportedLocales: 8 entries @@ -44,19 +43,18 @@ tests: - label: 'TH writes "xx-XX" to SupportedLocales attribute' verification: | - Verify in TH Log + ./chip-tool any write-by-id 0x002B 1 '"xx-XX"' 1 0 + On TH verify that DUT responds as UNSUPPORTED_WRITE - ./chip-tool any write-by-id 0x002B 1 xx-XX 1 0 - [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 + [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: "TH reads SupportedLocales attribute" verification: | - Verify in TH Log - ./chip-tool localizationconfiguration read supported-locales 1 0 + On TH verify that the entries same as step 1 [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 @@ -72,10 +70,8 @@ tests: - label: "TH reads ActiveLocale Attribute from the DUT" PICS: LCFG.S.A0000 verification: | - Verify in TH Log - ./chip-tool localizationconfiguration read active-locale 1 0 - + On TH verify that the ActiveLocale Attribute value is present in the SupportedLocales attribute list [1651035208.064278][2761:2766] CHIP:DMG: SuppressResponse = true, [1651035208.064316][2761:2766] CHIP:DMG: InteractionModelRevision = 1 @@ -88,10 +84,8 @@ tests: "TH writes new string not present in SupportedLocale attribute to ActiveLocale Attribute." verification: | - Verify in TH Log - ./chip-tool localizationconfiguration write active-locale fw-GB 1 0 - + On TH verify that DUT responds as CONSTRAINT_ERROR [[1651130076.882814][174458:174463] CHIP:DMG: WriteResponseMessage = [1651130076.882819][174458:174463] CHIP:DMG: { @@ -126,9 +120,8 @@ tests: "TH writes new string present in SupportedLocale attribute to ActiveLocale Attribute" verification: | - Verify in TH Log - ./chip-tool localizationconfiguration write active-locale fr-FR 1 0 + On TH verify that DUT responds as SUCCESS [1651035259.959116][2776:2781] CHIP:DMG: StatusIB = [1651035259.959158][2776:2781] CHIP:DMG: { @@ -146,9 +139,8 @@ tests: - label: "TH Reads ActiveLocale" verification: | - Verify in TH Log - ./chip-tool localizationconfiguration read active-locale 1 0 + On TH Verify that the value of the ActiveLocale attribute is changed [1645772597.252904][3816:3821] CHIP:DMG: [1645772597.252948][3816:3821] CHIP:DMG: SuppressResponse = true, diff --git a/src/app/tests/suites/certification/Test_TC_LCFG_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LCFG_3_1.yaml index 5c4179cc230481..29acab3d216cef 100644 --- a/src/app/tests/suites/certification/Test_TC_LCFG_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LCFG_3_1.yaml @@ -27,7 +27,7 @@ tests: PICS: LCFG.C.A0001 verification: | ./chip-tool localizationconfiguration read supported-locales 1 0 - verify on Reference app receives the right response for the data sent in the above commands + Verify in DUT as client side: verify that DUT reads SupportedLocales attribute from the TH successfully [1657111931.771994][5357:5363] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_0001 DataVersion: 3168433155 [1657111931.772105][5357:5363] CHIP:TOO: SupportedLocales: 8 entries @@ -45,8 +45,7 @@ tests: PICS: LCFG.C.A0000 verification: | ./chip-tool localizationconfiguration read active-locale 1 0 - - verify on Reference app receives the right response for the data sent in the above commands + Verify in DUT as client side: verify that DUT reads ActiveLocale attribute from the TH successfully [1651564394.281211][8392:8397] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_0001 DataVersion: 1726343234 [1651564394.281289][8392:8397] CHIP:TOO: ActiveLocale: en-US diff --git a/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml index c9bb5e1803c760..7232c912e86270 100644 --- a/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -44,7 +44,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml index 89ef7500f882a3..21a4137aea55d0 100644 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 109.1.1. [TC-LTIME-1.1] Global Attributes [DUT as Client] +name: 4.1.1. [TC-LTIME-1.1] Global Attributes [DUT as Client] config: nodeId: 0x12344321 @@ -21,11 +21,15 @@ config: endpoint: 0 tests: - - label: "DUT reads from the TH the (0xFFFD) ClusterRevision attribute" + - label: "Commission DUT to TH" verification: | - Verify in TH all-clusters-app + disabled: true + + - label: "DUT reads from the TH the (0xFFFD) ClusterRevision attribute" + verification: | ./chip-tool timeformatlocalization read cluster-revision 1 0 + Verify in DUT as client side: verify that TH sends ClusterRevision attribute value as 1 [1651185991606] [10988:109915] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 3316530441 [1651185991606] [10988:109915] CHIP: [TOO] ClusterRevision: 1 @@ -33,18 +37,18 @@ tests: - label: "DUT reads from the TH the (0xFFFC) FeatureMap attribute" verification: | - Verify in TH all-clusters-app - ./chip-tool timeformatlocalization read feature-map 1 0 + + Verify in DUT as client side: verify that TH sends FeatureMap attribute value as 1 + [1653379129.497852][7509:7514] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFC DataVersion: 724978222 [1653379129.497936][7509:7514] CHIP:TOO: FeatureMap: 0 disabled: true - label: "DUT reads from the TH the (0xFFFB) AttributeList attribute" verification: | - Verify in TH all-clusters-app - ./chip-tool timeformatlocalization read attribute-list 1 0 + Verify in DUT as client side: verify that TH sends a list of supported attributes [1653999139.214139][7477:7482] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFB DataVersion: 3201720795 [1653999139.214208][7477:7482] CHIP:TOO: AttributeList: 8 entries [1653999139.214241][7477:7482] CHIP:TOO: [1]: 0 @@ -65,18 +69,17 @@ tests: - label: "DUT reads from the TH the (0xFFF9) AcceptedCommandList attribute" verification: | - Verify in TH all-clusters-app - ./chip-tool timeformatlocalization read accepted-command-list 1 0 + Verify in DUT as client side: verify that TH responsds as list of Accepted Command as 0 entries. + [1651186189564] [11076:112595] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFF9 DataVersion: 3316530441 [1651186189564] [11076:112595] CHIP: [TOO] AcceptedCommandList: 0 entries disabled: true - label: "DUT reads from the TH the (0xFFF8) GeneratedCommandList attribute" verification: | - Verify in TH all-clusters-app - ./chip-tool timeformatlocalization read generated-command-list 1 0 + Verify in DUT as client side: verify that TH responsds as list of GeneratedCommandList as 0 entries. [1651191789962] [13591:180646] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFF8 DataVersion: 3316530441 [1651191789963] [13591:180646] CHIP: [TOO] GeneratedCommandList: 0 entries disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml index f51f52db956c96..e123e5433af78f 100644 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml @@ -28,9 +28,8 @@ tests: - label: "TH reads from the DUT the (0xFFFD) ClusterRevision attribute" verification: | - Verify in TH log: - ./chip-tool timeformatlocalization read cluster-revision 1 0 + On TH, verify that DUT sends ClusterRevision attribute value as 1 [1651185991606] [10988:109915] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 3316530441 [1651185991606] [10988:109915] CHIP: [TOO] ClusterRevision: 1 @@ -38,10 +37,10 @@ tests: - label: "TH reads from the DUT the (0xFFFC) FeatureMap attribute" verification: | - Verify in TH log: - ./chip-tool timeformatlocalization read feature-map 1 0 + On TH, verify that DUT sends FeatureMap attribute value as 1 + [1653400472.682259][11385:11390] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFC DataVersion: 4156010624 [1653400472.682314][11385:11390] CHIP:TOO: FeatureMap: 0 [1653400472.682416][11385:11390] CHIP:EM: Sending Standalone Ack for MessageCounter:10442089 on exchange 10027i @@ -49,9 +48,11 @@ tests: - label: "TH reads from the DUT the (0xFFFB) AttributeList attribute" verification: | - Verify in TH log: - ./chip-tool timeformatlocalization read attribute-list 1 0 + + + On TH, verify that DUT sends a list of supported attributes + [1653999139.214139][7477:7482] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFB DataVersion: 3201720795 [1653999139.214208][7477:7482] CHIP:TOO: AttributeList: 8 entries [1653999139.214241][7477:7482] CHIP:TOO: [1]: 0 @@ -72,18 +73,21 @@ tests: - label: "TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute" verification: | - Verify in TH log: - ./chip-tool timeformatlocalization read accepted-command-list 1 0 + + On TH, verify that DUT responsds as list of Accepted Command as 0 entries. + [1651186189564] [11076:112595] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFF9 DataVersion: 3316530441 [1651186189564] [11076:112595] CHIP: [TOO] AcceptedCommandList: 0 entries disabled: true - label: "TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute" verification: | - Verify in TH log: - ./chip-tool timeformatlocalization read generated-command-list 1 0 + + + On TH, verify that DUT responsds as list of GeneratedCommandList as 0 entries. + [1651191789962] [13591:180646] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFF8 DataVersion: 3316530441 [1651191789963] [13591:180646] CHIP: [TOO] GeneratedCommandList: 0 entries disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml index 9463ccca25630f..97286a7ad5d096 100644 --- a/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 109.2.1. [TC-LTIME-2.1] Read and Write Time Format Localization Cluster + 110.2.1. [TC-LTIME-2.1] Read and Write Time Format Localization Cluster Attributes [DUT as Client] config: @@ -26,9 +26,8 @@ tests: - label: "DUT reads HourFormat attribute from TH" PICS: LTIME.C.A0000 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read hour-format 1 0 + Verify in DUT as client side: Verify that the HourFormat attribute value [1657106866.828694][4891:4896] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0000 DataVersion: 2232855152 [1657106866.828763][4891:4896] CHIP:TOO: HourFormat: 0 @@ -37,9 +36,8 @@ tests: - label: "If (LTIME.C.A0000.12HR) DUT writes 0 to HourFormat attribute" PICS: LTIME.C.A0000.12HR verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write hour-format 0 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657106893.878113][4897:4902] CHIP:DMG: WriteResponseMessage = [1657106893.878138][4897:4902] CHIP:DMG: { @@ -71,9 +69,8 @@ tests: - label: "DUT reads HourFormat attribute" PICS: LTIME.C.A0000 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read hour-format 1 0 + Verify in DUT as client side: Verify that the HourFormat attribute value as 0 [1657106866.828694][4891:4896] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0000 DataVersion: 2232855152 [1657106866.828763][4891:4896] CHIP:TOO: HourFormat: 0 @@ -82,9 +79,8 @@ tests: - label: "If (LTIME.C.A0000.24HR) DUT writes 1 to HourFormat attribute" PICS: LTIME.C.A0000.24HR verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write hour-format 1 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657106989.102102][4907:4912] CHIP:DMG: WriteResponseMessage = [1657106989.102137][4907:4912] CHIP:DMG: { @@ -116,9 +112,8 @@ tests: - label: "DUT reads HourFormat attribute" PICS: LTIME.C.A0000 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read hour-format 1 0 + Verify in DUT as client side: Verify that HourFormat attribute value as 1 [1654605170.332304][7266:7271] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0000 DataVersion: 3185003975 [1654605170.332388][7266:7271] CHIP:TOO: HourFormat: 1 [1654605170.332493][7266:7271] CHIP:EM: Sending Standalone Ack for MessageCounter:6045450 on exchange 44106i @@ -127,9 +122,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute from DUT" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that the ActiveCalendarType attribute value [1657107039.005036][4917:4922] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855154 [1657107039.005112][4917:4922] CHIP:TOO: ActiveCalendarType: 0 @@ -138,9 +132,8 @@ tests: - label: "DUT reads SupportedCalendarTypes attribute from DUT" PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read supported-calendar-types 1 0 + Verify in DUT as client side: Verify that SupportedCalendarTypes attribute value [1657107056.982007][4924:4929] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0002 DataVersion: 2232855154 [1657107056.982095][4924:4929] CHIP:TOO: SupportedCalendarTypes: 12 entries @@ -161,11 +154,10 @@ tests: - label: "If (0 in LTIME.C.A0002.SCT) DUT writes 0 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 0 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107074.760869][4932:4937] CHIP:DMG: WriteResponseMessage = [1657107074.760897][4932:4937] CHIP:DMG: { @@ -197,9 +189,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that the ActiveCalendarType attribute value as 0 [1657107039.005036][4917:4922] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855154 [1657107039.005112][4917:4922] CHIP:TOO: ActiveCalendarType: 0 @@ -208,11 +199,10 @@ tests: - label: "If (1 in LTIME.C.A0002.SCT) DUT writes 1 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 1 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107238.274764][4949:4954] CHIP:DMG: WriteResponseMessage = [1657107238.274795][4949:4954] CHIP:DMG: { @@ -244,9 +234,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that the ActiveCalendarType attribute value as 1 [1657107039.005036][4917:4922] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855154 [1657107039.005112][4917:4922] CHIP:TOO: ActiveCalendarType: 1 @@ -255,11 +244,10 @@ tests: - label: "If (2 in LTIME.C.A0002.SCT) DUT writes 2 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 2 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107378.279674][4960:4965] CHIP:DMG: WriteResponseMessage = [1657107378.279720][4960:4965] CHIP:DMG: { @@ -291,9 +279,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that the ActiveCalendarType attribute value as 2 [1657107404.774339][4968:4973] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855157 [1657107404.774453][4968:4973] CHIP:TOO: ActiveCalendarType: 2 @@ -302,11 +289,10 @@ tests: - label: "If (3 in LTIME.C.A0002.SCT) DUT writes 3 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 3 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107432.589832][4975:4980] CHIP:DMG: WriteResponseMessage = [1657107432.589869][4975:4980] CHIP:DMG: { @@ -338,9 +324,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 3 [1657107452.389424][4983:4988] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855158 [1657107452.389490][4983:4988] CHIP:TOO: ActiveCalendarType: 3 @@ -349,11 +334,10 @@ tests: - label: "If (4 in LTIME.C.A0002.SCT) DUT writes 4 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 4 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107472.754436][4990:4996] CHIP:DMG: WriteResponseMessage = [1657107472.754462][4990:4996] CHIP:DMG: { @@ -385,9 +369,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 4 [1657107496.925134][4997:5002] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855159 [1657107496.925199][4997:5002] CHIP:TOO: ActiveCalendarType: 4 @@ -396,11 +379,10 @@ tests: - label: "If (5 in LTIME.C.A0002.SCT) DUT writes 5 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 5 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107518.977989][5005:5010] CHIP:DMG: WriteResponseMessage = [1657107518.978030][5005:5010] CHIP:DMG: { @@ -432,9 +414,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 5 [1657107552.874504][5011:5016] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855160 [1657107552.874572][5011:5016] CHIP:TOO: ActiveCalendarType: 5 @@ -443,12 +424,10 @@ tests: - label: "If (6 in LTIME.C.A0002.SCT) DUT writes 6 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - - ./chip-tool timeformatlocalization write active-calendar-type 6 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107711.004508][5030:5035] CHIP:DMG: WriteResponseMessage = [1657107711.004535][5030:5035] CHIP:DMG: { @@ -480,9 +459,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 6 [1657107808.981214][5042:5047] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855162 [1657107808.981291][5042:5047] CHIP:TOO: ActiveCalendarType: 6 @@ -491,11 +469,10 @@ tests: - label: "If (7 in LTIME.C.A0002.SCT) DUT writes 7 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 7 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107845.528814][5048:5053] CHIP:DMG: WriteResponseMessage = [1657107845.528843][5048:5053] CHIP:DMG: { @@ -527,9 +504,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 7 [1657107867.321473][5055:5060] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855163 [1657107867.321550][5055:5060] CHIP:TOO: ActiveCalendarType: 7 @@ -538,11 +514,10 @@ tests: - label: "If (8 in LTIME.C.A0002.SCT) DUT writes 8 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 8 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107895.609252][5062:5067] CHIP:DMG: WriteResponseMessage = [1657107895.609278][5062:5067] CHIP:DMG: { @@ -574,9 +549,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 8 [1657107912.560322][5068:5073] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855164 [1657107912.560397][5068:5073] CHIP:TOO: ActiveCalendarType: 8 @@ -585,11 +559,10 @@ tests: - label: "If (9 in LTIME.C.A0002.SCT) DUT writes 9 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 9 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107930.629239][5076:5081] CHIP:DMG: WriteResponseMessage = [1657107930.629265][5076:5081] CHIP:DMG: { @@ -621,9 +594,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that the ActiveCalendarType attribute value as 9 [1657107951.056785][5082:5087] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855165 [1657107951.056861][5082:5087] CHIP:TOO: ActiveCalendarType: 9 @@ -632,11 +604,10 @@ tests: - label: "If (10 in LTIME.C.A0002.SCT) DUT writes 10 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 10 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107969.768286][5090:5095] CHIP:DMG: WriteResponseMessage = [1657107969.768313][5090:5095] CHIP:DMG: { @@ -668,9 +639,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that the ActiveCalendarType attribute value as 10 [1657107989.893985][5097:5102] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855166 [1657107989.894063][5097:5102] CHIP:TOO: ActiveCalendarType: 10 @@ -679,11 +649,10 @@ tests: - label: "If (11 in LTIME.C.A0002.SCT) DUT writes 11 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 11 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657108006.545369][5103:5108] CHIP:DMG: WriteResponseMessage = [1657108006.545394][5103:5108] CHIP:DMG: { @@ -715,9 +684,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 11 [1657108026.518564][5111:5116] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855167 [1657108026.518640][5111:5116] CHIP:TOO: ActiveCalendarType: 11 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 d514efa49894be..6d71c8786c7352 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 @@ -27,6 +27,7 @@ tests: PICS: LTIME.S.A0000 verification: | ./chip-tool timeformatlocalization read hour-format 1 0 + On TH, verify that HourFormat attribute value is of Enum8 datatype [1651191944157] [13649:182326] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0000 DataVersion: 3316530441 [1651191944158] [13649:182326] CHIP: [TOO] HourFormat: 0 disabled: true @@ -35,6 +36,9 @@ tests: PICS: LTIME.S.A0000.12HR verification: | ./chip-tool timeformatlocalization write hour-format 0 1 0 + + On TH verify that DUT sends a success response + [1651192743588] [14026:192208] CHIP: [DMG] WriteResponseMessage = [1651192743588] [14026:192208] CHIP: [DMG] { [1651192743588] [14026:192208] CHIP: [DMG] AttributeStatusIBs = @@ -73,6 +77,9 @@ tests: PICS: LTIME.S.A0000.24HR verification: | ./chip-tool timeformatlocalization write hour-format 1 1 0 + + On TH verify that HourFormat attribute value changed as 0 + [1651193043035] [14140:195730] CHIP: [DMG] WriteResponseMessage = [1651193043035] [14140:195730] CHIP: [DMG] { [1651193043035] [14140:195730] CHIP: [DMG] AttributeStatusIBs = @@ -103,7 +110,9 @@ tests: - label: "TH reads HourFormat attribute" PICS: LTIME.S.A0000 verification: | - ./chip-tool timeformatlocalization read hour-format 1 0 + ./chip-tool timeformatlocalization read hour-format 1 + + On TH verify that DUT sends a success response [1651193120969] [14169:196901] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0000 DataVersion: 3316530443 [1651193120969] [14169:196901] CHIP: [TOO] HourFormat: 1 disabled: true @@ -112,6 +121,9 @@ tests: PICS: LTIME.S.A0001 verification: | ./chip-tool timeformatlocalization read active-calendar-type 1 0 + + On TH, verify that ActiveCalendarType attribute value is in between 0 to 11 + [1651193250602] [14215:198406] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 3316530443 [1651193250602] [14215:198406] CHIP: [TOO] ActiveCalendarType: 0 disabled: true @@ -120,6 +132,9 @@ tests: PICS: LTIME.S.A0002 verification: | ./chip-tool timeformatlocalization read supported-calendar-types 1 0 + + On TH, verify that SupportedCalendarTypes attribute value is in between 0 to 11 + [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 @@ -142,6 +157,9 @@ tests: PICS: LTIME.S.A0002.SCT verification: | ./chip-tool timeformatlocalization write active-calendar-type 0 1 0 + + On TH, verify that ActiveCalendarType attribute value is in between 0 to 11 + [1651194449245] [14699:212201] CHIP: [DMG] WriteResponseMessage = [1651194449245] [14699:212201] CHIP: [DMG] { [1651194449245] [14699:212201] CHIP: [DMG] AttributeStatusIBs = @@ -172,6 +190,9 @@ tests: PICS: LTIME.S.A0001 verification: | ./chip-tool timeformatlocalization read active-calendar-type 1 0 + + On TH verify that DUT sends a success response + [1651194544627] [14736:213553] CHIP: [DMG] ReportDataMessage = [1651194544627] [14736:213553] CHIP: [DMG] { [1651194544627] [14736:213553] CHIP: [DMG] AttributeReportIBs = @@ -206,6 +227,9 @@ tests: PICS: LTIME.S.A0002.SCT verification: | ./chip-tool timeformatlocalization write active-calendar-type 1 1 0 + + On TH verify that ActiveCalendarType attribute value changed as 0 + [1651194780019] [14823:216414] CHIP: [DMG] WriteResponseMessage = [1651194780019] [14823:216414] CHIP: [DMG] { [1651194780019] [14823:216414] CHIP: [DMG] AttributeStatusIBs = @@ -236,6 +260,8 @@ tests: PICS: LTIME.S.A0001 verification: | ./chip-tool timeformatlocalization read active-calendar-type 1 0 + + On TH verify that DUT sends a success response [1651194544627] [14736:213553] CHIP: [DMG] ReportDataMessage = [1651194544627] [14736:213553] CHIP: [DMG] { [1651194544627] [14736:213553] CHIP: [DMG] AttributeReportIBs = @@ -270,6 +296,9 @@ tests: PICS: LTIME.S.A0002.SCT verification: | ./chip-tool timeformatlocalization write active-calendar-type 2 1 0 + + On TH verify that DUT sends a success response + [1651194780019] [14823:216414] CHIP: [DMG] WriteResponseMessage = [1651194780019] [14823:216414] CHIP: [DMG] { [1651194780019] [14823:216414] CHIP: [DMG] AttributeStatusIBs = @@ -300,6 +329,9 @@ tests: PICS: LTIME.S.A0001 verification: | ./chip-tool timeformatlocalization read active-calendar-type 1 0 + + On TH verify that ActiveCalendarType attribute value changed as 2 + [1655184715.197446][2276:2281] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 3044477121 [1655184715.197524][2276:2281] CHIP:TOO: ActiveCalendarType: 2 [1655184715.197650][2276:2281] CHIP:EM: Sending Standalone Ack for MessageCounter:27645137 on exchange 37300i @@ -313,6 +345,9 @@ tests: PICS: LTIME.S.A0002.SCT verification: | ./chip-tool timeformatlocalization write active-calendar-type 3 1 0 + + On TH verify that DUT sends a success response + [1651194780019] [14823:216414] CHIP: [DMG] WriteResponseMessage = [1651194780019] [14823:216414] CHIP: [DMG] { [1651194780019] [14823:216414] CHIP: [DMG] AttributeStatusIBs = @@ -343,6 +378,9 @@ tests: PICS: LTIME.S.A0001 verification: | ./chip-tool timeformatlocalization read active-calendar-type 1 0 + + On TH verify that ActiveCalendarType attribute value changed as 3 + [1655184753.237947][2289:2294] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 3044477122 [1655184753.238025][2289:2294] CHIP:TOO: ActiveCalendarType: 3 [1655184753.238126][2289:2294] CHIP:EM: Sending Standalone Ack for MessageCounter:167097094 on exchange 10188i @@ -355,6 +393,8 @@ tests: verification: | ./chip-tool timeformatlocalization write active-calendar-type 4 1 0 + On TH verify that DUT sends a success response + [1651194780019] [14823:216414] CHIP: [DMG] WriteResponseMessage = [1651194780019] [14823:216414] CHIP: [DMG] { [1651194780019] [14823:216414] CHIP: [DMG] AttributeStatusIBs = @@ -385,6 +425,9 @@ tests: PICS: LTIME.S.A0001 verification: | ./chip-tool timeformatlocalization read active-calendar-type 1 0 + + On TH verify that ActiveCalendarType attribute value changed as 4 + [1655184774.541839][2301:2306] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 3044477123 [1655184774.541949][2301:2306] CHIP:TOO: ActiveCalendarType: 4 [1655184774.542080][2301:2306] CHIP:EM: Sending Standalone Ack for MessageCounter:20884820 on exchange 35148i @@ -396,6 +439,8 @@ tests: PICS: LTIME.S.A0002.SCT verification: | ./chip-tool timeformatlocalization write active-calendar-type 5 1 0 + + On TH verify that DUT sends a success response [1651194780019] [14823:216414] CHIP: [DMG] WriteResponseMessage = [1651194780019] [14823:216414] CHIP: [DMG] { [1651194780019] [14823:216414] CHIP: [DMG] AttributeStatusIBs = @@ -426,6 +471,9 @@ tests: PICS: LTIME.S.A0001 verification: | ./chip-tool timeformatlocalization read active-calendar-type 1 0 + + On TH verify that ActiveCalendarType attribute value changed as 5 + [1655184794.906220][2314:2319] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 3044477124 [1655184794.906340][2314:2319] CHIP:TOO: ActiveCalendarType: 5 [1655184794.906501][2314:2319] CHIP:EM: Sending Standalone Ack for MessageCounter:238991245 on exchange 63616i @@ -437,6 +485,9 @@ tests: PICS: LTIME.S.A0002.SCT verification: | ./chip-tool timeformatlocalization write active-calendar-type 6 1 0 + + On TH verify that DUT sends a success response + [1651194780019] [14823:216414] CHIP: [DMG] WriteResponseMessage = [1651194780019] [14823:216414] CHIP: [DMG] { [1651194780019] [14823:216414] CHIP: [DMG] AttributeStatusIBs = @@ -467,6 +518,9 @@ tests: PICS: LTIME.S.A0001 verification: | ./chip-tool timeformatlocalization read active-calendar-type 1 0 + + On TH verify that ActiveCalendarType attribute value changed as 6 + [1655184813.727744][2327:2332] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 3044477125 [1655184813.727848][2327:2332] CHIP:TOO: ActiveCalendarType: 6 [1655184813.727986][2327:2332] CHIP:EM: Sending Standalone Ack for MessageCounter:89082324 on exchange 59020i @@ -478,6 +532,9 @@ tests: PICS: LTIME.S.A0002.SCT verification: | ./chip-tool timeformatlocalization write active-calendar-type 7 1 0 + + On TH verify that DUT sends a success response + [1651194780019] [14823:216414] CHIP: [DMG] WriteResponseMessage = [1651194780019] [14823:216414] CHIP: [DMG] { [1651194780019] [14823:216414] CHIP: [DMG] AttributeStatusIBs = @@ -508,6 +565,8 @@ tests: PICS: LTIME.S.A0001 verification: | ./chip-tool timeformatlocalization read active-calendar-type 1 0 + + On TH verify that ActiveCalendarType attribute value changed as 7 [1655184842.351575][2339:2344] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 3044477126 [1655184842.351697][2339:2344] CHIP:TOO: ActiveCalendarType: 7 [1655184842.351855][2339:2344] CHIP:EM: Sending Standalone Ack for MessageCounter:117380134 on exchange 31303i @@ -519,6 +578,8 @@ tests: PICS: LTIME.S.A0002.SCT verification: | ./chip-tool timeformatlocalization write active-calendar-type 8 1 0 + + On TH verify that DUT sends a success response [1651194780019] [14823:216414] CHIP: [DMG] WriteResponseMessage = [1651194780019] [14823:216414] CHIP: [DMG] { [1651194780019] [14823:216414] CHIP: [DMG] AttributeStatusIBs = @@ -590,6 +651,9 @@ tests: PICS: LTIME.S.A0001 verification: | ./chip-tool timeformatlocalization read active-calendar-type 1 0 + + On TH verify that ActiveCalendarType attribute value changed as 8 + [1655184888.113826][2364:2369] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 3044477128 [1655184888.113934][2364:2369] CHIP:TOO: ActiveCalendarType: 9 [1655184888.114068][2364:2369] CHIP:EM: Sending Standalone Ack for MessageCounter:236846127 on exchange 9207i @@ -631,6 +695,9 @@ tests: PICS: LTIME.S.A0001 verification: | ./chip-tool timeformatlocalization read active-calendar-type 1 0 + + On TH verify that ActiveCalendarType attribute value changed as 10 + [1655184911.317297][2377:2383] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 3044477129 [1655184911.317407][2377:2383] CHIP:TOO: ActiveCalendarType: 10 [1655184911.317542][2377:2383] CHIP:EM: Sending Standalone Ack for MessageCounter:69288389 on exchange 58126i @@ -642,6 +709,9 @@ tests: PICS: LTIME.S.A0002.SCT verification: | ./chip-tool timeformatlocalization write active-calendar-type 11 1 0 + + On TH verify that DUT sends a success response + [1651194780019] [14823:216414] CHIP: [DMG] WriteResponseMessage = [1651194780019] [14823:216414] CHIP: [DMG] { [1651194780019] [14823:216414] CHIP: [DMG] AttributeStatusIBs = @@ -672,6 +742,9 @@ tests: PICS: LTIME.S.A0001 verification: | ./chip-tool timeformatlocalization read active-calendar-type 1 0 + + On TH verify that DUT sends a success response + [1651194544627] [14736:213553] CHIP: [DMG] ReportDataMessage = [1651194544627] [14736:213553] CHIP: [DMG] { [1651194544627] [14736:213553] CHIP: [DMG] AttributeReportIBs = @@ -703,10 +776,10 @@ tests: - label: "TH writes 50 to ActiveCalendarType attribute" PICS: LTIME.S.A0001 verification: | - Verify in TH log: - ./chip-tool timeformatlocalization write active-calendar-type 50 1 0 + On TH verify that DUT sends a success response + [1656934134.261135][6359:6364] CHIP:DMG: WriteResponseMessage = [1656934134.261172][6359:6364] CHIP:DMG: { [1656934134.261204][6359:6364] CHIP:DMG: AttributeStatusIBs = @@ -737,9 +810,9 @@ tests: - label: "TH writes 5 to HourFormat attribute" PICS: LTIME.S.A0000 verification: | - Verify in TH log: + ./chip-tool timeformatlocalization write hour-format 5 1 0 - ./chip-tool timeformatlocalization write hour-format 5 1 0 + On TH verify that DUT sends a success response [1656934321.910991][6387:6392] CHIP:DMG: WriteResponseMessage = [1656934321.911025][6387:6392] CHIP:DMG: { diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_2_1.yaml index 74ef77e3b0d6ba..89b29acacd22c5 100644 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LUNIT_2_1.yaml @@ -26,143 +26,57 @@ tests: - label: "DUT reads TemperatureUnit attribute from TH" PICS: LUNIT.C.A0000 verification: | - verify on Reference app receives the right response for the data sent in the below commands - - ./chip-tool unitlocalization read temperature-unit 1 0 - - [1657108071.586424][5119:5124] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 4164031415 - [1657108071.586491][5119:5124] CHIP:TOO: TemperatureUnit: 0 - disabled: true - - - label: "DUT writes 0 to TemperatureUnit attribute" - PICS: LUNIT.C.A0000.Fahrenheit - verification: | - verify on Reference app receives the right response for the data sent in the below commands - - ./chip-tool unitlocalization write temperature-unit 0 1 0 - - [1657108113.524411][5127:5132] CHIP:DMG: WriteResponseMessage = - [1657108113.524437][5127:5132] CHIP:DMG: { - [1657108113.524460][5127:5132] CHIP:DMG: AttributeStatusIBs = - [1657108113.524497][5127:5132] CHIP:DMG: [ - [1657108113.524521][5127:5132] CHIP:DMG: AttributeStatusIB = - [1657108113.524551][5127:5132] CHIP:DMG: { - [1657108113.524579][5127:5132] CHIP:DMG: AttributePathIB = - [1657108113.524610][5127:5132] CHIP:DMG: { - [1657108113.524645][5127:5132] CHIP:DMG: Endpoint = 0x0, - [1657108113.524678][5127:5132] CHIP:DMG: Cluster = 0x2d, - [1657108113.524708][5127:5132] CHIP:DMG: Attribute = 0x0000_0000, - [1657108113.524739][5127:5132] CHIP:DMG: } - [1657108113.524771][5127:5132] CHIP:DMG: - [1657108113.524800][5127:5132] CHIP:DMG: StatusIB = - [1657108113.524831][5127:5132] CHIP:DMG: { - [1657108113.524862][5127:5132] CHIP:DMG: status = 0x00 (SUCCESS), - [1657108113.524895][5127:5132] CHIP:DMG: }, - [1657108113.524924][5127:5132] CHIP:DMG: - [1657108113.524951][5127:5132] CHIP:DMG: }, - [1657108113.524981][5127:5132] CHIP:DMG: - [1657108113.525005][5127:5132] CHIP:DMG: ], - [1657108113.525034][5127:5132] CHIP:DMG: - [1657108113.525058][5127:5132] CHIP:DMG: InteractionModelRevision = 1 - [1657108113.525081][5127:5132] CHIP:DMG: } - [1657108113.525148][5127:5132] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: "DUT reads TemperatureUnit attribute from TH" - PICS: LUNIT.C.A0000 - verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool unitlocalization read temperature-unit 1 0 - - [1657108071.586424][5119:5124] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 4164031415 - [1657108071.586491][5119:5124] CHIP:TOO: TemperatureUnit: 0 + Verify in DUT as client side: Verify that DUT reads TemperatureUnit attribute value is in the range 0 to 3 + [1658246774.701510][2262:2267] CHIP:DMG: } + [1658246774.701747][2262:2267] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 2312195207 + [1658246774.702985][2262:2267] CHIP:TOO: TemperatureUnit: 0 + [1658246774.703107][2262:2267] CHIP:EM: Sending Standalone Ack for MessageCounter:177086388 on exchange 32231i disabled: true - - label: "DUT writes 1 to TemperatureUnit attribute" - PICS: LUNIT.C.A0000.Celsius - verification: | - verify on Reference app receives the right response for the data sent in the below commands - - ./chip-tool unitlocalization write temperature-unit 1 1 0 - - [1657108163.429166][5149:5154] CHIP:DMG: WriteResponseMessage = - [1657108163.429205][5149:5154] CHIP:DMG: { - [1657108163.429228][5149:5154] CHIP:DMG: AttributeStatusIBs = - [1657108163.429259][5149:5154] CHIP:DMG: [ - [1657108163.429283][5149:5154] CHIP:DMG: AttributeStatusIB = - [1657108163.429310][5149:5154] CHIP:DMG: { - [1657108163.429335][5149:5154] CHIP:DMG: AttributePathIB = - [1657108163.429374][5149:5154] CHIP:DMG: { - [1657108163.429405][5149:5154] CHIP:DMG: Endpoint = 0x0, - [1657108163.429441][5149:5154] CHIP:DMG: Cluster = 0x2d, - [1657108163.429474][5149:5154] CHIP:DMG: Attribute = 0x0000_0000, - [1657108163.429505][5149:5154] CHIP:DMG: } - [1657108163.429539][5149:5154] CHIP:DMG: - [1657108163.429572][5149:5154] CHIP:DMG: StatusIB = - [1657108163.429606][5149:5154] CHIP:DMG: { - [1657108163.429637][5149:5154] CHIP:DMG: status = 0x00 (SUCCESS), - [1657108163.429671][5149:5154] CHIP:DMG: }, - [1657108163.429702][5149:5154] CHIP:DMG: - [1657108163.429728][5149:5154] CHIP:DMG: }, - [1657108163.429759][5149:5154] CHIP:DMG: - [1657108163.429782][5149:5154] CHIP:DMG: ], - [1657108163.429811][5149:5154] CHIP:DMG: - [1657108163.429834][5149:5154] CHIP:DMG: InteractionModelRevision = 1 - [1657108163.429857][5149:5154] CHIP:DMG: } - [1657108163.429923][5149:5154] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: "DUT reads TemperatureUnit attribute from TH" + - label: "DUT writes 3 to TemperatureUnit attribute on TH" PICS: LUNIT.C.A0000 verification: | - verify on Reference app receives the right response for the data sent in the below commands - - ./chip-tool unitlocalization read temperature-unit 1 0 - [1657108230.188723][5156:5161] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 4164031418 - [1657108230.188792][5156:5161] CHIP:TOO: TemperatureUnit: 1 - disabled: true - - - label: "DUT writes 2 to TemperatureUnit attribute" - PICS: LUNIT.C.A0000.Kelvin - verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool unitlocalization write temperature-unit 2 1 0 - - [1657108163.429166][5149:5154] CHIP:DMG: WriteResponseMessage = - [1657108163.429205][5149:5154] CHIP:DMG: { - [1657108163.429228][5149:5154] CHIP:DMG: AttributeStatusIBs = - [1657108163.429259][5149:5154] CHIP:DMG: [ - [1657108163.429283][5149:5154] CHIP:DMG: AttributeStatusIB = - [1657108163.429310][5149:5154] CHIP:DMG: { - [1657108163.429335][5149:5154] CHIP:DMG: AttributePathIB = - [1657108163.429374][5149:5154] CHIP:DMG: { - [1657108163.429405][5149:5154] CHIP:DMG: Endpoint = 0x0, - [1657108163.429441][5149:5154] CHIP:DMG: Cluster = 0x2d, - [1657108163.429474][5149:5154] CHIP:DMG: Attribute = 0x0000_0000, - [1657108163.429505][5149:5154] CHIP:DMG: } - [1657108163.429539][5149:5154] CHIP:DMG: - [1657108163.429572][5149:5154] CHIP:DMG: StatusIB = - [1657108163.429606][5149:5154] CHIP:DMG: { - [1657108163.429637][5149:5154] CHIP:DMG: status = 0x00 (SUCCESS), - [1657108163.429671][5149:5154] CHIP:DMG: }, - [1657108163.429702][5149:5154] CHIP:DMG: - [1657108163.429728][5149:5154] CHIP:DMG: }, - [1657108163.429759][5149:5154] CHIP:DMG: - [1657108163.429782][5149:5154] CHIP:DMG: ], - [1657108163.429811][5149:5154] CHIP:DMG: - [1657108163.429834][5149:5154] CHIP:DMG: InteractionModelRevision = 1 - [1657108163.429857][5149:5154] CHIP:DMG: } - [1657108163.429923][5149:5154] CHIP:DMG: WriteClient moving to [AwaitingDe] + ./chip-tool unitlocalization write temperature-unit 3 1 0 + Verify in DUT as client side: verify that DUT sends a success response + + [1658246841.988723][2274:2279] CHIP:DMG: WriteClient moving to [ResponseRe] + [1658246841.988793][2274:2279] CHIP:DMG: WriteResponseMessage = + [1658246841.988835][2274:2279] CHIP:DMG: { + [1658246841.988871][2274:2279] CHIP:DMG: AttributeStatusIBs = + [1658246841.988921][2274:2279] CHIP:DMG: [ + [1658246841.988960][2274:2279] CHIP:DMG: AttributeStatusIB = + [1658246841.989005][2274:2279] CHIP:DMG: { + [1658246841.989046][2274:2279] CHIP:DMG: AttributePathIB = + [1658246841.989102][2274:2279] CHIP:DMG: { + [1658246841.989153][2274:2279] CHIP:DMG: Endpoint = 0x0, + [1658246841.989208][2274:2279] CHIP:DMG: Cluster = 0x2d, + [1658246841.989261][2274:2279] CHIP:DMG: Attribute = 0x0000_0000, + [1658246841.989313][2274:2279] CHIP:DMG: } + [1658246841.989369][2274:2279] CHIP:DMG: + [1658246841.989418][2274:2279] CHIP:DMG: StatusIB = + [1658246841.989469][2274:2279] CHIP:DMG: { + [1658246841.989518][2274:2279] CHIP:DMG: status = 0x00 (SUCCESS), + [1658246841.989569][2274:2279] CHIP:DMG: }, + [1658246841.989620][2274:2279] CHIP:DMG: + [1658246841.989664][2274:2279] CHIP:DMG: }, + [1658246841.989712][2274:2279] CHIP:DMG: + [1658246841.989750][2274:2279] CHIP:DMG: ], + [1658246841.989797][2274:2279] CHIP:DMG: + [1658246841.989836][2274:2279] CHIP:DMG: InteractionModelRevision = 1 + [1658246841.989874][2274:2279] CHIP:DMG: } + [1658246841.990021][2274:2279] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658246841.990103][2274:2279] CHIP:EM: Sending Standalone Ack for MessageCounter:83846292 on exchange 33799i disabled: true - label: "DUT reads TemperatureUnit attribute from TH" PICS: LUNIT.C.A0000 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool unitlocalization read temperature-unit 1 0 + Verify in DUT as client side: Verify that DUT reads TemperatureUnit attribute value as 3 - [1657108230.188723][5156:5161] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 4164031418 - [1657108230.188792][5156:5161] CHIP:TOO: TemperatureUnit: 2 + [1658246890.082009][2283:2288] CHIP:DMG: } + [1658246890.082194][2283:2288] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 2312195208 + [1658246890.082278][2283:2288] CHIP:TOO: TemperatureUnit: 3 + [1658246890.082378][2283:2288] CHIP:EM: Sending Standalone Ack for MessageCounter:2721421 on exchange 29345i disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_3_1.yaml index 47280cb67e371c..51b0774a98f30f 100644 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LUNIT_3_1.yaml @@ -19,150 +19,79 @@ name: config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Unit Localization" endpoint: 0 tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + - label: "TH reads TemperatureUnit attribute from DUT" PICS: LUNIT.S.A0000 - verification: | - Verify in TH log: - - ./chip-tool unitlocalization read temperature-unit 1 0 - [1651186538224] [11210:117238] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 486381485 - [1651186538224] [11210:117238] CHIP: [TOO] TemperatureUnit: 0 - disabled: true + command: "readAttribute" + attribute: "TemperatureUnit" + response: + constraints: + type: enum8 - - label: "TH writes 0 to TemperatureUnit attribute" + - label: "TH writes 0 (Fahrenheit) to TemperatureUnit attribute" PICS: LUNIT.C.A0000.Fahrenheit - verification: | - Verify in TH log: - - ./chip-tool unitlocalization write temperature-unit 0 1 0 - [1651191017267] [13215:170815] CHIP: [DMG] WriteResponseMessage = - [1651191017267] [13215:170815] CHIP: [DMG] { - [1651191017267] [13215:170815] CHIP: [DMG] AttributeStatusIBs = - [1651191017267] [13215:170815] CHIP: [DMG] [ - [1651191017267] [13215:170815] CHIP: [DMG] AttributeStatusIB = - [1651191017267] [13215:170815] CHIP: [DMG] { - [1651191017267] [13215:170815] CHIP: [DMG] AttributePathIB = - [1651191017267] [13215:170815] CHIP: [DMG] { - [1651191017267] [13215:170815] CHIP: [DMG] Endpoint = 0x0, - [1651191017267] [13215:170815] CHIP: [DMG] Cluster = 0x2d, - [1651191017267] [13215:170815] CHIP: [DMG] Attribute = 0x0000_0000, - [1651191017267] [13215:170815] CHIP: [DMG] } - [1651191017267] [13215:170815] CHIP: [DMG] - [1651191017267] [13215:170815] CHIP: [DMG] StatusIB = - [1651191017267] [13215:170815] CHIP: [DMG] { - [1651191017267] [13215:170815] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651191017267] [13215:170815] CHIP: [DMG] }, - [1651191017267] [13215:170815] CHIP: [DMG] - [1651191017267] [13215:170815] CHIP: [DMG] }, - [1651191017267] [13215:170815] CHIP: [DMG] - [1651191017267] [13215:170815] CHIP: [DMG] ], - [1651191017267] [13215:170815] CHIP: [DMG] - [1651191017267] [13215:170815] CHIP: [DMG] InteractionModelRevision = 1 - disabled: true + cluster: "Unit Localization" + command: "writeAttribute" + attribute: "TemperatureUnit" + arguments: + value: 0 - label: "TH reads TemperatureUnit attribute" PICS: LUNIT.C.A0000 - verification: | - Verify in TH log: + command: "readAttribute" + attribute: "TemperatureUnit" + response: + value: 0 - ./chip-tool unitlocalization read temperature-unit 1 0 - [1651190135534] [12868:159849] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 486381486 - [1651190135534] [12868:159849] CHIP: [TOO] TemperatureUnit: 0 - disabled: true - - - label: "TH writes 1 to TemperatureUnit attribute" + - label: "TH writes 1 (Celsius) to TemperatureUnit attribute" PICS: LUNIT.C.A0000.Celsius - verification: | - Verify in TH log: - - ./chip-tool unitlocalization write temperature-unit 1 1 0 - - [1651190221003] [12900:161139] CHIP: [DMG] WriteResponseMessage = - [1651190221003] [12900:161139] CHIP: [DMG] { - [1651190221003] [12900:161139] CHIP: [DMG] AttributeStatusIBs = - [1651190221003] [12900:161139] CHIP: [DMG] [ - [1651190221003] [12900:161139] CHIP: [DMG] AttributeStatusIB = - [1651190221003] [12900:161139] CHIP: [DMG] { - [1651190221003] [12900:161139] CHIP: [DMG] AttributePathIB = - [1651190221003] [12900:161139] CHIP: [DMG] { - [1651190221003] [12900:161139] CHIP: [DMG] Endpoint = 0x0, - [1651190221003] [12900:161139] CHIP: [DMG] Cluster = 0x2d, - [1651190221003] [12900:161139] CHIP: [DMG] Attribute = 0x0000_0000, - [1651190221003] [12900:161139] CHIP: [DMG] } - [1651190221003] [12900:161139] CHIP: [DMG] - [1651190221003] [12900:161139] CHIP: [DMG] StatusIB = - [1651190221003] [12900:161139] CHIP: [DMG] { - [1651190221003] [12900:161139] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651190221003] [12900:161139] CHIP: [DMG] }, - [1651190221003] [12900:161139] CHIP: [DMG] - [1651190221003] [12900:161139] CHIP: [DMG] }, - [1651190221003] [12900:161139] CHIP: [DMG] - [1651190221003] [12900:161139] CHIP: [DMG] ], - [1651190221003] [12900:161139] CHIP: [DMG] - [1651190221003] [12900:161139] CHIP: [DMG] InteractionModelRevision = 1 - [1651190221003] [12900:161139] CHIP: [DMG] } - disabled: true + cluster: "Unit Localization" + command: "writeAttribute" + attribute: "TemperatureUnit" + arguments: + value: 1 - label: "TH reads TemperatureUnit attribute" PICS: LUNIT.C.A0000 - verification: | - Verify in TH log: - - ./chip-tool unitlocalization read temperature-unit 1 0 - [1651190800434] [13122:167909] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 486381489 - [1651190800434] [13122:167909] CHIP: [TOO] TemperatureUnit: 1 - disabled: true + command: "readAttribute" + attribute: "TemperatureUnit" + response: + value: 1 - - label: "TH writes 2 to TemperatureUnit attribute" + - label: "TH writes 2 (Kelvin) to TemperatureUnit attribute" PICS: LUNIT.C.A0000.Kelvin - verification: | - Verify in TH log: - - ./chip-tool unitlocalization write temperature-unit 2 1 0 - [1651190829573] [13133:168303] CHIP: [DMG] WriteResponseMessage = - [1651190829573] [13133:168303] CHIP: [DMG] { - [1651190829573] [13133:168303] CHIP: [DMG] AttributeStatusIBs = - [1651190829573] [13133:168303] CHIP: [DMG] [ - [1651190829573] [13133:168303] CHIP: [DMG] AttributeStatusIB = - [1651190829573] [13133:168303] CHIP: [DMG] { - [1651190829573] [13133:168303] CHIP: [DMG] AttributePathIB = - [1651190829573] [13133:168303] CHIP: [DMG] { - [1651190829573] [13133:168303] CHIP: [DMG] Endpoint = 0x0, - [1651190829573] [13133:168303] CHIP: [DMG] Cluster = 0x2d, - [1651190829573] [13133:168303] CHIP: [DMG] Attribute = 0x0000_0000, - [1651190829573] [13133:168303] CHIP: [DMG] } - [1651190829573] [13133:168303] CHIP: [DMG] - [1651190829573] [13133:168303] CHIP: [DMG] StatusIB = - [1651190829573] [13133:168303] CHIP: [DMG] { - [1651190829573] [13133:168303] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651190829573] [13133:168303] CHIP: [DMG] }, - [1651190829573] [13133:168303] CHIP: [DMG] - [1651190829573] [13133:168303] CHIP: [DMG] }, - [1651190829573] [13133:168303] CHIP: [DMG] - [1651190829573] [13133:168303] CHIP: [DMG] ], - [1651190829573] [13133:168303] CHIP: [DMG] - [1651190829573] [13133:168303] CHIP: [DMG] InteractionModelRevision = 1 - [1651190829573] [13133:168303] CHIP: [DMG] } - disabled: true + cluster: "Unit Localization" + command: "writeAttribute" + attribute: "TemperatureUnit" + arguments: + value: 2 - label: "TH reads TemperatureUnit attribute" PICS: LUNIT.C.A0000 - verification: | - Verify in TH log: - - ./chip-tool unitlocalization read temperature-unit 1 0 - [1651190908005] [13164:169492] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 486381490 - [1651190908005] [13164:169492] CHIP: [TOO] TemperatureUnit: 2 - disabled: true + command: "readAttribute" + attribute: "TemperatureUnit" + response: + value: 2 - label: "TH writes 5 to TemperatureUnit attribute" PICS: LUNIT.C.A0000 - verification: | - Verify in TH log: - - Verify that the write request fails with 0x87 (Constraint Error) - disabled: true + cluster: "Unit Localization" + command: "writeAttribute" + attribute: "TemperatureUnit" + arguments: + # Per spec, if [TEMP] feature is enabled, then this attribute can be + # one of 0 (Farenheit), 1 (Celsius) or 2 (Kelvin) + value: 5 # INVALID + response: + error: CONSTRAINT_ERROR diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index 10f10b40948ffa..599a74ca31c732 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 5 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: LVL.S.F00 || LVL.S.F01 || LVL.S.F02 @@ -42,7 +42,7 @@ tests: attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 7 @@ -85,7 +85,7 @@ tests: type: list contains: [2] - - label: "Read the optonal attribute(MinLevel) in AttributeList" + - label: "Read the optonal attribute(MaxLevel) in AttributeList" PICS: LVL.S.A0003 command: "readAttribute" attribute: "AttributeList" @@ -131,22 +131,23 @@ tests: contains: [20] - label: "Read the global attribute: AcceptedCommandList" - PICS: LVL.S.F02 command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0, 1, 2, 3, 4, 5, 6, 7, 8] + contains: [0, 1, 2, 3, 4, 5, 6, 7] - - label: "Read the global attribute: AcceptedCommandList" - PICS: " !LVL.S.F02 " + - label: + "Read the Feature-dependent(LVL.S.F02) attribute in + AcceptedCommandList" + PICS: LVL.S.F02 command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0, 1, 2, 3, 4, 5, 6, 7] + contains: [8] - label: "Read the global attribute: GeneratedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml index b6f4088fd15da6..179ba1b5b9ecbb 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml @@ -28,37 +28,6 @@ tests: - name: "nodeId" value: nodeId - # Temporary - see #13551 - - label: "Precondition: Reset level to 254" - PICS: PICS_SDK_CI_ONLY - command: "MoveToLevel" - arguments: - values: - - name: "level" - value: 254 - - name: "transitionTime" - value: 0 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 - - - label: "Wait 100ms" - PICS: PICS_SDK_CI_ONLY - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - - label: "Precondition: Reads the CurrentLevel attribute" - PICS: LVL.S.A0000 - command: "readAttribute" - attribute: "current level" - response: - value: 254 - - label: "Reads the CurrentLevel attribute" PICS: LVL.S.A0000 command: "readAttribute" @@ -66,7 +35,7 @@ tests: response: saveAs: CurrentLevelValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -76,7 +45,7 @@ tests: attribute: "remaining time" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -88,16 +57,16 @@ tests: value: 1 saveAs: MinLevelValue constraints: - type: uint8 + type: int8u - label: "Reads the MinLevel attribute" PICS: LVL.S.A0002 && !LVL.S.F01 command: "readAttribute" attribute: "min level" response: - saveAs: MinLevelValue1 + saveAs: MinLevelFeatureMapNotSupportedValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -109,7 +78,7 @@ tests: value: 254 saveAs: MaxLevelValue constraints: - type: uint8 + type: int8u minValue: MinLevelValue - label: "Reads the MaxLevel attribute" @@ -117,10 +86,10 @@ tests: command: "readAttribute" attribute: "max level" response: - saveAs: MaxLevelValue1 + saveAs: MaxLevelFeatureMapNotSupportedValue constraints: - type: uint8 - minValue: MinLevelValue1 + type: int8u + minValue: MinLevelFeatureMapNotSupportedValue maxValue: 254 - label: "Step 4b & 4C Reads the CurrentLevel attribute" @@ -129,7 +98,7 @@ tests: attribute: "current level" response: constraints: - type: uint8 + type: int8u minValue: MinLevelValue maxValue: MaxLevelValue @@ -139,9 +108,9 @@ tests: attribute: "current level" response: constraints: - type: uint8 - minValue: MinLevelValue1 - maxValue: MaxLevelValue1 + type: int8u + minValue: MinLevelFeatureMapNotSupportedValue + maxValue: MaxLevelFeatureMapNotSupportedValue - label: "Reads the CurrentFrequency attribute" PICS: LVL.S.A0004 @@ -149,7 +118,7 @@ tests: attribute: "current frequency" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -160,7 +129,7 @@ tests: response: saveAs: MinFrequencyValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -171,7 +140,7 @@ tests: response: saveAs: MaxFrequencyValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -181,7 +150,7 @@ tests: attribute: "current frequency" response: constraints: - type: uint16 + type: int16u minValue: MinFrequencyValue maxValue: MaxFrequencyValue @@ -191,7 +160,7 @@ tests: attribute: "on off transition time" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -201,7 +170,7 @@ tests: attribute: "on level" response: constraints: - type: uint8 + type: int8u minValue: MinLevelValue maxValue: MaxLevelValue @@ -211,9 +180,9 @@ tests: attribute: "on level" response: constraints: - type: uint8 - minValue: MinLevelValue1 - maxValue: MaxLevelValue1 + type: int8u + minValue: MinLevelFeatureMapNotSupportedValue + maxValue: MaxLevelFeatureMapNotSupportedValue - label: "Reads the OnTransitionTime attribute " PICS: LVL.S.A0012 @@ -221,7 +190,7 @@ tests: attribute: "on transition time" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -231,7 +200,7 @@ tests: attribute: "off transition time" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -241,7 +210,7 @@ tests: attribute: "default move rate" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -252,7 +221,7 @@ tests: response: value: 0 constraints: - type: map8 + type: bitmap8 - label: "Reads the StartUpCurrentLevel attribute " PICS: LVL.S.A4000 @@ -260,6 +229,6 @@ tests: attribute: "start up current level" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml index 791618634c6cbe..d6a3ae0b17a032 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml @@ -19,22 +19,22 @@ config: cluster: "Level Control" endpoint: 1 OnOffTransitionTimeConfigValue: - type: INT16U + type: int16u defaultValue: 10 OnLevelConfigValue: - type: INT8U + type: int8u defaultValue: 5 OnTransitionTimeConfigValue: - type: INT16U + type: int16u defaultValue: 5 OffTransitionTimeConfigValue: - type: INT16U + type: int16u defaultValue: 10 DefaultMoveRateConfigValue: - type: INT8U + type: int8u defaultValue: 111 StartUpCurrentLevelConfigValue: - type: INT8U + type: int8u defaultValue: 5 tests: @@ -53,7 +53,7 @@ tests: response: saveAs: OnOffTransitionTimeValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -71,7 +71,7 @@ tests: response: value: OnOffTransitionTimeConfigValue constraints: - type: uint16 + type: int16u notValue: OnOffTransitionTimeValue - label: "Reads the OnLevel attribute from the DUT" @@ -81,7 +81,7 @@ tests: response: saveAs: OnLevelValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -99,7 +99,7 @@ tests: response: value: OnLevelConfigValue constraints: - type: uint8 + type: int8u notValue: OnLevelValue - label: "Reads the OnTransitionTime attribute from the DUT" @@ -109,7 +109,7 @@ tests: response: saveAs: OnTransitionTimeValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -127,7 +127,7 @@ tests: response: value: OnTransitionTimeConfigValue constraints: - type: uint16 + type: int16u notValue: OnTransitionTimeValue - label: "Reads the OffTransitionTime attribute from the DUT" @@ -137,7 +137,7 @@ tests: response: saveAs: OffTransitionTimeValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -155,7 +155,7 @@ tests: response: value: OffTransitionTimeConfigValue constraints: - type: uint16 + type: int16u notValue: OffTransitionTimeValue - label: "Reads the DefaultMoveRate attribute from the DUT" @@ -165,7 +165,7 @@ tests: response: saveAs: DefaultMoveRatevalue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -183,7 +183,7 @@ tests: response: value: DefaultMoveRateConfigValue constraints: - type: uint8 + type: int8u notValue: DefaultMoveRatevalue - label: "Reads the StartUpCurrentLevel attribute from the DUT" @@ -193,7 +193,7 @@ tests: response: saveAs: StartUpCurrentLevelValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -211,9 +211,10 @@ tests: response: value: StartUpCurrentLevelConfigValue constraints: - type: uint8 + type: int8u notValue: StartUpCurrentLevelValue + #This is a reset step that is needed to reset the value of the attribute to the default values so as to not effect other test cases. - label: "writes back default value of OnOffTransitionTime attribute" PICS: LVL.S.A0010 command: "writeAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml index 7d87c801db219c..a58ef22a068dbc 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml @@ -589,9 +589,9 @@ tests: "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order" verification: | + ./chip-tool levelcontrol read remaining-time 1 1 Verify in TH all-clusters-app - ./chip-tool levelcontrol read remaining-time 1 1 [1657913955.033202][3126:3126] CHIP:IM: Received Read request [1657913955.033289][3126:3126] CHIP:DMG: ReadRequestMessage = [1657913955.033319][3126:3126] CHIP:DMG: { @@ -611,7 +611,9 @@ tests: [1657913955.033764][3126:3126] CHIP:DMG: }, - ./chip-tool levelcontrol read min-level 1 1 + ./chip-tool levelcontrol read min-level 1 1 + Verify in TH all-clusters-app + [1657914034.938109][3245:3245] CHIP:DMG: ReadRequestMessage = [1657914034.938157][3245:3245] CHIP:DMG: { [1657914034.938197][3245:3245] CHIP:DMG: AttributePathIBs = @@ -631,6 +633,8 @@ tests: ./chip-tool levelcontrol read max-level 1 1 + Verify in TH all-clusters-app + [1657914049.937379][3245:3245] CHIP:IM: Received Read request [1657914049.937458][3245:3245] CHIP:DMG: ReadRequestMessage = [1657914049.937487][3245:3245] CHIP:DMG: { @@ -651,6 +655,7 @@ tests: ./chip-tool levelcontrol read current-frequency 1 1 + Verify in TH all-clusters-app [1657914066.583478][3245:3245] CHIP:DMG: ReadRequestMessage = [1657914066.583530][3245:3245] CHIP:DMG: { [1657914066.583568][3245:3245] CHIP:DMG: AttributePathIBs = @@ -670,6 +675,7 @@ tests: ./chip-tool levelcontrol read min-frequency 1 1 + Verify in TH all-clusters-app [1657914086.207991][3245:3245] CHIP:IM: Received Read request [1657914086.208155][3245:3245] CHIP:DMG: ReadRequestMessage = [1657914086.208207][3245:3245] CHIP:DMG: { @@ -690,6 +696,7 @@ tests: ./chip-tool levelcontrol read max-frequency 1 1 + Verify in TH all-clusters-app [1657914105.798625][3245:3245] CHIP:IM: Received Read request [1657914105.798770][3245:3245] CHIP:DMG: ReadRequestMessage = [1657914105.798846][3245:3245] CHIP:DMG: { @@ -709,6 +716,7 @@ tests: [1657914105.799842][3245:3245] CHIP:DMG: }, ./chip-tool levelcontrol read on-off-transition-time 1 1 + Verify in TH all-clusters-app [1657914125.515789][3245:3245] CHIP:IM: Received Read request [1657914125.515917][3245:3245] CHIP:DMG: ReadRequestMessage = [1657914125.515964][3245:3245] CHIP:DMG: { @@ -732,9 +740,9 @@ tests: "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer specific order" verification: | + ./chip-tool levelcontrol write on-off-transition-time 5 1 1 Verify in TH all-clusters-app - ./chip-tool levelcontrol write on-off-transition-time 5 1 1 [1657914163.137445][3245:3245] CHIP:DMG: WriteRequestMessage = [1657914163.137491][3245:3245] CHIP:DMG: { [1657914163.137533][3245:3245] CHIP:DMG: suppressResponse = false, @@ -761,6 +769,8 @@ tests: ./chip-tool levelcontrol write on-transition-time 5 1 1 + Verify in TH all-clusters-app + [1657914187.402168][3245:3245] CHIP:DMG: WriteRequestMessage = [1657914187.402215][3245:3245] CHIP:DMG: { [1657914187.402258][3245:3245] CHIP:DMG: suppressResponse = false, @@ -812,6 +822,8 @@ tests: [1657914206.149489][3245:3245] CHIP:DMG: }, ./chip-tool levelcontrol write default-move-rate 5 1 1 + Verify in TH all-clusters-app + [1657914228.843788][3245:3245] CHIP:DMG: WriteRequestMessage = [1657914228.843839][3245:3245] CHIP:DMG: { [1657914228.843881][3245:3245] CHIP:DMG: suppressResponse = false, diff --git a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml index df5043401010d4..b1bafbe1a9c3ce 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml @@ -41,13 +41,20 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: LVL.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Reads the MinLevel attribute" PICS: LVL.S.A0002 command: "readAttribute" attribute: "min level" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -57,7 +64,7 @@ tests: attribute: "max level" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -70,10 +77,10 @@ tests: value: 64 - name: "transitionTime" value: 0 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - label: "Wait 100ms" cluster: "DelayCommands" @@ -99,10 +106,10 @@ tests: value: 100 - name: "transitionTime" value: 0 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - label: "Wait 100 ms" cluster: "DelayCommands" @@ -128,10 +135,10 @@ tests: value: 128 - name: "transitionTime" value: 100 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - label: "Wait 11000ms" cluster: "DelayCommands" @@ -154,7 +161,7 @@ tests: attribute: "on off transition time" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -168,10 +175,10 @@ tests: value: 64 - name: "transitionTime" value: 0xFFFF - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - label: "Wait 1000ms" cluster: "DelayCommands" @@ -188,28 +195,6 @@ tests: response: value: 64 - - label: "Reset level to 254" - PICS: LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000 - command: "MoveToLevel" - arguments: - values: - - name: "level" - value: 254 - - name: "transitionTime" - value: 0 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 - - - label: "Wait 100ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - label: "Precondition send Off Command" cluster: "On/Off" PICS: OO.S.C00.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml index f9dadfe58fbc15..f03caa284c3927 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml @@ -41,6 +41,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: LVL.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Reads Minlevel attribute from DUT" PICS: LVL.S.A0002 command: "readAttribute" @@ -48,7 +55,7 @@ tests: response: saveAs: MinlevelValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -61,9 +68,9 @@ tests: value: 1 - name: "transitionTime" value: 0 - - name: "optionMask" + - name: "OptionsMask" value: 1 - - name: "optionOverride" + - name: "OptionsOverride" value: 1 - label: "reads max level attribute from DUT" @@ -73,7 +80,7 @@ tests: response: saveAs: MaxlevelValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -86,9 +93,9 @@ tests: value: 0 - name: "rate" value: 32 - - name: "optionMask" + - name: "OptionsMask" value: 1 - - name: "optionOverride" + - name: "OptionsOverride" value: 1 - label: @@ -97,7 +104,7 @@ tests: maximum level" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && LVL.S.C01.Rsp arguments: values: - name: "message" @@ -120,18 +127,18 @@ tests: response: value: MaxlevelValue - - label: "sends a MoveWithOnOff command" + - label: "sends a Move command" PICS: LVL.S.C05.Rsp - command: "MoveWithOnOff" + command: "Move" arguments: values: - name: "moveMode" value: 1 - name: "rate" value: 64 - - name: "optionMask" + - name: "OptionsMask" value: 1 - - name: "optionOverride" + - name: "OptionsOverride" value: 1 - label: @@ -140,7 +147,7 @@ tests: minimum level" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && LVL.S.C05.Rsp arguments: values: - name: "message" @@ -156,7 +163,6 @@ tests: - name: "ms" value: 5000 - # For lighting Device type current level minimal value is 1 - label: "reads CurrentLevel attribute from DUT" PICS: LVL.S.C05.Rsp && LVL.S.A0000 command: "readAttribute" @@ -174,7 +180,7 @@ tests: response: saveAs: DefaultMoveRateValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -187,25 +193,25 @@ tests: value: 0 - name: "rate" value: 255 - - name: "optionMask" + - name: "OptionsMask" value: 1 - - name: "optionOverride" + - name: "OptionsOverride" value: 1 - - label: "Wait 100ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 500 - label: "Physically verify that the device moves at the rate recorded in step 3a and completes moving to its maximum level" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && LVL.S.C05.Rsp && LVL.S.A0014 arguments: values: - name: "message" @@ -213,28 +219,6 @@ tests: - name: "expectedValue" value: "y" - - label: "Reset level to 254" - PICS: LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000 - command: "MoveToLevel" - arguments: - values: - - name: "level" - value: 254 - - name: "transitionTime" - value: 0 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 - - - label: "Wait 100ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - label: "Precondition send Off Command" cluster: "On/Off" PICS: OO.S.C00.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml index abcf91204efe42..600b487af75e70 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml @@ -41,6 +41,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: LVL.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Reads Minlevel attribute from DUT" PICS: LVL.S.A0002 command: "readAttribute" @@ -48,35 +55,60 @@ tests: response: saveAs: MinlevelValue constraints: - type: uint8 + type: int8u minValue: 0 - maxValue: 255 + maxValue: 254 - label: "Sends MoveToLevelWithOnOff command to DUT" - PICS: LVL.S.C04.Rsp + PICS: LVL.S.C04.Rsp && LVL.S.A0002 command: "MoveToLevelWithOnOff" arguments: values: - name: "level" - value: MinlevelValue + value: MinlevelValue + 1 - name: "transitionTime" value: 0 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + + - label: "Sends MoveToLevelWithOnOff command to DUT" + PICS: LVL.S.C04.Rsp && !LVL.S.A0002 + command: "MoveToLevelWithOnOff" + arguments: + values: + - name: "level" + value: 2 + - name: "transitionTime" + value: 0 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - label: "Reads current level attribute from DUT" - PICS: LVL.S.A0000 + PICS: LVL.S.A0000 && LVL.S.C04.Rsp command: "readAttribute" attribute: "current level" response: - value: MinlevelValue + value: MinlevelValue + 1 saveAs: CurrentlevelValue constraints: - type: uint8 + type: int8u + minValue: 0 + maxValue: 254 + + - label: "Reads current level attribute from DUT" + PICS: LVL.S.A0000 && !LVL.S.A0002 && LVL.S.C04.Rsp + command: "readAttribute" + attribute: "current level" + response: + value: 2 + constraints: + type: int8u minValue: 0 - maxValue: 255 + maxValue: 254 - label: "Sends step up command to DUT" PICS: LVL.S.C02.Rsp && LVL.S.M.VarRate @@ -89,28 +121,52 @@ tests: value: 64 - name: "transitionTime" value: 20 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + + - label: "Sends step up command to DUT" + PICS: LVL.S.C02.Rsp && !LVL.S.M.VarRate + command: "Step" + arguments: + values: + - name: "stepMode" + value: 0 + - name: "stepSize" + value: 64 + - name: "transitionTime" + value: 20 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - - label: "Wait 4000ms" + - label: "Wait 2500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 4000 + value: 2500 + + - label: "Reads current level attribute from DUT" + PICS: LVL.S.A0000 && LVL.S.C02.Rsp && LVL.S.M.VarRate + command: "readAttribute" + attribute: "current level" + response: + value: 66 + constraints: + type: int8u - label: "Reads current level attribute from DUT" - PICS: LVL.S.A0000 && LVL.S.C02.Rsp + PICS: LVL.S.A0000 && LVL.S.C02.Rsp && !LVL.S.M.VarRate command: "readAttribute" attribute: "current level" response: + value: 66 constraints: - type: uint8 - minValue: 60 - maxValue: 68 + type: int8u - label: "Sends a StepWithOnOff command" PICS: LVL.S.C06.Rsp && LVL.S.M.VarRate @@ -123,47 +179,62 @@ tests: value: 64 - name: "transitionTime" value: 20 - - name: "optionMask" - value: 1 - - name: "optionOverride" + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + + - label: "Sends a StepWithOnOff command" + PICS: LVL.S.C06.Rsp && !LVL.S.M.VarRate + command: "StepWithOnOff" + arguments: + values: + - name: "stepMode" value: 1 + - name: "stepSize" + value: 64 + - name: "transitionTime" + value: 20 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - - label: "Wait 4000ms" + - label: "Wait 2500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 4000 + value: 2500 - label: "Reads current level attribute from DUT" - PICS: LVL.S.C06.Rsp && LVL.S.A0000 + PICS: LVL.S.C06.Rsp && LVL.S.A0000 && LVL.S.M.VarRate command: "readAttribute" attribute: "current level" response: value: CurrentlevelValue - - label: "Reset level to 254" - PICS: LVL.S.C00.Rsp - command: "MoveToLevel" - arguments: - values: - - name: "level" - value: 254 - - name: "transitionTime" - value: 0 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - label: "Reads current level attribute from DUT" + PICS: LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate + command: "readAttribute" + attribute: "current level" + response: + value: CurrentlevelValue - - label: "Wait 100ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 + - label: "Reads current level attribute from DUT" + PICS: LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && LVL.S.M.VarRate + command: "readAttribute" + attribute: "current level" + response: + value: 2 + + - label: "Reads current level attribute from DUT" + PICS: LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && !LVL.S.M.VarRate + command: "readAttribute" + attribute: "current level" + response: + value: 2 - label: "Precondition send Off Command" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml index 9058552ff93319..f68f33ec310669 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml @@ -41,6 +41,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: LVL.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Reads Minlevel attribute from DUT" PICS: LVL.S.A0002 command: "readAttribute" @@ -48,7 +55,7 @@ tests: response: saveAs: MinlevelValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -61,13 +68,13 @@ tests: value: 1 - name: "transitionTime" value: 0 - - name: "optionMask" + - name: "optionsMask" value: 1 - - name: "optionOverride" + - name: "optionsOverride" value: 1 - label: "Reads CurrentLevel attribute from DUT" - PICS: LVL.S.A0000 + PICS: LVL.S.A0000 && LVL.S.C04.Rsp command: "readAttribute" attribute: "current level" response: @@ -85,9 +92,9 @@ tests: value: 0 - name: "rate" value: 5 - - name: "optionMask" + - name: "optionsMask" value: 1 - - name: "optionOverride" + - name: "optionsOverride" value: 1 - label: "Wait 5000ms" @@ -103,15 +110,15 @@ tests: command: "Stop" arguments: values: - - name: "optionMask" + - name: "optionsMask" value: 1 - - name: "optionOverride" + - name: "optionsOverride" value: 1 - label: "Physically verify that the device has stopped transitioning" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && LVL.S.C03.Rsp arguments: values: - name: "message" @@ -125,8 +132,8 @@ tests: attribute: "current level" response: constraints: - minValue: 22 - maxValue: 28 + minValue: 21 + maxValue: 29 notValue: CurrentLevelValue - label: "Sends a move up command to DUT" @@ -138,9 +145,9 @@ tests: value: 0 - name: "rate" value: 5 - - name: "optionMask" + - name: "optionsMask" value: 1 - - name: "optionOverride" + - name: "optionsOverride" value: 1 - label: "Wait 5000ms" @@ -151,19 +158,20 @@ tests: - name: "ms" value: 5000 - - label: "Sends stop command to DUT" - command: "Stop" + - label: "Sends StopWithOnOff command to DUT" + PICS: LVL.S.C07.Rsp + command: "StopWithOnOff" arguments: values: - - name: "optionMask" + - name: "optionsMask" value: 1 - - name: "optionOverride" + - name: "optionsOverride" value: 1 - label: "Physically verify that the device has stopped transitioning" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && LVL.S.C07.Rsp arguments: values: - name: "message" @@ -177,32 +185,10 @@ tests: attribute: "current level" response: constraints: - minValue: 45 - maxValue: 55 + minValue: 43 + maxValue: 57 notValue: CurrentLevelValue - - label: "Reset level to 254" - PICS: LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000 - command: "MoveToLevel" - arguments: - values: - - name: "level" - value: 254 - - name: "transitionTime" - value: 0 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 - - - label: "Wait 100ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - label: "Precondition send Off Command" cluster: "On/Off" PICS: OO.S.C00.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml index b711c27431e241..54cab6a3183249 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml @@ -36,19 +36,18 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - - label: "Read the optional global attribute: FeatureMap" - PICS: MEDIAINPUT.S.NU + - label: "Read the global attribute: FeatureMap" command: "readAttribute" attribute: "FeatureMap" response: - value: 1 constraints: - type: map32 + type: bitmap32 + minValue: 0 + maxValue: 1 - label: "Read the global attribute: AttributeList" - PICS: MEDIAINPUT.S.A0000 && MEDIAINPUT.S.A0001 command: "readAttribute" attribute: "AttributeList" response: diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_3_13.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_3_13.yaml index 5a9bba52929bd3..adab80b37fe39b 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_3_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_3_13.yaml @@ -73,7 +73,7 @@ tests: [1651055193.215585][155444:155449] CHIP:TOO: } cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && MEDIAINPUT.S.A0000 + PICS: PICS_USER_PROMPT && MEDIAINPUT.S.A0000 && MEDIAINPUT.S.C0003 arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml index 07337bb8e6371e..1f8e0acd5f5ade 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml @@ -36,15 +36,15 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - - label: "Read the optional global attribute: FeatureMap" + - label: "Read the global attribute: FeatureMap" PICS: MEDIAPLAYBACK.S.AS || MEDIAPLAYBACK.S.VS command: "readAttribute" attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 3 @@ -118,6 +118,78 @@ tests: type: list contains: [0, 1, 2] + - label: "Read the optional command(StartOver) in AcceptedCommandList" + PICS: MEDIAPLAYBACK.S.C03.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [3] + + - label: "Read the optional command(Previous) in AcceptedCommandList" + PICS: MEDIAPLAYBACK.S.C04.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [4] + + - label: "Read the optional command(Next) in AcceptedCommandList" + PICS: MEDIAPLAYBACK.S.C05.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [5] + + - label: "Read the optional command(Rewind) in AcceptedCommandList" + PICS: MEDIAPLAYBACK.S.C06.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [6] + + - label: "Read the optional command(FastForward) in AcceptedCommandList" + PICS: MEDIAPLAYBACK.S.C07.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [7] + + - label: "Read the optional command(SkipForward) in AcceptedCommandList" + PICS: MEDIAPLAYBACK.S.C08.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [8] + + - label: "Read the optional command(SkipBackward) in AcceptedCommandList" + PICS: MEDIAPLAYBACK.S.C09.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [9] + + - label: "Read the optional command(Seek) in AcceptedCommandList" + PICS: MEDIAPLAYBACK.S.C0B.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [11] + - label: "Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_1.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_1.yaml index 2ef5ef5cf3cd42..bd6f0f5869b4d5 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_1.yaml @@ -32,21 +32,21 @@ tests: "Precondition: Media content in a paused state at the beginning of the content" command: "Pause" - PICS: MEDIAPLAYBACK.S.C0001 + PICS: MEDIAPLAYBACK.S.C01.Rsp response: values: - name: "status" value: 0 - label: "Reads the CurrentState attribute" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp command: "readAttribute" attribute: "CurrentState" response: value: 1 - label: "Sends a Play command" - PICS: MEDIAPLAYBACK.S.C0000 + PICS: MEDIAPLAYBACK.S.C00.Rsp command: "Play" response: values: @@ -56,7 +56,7 @@ tests: - label: "Verify that the media state is playing" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp arguments: values: - name: "message" @@ -64,15 +64,15 @@ tests: - name: "expectedValue" value: "y" - - label: "Reads the playback state attribute" - PICS: MEDIAPLAYBACK.S.A0000 + - label: "Reads the CurrentState attribute" + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp command: "readAttribute" attribute: "CurrentState" response: value: 0 - label: "sends a Pause command" - PICS: MEDIAPLAYBACK.S.C0001 + PICS: MEDIAPLAYBACK.S.C01.Rsp command: "Pause" response: values: @@ -82,7 +82,7 @@ tests: - label: "Verify that the media is paused" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C01.Rsp arguments: values: - name: "message" @@ -90,14 +90,15 @@ tests: - name: "expectedValue" value: "y" - - label: "Reads the playback state attribute" + - label: "Reads the CurrentState attribute" + PICS: MEDIAPLAYBACK.S.C01.Rsp && MEDIAPLAYBACK.S.A0000 command: "readAttribute" attribute: "CurrentState" response: value: 1 - label: "Sends a Stop command" - PICS: MEDIAPLAYBACK.S.C0002 + PICS: MEDIAPLAYBACK.S.C02.Rsp command: "StopPlayback" response: values: @@ -107,7 +108,7 @@ tests: - label: "Verify that the media is stoped" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C02.Rsp arguments: values: - name: "message" @@ -115,8 +116,8 @@ tests: - name: "expectedValue" value: "y" - - label: "Reads the playback state attribute" - PICS: MEDIAPLAYBACK.S.A0000 + - label: "Reads the CurrentState attribute" + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C02.Rsp command: "readAttribute" attribute: "CurrentState" response: diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_2.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_2.yaml index f26c10f8e38e64..8e32a15acd3744 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_2.yaml @@ -32,21 +32,21 @@ tests: "Precondition: Media content in a paused state at the beginning of the content" command: "Pause" - PICS: MEDIAPLAYBACK.S.C0001 + PICS: MEDIAPLAYBACK.S.C01.Rsp response: values: - name: "status" value: 0 - label: "Reads the CurrentState attribute from the DUT" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp command: "readAttribute" attribute: "CurrentState" response: value: 1 - label: "Sends a Play command to the DUT" - PICS: MEDIAPLAYBACK.S.C0000 + PICS: MEDIAPLAYBACK.S.C00.Rsp command: "Play" response: values: @@ -56,7 +56,7 @@ tests: - label: "Verify that the media state is playing" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp arguments: values: - name: "message" @@ -65,14 +65,14 @@ tests: value: "y" - label: "Reads the CurrentState attribute" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp command: "readAttribute" attribute: "CurrentState" response: value: 0 - label: "Sends a StartOver command to the DUT" - PICS: MEDIAPLAYBACK.S.C0003 + PICS: MEDIAPLAYBACK.S.C03.Rsp command: "StartOver" response: values: @@ -82,7 +82,7 @@ tests: - label: "Verify that the media is started over" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C03.Rsp arguments: values: - name: "message" @@ -91,7 +91,7 @@ tests: value: "y" - label: "Sends a Next command to the DUT" - PICS: MEDIAPLAYBACK.S.C0005 + PICS: MEDIAPLAYBACK.S.C05.Rsp command: "Next" response: values: @@ -101,7 +101,7 @@ tests: - label: "Verify that the next media item in the queue has been loaded" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C05.Rsp arguments: values: - name: "message" @@ -111,7 +111,7 @@ tests: value: "y" - label: "Sends a Previous command to the DUT" - PICS: MEDIAPLAYBACK.S.C0004 + PICS: MEDIAPLAYBACK.S.C04.Rsp command: "Previous" response: values: @@ -121,7 +121,7 @@ tests: - label: "Verify that the previous media item in the queue has been loaded" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C04.Rsp arguments: values: - name: "message" @@ -132,7 +132,7 @@ tests: value: "y" - label: "Sends a SkipForward command to the DUT " - PICS: MEDIAPLAYBACK.S.C0008 + PICS: MEDIAPLAYBACK.S.C08.Rsp command: "SkipForward" arguments: values: @@ -146,7 +146,7 @@ tests: - label: "Verify that the media has skipped forward 10 seconds" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C08.Rsp arguments: values: - name: "message" @@ -156,14 +156,14 @@ tests: value: "y" - label: "Reads the SampledPosition attribute from the DUT" - PICS: MEDIAPLAYBACK.S.A0003 + PICS: MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C08.Rsp command: "readAttribute" attribute: "SampledPosition" response: value: 10000 - label: "Sends a SkipBackward command to the DUT " - PICS: MEDIAPLAYBACK.S.C0009 + PICS: MEDIAPLAYBACK.S.C09.Rsp command: "SkipBackward" arguments: values: @@ -177,7 +177,7 @@ tests: - label: "Verify that the media has skipped backward 10 seconds" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C09.Rsp arguments: values: - name: "message" @@ -187,7 +187,7 @@ tests: value: "y" - label: "Reads the SampledPosition attribute from the DUT" - PICS: MEDIAPLAYBACK.S.A0003 + PICS: MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C09.Rsp command: "readAttribute" attribute: "SampledPosition" response: diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_3.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_3.yaml index d2cd64bb010a38..cdf3b92190c987 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_3.yaml @@ -19,7 +19,7 @@ config: cluster: "Media Playback" endpoint: 1 SeekPosition: - type: INT64U + type: int64u defaultValue: 100000000 tests: @@ -35,14 +35,14 @@ tests: "Precondition: Media content in a paused state at the beginning of the content" command: "Pause" - PICS: MEDIAPLAYBACK.S.C0001 + PICS: MEDIAPLAYBACK.S.C01.Rsp response: values: - name: "status" value: 0 - label: "Sends a Seek command" - PICS: MEDIAPLAYBACK.S.C000B + PICS: MEDIAPLAYBACK.S.C0B.Rsp command: "Seek" arguments: values: @@ -57,7 +57,7 @@ tests: "Verify that the media has moved to 10 seconds from the starting point" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0B.Rsp arguments: values: - name: "message" @@ -68,7 +68,7 @@ tests: value: "y" - label: "Reads the SampledPosition attribute" - PICS: MEDIAPLAYBACK.S.A0003 + PICS: MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C0B.Rsp command: "readAttribute" attribute: "SampledPosition" response: @@ -142,7 +142,7 @@ tests: - label: "Sends a Seek command Position value beyond the furthest valid position" - PICS: MEDIAPLAYBACK.S.C000B + PICS: MEDIAPLAYBACK.S.C0B.Rsp command: "Seek" arguments: values: diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_4.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_4.yaml index 94697c546a6a75..6f52c15856c88f 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_4.yaml @@ -32,14 +32,14 @@ tests: "Precondition: Media content in a paused state at the beginning of the content" command: "Pause" - PICS: MEDIAPLAYBACK.S.C0001 + PICS: MEDIAPLAYBACK.S.C01.Rsp response: values: - name: "status" value: 0 - label: "Reads the CurrentState attribute from the DUT" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp command: "readAttribute" attribute: "CurrentState" response: @@ -53,7 +53,7 @@ tests: value: 0 - label: "Sends a FastForward command" - PICS: MEDIAPLAYBACK.S.C0007 + PICS: MEDIAPLAYBACK.S.C07.Rsp command: "FastForward" response: values: @@ -61,21 +61,21 @@ tests: value: 0 - label: "Reads the CurrentState attribute" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C07.Rsp command: "readAttribute" attribute: "CurrentState" response: value: 0 - label: "Reads the PlaybackSpeed attribute from the DUT" - PICS: MEDIAPLAYBACK.S.A0004 + PICS: MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp command: "readAttribute" attribute: "PlaybackSpeed" response: value: 1 - label: "Sends a FastForward command" - PICS: MEDIAPLAYBACK.S.C0007 + PICS: MEDIAPLAYBACK.S.C07.Rsp command: "FastForward" response: values: @@ -83,14 +83,14 @@ tests: value: 0 - label: "Reads the PlaybackSpeed attribute from the DUT" - PICS: MEDIAPLAYBACK.S.A0004 + PICS: MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp command: "readAttribute" attribute: "PlaybackSpeed" response: value: 2 - label: "Sends a Rewind command to the DUT" - PICS: MEDIAPLAYBACK.S.C0006 + PICS: MEDIAPLAYBACK.S.C06.Rsp command: "Rewind" response: values: @@ -98,7 +98,7 @@ tests: value: 0 - label: "Reads the CurrentState attribute" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C06.Rsp command: "readAttribute" attribute: "CurrentState" response: @@ -113,16 +113,16 @@ tests: [1655114487.018421][41855:41860] CHIP:EM: Sending Standalone Ack for MessageCounter:163883813 on exchange 24959 cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0007 + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0004 arguments: values: - name: "message" - value: "Please enter 'y' if PlaybackSpeed value is -2" + value: "Please enter 'y' if PlaybackSpeed value is -1" - name: "expectedValue" value: "y" - label: "Sends a Rewind command to the DUT" - PICS: MEDIAPLAYBACK.S.C0006 + PICS: MEDIAPLAYBACK.S.C06.Rsp command: "Rewind" response: values: @@ -147,7 +147,7 @@ tests: value: "y" - label: "Sends a Play command" - PICS: MEDIAPLAYBACK.S.C0000 + PICS: MEDIAPLAYBACK.S.C00.Rsp command: "Play" response: values: @@ -157,7 +157,7 @@ tests: - label: "Reads the PlaybackSpeed attribute from the DUT" command: "readAttribute" attribute: "PlaybackSpeed" - PICS: MEDIAPLAYBACK.S.A0004 + PICS: MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C00.Rsp response: value: 1 @@ -175,7 +175,7 @@ tests: [1655460522.133751][12273:12278] CHIP:TOO: } cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0007 + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp arguments: values: - name: "message" @@ -195,7 +195,7 @@ tests: [1655460483.177228][12225:12230] CHIP:TOO: } cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0006 + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C06.Rsp arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_5.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_5.yaml index 114b7139097ebf..5f1de682170d0d 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_5.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 19.8.5. [TC-MEDIAPLAYBACK-6.5] Mandatory Media Playback Verification (DUT as + 3.8.5. [TC-MEDIAPLAYBACK-6.5] Mandatory Media Playback Verification (DUT as Client) config: @@ -24,100 +24,99 @@ config: tests: - label: "DUT sends Play command to TH" - PICS: MEDIAPLAYBACK.C.C0000 + PICS: MEDIAPLAYBACK.C.C00.Tx verification: | - The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. + ./chip-tool mediaplayback play 1 3 - ./chip-tool mediaplayback play 1 1 + The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. - [1653155763765] [89108:1728729] CHIP: [DMG] InvokeRequestMessage = - [1653155763765] [89108:1728729] CHIP: [DMG] { - [1653155763765] [89108:1728729] CHIP: [DMG] suppressResponse = false, - [1653155763765] [89108:1728729] CHIP: [DMG] timedRequest = false, - [1653155763765] [89108:1728729] CHIP: [DMG] InvokeRequests = - [1653155763765] [89108:1728729] CHIP: [DMG] [ - [1653155763765] [89108:1728729] CHIP: [DMG] CommandDataIB = - [1653155763765] [89108:1728729] CHIP: [DMG] { - [1653155763765] [89108:1728729] CHIP: [DMG] CommandPathIB = - [1653155763765] [89108:1728729] CHIP: [DMG] { - [1653155763765] [89108:1728729] CHIP: [DMG] EndpointId = 0x1, - [1653155763765] [89108:1728729] CHIP: [DMG] ClusterId = 0x506, - [1653155763765] [89108:1728729] CHIP: [DMG] CommandId = 0x0, - [1653155763765] [89108:1728729] CHIP: [DMG] }, - [1653155763765] [89108:1728729] CHIP: [DMG] - [1653155763765] [89108:1728729] CHIP: [DMG] CommandData = - [1653155763765] [89108:1728729] CHIP: [DMG] { - [1653155763765] [89108:1728729] CHIP: [DMG] }, - [1653155763765] [89108:1728729] CHIP: [DMG] }, - [1653155763765] [89108:1728729] CHIP: [DMG] - [1653155763765] [89108:1728729] CHIP: [DMG] ], - [1653155763765] [89108:1728729] CHIP: [DMG] - [1653155763765] [89108:1728729] CHIP: [DMG] InteractionModelRevision = 1 - [1653155763765] [89108:1728729] CHIP: [DMG] }, + [1658530945655] [21924:317544] CHIP: [DMG] InvokeRequestMessage = + [1658530945655] [21924:317544] CHIP: [DMG] { + [1658530945655] [21924:317544] CHIP: [DMG] suppressResponse = false, + [1658530945655] [21924:317544] CHIP: [DMG] timedRequest = false, + [1658530945655] [21924:317544] CHIP: [DMG] InvokeRequests = + [1658530945655] [21924:317544] CHIP: [DMG] [ + [1658530945655] [21924:317544] CHIP: [DMG] CommandDataIB = + [1658530945655] [21924:317544] CHIP: [DMG] { + [1658530945655] [21924:317544] CHIP: [DMG] CommandPathIB = + [1658530945655] [21924:317544] CHIP: [DMG] { + [1658530945655] [21924:317544] CHIP: [DMG] EndpointId = 0x3, + [1658530945655] [21924:317544] CHIP: [DMG] ClusterId = 0x506, + [1658530945655] [21924:317544] CHIP: [DMG] CommandId = 0x0, + [1658530945655] [21924:317544] CHIP: [DMG] }, + [1658530945655] [21924:317544] CHIP: [DMG] + [1658530945655] [21924:317544] CHIP: [DMG] CommandFields = + [1658530945655] [21924:317544] CHIP: [DMG] { + [1658530945655] [21924:317544] CHIP: [DMG] }, + [1658530945655] [21924:317544] CHIP: [DMG] }, + [1658530945655] [21924:317544] CHIP: [DMG] + [1658530945655] [21924:317544] CHIP: [DMG] ], + [1658530945655] [21924:317544] CHIP: [DMG] + [1658530945655] [21924:317544] CHIP: [DMG] InteractionModelRevision = 1 + [1658530945655] [21924:317544] CHIP: [DMG] }, disabled: true - label: "DUT sends Pause command to TH" - PICS: MEDIAPLAYBACK.C.C0001 + PICS: MEDIAPLAYBACK.C.C01.Tx verification: | - The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. + ./chip-tool mediaplayback pause 1 3 - ./chip-tool mediaplayback pause 1 1 + The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. - [1653155793657] [89108:1728972] CHIP: [DMG] InvokeRequestMessage = - [1653155793657] [89108:1728972] CHIP: [DMG] { - [1653155793657] [89108:1728972] CHIP: [DMG] suppressResponse = false, - [1653155793657] [89108:1728972] CHIP: [DMG] timedRequest = false, - [1653155793657] [89108:1728972] CHIP: [DMG] InvokeRequests = - [1653155793657] [89108:1728972] CHIP: [DMG] [ - [1653155793657] [89108:1728972] CHIP: [DMG] CommandDataIB = - [1653155793657] [89108:1728972] CHIP: [DMG] { - [1653155793657] [89108:1728972] CHIP: [DMG] CommandPathIB = - [1653155793657] [89108:1728972] CHIP: [DMG] { - [1653155793657] [89108:1728972] CHIP: [DMG] EndpointId = 0x1, - [1653155793657] [89108:1728972] CHIP: [DMG] ClusterId = 0x506, - [1653155793657] [89108:1728972] CHIP: [DMG] CommandId = 0x1, - [1653155793657] [89108:1728972] CHIP: [DMG] }, - [1653155793657] [89108:1728972] CHIP: [DMG] - [1653155793657] [89108:1728972] CHIP: [DMG] CommandData = - [1653155793657] [89108:1728972] CHIP: [DMG] { - [1653155793657] [89108:1728972] CHIP: [DMG] }, - [1653155793657] [89108:1728972] CHIP: [DMG] }, - [1653155793657] [89108:1728972] CHIP: [DMG] - [1653155793657] [89108:1728972] CHIP: [DMG] ], - [1653155793657] [89108:1728972] CHIP: [DMG] - [1653155793657] [89108:1728972] CHIP: [DMG] InteractionModelRevision = 1 - [1653155793657] [89108:1728972] CHIP: [DMG] }, + [1658530975757] [21924:317544] CHIP: [DMG] InvokeRequestMessage = + [1658530975757] [21924:317544] CHIP: [DMG] { + [1658530975757] [21924:317544] CHIP: [DMG] suppressResponse = false, + [1658530975757] [21924:317544] CHIP: [DMG] timedRequest = false, + [1658530975757] [21924:317544] CHIP: [DMG] InvokeRequests = + [1658530975757] [21924:317544] CHIP: [DMG] [ + [1658530975757] [21924:317544] CHIP: [DMG] CommandDataIB = + [1658530975757] [21924:317544] CHIP: [DMG] { + [1658530975757] [21924:317544] CHIP: [DMG] CommandPathIB = + [1658530975757] [21924:317544] CHIP: [DMG] { + [1658530975757] [21924:317544] CHIP: [DMG] EndpointId = 0x3, + [1658530975757] [21924:317544] CHIP: [DMG] ClusterId = 0x506, + [1658530975757] [21924:317544] CHIP: [DMG] CommandId = 0x1, + [1658530975757] [21924:317544] CHIP: [DMG] }, + [1658530975757] [21924:317544] CHIP: [DMG] + [1658530975757] [21924:317544] CHIP: [DMG] CommandFields = + [1658530975757] [21924:317544] CHIP: [DMG] { + [1658530975757] [21924:317544] CHIP: [DMG] }, + [1658530975757] [21924:317544] CHIP: [DMG] }, + [1658530975757] [21924:317544] CHIP: [DMG] + [1658530975757] [21924:317544] CHIP: [DMG] ], + [1658530975757] [21924:317544] CHIP: [DMG] + [1658530975757] [21924:317544] CHIP: [DMG] InteractionModelRevision = 1 + [1658530975757] [21924:317544] CHIP: [DMG] }, disabled: true - label: "DUT sends Stop command to TH" - PICS: MEDIAPLAYBACK.C.C0002 + PICS: MEDIAPLAYBACK.C.C02.Tx verification: | + ./chip-tool mediaplayback stop-playback 1 3 The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. - ./chip-tool mediaplayback stop-playback 1 1 - - [1653155821639] [89108:1730227] CHIP: [DMG] InvokeRequestMessage = - [1653155821639] [89108:1730227] CHIP: [DMG] { - [1653155821639] [89108:1730227] CHIP: [DMG] suppressResponse = false, - [1653155821639] [89108:1730227] CHIP: [DMG] timedRequest = false, - [1653155821639] [89108:1730227] CHIP: [DMG] InvokeRequests = - [1653155821639] [89108:1730227] CHIP: [DMG] [ - [1653155821639] [89108:1730227] CHIP: [DMG] CommandDataIB = - [1653155821639] [89108:1730227] CHIP: [DMG] { - [1653155821639] [89108:1730227] CHIP: [DMG] CommandPathIB = - [1653155821639] [89108:1730227] CHIP: [DMG] { - [1653155821639] [89108:1730227] CHIP: [DMG] EndpointId = 0x1, - [1653155821639] [89108:1730227] CHIP: [DMG] ClusterId = 0x506, - [1653155821639] [89108:1730227] CHIP: [DMG] CommandId = 0x2, - [1653155821639] [89108:1730227] CHIP: [DMG] }, - [1653155821639] [89108:1730227] CHIP: [DMG] - [1653155821639] [89108:1730227] CHIP: [DMG] CommandData = - [1653155821639] [89108:1730227] CHIP: [DMG] { - [1653155821639] [89108:1730227] CHIP: [DMG] }, - [1653155821639] [89108:1730227] CHIP: [DMG] }, - [1653155821639] [89108:1730227] CHIP: [DMG] - [1653155821639] [89108:1730227] CHIP: [DMG] ], - [1653155821639] [89108:1730227] CHIP: [DMG] - [1653155821639] [89108:1730227] CHIP: [DMG] InteractionModelRevision = 1 - [1653155821639] [89108:1730227] CHIP: [DMG] }, + [1658531007495] [21924:317544] CHIP: [DMG] InvokeRequestMessage = + [1658531007495] [21924:317544] CHIP: [DMG] { + [1658531007495] [21924:317544] CHIP: [DMG] suppressResponse = false, + [1658531007495] [21924:317544] CHIP: [DMG] timedRequest = false, + [1658531007495] [21924:317544] CHIP: [DMG] InvokeRequests = + [1658531007495] [21924:317544] CHIP: [DMG] [ + [1658531007495] [21924:317544] CHIP: [DMG] CommandDataIB = + [1658531007495] [21924:317544] CHIP: [DMG] { + [1658531007495] [21924:317544] CHIP: [DMG] CommandPathIB = + [1658531007495] [21924:317544] CHIP: [DMG] { + [1658531007495] [21924:317544] CHIP: [DMG] EndpointId = 0x3, + [1658531007495] [21924:317544] CHIP: [DMG] ClusterId = 0x506, + [1658531007495] [21924:317544] CHIP: [DMG] CommandId = 0x2, + [1658531007495] [21924:317544] CHIP: [DMG] }, + [1658531007495] [21924:317544] CHIP: [DMG] + [1658531007495] [21924:317544] CHIP: [DMG] CommandFields = + [1658531007495] [21924:317544] CHIP: [DMG] { + [1658531007495] [21924:317544] CHIP: [DMG] }, + [1658531007495] [21924:317544] CHIP: [DMG] }, + [1658531007495] [21924:317544] CHIP: [DMG] + [1658531007495] [21924:317544] CHIP: [DMG] ], + [1658531007495] [21924:317544] CHIP: [DMG] + [1658531007495] [21924:317544] CHIP: [DMG] InteractionModelRevision = 1 + [1658531007495] [21924:317544] CHIP: [DMG] }, disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_7.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_7.yaml index f26657367075dc..5c229fbf6f5fe2 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_7.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 19.8.6. [TC-MEDIAPLAYBACK-6.7] Optional Media Playback Verification (DUT as + 3.8.6. [TC-MEDIAPLAYBACK-6.7] Optional Media Playback Verification (DUT as Client) config: @@ -24,201 +24,200 @@ config: tests: - label: "DUT sends Play command to TH" - PICS: MEDIAPLAYBACK.C.C0000 + PICS: MEDIAPLAYBACK.C.C00.Tx verification: | + ./chip-tool mediaplayback play 1 3 + The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. - ./chip-tool mediaplayback play 1 1 - - [1653155763765] [89108:1728729] CHIP: [DMG] InvokeRequestMessage = - [1653155763765] [89108:1728729] CHIP: [DMG] { - [1653155763765] [89108:1728729] CHIP: [DMG] suppressResponse = false, - [1653155763765] [89108:1728729] CHIP: [DMG] timedRequest = false, - [1653155763765] [89108:1728729] CHIP: [DMG] InvokeRequests = - [1653155763765] [89108:1728729] CHIP: [DMG] [ - [1653155763765] [89108:1728729] CHIP: [DMG] CommandDataIB = - [1653155763765] [89108:1728729] CHIP: [DMG] { - [1653155763765] [89108:1728729] CHIP: [DMG] CommandPathIB = - [1653155763765] [89108:1728729] CHIP: [DMG] { - [1653155763765] [89108:1728729] CHIP: [DMG] EndpointId = 0x1, - [1653155763765] [89108:1728729] CHIP: [DMG] ClusterId = 0x506, - [1653155763765] [89108:1728729] CHIP: [DMG] CommandId = 0x0, - [1653155763765] [89108:1728729] CHIP: [DMG] }, - [1653155763765] [89108:1728729] CHIP: [DMG] - [1653155763765] [89108:1728729] CHIP: [DMG] CommandData = - [1653155763765] [89108:1728729] CHIP: [DMG] { - [1653155763765] [89108:1728729] CHIP: [DMG] }, - [1653155763765] [89108:1728729] CHIP: [DMG] }, - [1653155763765] [89108:1728729] CHIP: [DMG] - [1653155763765] [89108:1728729] CHIP: [DMG] ], - [1653155763765] [89108:1728729] CHIP: [DMG] - [1653155763765] [89108:1728729] CHIP: [DMG] InteractionModelRevision = 1 - [1653155763765] [89108:1728729] CHIP: [DMG] }, + [1658531093554] [21924:321344] CHIP: [DMG] InvokeRequestMessage = + [1658531093554] [21924:321344] CHIP: [DMG] { + [1658531093554] [21924:321344] CHIP: [DMG] suppressResponse = false, + [1658531093554] [21924:321344] CHIP: [DMG] timedRequest = false, + [1658531093554] [21924:321344] CHIP: [DMG] InvokeRequests = + [1658531093554] [21924:321344] CHIP: [DMG] [ + [1658531093554] [21924:321344] CHIP: [DMG] CommandDataIB = + [1658531093554] [21924:321344] CHIP: [DMG] { + [1658531093554] [21924:321344] CHIP: [DMG] CommandPathIB = + [1658531093554] [21924:321344] CHIP: [DMG] { + [1658531093554] [21924:321344] CHIP: [DMG] EndpointId = 0x3, + [1658531093554] [21924:321344] CHIP: [DMG] ClusterId = 0x506, + [1658531093554] [21924:321344] CHIP: [DMG] CommandId = 0x0, + [1658531093554] [21924:321344] CHIP: [DMG] }, + [1658531093554] [21924:321344] CHIP: [DMG] + [1658531093554] [21924:321344] CHIP: [DMG] CommandFields = + [1658531093554] [21924:321344] CHIP: [DMG] { + [1658531093554] [21924:321344] CHIP: [DMG] }, + [1658531093554] [21924:321344] CHIP: [DMG] }, + [1658531093554] [21924:321344] CHIP: [DMG] + [1658531093554] [21924:321344] CHIP: [DMG] ], + [1658531093554] [21924:321344] CHIP: [DMG] + [1658531093554] [21924:321344] CHIP: [DMG] InteractionModelRevision = 1 + [1658531093554] [21924:321344] CHIP: [DMG] }, disabled: true - - label: "DUT sends Start Over command to TH" - PICS: MEDIAPLAYBACK.C.C0003 + - label: "DUT sends StartOver command to TH" + PICS: MEDIAPLAYBACK.C.C03.Tx verification: | - The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. + ./chip-tool mediaplayback start-over 1 3 - ./chip-tool mediaplayback start-over 1 1 - - [1653155863805] [89108:1730610] CHIP: [DMG] InvokeRequestMessage = - [1653155863805] [89108:1730610] CHIP: [DMG] { - [1653155863805] [89108:1730610] CHIP: [DMG] suppressResponse = false, - [1653155863805] [89108:1730610] CHIP: [DMG] timedRequest = false, - [1653155863805] [89108:1730610] CHIP: [DMG] InvokeRequests = - [1653155863805] [89108:1730610] CHIP: [DMG] [ - [1653155863805] [89108:1730610] CHIP: [DMG] CommandDataIB = - [1653155863805] [89108:1730610] CHIP: [DMG] { - [1653155863805] [89108:1730610] CHIP: [DMG] CommandPathIB = - [1653155863805] [89108:1730610] CHIP: [DMG] { - [1653155863805] [89108:1730610] CHIP: [DMG] EndpointId = 0x1, - [1653155863805] [89108:1730610] CHIP: [DMG] ClusterId = 0x506, - [1653155863805] [89108:1730610] CHIP: [DMG] CommandId = 0x3, - [1653155863805] [89108:1730610] CHIP: [DMG] }, - [1653155863805] [89108:1730610] CHIP: [DMG] - [1653155863805] [89108:1730610] CHIP: [DMG] CommandData = - [1653155863805] [89108:1730610] CHIP: [DMG] { - [1653155863805] [89108:1730610] CHIP: [DMG] }, - [1653155863805] [89108:1730610] CHIP: [DMG] }, - [1653155863805] [89108:1730610] CHIP: [DMG] - [1653155863805] [89108:1730610] CHIP: [DMG] ], - [1653155863805] [89108:1730610] CHIP: [DMG] - [1653155863805] [89108:1730610] CHIP: [DMG] InteractionModelRevision = 1 - [1653155863805] [89108:1730610] CHIP: [DMG] }, + The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. + [1658531129608] [21924:322334] CHIP: [DMG] InvokeRequestMessage = + [1658531129608] [21924:322334] CHIP: [DMG] { + [1658531129608] [21924:322334] CHIP: [DMG] suppressResponse = false, + [1658531129608] [21924:322334] CHIP: [DMG] timedRequest = false, + [1658531129608] [21924:322334] CHIP: [DMG] InvokeRequests = + [1658531129608] [21924:322334] CHIP: [DMG] [ + [1658531129608] [21924:322334] CHIP: [DMG] CommandDataIB = + [1658531129608] [21924:322334] CHIP: [DMG] { + [1658531129608] [21924:322334] CHIP: [DMG] CommandPathIB = + [1658531129608] [21924:322334] CHIP: [DMG] { + [1658531129608] [21924:322334] CHIP: [DMG] EndpointId = 0x3, + [1658531129608] [21924:322334] CHIP: [DMG] ClusterId = 0x506, + [1658531129608] [21924:322334] CHIP: [DMG] CommandId = 0x3, + [1658531129608] [21924:322334] CHIP: [DMG] }, + [1658531129608] [21924:322334] CHIP: [DMG] + [1658531129608] [21924:322334] CHIP: [DMG] CommandFields = + [1658531129608] [21924:322334] CHIP: [DMG] { + [1658531129608] [21924:322334] CHIP: [DMG] }, + [1658531129608] [21924:322334] CHIP: [DMG] }, + [1658531129608] [21924:322334] CHIP: [DMG] + [1658531129608] [21924:322334] CHIP: [DMG] ], + [1658531129609] [21924:322334] CHIP: [DMG] + [1658531129609] [21924:322334] CHIP: [DMG] InteractionModelRevision = 1 + [1658531129609] [21924:322334] CHIP: [DMG] }, disabled: true - label: "DUT sends Next command to TH" - PICS: MEDIAPLAYBACK.C.C0005 + PICS: MEDIAPLAYBACK.C.C05.Tx verification: | + ./chip-tool mediaplayback next 1 3 + The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. - ./chip-tool mediaplayback next 1 1 - - [1653155883955] [89108:1731475] CHIP: [DMG] InvokeRequestMessage = - [1653155883955] [89108:1731475] CHIP: [DMG] { - [1653155883955] [89108:1731475] CHIP: [DMG] suppressResponse = false, - [1653155883955] [89108:1731475] CHIP: [DMG] timedRequest = false, - [1653155883955] [89108:1731475] CHIP: [DMG] InvokeRequests = - [1653155883955] [89108:1731475] CHIP: [DMG] [ - [1653155883955] [89108:1731475] CHIP: [DMG] CommandDataIB = - [1653155883955] [89108:1731475] CHIP: [DMG] { - [1653155883955] [89108:1731475] CHIP: [DMG] CommandPathIB = - [1653155883955] [89108:1731475] CHIP: [DMG] { - [1653155883955] [89108:1731475] CHIP: [DMG] EndpointId = 0x1, - [1653155883956] [89108:1731475] CHIP: [DMG] ClusterId = 0x506, - [1653155883956] [89108:1731475] CHIP: [DMG] CommandId = 0x5, - [1653155883956] [89108:1731475] CHIP: [DMG] }, - [1653155883956] [89108:1731475] CHIP: [DMG] - [1653155883956] [89108:1731475] CHIP: [DMG] CommandData = - [1653155883956] [89108:1731475] CHIP: [DMG] { - [1653155883956] [89108:1731475] CHIP: [DMG] }, - [1653155883956] [89108:1731475] CHIP: [DMG] }, - [1653155883956] [89108:1731475] CHIP: [DMG] - [1653155883956] [89108:1731475] CHIP: [DMG] ], - [1653155883956] [89108:1731475] CHIP: [DMG] - [1653155883956] [89108:1731475] CHIP: [DMG] InteractionModelRevision = 1 - [1653155883956] [89108:1731475] CHIP: [DMG] }, + [1658531176900] [21924:322847] CHIP: [DMG] InvokeRequestMessage = + [1658531176900] [21924:322847] CHIP: [DMG] { + [1658531176900] [21924:322847] CHIP: [DMG] suppressResponse = false, + [1658531176900] [21924:322847] CHIP: [DMG] timedRequest = false, + [1658531176900] [21924:322847] CHIP: [DMG] InvokeRequests = + [1658531176900] [21924:322847] CHIP: [DMG] [ + [1658531176900] [21924:322847] CHIP: [DMG] CommandDataIB = + [1658531176900] [21924:322847] CHIP: [DMG] { + [1658531176900] [21924:322847] CHIP: [DMG] CommandPathIB = + [1658531176900] [21924:322847] CHIP: [DMG] { + [1658531176900] [21924:322847] CHIP: [DMG] EndpointId = 0x3, + [1658531176900] [21924:322847] CHIP: [DMG] ClusterId = 0x506, + [1658531176900] [21924:322847] CHIP: [DMG] CommandId = 0x5, + [1658531176900] [21924:322847] CHIP: [DMG] }, + [1658531176900] [21924:322847] CHIP: [DMG] + [1658531176900] [21924:322847] CHIP: [DMG] CommandFields = + [1658531176900] [21924:322847] CHIP: [DMG] { + [1658531176900] [21924:322847] CHIP: [DMG] }, + [1658531176900] [21924:322847] CHIP: [DMG] }, + [1658531176900] [21924:322847] CHIP: [DMG] + [1658531176900] [21924:322847] CHIP: [DMG] ], + [1658531176900] [21924:322847] CHIP: [DMG] + [1658531176900] [21924:322847] CHIP: [DMG] InteractionModelRevision = 1 + [1658531176900] [21924:322847] CHIP: [DMG] }, disabled: true - label: "DUT sends Previous command to TH" - PICS: MEDIAPLAYBACK.C.C0004 + PICS: MEDIAPLAYBACK.C.C04.Tx verification: | + ./chip-tool mediaplayback previous 1 3 + The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. - ./chip-tool mediaplayback previous 1 1 - - [1653155908464] [89108:1731410] CHIP: [DMG] InvokeRequestMessage = - [1653155908464] [89108:1731410] CHIP: [DMG] { - [1653155908464] [89108:1731410] CHIP: [DMG] suppressResponse = false, - [1653155908464] [89108:1731410] CHIP: [DMG] timedRequest = false, - [1653155908464] [89108:1731410] CHIP: [DMG] InvokeRequests = - [1653155908464] [89108:1731410] CHIP: [DMG] [ - [1653155908464] [89108:1731410] CHIP: [DMG] CommandDataIB = - [1653155908464] [89108:1731410] CHIP: [DMG] { - [1653155908464] [89108:1731410] CHIP: [DMG] CommandPathIB = - [1653155908464] [89108:1731410] CHIP: [DMG] { - [1653155908464] [89108:1731410] CHIP: [DMG] EndpointId = 0x1, - [1653155908464] [89108:1731410] CHIP: [DMG] ClusterId = 0x506, - [1653155908464] [89108:1731410] CHIP: [DMG] CommandId = 0x4, - [1653155908464] [89108:1731410] CHIP: [DMG] }, - [1653155908464] [89108:1731410] CHIP: [DMG] - [1653155908464] [89108:1731410] CHIP: [DMG] CommandData = - [1653155908464] [89108:1731410] CHIP: [DMG] { - [1653155908464] [89108:1731410] CHIP: [DMG] }, - [1653155908464] [89108:1731410] CHIP: [DMG] }, - [1653155908464] [89108:1731410] CHIP: [DMG] - [1653155908464] [89108:1731410] CHIP: [DMG] ], - [1653155908464] [89108:1731410] CHIP: [DMG] - [1653155908464] [89108:1731410] CHIP: [DMG] InteractionModelRevision = 1 - [1653155908464] [89108:1731410] CHIP: [DMG] }, + [1658531212499] [21924:323521] CHIP: [DMG] InvokeRequestMessage = + [1658531212499] [21924:323521] CHIP: [DMG] { + [1658531212499] [21924:323521] CHIP: [DMG] suppressResponse = false, + [1658531212499] [21924:323521] CHIP: [DMG] timedRequest = false, + [1658531212499] [21924:323521] CHIP: [DMG] InvokeRequests = + [1658531212499] [21924:323521] CHIP: [DMG] [ + [1658531212499] [21924:323521] CHIP: [DMG] CommandDataIB = + [1658531212499] [21924:323521] CHIP: [DMG] { + [1658531212499] [21924:323521] CHIP: [DMG] CommandPathIB = + [1658531212499] [21924:323521] CHIP: [DMG] { + [1658531212499] [21924:323521] CHIP: [DMG] EndpointId = 0x3, + [1658531212499] [21924:323521] CHIP: [DMG] ClusterId = 0x506, + [1658531212499] [21924:323521] CHIP: [DMG] CommandId = 0x4, + [1658531212499] [21924:323521] CHIP: [DMG] }, + [1658531212499] [21924:323521] CHIP: [DMG] + [1658531212499] [21924:323521] CHIP: [DMG] CommandFields = + [1658531212499] [21924:323521] CHIP: [DMG] { + [1658531212499] [21924:323521] CHIP: [DMG] }, + [1658531212499] [21924:323521] CHIP: [DMG] }, + [1658531212499] [21924:323521] CHIP: [DMG] + [1658531212499] [21924:323521] CHIP: [DMG] ], + [1658531212499] [21924:323521] CHIP: [DMG] + [1658531212499] [21924:323521] CHIP: [DMG] InteractionModelRevision = 1 + [1658531212499] [21924:323521] CHIP: [DMG] }, disabled: true - - label: "DUT sends Skip Forward command to TH" - PICS: MEDIAPLAYBACK.C.C0008 + - label: "DUT sends SkipForward command to TH" + PICS: MEDIAPLAYBACK.C.C08.Tx verification: | - The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. - - ./chip-tool mediaplayback skip-forward 2000 1 1 - - [1653155942341] [89108:1732693] CHIP: [DMG] InvokeRequestMessage = - [1653155942341] [89108:1732693] CHIP: [DMG] { - [1653155942341] [89108:1732693] CHIP: [DMG] suppressResponse = false, - [1653155942341] [89108:1732693] CHIP: [DMG] timedRequest = false, - [1653155942341] [89108:1732693] CHIP: [DMG] InvokeRequests = - [1653155942341] [89108:1732693] CHIP: [DMG] [ - [1653155942341] [89108:1732693] CHIP: [DMG] CommandDataIB = - [1653155942341] [89108:1732693] CHIP: [DMG] { - [1653155942341] [89108:1732693] CHIP: [DMG] CommandPathIB = - [1653155942341] [89108:1732693] CHIP: [DMG] { - [1653155942341] [89108:1732693] CHIP: [DMG] EndpointId = 0x1, - [1653155942341] [89108:1732693] CHIP: [DMG] ClusterId = 0x506, - [1653155942341] [89108:1732693] CHIP: [DMG] CommandId = 0x8, - [1653155942342] [89108:1732693] CHIP: [DMG] }, - [1653155942342] [89108:1732693] CHIP: [DMG] - [1653155942342] [89108:1732693] CHIP: [DMG] CommandData = - [1653155942342] [89108:1732693] CHIP: [DMG] { - [1653155942342] [89108:1732693] CHIP: [DMG] 0x0 = 2000, - [1653155942342] [89108:1732693] CHIP: [DMG] }, - [1653155942342] [89108:1732693] CHIP: [DMG] }, - [1653155942342] [89108:1732693] CHIP: [DMG] - [1653155942342] [89108:1732693] CHIP: [DMG] ], - [1653155942342] [89108:1732693] CHIP: [DMG] - [1653155942342] [89108:1732693] CHIP: [DMG] InteractionModelRevision = 1 - [1653155942342] [89108:1732693] CHIP: [DMG] }, + ./chip-tool mediaplayback skip-forward 10000 1 3 + + The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. + + [1658531247634] [21924:323905] CHIP: [DMG] InvokeRequestMessage = + [1658531247634] [21924:323905] CHIP: [DMG] { + [1658531247634] [21924:323905] CHIP: [DMG] suppressResponse = false, + [1658531247634] [21924:323905] CHIP: [DMG] timedRequest = false, + [1658531247634] [21924:323905] CHIP: [DMG] InvokeRequests = + [1658531247634] [21924:323905] CHIP: [DMG] [ + [1658531247634] [21924:323905] CHIP: [DMG] CommandDataIB = + [1658531247634] [21924:323905] CHIP: [DMG] { + [1658531247634] [21924:323905] CHIP: [DMG] CommandPathIB = + [1658531247634] [21924:323905] CHIP: [DMG] { + [1658531247634] [21924:323905] CHIP: [DMG] EndpointId = 0x3, + [1658531247634] [21924:323905] CHIP: [DMG] ClusterId = 0x506, + [1658531247634] [21924:323905] CHIP: [DMG] CommandId = 0x8, + [1658531247634] [21924:323905] CHIP: [DMG] }, + [1658531247634] [21924:323905] CHIP: [DMG] + [1658531247635] [21924:323905] CHIP: [DMG] CommandFields = + [1658531247635] [21924:323905] CHIP: [DMG] { + [1658531247635] [21924:323905] CHIP: [DMG] 0x0 = 10000, + [1658531247635] [21924:323905] CHIP: [DMG] }, + [1658531247635] [21924:323905] CHIP: [DMG] }, + [1658531247635] [21924:323905] CHIP: [DMG] + [1658531247635] [21924:323905] CHIP: [DMG] ], + [1658531247635] [21924:323905] CHIP: [DMG] + [1658531247635] [21924:323905] CHIP: [DMG] InteractionModelRevision = 1 + [1658531247635] [21924:323905] CHIP: [DMG] }, disabled: true - - label: "DUT sends Skip Backward command to TH" - PICS: MEDIAPLAYBACK.C.C0009 + - label: "DUT sends SkipBackward command to TH" + PICS: MEDIAPLAYBACK.C.C09.Tx verification: | + ./chip-tool mediaplayback skip-backward 10000 1 3 + The following chip-tool command simulates the interaction of the DUT and the log below shows the resulting log on the TH. - ./chip-tool mediaplayback skip-backward 2000 1 1 - - [1653155967344] [89108:1733002] CHIP: [DMG] InvokeRequestMessage = - [1653155967344] [89108:1733002] CHIP: [DMG] { - [1653155967344] [89108:1733002] CHIP: [DMG] suppressResponse = false, - [1653155967344] [89108:1733002] CHIP: [DMG] timedRequest = false, - [1653155967344] [89108:1733002] CHIP: [DMG] InvokeRequests = - [1653155967344] [89108:1733002] CHIP: [DMG] [ - [1653155967344] [89108:1733002] CHIP: [DMG] CommandDataIB = - [1653155967344] [89108:1733002] CHIP: [DMG] { - [1653155967344] [89108:1733002] CHIP: [DMG] CommandPathIB = - [1653155967344] [89108:1733002] CHIP: [DMG] { - [1653155967344] [89108:1733002] CHIP: [DMG] EndpointId = 0x1, - [1653155967344] [89108:1733002] CHIP: [DMG] ClusterId = 0x506, - [1653155967344] [89108:1733002] CHIP: [DMG] CommandId = 0x9, - [1653155967344] [89108:1733002] CHIP: [DMG] }, - [1653155967344] [89108:1733002] CHIP: [DMG] - [1653155967344] [89108:1733002] CHIP: [DMG] CommandData = - [1653155967344] [89108:1733002] CHIP: [DMG] { - [1653155967344] [89108:1733002] CHIP: [DMG] 0x0 = 2000, - [1653155967344] [89108:1733002] CHIP: [DMG] }, - [1653155967344] [89108:1733002] CHIP: [DMG] }, - [1653155967344] [89108:1733002] CHIP: [DMG] - [1653155967344] [89108:1733002] CHIP: [DMG] ], - [1653155967344] [89108:1733002] CHIP: [DMG] - [1653155967344] [89108:1733002] CHIP: [DMG] InteractionModelRevision = 1 - [1653155967344] [89108:1733002] CHIP: [DMG] }, + [1658531281369] [21924:323905] CHIP: [DMG] InvokeRequestMessage = + [1658531281369] [21924:323905] CHIP: [DMG] { + [1658531281369] [21924:323905] CHIP: [DMG] suppressResponse = false, + [1658531281369] [21924:323905] CHIP: [DMG] timedRequest = false, + [1658531281369] [21924:323905] CHIP: [DMG] InvokeRequests = + [1658531281369] [21924:323905] CHIP: [DMG] [ + [1658531281369] [21924:323905] CHIP: [DMG] CommandDataIB = + [1658531281369] [21924:323905] CHIP: [DMG] { + [1658531281369] [21924:323905] CHIP: [DMG] CommandPathIB = + [1658531281369] [21924:323905] CHIP: [DMG] { + [1658531281369] [21924:323905] CHIP: [DMG] EndpointId = 0x3, + [1658531281369] [21924:323905] CHIP: [DMG] ClusterId = 0x506, + [1658531281369] [21924:323905] CHIP: [DMG] CommandId = 0x9, + [1658531281369] [21924:323905] CHIP: [DMG] }, + [1658531281369] [21924:323905] CHIP: [DMG] + [1658531281369] [21924:323905] CHIP: [DMG] CommandFields = + [1658531281369] [21924:323905] CHIP: [DMG] { + [1658531281369] [21924:323905] CHIP: [DMG] 0x0 = 10000, + [1658531281369] [21924:323905] CHIP: [DMG] }, + [1658531281369] [21924:323905] CHIP: [DMG] }, + [1658531281369] [21924:323905] CHIP: [DMG] + [1658531281369] [21924:323905] CHIP: [DMG] ], + [1658531281369] [21924:323905] CHIP: [DMG] + [1658531281369] [21924:323905] CHIP: [DMG] InteractionModelRevision = 1 + [1658531281369] [21924:323905] CHIP: [DMG] }, 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 5852934e541aac..f4deeee328d384 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 @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "TH reads the FeatureMap attribute from the DUT" PICS: MOD.S.F00 @@ -43,7 +43,7 @@ tests: response: value: 1 constraints: - type: map32 + type: bitmap32 - label: "TH reads the FeatureMap attribute from the DUT" PICS: " !MOD.S.F00 " @@ -52,7 +52,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "TH reads the AttributeList attribute from the DUT" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml index 3da9ee749d6d8d..f30a3b1cc381bb 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml @@ -28,13 +28,13 @@ tests: - name: "nodeId" value: nodeId - - label: "read the global attribute: ClusterRevision" + - label: "Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" response: value: 3 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml index 228b64c7dbbb78..c559eea82eb7f8 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "occupancy" response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 1 @@ -54,7 +54,7 @@ tests: attribute: "occupancy sensor type bitmap" response: constraints: - type: map8 + type: bitmap8 minValue: 1 maxValue: 273 @@ -65,7 +65,7 @@ tests: response: value: 0 constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -76,7 +76,7 @@ tests: response: value: 0 constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -88,7 +88,7 @@ tests: response: value: 1 constraints: - type: uint8 + type: int8u minValue: 1 maxValue: 254 @@ -99,7 +99,7 @@ tests: response: value: 0 constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -110,7 +110,7 @@ tests: response: value: 0 constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -121,7 +121,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int8u minValue: 1 maxValue: 254 @@ -134,7 +134,7 @@ tests: response: value: 0 constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -147,7 +147,7 @@ tests: response: value: 0 constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -160,6 +160,6 @@ tests: response: value: 1 constraints: - type: uint8 + type: int8u minValue: 1 maxValue: 254 diff --git a/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml index 648e8d4a7f2422..07710d8274d6bb 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml @@ -33,7 +33,6 @@ tests: command: "readAttribute" attribute: "occupancy" response: - value: 0 saveAs: OccupancyValue - label: "Operate on DUT to change the occupancy status" @@ -48,9 +47,9 @@ tests: value: "y" - label: "Reads back Occupancy attribute from DUT after few seconds" - PICS: OCC.S.A0000 + PICS: OCC.S.A0000 && OCC.M.OccupancyChange command: "readAttribute" attribute: "occupancy" response: constraints: - notvalue: OccupancyValue + notValue: OccupancyValue 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 bfb98d05c32a89..6c811f34c153d2 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 @@ -34,7 +34,7 @@ tests: response: value: 4 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -43,7 +43,7 @@ tests: response: value: 1 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -52,55 +52,42 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: OO.S.F00 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: - [ - 0, - 16384, - 16385, - 16386, - 16387, - 65528, - 65529, - 65531, - 65532, - 65533, - ] + contains: [0, 65528, 65529, 65531, 65532, 65533] - - label: "Read the global attribute: AttributeList" - PICS: " !OO.S.F00 " + - label: "Read the feature dependent(OO.S.F00) attribute in AttributeList" + PICS: OO.S.F00 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 65528, 65529, 65531, 65532, 65533] + contains: [16384, 16385, 16386, 16387] - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: OO.S.F00 response: constraints: type: list - contains: [0, 1, 2, 64, 65, 66] + contains: [0, 1, 2] - - label: "Read the global attribute: AcceptedCommandList" + - label: + "Read the feature dependent(OO.S.F00) commands in AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: " !OO.S.F00 " + PICS: OO.S.F00 response: constraints: type: list - contains: [0, 1, 2] + contains: [64, 65, 66] - label: "Read the global attribute: GeneratedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml index 2580de9ddd88f8..a471f39e6bce2f 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml @@ -28,43 +28,43 @@ tests: - name: "nodeId" value: nodeId - - label: "read the mandatory attribute: OnOff" + - label: "Read the mandatory attribute: OnOff" PICS: OO.S.A0000 command: "readAttribute" attribute: "OnOff" response: constraints: - type: bool + type: boolean - - label: "read LT attribute: GlobalSceneControl" + - label: "Read LT attribute: GlobalSceneControl" PICS: OO.S.A4000 command: "readAttribute" attribute: "GlobalSceneControl" response: constraints: - type: bool + type: boolean - - label: "read LT attribute: OnTime" + - label: "Read LT attribute: OnTime" PICS: OO.S.A4001 command: "readAttribute" attribute: "OnTime" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "read LT attribute: OffWaitTime" + - label: "Read LT attribute: OffWaitTime" PICS: OO.S.A4002 command: "readAttribute" attribute: "OffWaitTime" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "read LT attribute: StartUpOnOff" + - label: "Read LT attribute: StartUpOnOff" PICS: OO.S.A4003 command: "readAttribute" attribute: "StartUpOnOff" diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_2.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_2.yaml index 8181dba46b76da..f65f9f647eeb39 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_2_2.yaml @@ -124,7 +124,7 @@ tests: - label: "Operate on device to set OnOff attribute manually to on" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && OO.M.ManuallyControlled + PICS: PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000 arguments: values: - name: "message" @@ -134,7 +134,7 @@ tests: # Skipped this step because the above test need manual input - label: "Check on/off attribute value is true after on command" - PICS: PICS_SKIP_SAMPLE_APP && OO.S.A0000 + PICS: PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled command: "readAttribute" attribute: "OnOff" response: @@ -143,7 +143,7 @@ tests: - label: "Operate on device to set OnOff attribute manually to off" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && OO.M.ManuallyControlled + PICS: PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000 arguments: values: - name: "message" @@ -153,7 +153,7 @@ tests: # Skipped the step because the above test need manual input - label: "Check on/off attribute value is false after off command" - PICS: PICS_SKIP_SAMPLE_APP && OO.S.A0000 + PICS: PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled command: "readAttribute" attribute: "OnOff" response: diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_3.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_3.yaml index 956cb07d6fdeb9..514e7fd4c53dda 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_2_3.yaml @@ -294,8 +294,8 @@ tests: PICS: OO.S.A4001 response: constraints: - minValue: 270 - maxValue: 320 + minValue: 255 + maxValue: 345 - label: "9b:Reads OffWaitTime attribute from DUT" command: "readAttribute" @@ -389,8 +389,8 @@ tests: PICS: OO.S.A4001 response: constraints: - minValue: 270 - maxValue: 325 + minValue: 255 + maxValue: 345 - label: "10e:Reads OffWaitTime attribute from DUT" command: "readAttribute" @@ -437,8 +437,8 @@ tests: PICS: OO.S.A4002 response: constraints: - minValue: 270 - maxValue: 320 + minValue: 255 + maxValue: 345 - label: "Wait 10000ms" cluster: "DelayCommands" @@ -480,8 +480,8 @@ tests: PICS: OO.S.A4002 response: constraints: - minValue: 180 - maxValue: 220 + minValue: 170 + maxValue: 230 - label: "Wait 10000ms" cluster: "DelayCommands" @@ -570,8 +570,8 @@ tests: PICS: OO.S.A4002 response: constraints: - minValue: 270 - maxValue: 320 + minValue: 255 + maxValue: 345 - label: "Wait 30000ms" cluster: "DelayCommands" @@ -683,7 +683,9 @@ tests: attribute: "OnTime" PICS: OO.S.A4001 response: - value: 300 + constraints: + minValue: 255 + maxValue: 345 - label: "17c:Reads OffWaitTime attribute from DUT" command: "readAttribute" @@ -743,29 +745,26 @@ tests: - name: "OffWaitTime" value: 300 - # Issue 19159 onOff value mismatch: expected 1 but got 0 - label: "18b:Reads OnOff attribute from DUT" command: "readAttribute" attribute: "OnOff" - PICS: OO.S.A0000 && PICS_SKIP_SAMPLE_APP + PICS: OO.S.A0000 response: value: 1 - # Issue 19159 onTime value mismatch: expected 300 but got 0 - label: "18b:Reads OnTime attribute from DUT" command: "readAttribute" attribute: "OnTime" - PICS: OO.S.A4001 && PICS_SKIP_SAMPLE_APP + PICS: OO.S.A4001 response: constraints: - minValue: 270 - maxValue: 320 + minValue: 255 + maxValue: 345 - # Issue 19159 OffWaitTime value mismatch: expected 300 but got 0 - label: "18b:Reads OffWaitTime attribute from DUT" command: "readAttribute" attribute: "OffWaitTime" - PICS: OO.S.A4002 && PICS_SKIP_SAMPLE_APP + PICS: OO.S.A4002 response: value: 300 @@ -822,8 +821,8 @@ tests: PICS: OO.S.A4001 response: constraints: - minValue: 180 - maxValue: 220 + minValue: 170 + maxValue: 230 - label: "19c:Reads OffWaitTime attribute from DUT" command: "readAttribute" @@ -856,8 +855,8 @@ tests: PICS: OO.S.A4002 response: constraints: - minValue: 270 - maxValue: 320 + minValue: 255 + maxValue: 345 - label: "21a:Sends OnWithTimedOff command to DUT" command: "OnWithTimedOff" @@ -891,8 +890,8 @@ tests: PICS: OO.S.A4002 && PICS_SKIP_SAMPLE_APP response: constraints: - minValue: 180 - maxValue: 220 + minValue: 170 + maxValue: 230 - label: "22a:Send On Command" PICS: OO.S.C01.Rsp @@ -963,8 +962,8 @@ tests: PICS: OO.S.A4002 response: constraints: - minValue: 270 - maxValue: 320 + minValue: 255 + maxValue: 345 - label: "Wait 40000ms" cluster: "DelayCommands" @@ -995,7 +994,7 @@ tests: response: constraints: minValue: 0 - maxValue: 10 + maxValue: 15 - label: "24a:Sends OnWithTimedOff command to DUT" command: "OnWithTimedOff" @@ -1022,8 +1021,8 @@ tests: PICS: OO.S.A4001 response: constraints: - minValue: 270 - maxValue: 320 + minValue: 255 + maxValue: 345 - label: "24b:Reads OffWaitTime attribute from DUT" command: "readAttribute" @@ -1061,7 +1060,7 @@ tests: response: constraints: minValue: 0 - maxValue: 10 + maxValue: 15 - label: "Send Off Command" command: "Off" diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml index 1364c831d5edad..1463163543a05d 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml @@ -24,6 +24,7 @@ tests: - label: "Factory Reset DUT (to ensure NOC list is empty at the beginning of the following steps)" + PICS: MCORE.FACTORY_RESET verification: | On both DUT and TH side sudo rm -rf /tmp/chip_* 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 bf3689ae62d2c4..a095cc771d2219 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 @@ -34,7 +34,7 @@ tests: response: value: 3 constraints: - type: uint16 + type: int16u - label: "TH reads the FeatureMap attribute from the DUT" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "TH reads the AttributeList attribute from the DUT" command: "readAttribute" @@ -53,6 +53,182 @@ tests: contains: [0, 1, 2, 17, 18, 19, 32, 65528, 65529, 65531, 65532, 65533] + - label: + "TH reads optional attribute(MinConstPressure) attribute in + AttributeList from the DUT" + PICS: PCC.S.A0003 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3] + + - label: + "TH reads optional attribute(MaxConstPressure) attribute in + AttributeList from the DUT" + PICS: PCC.S.A0004 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4] + + - label: + "TH reads optional attribute(MinCompPressure) attribute in + AttributeList from the DUT" + PICS: PCC.S.A0005 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5] + + - label: + "TH reads optional attribute(MaxCompPressure) attribute in + AttributeList from the DUT" + PICS: PCC.S.A0006 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [6] + + - label: + "TH reads optional attribute(MinConstSpeed) attribute in AttributeList + from the DUT" + PICS: PCC.S.A0007 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [7] + + - label: + "TH reads optional attribute(MaxConstSpeed) attribute in AttributeList + from the DUT" + PICS: PCC.S.A0008 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [8] + + - label: + "TH reads optional attribute(MinConstFlow) attribute in AttributeList + from the DUT" + PICS: PCC.S.A0009 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [9] + + - label: + "TH reads optional attribute(MaxConstFlow) attribute in AttributeList + from the DUT" + PICS: PCC.S.A000a + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [10] + + - label: + "TH reads optional attribute(MinConstTemp) attribute in AttributeList + from the DUT" + PICS: PCC.S.A000b + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [11] + + - label: + "TH reads optional attribute(MaxConstTemp) attribute in AttributeList + from the DUT" + PICS: PCC.S.A000c + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [12] + + - label: + "TH reads optional attribute(PumpStatus) attribute in AttributeList + from the DUT" + PICS: PCC.S.A0010 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16] + + - label: + "TH reads optional attribute(Speed) attribute in AttributeList from + the DUT" + PICS: PCC.S.A0014 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [20] + + - label: + "TH reads optional attribute(LifetimeRunningHours) attribute in + AttributeList from the DUT" + PICS: PCC.S.A0015 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [21] + + - label: + "TH reads optional attribute(Power) attribute in AttributeList from + the DUT" + PICS: PCC.S.A0016 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [22] + + - label: + "TH reads optional attribute(LifetimeEnergyConsumed) attribute in + AttributeList from the DUT" + PICS: PCC.S.A0017 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [23] + + - label: + "TH reads optional attribute(ControlMode) attribute in AttributeList + from the DUT" + PICS: PCC.S.A0021 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [33] + - label: "TH reads the AcceptedCommandList attribute from the DUT" command: "readAttribute" attribute: "AcceptedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml index 5ce4bdf574593d..d69ef7d98629e5 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "MaxPressure" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -44,7 +44,7 @@ tests: attribute: "MaxSpeed" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -54,128 +54,117 @@ tests: attribute: "MaxFlow" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Read the optional attribute: MinConstPressure" PICS: PCC.S.A0003 - optional: true command: "readAttribute" attribute: "MinConstPressure" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: MaxConstPressure" PICS: PCC.S.A0004 - optional: true command: "readAttribute" attribute: "MaxConstPressure" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: MinCompPressure" PICS: PCC.S.A0005 - optional: true command: "readAttribute" attribute: "MinCompPressure" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: MaxCompPressure" PICS: PCC.S.A0006 - optional: true command: "readAttribute" attribute: "MaxCompPressure" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: MinConstSpeed" PICS: PCC.S.A0007 - optional: true command: "readAttribute" attribute: "MinConstSpeed" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Read the optional attribute: MaxConstSpeed" PICS: PCC.S.A0008 - optional: true command: "readAttribute" attribute: "MaxConstSpeed" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Read the optional attribute: MinConstFlow" PICS: PCC.S.A0009 - optional: true command: "readAttribute" attribute: "MinConstFlow" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Read the optional attribute: MaxConstFlow" PICS: PCC.S.A000a - optional: true command: "readAttribute" attribute: "MaxConstFlow" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Read the optional attribute: MinConstTemp" PICS: PCC.S.A000b - optional: true command: "readAttribute" attribute: "MinConstTemp" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: MaxConstTemp" PICS: PCC.S.A000c - optional: true command: "readAttribute" attribute: "MaxConstTemp" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: PumpStatus" PICS: PCC.S.A0010 - optional: true command: "readAttribute" attribute: "PumpStatus" response: constraints: - type: map16 + type: bitmap16 minValue: 0 maxValue: 8 @@ -205,51 +194,47 @@ tests: attribute: "Capacity" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: Speed" PICS: PCC.S.A0014 - optional: true command: "readAttribute" attribute: "Speed" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Read the optional attribute: LifetimeRunningHours" PICS: PCC.S.A0015 - optional: true command: "readAttribute" attribute: "LifetimeRunningHours" response: constraints: - type: uint24 + type: int24u minValue: 0 maxValue: 16777215 - label: "Read the optional attribute: Power" PICS: PCC.S.A0016 - optional: true command: "readAttribute" attribute: "Power" response: constraints: - type: uint24 + type: int24u minValue: 0 maxValue: 16777215 - label: "Read the optional attribute: LifetimeEnergyConsumed" PICS: PCC.S.A0017 - optional: true command: "readAttribute" attribute: "LifetimeEnergyConsumed" response: constraints: - type: uint32 + type: int32u minValue: 0 maxValue: 4294967295 @@ -265,7 +250,6 @@ tests: - label: "Read optional attribute: ControlMode" PICS: PCC.S.A0021 - optional: true command: "readAttribute" attribute: "ControlMode" response: diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml index c24059997de3a4..9f716da6798c62 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml @@ -28,42 +28,58 @@ tests: - name: "nodeId" value: nodeId - - label: "Write 1 to the OperationMode attribute to DUT: OperationMode" + - label: "TH write 0 (Normal) to the OperationMode attribute to DUT" command: "writeAttribute" attribute: "OperationMode" PICS: PCC.S.A0020 arguments: - value: 1 + value: 0 - - label: "Reads the attribute: EffectiveOperationMode" + - label: "TH reads from the DUT the EffectiveOperationMode attribute" command: "readAttribute" attribute: "EffectiveOperationMode" PICS: PCC.S.A0011 + response: + value: 0 + + - label: "TH write 1 (Minimum) to the OperationMode attribute to DUT" + command: "writeAttribute" + attribute: "OperationMode" + PICS: PCC.S.A0020 && PCC.M.ControlModeConstSpeed + arguments: + value: 1 + + - label: "TH reads from the DUT the EffectiveOperationMode attribute" + command: "readAttribute" + attribute: "EffectiveOperationMode" + PICS: PCC.S.A0011 && PCC.M.ControlModeConstSpeed response: value: 1 - - label: "Write 2 to the OperationMode attribute to DUT: OperationMode" + - label: + "TH write 2 (Maximum) to the OperationMode attribute to DUT one at a + time." command: "writeAttribute" attribute: "OperationMode" - PICS: PCC.S.A0020 + PICS: PCC.S.A0020 && PCC.M.ControlModeConstSpeed arguments: value: 2 - - label: "Reads the attribute: EffectiveOperationMode" + - label: "TH reads from the DUT the EffectiveOperationMode attribute" command: "readAttribute" attribute: "EffectiveOperationMode" - PICS: PCC.S.A0011 + PICS: PCC.S.A0011 && PCC.M.ControlModeConstSpeed response: value: 2 - - label: "Write 3 to the OperationMode attribute to DUT: OperationMode" + - label: "TH write 3 (Local) to the OperationMode attribute to DUT" command: "writeAttribute" attribute: "OperationMode" PICS: PCC.S.A0020 arguments: value: 3 - - label: "Reads the attribute: EffectiveOperationMode" + - label: "TH reads from the DUT the EffectiveOperationMode attribute" command: "readAttribute" attribute: "EffectiveOperationMode" PICS: PCC.S.A0011 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 dd99ae2d50de7a..e7e8a142285b62 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 @@ -34,7 +34,7 @@ tests: response: value: 3 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: PRS.S.F00 @@ -43,7 +43,7 @@ tests: response: value: 1 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: FeatureMap" PICS: " !PRS.S.F00 " @@ -52,7 +52,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global mandatory attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml index 86c74bfb54f6a6..cc541918a4bccc 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "MeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -44,7 +44,7 @@ tests: attribute: "MinMeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -54,7 +54,7 @@ tests: attribute: "MaxMeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -64,7 +64,7 @@ tests: attribute: "Tolerance" response: constraints: - type: int16 + type: int16u minValue: 0 maxValue: 2048 @@ -74,7 +74,7 @@ tests: attribute: "ScaledValue" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -84,7 +84,7 @@ tests: attribute: "MinScaledValue" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -94,7 +94,7 @@ tests: attribute: "MaxScaledValue" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -104,7 +104,7 @@ tests: attribute: "ScaledTolerance" response: constraints: - type: int16 + type: int16u minValue: 0 maxValue: 2048 @@ -114,6 +114,6 @@ tests: attribute: "Scale" response: constraints: - type: int8 + type: int8s minValue: -127 maxValue: 127 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 c355fc10682848..4053ea3195a19a 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 @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "TH reads the FeatureMap attribute from the DUT" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "TH reads the AttributeList attribute from the DUT" command: "readAttribute" 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 efbf0b32677ac1..dc766658a7594c 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 @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: PS.S.F00 || PS.S.F01 || PS.S.F02 || PS.S.F03 @@ -42,9 +42,9 @@ tests: attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 - maxValue: 7 + maxValue: 15 - label: "Read the global attribute: AttributeList" command: "readAttribute" @@ -55,43 +55,44 @@ tests: contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] - label: - "Read the Feature related(PS.S.F00-WIRED) attribute in AttributeList" + "Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList" PICS: PS.S.F00 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [3, 4, 5, 7, 8, 9, 10] + contains: [5] - - label: "Read the Feature related(PS.S.F01-BAT) attribute in AttributeList" + - label: + "Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList" PICS: PS.S.F01 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [11, 12, 13, 14, 15, 16, 17, 18] + contains: [14, 15, 16] - label: - "Read the Feature related(PS.S.F02-RECHG) attribute in AttributeList" + "Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList" PICS: PS.S.F02 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [26, 27, 28, 29, 30] + contains: [26, 28] - label: - "Read the Feature related(PS.S.F03-REPLC) attribute in AttributeList" + "Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList" PICS: PS.S.F03 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [19, 20, 21, 22, 23, 24, 25] + contains: [19, 25] - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml index ba8ecaa297abb9..969e453c6d1373 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml @@ -44,7 +44,7 @@ tests: attribute: "Order" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -54,7 +54,7 @@ tests: attribute: "Description" response: constraints: - type: string + type: char_string - label: "Test Harness Client reads WiredAssessedInputVoltage attribue from @@ -64,7 +64,7 @@ tests: attribute: "WiredAssessedInputVoltage" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -76,7 +76,7 @@ tests: attribute: "WiredAssessedInputFrequency" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -99,7 +99,7 @@ tests: attribute: "WiredAssessedCurrent" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -109,7 +109,7 @@ tests: attribute: "WiredNominalVoltage" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -119,7 +119,7 @@ tests: attribute: "WiredMaximumCurrent" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -129,7 +129,7 @@ tests: attribute: "WiredPresent" response: constraints: - type: bool + type: boolean - label: "Test Harness Client reads ActiveWiredFaults from Server DUT" PICS: PICS_SKIP_SAMPLE_APP && PS.S.A000a @@ -138,7 +138,7 @@ tests: response: constraints: type: list - maxlength: 8 + maxLength: 8 - label: "Test Harness Client reads BatVoltage from Server DUT" PICS: PICS_SKIP_SAMPLE_APP && PS.S.A000b @@ -146,7 +146,7 @@ tests: attribute: "BatVoltage" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -156,9 +156,9 @@ tests: attribute: "BatPercentRemaining" response: constraints: - type: uint8 - minvalue: 0 - maxvalue: 200 + type: int8u + minValue: 0 + maxValue: 200 - label: "Test Harness Client reads BatTimeRemaining from Server DUT" PICS: PICS_SKIP_SAMPLE_APP && PS.S.A000d @@ -166,7 +166,7 @@ tests: attribute: "BatTimeRemaining" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -186,7 +186,7 @@ tests: attribute: "BatReplacementNeeded" response: constraints: - type: bool + type: boolean - label: "Test Harness Client reads BatReplaceability from Server DUT" PICS: PICS_SKIP_SAMPLE_APP && PS.S.A0010 @@ -204,7 +204,7 @@ tests: attribute: "BatPresent" response: constraints: - type: bool + type: boolean - label: "Test Harness Client readsActiveBatFaults from Server DUT" PICS: PICS_SKIP_SAMPLE_APP && PS.S.A0012 @@ -213,7 +213,7 @@ tests: response: constraints: type: list - maxlength: 8 + maxLength: 8 - label: "Test Harness Client reads BatReplacementDescription from Server DUT" @@ -222,7 +222,7 @@ tests: attribute: "BatReplacementDescription" response: constraints: - type: string + type: char_string maxLength: 60 - label: "Test Harness Client reads BatCommonDesignation from Server DUT" @@ -231,7 +231,7 @@ tests: attribute: "BatCommonDesignation" response: constraints: - type: uint32 + type: int32u minValue: 0 maxValue: 80 @@ -241,7 +241,7 @@ tests: attribute: "BatANSIDesignation" response: constraints: - type: string + type: char_string maxLength: 20 - label: "Test Harness Client reads BatIECDesignation from Server DUT" @@ -250,7 +250,7 @@ tests: attribute: "BatIECDesignation" response: constraints: - type: string + type: char_string maxLength: 20 - label: "Test Harness Client reads BatApprovedChemistry from Server DUT" @@ -259,7 +259,7 @@ tests: attribute: "BatApprovedChemistry" response: constraints: - type: uint32 + type: int32u minValue: 0 maxValue: 32 @@ -269,7 +269,7 @@ tests: attribute: "BatCapacity" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -279,7 +279,7 @@ tests: attribute: "BatQuantity" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -299,7 +299,7 @@ tests: attribute: "BatTimeToFullCharge" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -310,7 +310,7 @@ tests: attribute: "BatFunctionalWhileCharging" response: constraints: - type: bool + type: boolean - label: "Test Harness Client reads BatChargingCurrent from Server DUT" PICS: PICS_SKIP_SAMPLE_APP && PS.S.A001d @@ -318,7 +318,7 @@ tests: attribute: "BatChargingCurrent" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF 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 8fd7e9a9723d27..79362ca7f613da 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 @@ -34,7 +34,7 @@ tests: response: value: 3 constraints: - type: list + type: int16u - label: "Read FeatureMap attribute from the DUT" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml index bbca0f62114a0b..588190de738f6f 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "measured value" response: constraints: - type: int16 + type: int16u minValue: 0 maxValue: 10000 @@ -44,16 +44,17 @@ tests: attribute: "min measured value" response: constraints: - type: int16 + type: int16u minValue: 0 maxValue: 9999 - label: "Reads constraints of attribute: MaxMeasuredValue" + PICS: RH.S.A0002 command: "readAttribute" attribute: "max measured value" response: constraints: - type: int16 + type: int16u minValue: 1 maxValue: 10000 @@ -63,6 +64,6 @@ tests: attribute: "tolerance" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 2048 diff --git a/src/app/tests/suites/certification/Test_TC_RH_2_2.yaml b/src/app/tests/suites/certification/Test_TC_RH_2_2.yaml index 0e73c4587852a7..fc4a8ab535f6f1 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_2_2.yaml @@ -34,17 +34,17 @@ tests: attribute: "min measured value" response: constraints: - type: int16 + type: int16u minValue: 0 maxValue: 9999 - label: "Reads constraints of attribute: MaxMeasuredValue" - PICS: PICS_SKIP_SAMPLE_APP + PICS: RH.S.A0002 command: "readAttribute" attribute: "max measured value" response: constraints: - type: int16 + type: int16u minValue: 1 maxValue: 10000 @@ -55,7 +55,7 @@ tests: response: saveAs: ValueBeforeChange constraints: - type: int16 + type: int16u minValue: 0 maxValue: 10000 @@ -73,8 +73,8 @@ tests: - label: "Read the mandatory attribute: MeasuredValue" command: "readAttribute" attribute: "measured value" - PICS: RH.S.A0000 + PICS: RH.S.A0000 && RH.M.ManuallyControlled response: constraints: - type: uint16 + type: int16u notValue: ValueBeforeChange diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml index 9ed1f75e4edc23..536019ae31e03c 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml @@ -21,16 +21,16 @@ config: cluster: "Secure Channel" endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 vendorId: - type: INT16U + type: int16u defaultValue: 65521 productId: - type: INT16U + type: int16u defaultValue: 32769 deviceType: - type: INT16U + type: int16u defaultValue: 5 tests: @@ -70,7 +70,7 @@ tests: #validate the service type and the service domain not implemented in CI - label: "Check Hostname" - PICS: "(WIFI || ETH) && !THREAD" + PICS: "( MCORE.SC.WIFI || MCORE.SC.ETH ) && !MCORE.SC.THR" cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -83,7 +83,7 @@ tests: isHexString: true - label: "Check Hostname" - PICS: "PICS_SKIP_SAMPLE_APP && (!WIFI && !ETH) && THREAD" + PICS: "( !MCORE.SC.WIFI && !MCORE.SC.ETH ) && MCORE.SC.THR " cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -113,7 +113,7 @@ tests: value: discriminator - label: "Check Vendor ID (_V)" - PICS: VENDOR_SUBTYPE + PICS: MCORE.SC.VENDOR_SUBTYPE cluster: "DiscoveryCommands" command: "FindCommissionableByVendorId" arguments: @@ -122,7 +122,7 @@ tests: value: vendorId - label: "Check Device Type ID (_T)" - PICS: PICS_SKIP_SAMPLE_APP && DEVTYPE_SUBTYPE + PICS: PICS_SKIP_SAMPLE_APP && MCORE.SC.DEVTYPE_SUBTYPE cluster: "DiscoveryCommands" command: "FindCommissionableByDeviceType" arguments: @@ -135,7 +135,7 @@ tests: command: "FindCommissionableByCommissioningMode" - label: "TXT key for Vendor ID and Product ID (VP)" - PICS: VP_KEY + PICS: MCORE.SC.VP_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -144,7 +144,7 @@ tests: value: vendorId - label: "TXT key for Vendor ID and Product ID (VP)" - PICS: VP_KEY + PICS: MCORE.SC.VP_KEY optional: true cluster: "DiscoveryCommands" command: "FindCommissionable" @@ -154,7 +154,7 @@ tests: value: productId - label: "Optional TXT key for MRP Retry Interval Idle (CRI)" - PICS: CRI_COMM_DISCOVERY_KEY + PICS: MCORE.SC.SII_OP_DISCOVERY_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -164,7 +164,7 @@ tests: maxValue: 3600000 - label: "Optional TXT key for MRP Retry Interval Active (CRA)" - PICS: CRA_COMM_DISCOVERY_KEY + PICS: MCORE.SC.SAI_OP_DISCOVERY_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -182,7 +182,7 @@ tests: value: 1 - label: "Optional TXT key for device type (DT)" - PICS: PICS_SKIP_SAMPLE_APP && DT_KEY + PICS: PICS_SKIP_SAMPLE_APP && MCORE.SC.DT_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -193,7 +193,7 @@ tests: maxValue: 999 - label: "Optional TXT key for device name (DN)" - PICS: DN_KEY + PICS: MCORE.SC.DN_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -203,7 +203,7 @@ tests: maxLength: 32 - label: "Optional TXT key for rotating device identifier (RI)" - PICS: RI_KEY + PICS: MCORE.SC.RI_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -213,7 +213,7 @@ tests: maxValue: 100 - label: "Optional TXT key for pairing hint (PH)" - PICS: PH_KEY + PICS: MCORE.SC.PH_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -223,7 +223,7 @@ tests: notValue: 0 - label: "Optional TXT key for pairing instructions (PI)" - PICS: PI_KEY + PICS: MCORE.SC.PI_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -242,6 +242,7 @@ tests: minValue: 1 - label: "Stop target device" + PICS: PICS_SDK_CI_ONLY cluster: "SystemCommands" command: "Stop" @@ -249,12 +250,26 @@ tests: "Start target device with the provided discriminator for basic commissioning advertisement" cluster: "SystemCommands" + PICS: PICS_SDK_CI_ONLY command: "Start" arguments: values: - name: "discriminator" value: discriminator + - label: "TH is rebooted" + verification: | + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Please reboot the TH and enter 'y' after TH starts" + - name: "expectedValue" + value: "y" + - label: "Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" @@ -288,7 +303,7 @@ tests: #validate the service type and the service domain not implemented in CI - label: "Check Hostname" - PICS: "(WIFI || ETH) && !THREAD" + PICS: "( MCORE.SC.WIFI || MCORE.SC.ETH ) && !MCORE.SC.THR " cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -301,7 +316,7 @@ tests: isHexString: true - label: "Check Hostname" - PICS: "PICS_SKIP_SAMPLE_APP && (!WIFI && !ETH) && THREAD" + PICS: "( !MCORE.SC.WIFI && !MCORE.SC.ETH ) && MCORE.SC.THR" cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -330,7 +345,7 @@ tests: value: discriminator - label: "Check Vendor ID (_V)" - PICS: VENDOR_SUBTYPE + PICS: MCORE.SC.VENDOR_SUBTYPE cluster: "DiscoveryCommands" command: "FindCommissionableByVendorId" arguments: @@ -339,7 +354,7 @@ tests: value: vendorId - label: "Check Device Type ID (_T)" - PICS: PICS_SKIP_SAMPLE_APP && DEVTYPE_SUBTYPE + PICS: PICS_SKIP_SAMPLE_APP && MCORE.SC.DEVTYPE_SUBTYPE cluster: "DiscoveryCommands" command: "FindCommissionableByDeviceType" arguments: @@ -352,7 +367,7 @@ tests: command: "FindCommissionableByCommissioningMode" - label: "TXT key for Vendor ID and Product ID (VP)" - PICS: VP_KEY + PICS: MCORE.SC.VP_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -361,7 +376,7 @@ tests: value: vendorId - label: "TXT key for Vendor ID and Product ID (VP)" - PICS: VP_KEY + PICS: MCORE.SC.VP_KEY optional: true cluster: "DiscoveryCommands" command: "FindCommissionable" @@ -371,7 +386,7 @@ tests: value: productId - label: "Optional TXT key for MRP Retry Interval Idle (CRI)" - PICS: CRI_COMM_DISCOVERY_KEY + PICS: MCORE.SC.SII_OP_DISCOVERY_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -381,7 +396,7 @@ tests: maxValue: 3600000 - label: "Optional TXT key for MRP Retry Interval Active (CRA)" - PICS: CRA_COMM_DISCOVERY_KEY + PICS: MCORE.SC.SAI_OP_DISCOVERY_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -399,7 +414,7 @@ tests: value: 1 - label: "Optional TXT key for device type (DT)" - PICS: PICS_SKIP_SAMPLE_APP && DT_KEY + PICS: PICS_SKIP_SAMPLE_APP && MCORE.SC.DT_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -410,7 +425,7 @@ tests: maxValue: 999 - label: "Optional TXT key for device name (DN)" - PICS: DN_KEY + PICS: MCORE.SC.DN_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -420,7 +435,7 @@ tests: maxLength: 32 - label: "Optional TXT key for rotating device identifier (RI)" - PICS: RI_KEY + PICS: MCORE.SC.RI_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -430,7 +445,7 @@ tests: maxValue: 100 - label: "Optional TXT key for pairing hint (PH)" - PICS: PH_KEY + PICS: MCORE.SC.PH_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -440,7 +455,7 @@ tests: notValue: 0 - label: "Optional TXT key for pairing instructions (PI)" - PICS: PI_KEY + PICS: MCORE.SC.PI_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml index 54562b68394241..ac4478dcaf2d5c 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml @@ -33,27 +33,13 @@ tests: - label: "By any means, DUT is instructed to perform an unicast UDP query to the DNS-SD Discovery Proxy on TH for services" + PICS: + MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && + MCORE.SC.T_KEY verification: | - 1. Proviosion the node(accessory/device) to thread network - - 2. Open the matter shell in the SDK and run resolve command, Verify if the device detects the published IP address and the Common Txt Key/Value Pairs , as advertised in the service. Ref below example. - - - uart:~$ matter dns resolve 9791300599901692208 10360380464321857174 - Resolving ... - uart:~$ I: 127317 [DIS]Node ID resolved for 0x8FC7772401CD0696 to [fd7b:a81b:9770:0:dea6:32ff:fe8d:7072]:22222 - DNS resolve for 87E1B004E235A130-8FC7772401CD0696 succeeded: - Hostname: ubuntuserverAcce - IP address: fd7b:a81b:9770:0:dea6:32ff:fe8d:7072 - Port: 22222 - MRP retry interval (idle): 3000ms - MRP retry interval (active): 4000ms - Supports TCP: no - - avahi-browse -rt _matter._tcp - + Verify on the TH Log: + eth0 IPv6 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local + eth0 IPv4 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local @@ -77,34 +63,25 @@ tests: disabled: true - label: "DUT must receive a notification with new data" + PICS: + MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && + MCORE.SC.T_KEY verification: | - 1. Open the matter shell in the SDK and run resolve command, Verify if the device detects updated values in the service, i..e Support TCP is '1'(Yes) - - - uart:~$ matter dns resolve 9791300599901692208 10360380464321857174 - Resolving ... - uart:~$ I: 542364 [DIS]Node ID resolved for 0x8FC7772401CD0696 to [fd7b:a81b:9770:0:dea6:32ff:fe8d:7072]:22222 - DNS resolve for 87E1B004E235A130-8FC7772401CD0696 succeeded: - Hostname: ubuntuserverAcce - IP address: fd7b:a81b:9770:0:dea6:32ff:fe8d:7072 - Port: 22222 - MRP retry interval (idle): 3000ms - MRP retry interval (active): 4000ms - Supports TCP: yes + avahi-browse -rt _matter._tcp + Verify on the TH Log: - avahi-browse -rt _matter._tcp + eth0 IPv6 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local + eth0 IPv4 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local = eth0 IPv4 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local hostname = [D21165B5F440B033.local] address = [fd11:22::4b31:9932:cffe:b41a] port = [5540] - txt = ["T=0" "SAI=300" "SII=5000"] + txt = ["T=1" "SAI=300" "SII=5000"] = eth0 IPv6 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local hostname = [D21165B5F440B033.local] address = [fd11:22::4b31:9932:cffe:b41a] port = [5540] - txt = ["T=0" "SAI=300" "SII=5000"] + txt = ["T=1" "SAI=300" "SII=5000"] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_6.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_6.yaml index d638099f0ca101..7e60d9847fda91 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_6.yaml @@ -31,9 +31,14 @@ tests: disabled: true - label: "Check DNS-SD subtypes used by DUT" + PICS: + MCORE.SC.DEVTYPE_SUBTYPE && MCORE.SC.VP_KEY && MCORE.SC.DT_KEY && + MCORE.SC.DN_KEY verification: | avahi-publish-service --subtype=_V123._sub._matterd._udp DD200C20D25AE5F7 _matterd._udp 33333 VP=123+456 DT=35 DN="Living Room TV" + Verify on the TH Log: + ubuntu@ubuntu:~$ avahi-browse _matterd._udp -r + eth0 IPv6 DD200C20D25AE5F7 _matterd._udp local @@ -52,10 +57,10 @@ tests: to look for subtypes, on the raspi run $ avahi-browse -p _services._dns-sd._udp - | grep _matterc + | grep _matterd - +;eth0;IPv6;_CM;_sub._matterc._udp;local - +;eth0;IPv6;_L3840;_sub._matterc._udp;local - +;eth0;IPv6;_S0;_sub._matterc._udp;local - +;eth0;IPv6;_V9050;_sub._matterc._udp;local + +;eth0;IPv6;_CM;_sub._matterd._udp;local + +;eth0;IPv6;_L3840;_sub._matterd._udp;local + +;eth0;IPv6;_S0;_sub._matterd._udp;local + +;eth0;IPv6;_V9050;_sub._matterd._udp;local disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_8.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_8.yaml index f7d859a2e71c72..590965b9a1d86a 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_8.yaml @@ -30,9 +30,12 @@ tests: ./chip-tool pairing onnetwork 2 20202021 - Assigned compressed fabric ID: 0xF3C001637A30CEEC - Assigned compressed fabric ID: 0xBE320A8460153487 - Assigned compressed fabric ID: 0x8A124463B858624F + + avahi-browse _matter._tcp -rt + + Verify on the TH Log: + + eth0 IPv6 8840D142C33AB653-0000000000000001 _matter._tcp local disabled: true - label: "Commission TH2 to DUTs Fabric" @@ -43,19 +46,26 @@ tests: ./chip-tool pairing ble-wifi 1 chipsetup4 matter123 20202021 3841 - Assigned compressed fabric ID: 0xF3C001637A30CEEC - Assigned compressed fabric ID: 0xBE320A8460153487 - Assigned compressed fabric ID: 0x8A124463B858624F + Verify you got below message Device commissioning completed with success + + + avahi-browse _matter._tcp -rt + + Verify on the TH Log: + + + eth0 IPv6 8840D142C33AB653-0000000000000001 _matter._tcp local disabled: true - label: "Send RemoveFabric from DUT to TH1 and comission DUT to TH1 again" verification: | ./chip-tool operationalcredentials remove-fabric 1 1 0 - Verify the below log on the DUT as client device + Verify in TH all-clusters-app log + + CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1651571274.154864][10562:10567] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 @@ -67,15 +77,19 @@ tests: ./chip-tool pairing ble-wifi 1 chipsetup4 matter123 20202021 3841 - Assigned compressed fabric ID: 0xF3C001637A30CEEC - Assigned compressed fabric ID: 0xBE320A8460153487 - Assigned compressed fabric ID: 0x8A124463B858624F + avahi-browse _matter._tcp -rt + + Verify on the TH Log: + + + eth0 IPv6 8840D142C33AB653-0000000000000001 _matter._tcp local disabled: true - label: "Send RemoveFabric from DUT to TH2 and comission DUT to TH2 again" verification: | ./chip-tool operationalcredentials remove-fabric 1 2 0 + Verify in TH all-clusters-app log + [1657628679275] [78509:912135] CHIP: [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1657628679275] [78509:912135] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 [1657628679275] [78509:912135] CHIP: [TOO] NOCResponse: { @@ -88,7 +102,9 @@ tests: ./chip-tool pairing onnetwork 2 20202021 - Assigned compressed fabric ID: 0xF3C001637A30CEEC - Assigned compressed fabric ID: 0xBE320A8460153487 - Assigned compressed fabric ID: 0x8A124463B858624F + avahi-browse _matter._tcp -rt + + Verify on the TH Log: + + + eth0 IPv6 8840D142C33AB653-0000000000000002 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml index 9b9b46ae11e8c4..9d2b3415f11a38 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml @@ -11,110 +11,142 @@ # WITHOUT 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: 74.1.1. [TC-SWTCH-1.1] Global attributes with server as DUT config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Switch" + endpoint: 1 tests: - - label: "Commission DUT to TH (can be skipped if done in a preceding test)" - verification: | - - disabled: true - - - label: "Read FeatureMap (global attribute 65532)" - verification: | - ./chip-tool switch read feature-map 1 1 - - Verify on the TH Log: - - [1655271856.827371][2855:2860] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFC DataVersion: 4291766665 - [1655271856.827493][2855:2860] CHIP:TOO: FeatureMap: 1 - disabled: true - - - label: "Check values of flags in this FeatureMap" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Read the global attribute: FeatureMap" + command: "readAttribute" + attribute: "FeatureMap" + response: + saveAs: FeatureMapValue + + - label: + "Read the FeatureMap value and verify LS is set to 1; MS, MSR, MSL, + MSM are all set to 0" PICS: SWTCH.S.F00 - verification: | - no Matter messages, but TH internal checking - disabled: true + command: "readAttribute" + attribute: "FeatureMap" + response: + value: FeatureMapValue - label: "Check values of flags in this FeatureMap" - PICS: SWTCH.S.F01 verification: | - no Matter messages, but TH internal checking - disabled: true + LS is set to 0; MS is set to 1 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && SWTCH.S.F01 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Check values of flags in this FeatureMap" - PICS: SWTCH.S.F02 verification: | - no Matter messages, but TH internal checking - disabled: true + LS is set to 0; MS, MSR are set to 1 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && SWTCH.S.F02 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Check values of flags in this FeatureMap" - PICS: SWTCH.S.F03 verification: | - no Matter messages, but TH internal checking - disabled: true + LS is set to 0; MS, MSR, MSL are all set to 1 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && SWTCH.S.F03 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Check values of flags in this FeatureMap" - PICS: SWTCH.S.F04 - verification: | - no Matter messages, but TH internal checking - disabled: true - - - label: "Read ClusterRevision (global attribute 65533)" - verification: | - ./chip-tool switch read cluster-revision 1 1 - - Verify on the TH Log: - - [1651563714.073979][8331:8336] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFD DataVersion: 3331396879 - [1651563714.074140][8331:8336] CHIP:TOO: ClusterRevision: 1 - disabled: true - - - label: "Read AttributeList (global attribute 65531)" verification: | - ./chip-tool switch read attribute-list 1 1 - - Verify on the TH Log: - - [1651563753.140074][8338:8343] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFB DataVersion: 3331396879 - [1651563753.140200][8338:8343] CHIP:TOO: AttributeList: 8 entries - [1651563753.140246][8338:8343] CHIP:TOO: [1]: 0 - [1651563753.140283][8338:8343] CHIP:TOO: [2]: 1 - [1651563753.140319][8338:8343] CHIP:TOO: [3]: 2 - [1651563753.140355][8338:8343] CHIP:TOO: [4]: 65528 - [1651563753.140389][8338:8343] CHIP:TOO: [5]: 65529 - [1651563753.140425][8338:8343] CHIP:TOO: [6]: 65531 - [1651563753.140460][8338:8343] CHIP:TOO: [7]: 65532 - [1651563753.140495][8338:8343] CHIP:TOO: [8]: 65533 - disabled: true - - - label: "Read EventList (global attribute 65530)" + LS is set to 0; MS, MSR, MSM are all set to 1 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && SWTCH.S.F04 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "read the global attribute: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + + - label: "Read the global attribute: AttributeList" + PICS: SWTCH.S.F04 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + + - label: "Read the global attribute: AttributeList" + PICS: "!SWTCH.S.F04" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + + - label: "Read the global attribute: AcceptedCommandList" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [] + + - label: "Read the global attribute: GeneratedCommandList" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + + #issue #15011 + - label: + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | OUT OF SCOPE FOR V1.0 - disabled: true - - - label: "Read AcceptedCommandList (global attribute 65529)" - verification: | - ./chip-tool switch read accepted-command-list 1 1 - - Verify on the TH Log: - - [1651563822.164319][8348:8353] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFF9 DataVersion: 3331396879 - [1651563822.164424][8348:8353] CHIP:TOO: AcceptedCommandList: 0 entries - disabled: true - - - label: "Read GeneratedCommandList (global attribute 65528)" - verification: | - ./chip-tool switch read generated-command-list 1 1 - - Verify on the TH Log: - - [1651563849.608873][8355:8361] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFF8 DataVersion: 3331396879 - [1651563849.608977][8355:8361] CHIP:TOO: GeneratedCommandList: 0 entries - disabled: true + 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_SWTCH_2_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_2_1.yaml index 5f0653034876bf..d66ad3aa45f22a 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_2_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 2 constraints: - type: uint8 + type: int8u minValue: 2 - label: "Read CurrentPosition attribute" @@ -43,7 +43,7 @@ tests: response: value: 0 constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -54,6 +54,6 @@ tests: response: value: 2 constraints: - type: uint8 + type: int8u minValue: 2 maxValue: 255 diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml index e80d3e1c5bfb46..e9339db43775b9 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 73.2.2. [TC-SWTCH-2.2] Primary functionality with server as DUT +name: 74.2.2. [TC-SWTCH-2.2] Primary functionality with server as DUT config: nodeId: 0x12344321 @@ -31,7 +31,7 @@ tests: verification: | ./chip-tool switch subscribe-event switch-latched 1 100 1 1 - Verify in TH Log: + Verify inTH Log: [1646209067.917157][2496:2501] CHIP:DMG: SubscribeResponseMessage = [1646209067.917184][2496:2501] CHIP:DMG: { @@ -53,7 +53,7 @@ tests: verification: | ./chip-tool switch read current-position 1 1 - Verify in TH Log: + Verify inTH Log: [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 0 @@ -70,6 +70,9 @@ tests: PICS: SWTCH.S.F00 verification: | ./chip-tool switch read current-position 1 1 + + Verify inTH Log: + [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 1 disabled: true @@ -81,7 +84,7 @@ tests: verification: | ./chip-tool switch read current-position 1 1 - Verify in TH Log: + Verify inTH Log: Event (content will vary on the device) [1646209167.923346][2190:2190] CHIP:DMG: StatusResponseMessage = @@ -98,7 +101,7 @@ tests: Read CurrentPosition attribute" PICS: SWTCH.S.F00 verification: | - 2 + disabled: true - label: "Operator returns switch to first position" @@ -111,8 +114,7 @@ tests: PICS: SWTCH.S.F00 verification: | ./chip-tool switch read current-position 1 1 - - Verify in TH Log: + Verify inTH Log: [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 0 @@ -122,8 +124,7 @@ tests: PICS: SWTCH.S.F01 verification: | ./chip-tool switch subscribe-event initial-press 1 100 1 1 - - Verify in TH Log: + Verify inTH Log: [1646209546.313236][2641:2646] CHIP:DMG: SubscribeResponseMessage = [1646209546.313263][2641:2646] CHIP:DMG: { @@ -146,7 +147,7 @@ tests: verification: | ./chip-tool switch read current-position 1 1 - Verify in TH Log: + Verify inTH Log: [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 0 @@ -162,6 +163,10 @@ tests: PICS: SWTCH.S.F01 verification: | ./chip-tool switch read current-position 1 1 + + Verify inTH Log: + [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 + [1646209289.746228][2617:2622] CHIP:TOO: current position: 1 disabled: true - label: "Operator does not operate switch (release switch)" @@ -173,15 +178,19 @@ tests: - label: "Read CurrentPosition attribute" PICS: SWTCH.S.F01 verification: | - Read attrbute + ./chip-tool switch read current-position 1 1 + + Verify inTH Log: + [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 + [1646209289.746228][2617:2622] CHIP:TOO: current position: 0 disabled: true - label: "Set up subscription to InitialPress and ShortRelease events" PICS: SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 verification: | - ./chip-tool switch subscribe-event initial-press 1 100 1 1 1 + ./chip-tool switch subscribe-event initial-press 1 100 1 1 - ./chip-tool switch subscribe-event short-release 1 100 1 1 1 + ./chip-tool switch subscribe-event short-release 1 100 1 1 disabled: true - label: "Operator does not operate switch" @@ -220,12 +229,12 @@ tests: LongRelease events" PICS: SWTCH.S.F01 && SWTCH.S.F03 verification: | + Verify inTH Log: + ./chip-tool switch subscribe-event initial-press 1 100 1 1 ./chip-tool switch subscribe-event short-release 1 100 1 1 - Verify in TH Log: - [1655272080.983330][2922:2927] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 [1655272080.983357][2922:2927] CHIP:TOO: Event number: 2 [1655272080.983380][2922:2927] CHIP:TOO: Priority: Info @@ -381,13 +390,13 @@ tests: MultiPressComplete events" PICS: SWTCH.S.F01 && SWTCH.S.F04 verification: | - ./chip-tool switch subscribe-event initial-press 1 100 1 1 1 + ./chip-tool switch subscribe-event initial-press 1 100 1 1 - ./chip-tool switch subscribe-event short-release 1 100 1 1 1 + ./chip-tool switch subscribe-event short-release 1 100 1 1 - ./chip-tool switch subscribe-event multi-press-ongoing 1 100 1 1 1 + ./chip-tool switch subscribe-event multi-press-ongoing 1 100 1 1 - ./chip-tool switch subscribe-event multi-press-complete 1 100 1 1 1 + ./chip-tool switch subscribe-event multi-press-complete 1 100 1 1 disabled: true - label: "Operator does not operate switch" @@ -432,7 +441,8 @@ tests: receive 2 events disabled: true - - label: "If MultiPressMax == 2, skip steps 6j .. 6o" + - label: + "If MultiPressMax == 2 (see 2c of TC-SWTCH-2.1), skip steps 6j .. 6o" PICS: SWTCH.S.F01 && SWTCH.S.F04 verification: | no Matter messages for this step diff --git a/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml b/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml index 627d1237d91d3b..8bbfe298a9748e 100644 --- a/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -44,25 +44,24 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: TGTNAV.S.A0001 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + contains: [0, 65528, 65529, 65531, 65532, 65533] - - label: "Read the global attribute: AttributeList" - PICS: " !TGTNAV.S.A0001 " + - label: "Read the optional attribute(CurrentTarget) in AttributeList" + PICS: TGTNAV.S.A0001 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 65528, 65529, 65531, 65532, 65533] + contains: [1] - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_TGTNAV_8_1.yaml b/src/app/tests/suites/certification/Test_TC_TGTNAV_8_1.yaml index a58b42e1735c7d..c7ffec68e69bd4 100644 --- a/src/app/tests/suites/certification/Test_TC_TGTNAV_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TGTNAV_8_1.yaml @@ -19,10 +19,10 @@ config: cluster: "Target Navigator" endpoint: 1 targetvalue1: - type: INT8U + type: int8u defaultValue: 1 targetvalue2: - type: INT8U + type: int8u defaultValue: 2 tests: @@ -40,7 +40,7 @@ tests: attribute: "CurrentTarget" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -62,7 +62,7 @@ tests: value: targetvalue1 - label: "Reads the CurrentTarget attribute" - PICS: TGTNAV.S.A0001 + PICS: TGTNAV.S.A0001 && TGTNAV.S.C0000 command: "readAttribute" attribute: "CurrentTarget" response: 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 bcc8ce2b45645f..c3e466ff57ca6c 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 @@ -34,7 +34,7 @@ tests: response: value: 4 constraints: - type: unit16 + type: int16u - label: "Read FeatureMap attribute from the DUT" command: "readAttribute" @@ -42,30 +42,30 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: TMP.S.A0003 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] - - label: "Read the global attribute: AttributeList" - PICS: " !TMP.S.A0003 " + - label: "Read the optional attribute(Tolerance) in AttributeList" + PICS: TMP.S.A0003 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + contains: [3] - label: "Read AcceptedCommandList attribute from the DUT" command: "readAttribute" attribute: "AcceptedCommandList" response: + value: [] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml index 4b0018e94e38df..37baa132bb605b 100644 --- a/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml @@ -28,42 +28,42 @@ tests: - name: "nodeId" value: nodeId - - label: "read the mandatory attribute: MeasuredValue" + - label: "Read the mandatory attribute: MeasuredValue" PICS: TMP.S.A0000 command: "readAttribute" attribute: "MeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 - - label: "read the mandatory attribute: MinMeasuredValue" + - label: "Read the mandatory attribute: MinMeasuredValue" PICS: TMP.S.A0001 command: "readAttribute" attribute: "MinMeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 - - label: "read the mandatory attribute: MaxMeasuredValue" + - label: "Read the mandatory attribute: MaxMeasuredValue" PICS: TMP.S.A0002 command: "readAttribute" attribute: "MaxMeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -27314 maxValue: 32767 - - label: "read the optional attribute: Tolerance" + - label: "Read the optional attribute: Tolerance" PICS: TMP.S.A0003 command: "readAttribute" attribute: "Tolerance" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 2048 diff --git a/src/app/tests/suites/certification/Test_TC_TMP_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TMP_2_2.yaml index c0ee0370643242..1caecd702318e1 100644 --- a/src/app/tests/suites/certification/Test_TC_TMP_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TMP_2_2.yaml @@ -28,23 +28,23 @@ tests: - name: "nodeId" value: nodeId - - label: "read the mandatory attribute: MinMeasuredValue" + - label: "Read the mandatory attribute: MinMeasuredValue" PICS: TMP.S.A0001 command: "readAttribute" attribute: "MinMeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32766 - - label: "read the mandatory attribute: MaxMeasuredValue" + - label: "Read the mandatory attribute: MaxMeasuredValue" PICS: TMP.S.A0002 command: "readAttribute" attribute: "MaxMeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -27314 maxValue: 32767 @@ -55,9 +55,9 @@ tests: response: saveAs: valueBeforeChange constraints: - type: uint16 - minValue: 0 - maxValue: 65535 + type: int16s + minValue: -27314 + maxValue: 32767 - label: "Operate on device to change the temperature significantly" cluster: "LogCommands" @@ -73,10 +73,10 @@ tests: - label: "Read the mandatory attribute: MeasuredValue" command: "readAttribute" attribute: "MeasuredValue" - PICS: TMP.S.A0000 + PICS: TMP.S.A0000 && TMP.M.ManuallyControlled response: constraints: - type: uint16 - minValue: 0 - maxValue: 65535 + type: int16s + minValue: -27314 + maxValue: 32767 notValue: valueBeforeChange 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 fc9ef9b9d6ac79..ba9181bc229551 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 @@ -34,7 +34,7 @@ tests: response: value: 5 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: @@ -44,8 +44,8 @@ tests: attribute: "FeatureMap" response: constraints: - type: map32 - minValue: 0 + type: bitmap32 + minValue: 1 maxValue: 63 - label: "Read the global attribute: AttributeList" @@ -57,59 +57,58 @@ tests: contains: [0, 27, 28, 65528, 65529, 65531, 65532, 65533] - label: - "Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in + "Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList" - PICS: TSTAT.S.F01 + PICS: TSTAT.S.F00 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [5, 6, 7, 17, 23, 24] - + contains: [18] - label: - "Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in + "Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList" - PICS: TSTAT.S.F02 + PICS: TSTAT.S.F01 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [2] + contains: [17] - label: - "Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in + "Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList" - PICS: TSTAT.S.F00 + PICS: TSTAT.S.F02 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [3, 4, 8, 18, 21, 22] + contains: [2] - label: - "Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) + "Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList" - PICS: TSTAT.S.F01 && TSTAT.S.F01 + PICS: TSTAT.S.F00 && TSTAT.S.F02 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [19] + contains: [20] - label: - "Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) + "Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList" - PICS: TSTAT.S.F00 && TSTAT.S.F02 + PICS: TSTAT.S.F01 && TSTAT.S.F02 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [20] + contains: [19] - label: "Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in @@ -120,7 +119,7 @@ tests: response: constraints: type: list - contains: [25, 30] + contains: [17, 18, 25] - label: "Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in @@ -182,6 +181,7 @@ tests: #issue #15011 disabled steps below Global attributes missing from YAML framework - label: "Read the global attribute: EventList" + disabled: true verification: | Not implemented in chip-tool cluster: "LogCommands" diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml index 31f03c229dd4b6..a0ffea63eb050f 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml @@ -31,10 +31,9 @@ tests: - label: "Reads mandatory attributes from DUT: LocalTemperature" command: "readAttribute" attribute: "LocalTemperature" - PICS: TSTAT.S.A0000 response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -44,17 +43,17 @@ tests: attribute: "OutdoorTemperature" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 - label: "Read Occupancy attribute from the DUT" - PICS: TSTAT.S.A0002 + PICS: TSTAT.S.F02 command: "readAttribute" attribute: "Occupancy" response: constraints: - type: int16 + type: bitmap8 minValue: 0 maxValue: 1 @@ -64,7 +63,7 @@ tests: attribute: "AbsMinHeatSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -74,7 +73,7 @@ tests: attribute: "AbsMaxHeatSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -84,7 +83,7 @@ tests: attribute: "AbsMinCoolSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -94,7 +93,7 @@ tests: attribute: "AbsMaxCoolSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -104,7 +103,7 @@ tests: attribute: "PICoolingDemand" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 100 @@ -114,7 +113,7 @@ tests: attribute: "PIHeatingDemand" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 100 @@ -124,7 +123,7 @@ tests: attribute: "HVACSystemTypeConfiguration" response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 63 @@ -134,67 +133,67 @@ tests: attribute: "LocalTemperatureCalibration" response: constraints: - type: int8 + type: int8s minValue: 25 maxValue: -25 - label: "Reads optional attributes from DUT: OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 command: "readAttribute" attribute: "OccupiedCoolingSetpoint" response: constraints: - type: int16 - minValue: -27315 - maxValue: 32767 + type: int16s + minValue: 1600 + maxValue: 3200 - label: "Reads mandatory attributes from DUT: OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 command: "readAttribute" attribute: "OccupiedHeatingSetpoint" response: constraints: - type: int16 - minValue: -27315 - maxValue: 32767 + type: int16s + minValue: 700 + maxValue: 3000 - label: "Read UnoccupiedCoolingSetpoint attribute from the DUT" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F01 && TSTAT.S.F02 command: "readAttribute" attribute: "UnoccupiedCoolingSetpoint" response: constraints: - type: int16 - minValue: -27315 - maxValue: 32767 + type: int16s + minValue: 1600 + maxValue: 3200 - label: "Read UnoccupiedHeatingSetpoint attribute from the DUT" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F00 && TSTAT.S.F02 command: "readAttribute" attribute: "UnoccupiedHeatingSetpoint" response: constraints: - type: int16 - minValue: -27315 - maxValue: 32767 + type: int16s + minValue: 700 + maxValue: 3000 - - label: "Reads mandatory attributes from DUT: MinHeatSetpointLimit" + - label: "Reads attribute from DUT: MinHeatSetpointLimit" PICS: TSTAT.S.A0015 command: "readAttribute" attribute: "MinHeatSetpointLimit" response: constraints: - type: int16 - minValue: -27315 - maxValue: 32767 + type: int16s + minValue: 700 + maxValue: 3000 - - label: "Reads mandatory attributes from DUT: MaxHeatSetpointLimit" + - label: "Reads attribute from DUT: MaxHeatSetpointLimit" PICS: TSTAT.S.A0016 command: "readAttribute" attribute: "MaxHeatSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -204,7 +203,7 @@ tests: attribute: "MinCoolSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -214,17 +213,17 @@ tests: attribute: "MaxCoolSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 - label: "Reads optional attributes from DUT: MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 command: "readAttribute" attribute: "MinSetpointDeadBand" response: constraints: - type: int8 + type: int8s minValue: 0 maxValue: 25 @@ -234,12 +233,11 @@ tests: attribute: "RemoteSensing" response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 7 - label: "Reads mandatory attributes from DUT: ControlSequenceOfOperation" - PICS: TSTAT.S.A001b command: "readAttribute" attribute: "ControlSequenceOfOperation" response: @@ -249,7 +247,6 @@ tests: maxValue: 5 - label: "Reads mandatory attributes from DUT: SystemMode" - PICS: TSTAT.S.A001c command: "readAttribute" attribute: "SystemMode" response: @@ -258,52 +255,6 @@ tests: minValue: 0 maxValue: 9 - - label: - "Read AlarmMask attribute from the DUT and Verify that the DUT - responds with a map8 value.The value has to be in the range of 0x00 to - 0x07." - verification: | - ./apps/chip-tool thermostat read alarm-mask 54321 1 - [1651147597.962878][10583:10588] CHIP:DMG: ReportDataMessage = - [1651147597.962928][10583:10588] CHIP:DMG: { - [1651147597.962957][10583:10588] CHIP:DMG: AttributeReportIBs = - [1651147597.963014][10583:10588] CHIP:DMG: [ - [1651147597.963047][10583:10588] CHIP:DMG: AttributeReportIB = - [1651147597.963103][10583:10588] CHIP:DMG: { - [1651147597.963138][10583:10588] CHIP:DMG: AttributeStatusIB = - [1651147597.963177][10583:10588] CHIP:DMG: { - [1651147597.963226][10583:10588] CHIP:DMG: AttributePathIB = - [1651147597.963286][10583:10588] CHIP:DMG: { - [1651147597.963329][10583:10588] CHIP:DMG: Endpoint = 0x1, - [1651147597.963389][10583:10588] CHIP:DMG: Cluster = 0x201, - [1651147597.963449][10583:10588] CHIP:DMG: Attribute = 0x0000_001D, - [1651147597.963575][10583:10588] CHIP:DMG: } - [1651147597.963641][10583:10588] CHIP:DMG: - [1651147597.963683][10583:10588] CHIP:DMG: StatusIB = - [1651147597.963724][10583:10588] CHIP:DMG: { - [1651147597.963785][10583:10588] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1651147597.963846][10583:10588] CHIP:DMG: }, - [1651147597.963892][10583:10588] CHIP:DMG: - [1651147597.963945][10583:10588] CHIP:DMG: }, - [1651147597.963991][10583:10588] CHIP:DMG: - [1651147597.964040][10583:10588] CHIP:DMG: }, - [1651147597.964092][10583:10588] CHIP:DMG: - [1651147597.964125][10583:10588] CHIP:DMG: ], - [1651147597.964180][10583:10588] CHIP:DMG: - [1651147597.964213][10583:10588] CHIP:DMG: SuppressResponse = true, - [1651147597.964258][10583:10588] CHIP:DMG: InteractionModelRevision = 1 - [1651147597.964290][10583:10588] CHIP:DMG: } - [1651147597.964450][10583:10588] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A001d - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Read ThermostatRunningMode attribute from the DUT" PICS: TSTAT.S.A001e command: "readAttribute" @@ -312,10 +263,10 @@ tests: constraints: type: enum8 minValue: 0 - maxValue: 4 + maxValue: 9 - label: "Reads constraints of optional attributes from DUT: StartOfWeek" - PICS: TSTAT.S.A0020 + PICS: TSTAT.S.F03 command: "readAttribute" attribute: "StartOfWeek" response: @@ -325,22 +276,22 @@ tests: maxValue: 6 - label: "Reads optional attributes from DUT: NumberOfWeeklyTransitions" - PICS: TSTAT.S.A0021 + PICS: TSTAT.S.F03 command: "readAttribute" attribute: "NumberOfWeeklyTransitions" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 - label: "Reads optional attributes from DUT: NumberOfDailyTransitions" - PICS: TSTAT.S.A0022 + PICS: TSTAT.S.F03 command: "readAttribute" attribute: "NumberOfDailyTransitions" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -360,7 +311,7 @@ tests: attribute: "TemperatureSetpointHoldDuration" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 1440 @@ -370,7 +321,7 @@ tests: attribute: "ThermostatProgrammingOperationMode" response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 7 @@ -380,7 +331,7 @@ tests: attribute: "ThermostatRunningState" response: constraints: - type: map16 + type: bitmap16 minValue: 0 maxValue: 127 @@ -400,7 +351,7 @@ tests: attribute: "SetpointChangeAmount" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -413,62 +364,62 @@ tests: type: utc - label: "Read OccupiedSetback attribute from the DUT" - PICS: TSTAT.S.A0034 + PICS: TSTAT.S.F02 command: "readAttribute" attribute: "OccupiedSetback" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 - label: "Read OccupiedSetbackMin attribute from the DUT" - PICS: TSTAT.S.A0035 + PICS: TSTAT.S.F02 command: "readAttribute" attribute: "OccupiedSetbackMin" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 - label: "Read OccupiedSetbackMax attribute from the DUT" - PICS: TSTAT.S.A0036 + PICS: TSTAT.S.F02 command: "readAttribute" attribute: "OccupiedSetbackMax" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 - label: "Read UnoccupiedSetback attribute from the DUT" - PICS: TSTAT.S.A0037 + PICS: TSTAT.S.F02 && TSTAT.S.F04 command: "readAttribute" attribute: "UnoccupiedSetback" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 - label: "Read UnoccupiedSetbackMin attribute from the DUT" - PICS: TSTAT.S.A0038 + PICS: TSTAT.S.F02 && TSTAT.S.F04 command: "readAttribute" attribute: "UnoccupiedSetbackMin" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 - label: "Read UnoccupiedSetbackMax attribute from the DUT" - PICS: TSTAT.S.A0039 + PICS: TSTAT.S.F02 && TSTAT.S.F04 command: "readAttribute" attribute: "UnoccupiedSetbackMax" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -478,7 +429,7 @@ tests: attribute: "EmergencyHeatDelta" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -498,7 +449,7 @@ tests: attribute: "ACCapacity" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -528,7 +479,7 @@ tests: attribute: "ACErrorCode" response: constraints: - type: map32 + type: bitmap32 - label: "Read ACLouverPosition attribute from the DUT" PICS: TSTAT.S.A0045 @@ -546,7 +497,7 @@ tests: attribute: "ACCoilTemperature" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml index 6fa064ba30dec1..4b0328d502a885 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml @@ -33,10 +33,10 @@ tests: that the value is within range" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 response: constraints: - type: int16 + type: int16s minValue: 1600 maxValue: 3200 @@ -45,7 +45,7 @@ tests: OccupiedCoolingSetpoint attribute" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 2500 @@ -54,16 +54,16 @@ tests: OccupiedCoolingSetpoint attribute" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 response: value: 2500 - label: "Writes OccupiedCoolingSetpoint to value below the - MinCoolSetpointLimit" + ABSMinCoolSetpointLimit" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 30 response: @@ -74,7 +74,7 @@ tests: MaxCoolSetpointLimit" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 4000 response: @@ -83,21 +83,11 @@ tests: - label: "Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute" - verification: | - ./chip-tool thermostat write occupied-cooling-setpoint 1600 1 1 - [1653574006.162208][16728:16733] CHIP:DMG: StatusIB = - [1653574006.162227][16728:16733] CHIP:DMG: { - [1653574006.162245][16728:16733] CHIP:DMG: status = 0x00 (SUCCESS), - [1653574006.162261][16728:16733] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0011 + command: "writeAttribute" + attribute: "OccupiedCoolingSetpoint" + PICS: TSTAT.S.F01 && !TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 1600 - label: "Writes the CoolingSetpoint below the HeatingSetpoint when auto is @@ -115,7 +105,7 @@ tests: attribute" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 3200 @@ -124,10 +114,10 @@ tests: that the value is within range" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 response: constraints: - type: int16 + type: int16s minValue: 700 maxValue: 3000 @@ -136,7 +126,7 @@ tests: OccupiedHeatingSetpoint attribute" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 arguments: value: 2100 @@ -145,7 +135,7 @@ tests: OccupiedHeatingSetpoint attribute" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 response: value: 2100 @@ -154,7 +144,7 @@ tests: MinHeatSetpointLimit" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 arguments: value: 600 response: @@ -165,7 +155,7 @@ tests: MaxHeatSetpointLimit" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 arguments: value: 4010 response: @@ -176,7 +166,7 @@ tests: attribute" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 arguments: value: 700 @@ -201,30 +191,24 @@ tests: - label: "Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute" - verification: | - ./chip-tool thermostat read occupied-heating-setpoint 1 1 - [1650451168.922888][5386:5391] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_0012 DataVersion: 1433129384 - [1650451168.922971][5386:5391] CHIP:TOO: occupied heating setpoint: 2000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0012 + command: "writeAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 3000 + response: + error: CONSTRAINT_ERROR - label: "Reads UnoccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range" command: "readAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 response: value: 2600 constraints: - type: int16 + type: int16s minValue: 1600 maxValue: 3200 @@ -233,7 +217,7 @@ tests: UnoccupiedCoolingSetpoint attribute" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 arguments: value: 2500 @@ -242,16 +226,16 @@ tests: UnoccupiedCoolingSetpoint attribute" command: "readAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 response: value: 2500 - label: "Writes UnoccupiedCoolingSetpoint to value below the - MinHeatSetpointLimit" + MinCoolSetpointLimit" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 arguments: value: 1002 response: @@ -259,10 +243,10 @@ tests: - label: "Writes UnoccupiedCoolingSetpoint to value above the - MaxHeatSetpointLimit" + MaxCoolSetpointLimit" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 arguments: value: 4010 response: @@ -273,7 +257,7 @@ tests: attribute" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 arguments: value: 1800 @@ -282,7 +266,7 @@ tests: attribute" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 arguments: value: 3000 @@ -291,20 +275,21 @@ tests: verifies that the value is within range" command: "readAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 response: value: 2000 constraints: - type: int16 + type: int16s minValue: 700 maxValue: 3000 - label: "Writes a value back that is different but valid for UnoccupiedHeatingSetpoint attribute" + command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 arguments: value: 2500 @@ -313,7 +298,7 @@ tests: UnoccupiedHeatingSetpoint attribute" command: "readAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 response: value: 2500 @@ -322,7 +307,7 @@ tests: MinHeatSetpointLimit" command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 arguments: value: 500 response: @@ -333,7 +318,7 @@ tests: MaxHeatSetpointLimit" command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 arguments: value: 4010 response: @@ -344,7 +329,7 @@ tests: attribute" command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 arguments: value: 1800 @@ -353,7 +338,7 @@ tests: attribute" command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 arguments: value: 3000 @@ -362,76 +347,47 @@ tests: that the value is within range" command: "readAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.A0015 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 response: value: 700 constraints: - type: int16 + type: int16s minValue: 700 maxValue: 3000 - label: "Writes a value back that is different but valid for MinHeatSetpointLimit attribute" - verification: | - ./chip-tool thermostat write min-heat-setpoint-limit 1500 1 1 - [1651575873.602025][9521:9526] CHIP:DMG: WriteResponseMessage = - [1651575873.602056][9521:9526] CHIP:DMG: { - [1651575873.602078][9521:9526] CHIP:DMG: AttributeStatusIBs = - [1651575873.602124][9521:9526] CHIP:DMG: [ - [1651575873.602160][9521:9526] CHIP:DMG: AttributeStatusIB = - [1651575873.602195][9521:9526] CHIP:DMG: { - [1651575873.602233][9521:9526] CHIP:DMG: AttributePathIB = - [1651575873.602278][9521:9526] CHIP:DMG: { - [1651575873.602316][9521:9526] CHIP:DMG: Endpoint = 0x1, - [1651575873.602363][9521:9526] CHIP:DMG: Cluster = 0x201, - [1651575873.602412][9521:9526] CHIP:DMG: Attribute = 0x0000_0015, - [1651575873.602447][9521:9526] CHIP:DMG: } - [1651575873.602496][9521:9526] CHIP:DMG: - [1651575873.602537][9521:9526] CHIP:DMG: StatusIB = - [1651575873.602574][9521:9526] CHIP:DMG: { - [1651575873.602619][9521:9526] CHIP:DMG: status = 0x00 (SUCCESS), - [1651575873.602660][9521:9526] CHIP:DMG: }, - [1651575873.602697][9521:9526] CHIP:DMG: - [1651575873.602734][9521:9526] CHIP:DMG: }, - [1651575873.602775][9521:9526] CHIP:DMG: - [1651575873.602801][9521:9526] CHIP:DMG: ], - [1651575873.602840][9521:9526] CHIP:DMG: - [1651575873.602864][9521:9526] CHIP:DMG: InteractionModelRevision = 1 - [1651575873.602890][9521:9526] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0015 + command: "writeAttribute" + attribute: "MinHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 800 - label: "Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute" - verification: | - ./chip-tool thermostat read min-heat-setpoint-limit 1 1 - [1650451588.651448][5452:5457] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_0015 DataVersion: 1433129384 - [1650451588.651531][5452:5457] CHIP:TOO: min heat setpoint limit: 1500 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0015 + command: "readAttribute" + attribute: "MinHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 + response: + value: 800 + + - label: "Writes a value back that is different but violates the deadband" + command: "writeAttribute" + attribute: "MinHeatSetpointLimit" + PICS: TSTAT.S.A0015 && TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 2000 + response: + error: CONSTRAINT_ERROR - label: "Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit " command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.A0015 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 arguments: value: 650 response: @@ -442,7 +398,7 @@ tests: AbsMaxHeatSetpointLimit " command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.A0015 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 arguments: value: 4050 response: @@ -453,98 +409,38 @@ tests: attribute" command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.A0015 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 arguments: value: 700 - label: "Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute" - verification: | - ./chip-tool thermostat write min-heat-setpoint-limit 1000 1 1 - [1651575767.881039][9507:9512] CHIP:DMG: WriteResponseMessage = - [1651575767.881065][9507:9512] CHIP:DMG: { - [1651575767.881088][9507:9512] CHIP:DMG: AttributeStatusIBs = - [1651575767.881128][9507:9512] CHIP:DMG: [ - [1651575767.881154][9507:9512] CHIP:DMG: AttributeStatusIB = - [1651575767.881183][9507:9512] CHIP:DMG: { - [1651575767.881210][9507:9512] CHIP:DMG: AttributePathIB = - [1651575767.881243][9507:9512] CHIP:DMG: { - [1651575767.881277][9507:9512] CHIP:DMG: Endpoint = 0x1, - [1651575767.881312][9507:9512] CHIP:DMG: Cluster = 0x201, - [1651575767.881350][9507:9512] CHIP:DMG: Attribute = 0x0000_0015, - [1651575767.881383][9507:9512] CHIP:DMG: } - [1651575767.881420][9507:9512] CHIP:DMG: - [1651575767.881452][9507:9512] CHIP:DMG: StatusIB = - [1651575767.881485][9507:9512] CHIP:DMG: { - [1651575767.881520][9507:9512] CHIP:DMG: status = 0x00 (SUCCESS), - [1651575767.881553][9507:9512] CHIP:DMG: }, - [1651575767.881589][9507:9512] CHIP:DMG: - [1651575767.881618][9507:9512] CHIP:DMG: }, - [1651575767.881651][9507:9512] CHIP:DMG: - [1651575767.881677][9507:9512] CHIP:DMG: ], - [1651575767.881708][9507:9512] CHIP:DMG: - [1651575767.881732][9507:9512] CHIP:DMG: InteractionModelRevision = 1 - [1651575767.881757][9507:9512] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0015 + command: "writeAttribute" + attribute: "MinHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 3000 - label: "Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within range" - verification: | - ./chip-tool thermostat read max-heat-setpoint-limit 1 1 - [1651575563.660840][9476:9481] CHIP:DMG: ReportDataMessage = - [1651575563.660870][9476:9481] CHIP:DMG: { - [1651575563.660892][9476:9481] CHIP:DMG: AttributeReportIBs = - [1651575563.660929][9476:9481] CHIP:DMG: [ - [1651575563.660954][9476:9481] CHIP:DMG: AttributeReportIB = - [1651575563.660994][9476:9481] CHIP:DMG: { - [1651575563.661023][9476:9481] CHIP:DMG: AttributeDataIB = - [1651575563.661059][9476:9481] CHIP:DMG: { - [1651575563.661096][9476:9481] CHIP:DMG: DataVersion = 0x366e43c8, - [1651575563.661132][9476:9481] CHIP:DMG: AttributePathIB = - [1651575563.661169][9476:9481] CHIP:DMG: { - [1651575563.661208][9476:9481] CHIP:DMG: Endpoint = 0x1, - [1651575563.661248][9476:9481] CHIP:DMG: Cluster = 0x201, - [1651575563.661287][9476:9481] CHIP:DMG: Attribute = 0x0000_0016, - [1651575563.661322][9476:9481] CHIP:DMG: } - [1651575563.661358][9476:9481] CHIP:DMG: - [1651575563.661399][9476:9481] CHIP:DMG: Data = 3000, - [1651575563.661436][9476:9481] CHIP:DMG: }, - [1651575563.661473][9476:9481] CHIP:DMG: - [1651575563.661502][9476:9481] CHIP:DMG: }, - [1651575563.661536][9476:9481] CHIP:DMG: - [1651575563.661559][9476:9481] CHIP:DMG: ], - [1651575563.661590][9476:9481] CHIP:DMG: - [1651575563.661615][9476:9481] CHIP:DMG: SuppressResponse = true, - [1651575563.661642][9476:9481] CHIP:DMG: InteractionModelRevision = 1 - [1651575563.661667][9476:9481] CHIP:DMG: } - [1651575563.661803][9476:9481] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_0016 DataVersion: 913195976 - [1651575563.661866][9476:9481] CHIP:TOO: max heat setpoint limit: 3000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0016 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + command: "readAttribute" + attribute: "MaxHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 + response: + value: 3000 + constraints: + type: int16s + minValue: 700 + maxValue: 3000 - label: "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute" command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.F00 && A_MINHEATSETPOINTLIMIT + PICS: TSTAT.S.F00 && TSTAT.S.A0015 arguments: value: 700 @@ -553,7 +449,7 @@ tests: attribute" command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: A_MINHEATSETPOINTLIMIT && TSTAT.S.F05 + PICS: TSTAT.S.A0015 && TSTAT.S.F05 arguments: value: 3000 response: @@ -564,7 +460,7 @@ tests: MaxHeatSetpointLimit attribute" command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 arguments: value: 2900 @@ -573,7 +469,7 @@ tests: MaxHeatSetpointLimit attribute" command: "readAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 response: value: 2900 @@ -582,7 +478,7 @@ tests: AbsMinHeatSetpointLimit " command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 arguments: value: 500 response: @@ -593,7 +489,7 @@ tests: AbsMaxHeatSetpointLimit " command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 arguments: value: 4000 response: @@ -604,59 +500,29 @@ tests: attribute" command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 arguments: value: 700 - label: "Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute" - verification: | - ./chip-tool thermostat write max-heat-setpoint-limit 1000 1 1 - [1651575678.144963][9488:9493] CHIP:DMG: WriteResponseMessage = - [1651575678.144990][9488:9493] CHIP:DMG: { - [1651575678.145012][9488:9493] CHIP:DMG: AttributeStatusIBs = - [1651575678.145045][9488:9493] CHIP:DMG: [ - [1651575678.145071][9488:9493] CHIP:DMG: AttributeStatusIB = - [1651575678.145107][9488:9493] CHIP:DMG: { - [1651575678.145136][9488:9493] CHIP:DMG: AttributePathIB = - [1651575678.145169][9488:9493] CHIP:DMG: { - [1651575678.145204][9488:9493] CHIP:DMG: Endpoint = 0x1, - [1651575678.145242][9488:9493] CHIP:DMG: Cluster = 0x201, - [1651575678.145278][9488:9493] CHIP:DMG: Attribute = 0x0000_0016, - [1651575678.145314][9488:9493] CHIP:DMG: } - [1651575678.145353][9488:9493] CHIP:DMG: - [1651575678.145384][9488:9493] CHIP:DMG: StatusIB = - [1651575678.145418][9488:9493] CHIP:DMG: { - [1651575678.145450][9488:9493] CHIP:DMG: status = 0x00 (SUCCESS), - [1651575678.145483][9488:9493] CHIP:DMG: }, - [1651575678.145516][9488:9493] CHIP:DMG: - [1651575678.145543][9488:9493] CHIP:DMG: }, - [1651575678.145576][9488:9493] CHIP:DMG: - [1651575678.145603][9488:9493] CHIP:DMG: ], - [1651575678.145633][9488:9493] CHIP:DMG: - [1651575678.145658][9488:9493] CHIP:DMG: InteractionModelRevision = 1 - [1651575678.145683][9488:9493] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0016 + command: "writeAttribute" + attribute: "MaxHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 3000 - label: "Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range" command: "readAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 response: value: 1600 constraints: - type: int16 + type: int16s minValue: 1600 maxValue: 3200 @@ -665,7 +531,7 @@ tests: MinCoolSetpointLimit attribute" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 2000 @@ -674,7 +540,7 @@ tests: MinCoolSetpointLimit attribute" command: "readAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 response: value: 2000 @@ -683,7 +549,7 @@ tests: AbsMinCoolSetpointLimit " command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 1000 response: @@ -693,7 +559,7 @@ tests: "Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit " command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 4000 response: @@ -704,7 +570,7 @@ tests: attribute" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 1600 @@ -713,7 +579,7 @@ tests: attribute" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 3200 @@ -722,7 +588,7 @@ tests: attribute" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.F01 && A_MINCOOLSETPOINTLIMIT + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 1600 @@ -731,102 +597,38 @@ tests: that the value is within range" command: "readAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 response: value: 3200 constraints: - type: int16 + type: int16s minValue: 1600 maxValue: 3200 - label: "Writes a value back that is different but valid for MaxCoolSetpointLimit attribute" - verification: | - ./chip-tool thermostat write max-cool-setpoint-limit 3000 1 1 - [1651577904.824284][9656:9661] CHIP:DMG: WriteResponseMessage = - [1651577904.824317][9656:9661] CHIP:DMG: { - [1651577904.824347][9656:9661] CHIP:DMG: AttributeStatusIBs = - [1651577904.824387][9656:9661] CHIP:DMG: [ - [1651577904.824420][9656:9661] CHIP:DMG: AttributeStatusIB = - [1651577904.824457][9656:9661] CHIP:DMG: { - [1651577904.824492][9656:9661] CHIP:DMG: AttributePathIB = - [1651577904.824541][9656:9661] CHIP:DMG: { - [1651577904.824587][9656:9661] CHIP:DMG: Endpoint = 0x1, - [1651577904.824628][9656:9661] CHIP:DMG: Cluster = 0x201, - [1651577904.824674][9656:9661] CHIP:DMG: Attribute = 0x0000_0018, - [1651577904.824711][9656:9661] CHIP:DMG: } - [1651577904.824757][9656:9661] CHIP:DMG: - [1651577904.824797][9656:9661] CHIP:DMG: StatusIB = - [1651577904.824840][9656:9661] CHIP:DMG: { - [1651577904.824878][9656:9661] CHIP:DMG: status = 0x00 (SUCCESS), - [1651577904.824919][9656:9661] CHIP:DMG: }, - [1651577904.824957][9656:9661] CHIP:DMG: - [1651577904.824993][9656:9661] CHIP:DMG: }, - [1651577904.825035][9656:9661] CHIP:DMG: - [1651577904.825067][9656:9661] CHIP:DMG: ], - [1651577904.825106][9656:9661] CHIP:DMG: - [1651577904.825138][9656:9661] CHIP:DMG: InteractionModelRevision = 1 - [1651577904.825169][9656:9661] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0018 + command: "writeAttribute" + attribute: "MaxCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 2000 - label: "Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute" - verification: | - ./chip-tool thermostat read max-cool-setpoint-limit 1 1 - [1651576122.935621][9559:9564] CHIP:DMG: ReportDataMessage = - [1651576122.935665][9559:9564] CHIP:DMG: { - [1651576122.935701][9559:9564] CHIP:DMG: AttributeReportIBs = - [1651576122.935751][9559:9564] CHIP:DMG: [ - [1651576122.935791][9559:9564] CHIP:DMG: AttributeReportIB = - [1651576122.935857][9559:9564] CHIP:DMG: { - [1651576122.935900][9559:9564] CHIP:DMG: AttributeDataIB = - [1651576122.935953][9559:9564] CHIP:DMG: { - [1651576122.936006][9559:9564] CHIP:DMG: DataVersion = 0x366e43cd, - [1651576122.936059][9559:9564] CHIP:DMG: AttributePathIB = - [1651576122.936114][9559:9564] CHIP:DMG: { - [1651576122.936170][9559:9564] CHIP:DMG: Endpoint = 0x1, - [1651576122.936233][9559:9564] CHIP:DMG: Cluster = 0x201, - [1651576122.936296][9559:9564] CHIP:DMG: Attribute = 0x0000_0018, - [1651576122.936354][9559:9564] CHIP:DMG: } - [1651576122.936415][9559:9564] CHIP:DMG: - [1651576122.936477][9559:9564] CHIP:DMG: Data = 3000, - [1651576122.936525][9559:9564] CHIP:DMG: }, - [1651576122.936578][9559:9564] CHIP:DMG: - [1651576122.936622][9559:9564] CHIP:DMG: }, - [1651576122.936675][9559:9564] CHIP:DMG: - [1651576122.936714][9559:9564] CHIP:DMG: ], - [1651576122.936763][9559:9564] CHIP:DMG: - [1651576122.936804][9559:9564] CHIP:DMG: SuppressResponse = true, - [1651576122.936849][9559:9564] CHIP:DMG: InteractionModelRevision = 1 - [1651576122.936888][9559:9564] CHIP:DMG: } - [1651576122.937081][9559:9564] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_0018 DataVersion: 913195981 - [1651576122.937166][9559:9564] CHIP:TOO: max cool setpoint limit: 3000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0018 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + command: "readAttribute" + attribute: "MaxCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05 + response: + value: 2000 - label: "Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit " command: "writeAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 arguments: value: 1000 response: @@ -836,7 +638,7 @@ tests: "Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit " command: "writeAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 arguments: value: 4000 response: @@ -845,93 +647,53 @@ tests: - label: "Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute" - verification: | - ./chip-tool thermostat write max-cool-setpoint-limit 700 1 1 - [1651577904.824284][9656:9661] CHIP:DMG: WriteResponseMessage = - [1651577904.824317][9656:9661] CHIP:DMG: { - [1651577904.824347][9656:9661] CHIP:DMG: AttributeStatusIBs = - [1651577904.824387][9656:9661] CHIP:DMG: [ - [1651577904.824420][9656:9661] CHIP:DMG: AttributeStatusIB = - [1651577904.824457][9656:9661] CHIP:DMG: { - [1651577904.824492][9656:9661] CHIP:DMG: AttributePathIB = - [1651577904.824541][9656:9661] CHIP:DMG: { - [1651577904.824587][9656:9661] CHIP:DMG: Endpoint = 0x1, - [1651577904.824628][9656:9661] CHIP:DMG: Cluster = 0x201, - [1651577904.824674][9656:9661] CHIP:DMG: Attribute = 0x0000_0018, - [1651577904.824711][9656:9661] CHIP:DMG: } - [1651577904.824757][9656:9661] CHIP:DMG: - [1651577904.824797][9656:9661] CHIP:DMG: StatusIB = - [1651577904.824840][9656:9661] CHIP:DMG: { - [1651577904.824878][9656:9661] CHIP:DMG: status = 0x00 (SUCCESS), - [1651577904.824919][9656:9661] CHIP:DMG: }, - [1651577904.824957][9656:9661] CHIP:DMG: - [1651577904.824993][9656:9661] CHIP:DMG: }, - [1651577904.825035][9656:9661] CHIP:DMG: - [1651577904.825067][9656:9661] CHIP:DMG: ], - [1651577904.825106][9656:9661] CHIP:DMG: - [1651577904.825138][9656:9661] CHIP:DMG: InteractionModelRevision = 1 - [1651577904.825169][9656:9661] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0018 + command: "writeAttribute" + attribute: "MaxCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 1600 - label: "Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute" command: "writeAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 arguments: value: 3200 - label: "Writes (sets back) default value of MinHeatSetpointLimit" command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.A0015 + PICS: TSTAT.S.F01 && TSTAT.S.A0015 arguments: value: 700 - label: "Writes (sets back)default value of MaxHeatSetpointLimit" - verification: | - ./chip-tool thermostat write max-heat-setpoint-limit 3000 1 1 - CHIP:ZCL: status: Success (0x0000) - CHIP:TOO: Default Success Response - CHIP:DMG: WriteClient moving to [Uninitiali] - CHIP:EM: Sending Standalone Ack for MessageCounter:1 on exchange 12610i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0016 + command: "writeAttribute" + attribute: "MaxHeatSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0016 &&!TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 3000 - label: "Writes MaxHeatSetpointLimit That meets the deadband of 2.5C" command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.F01 && A_MAXHEATSETPOINTLIMIT &&!TSTAT.S.F05 + PICS: TSTAT.S.F01 && TSTAT.S.A0016 &&!TSTAT.S.F05 arguments: value: 2950 - label: "Writes (sets back) default value of MinCoolSetpointLimit" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 1600 - label: "Writes (sets back) default value of MaxCoolSetpointLimit" command: "writeAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 arguments: value: 3200 @@ -940,11 +702,11 @@ tests: the value is within range" command: "readAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 response: value: 25 constraints: - type: temp-s8 + type: int8s minValue: 0 maxValue: 25 @@ -953,7 +715,7 @@ tests: MinSetpointDeadBand attribute" command: "writeAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 arguments: value: 5 @@ -962,14 +724,14 @@ tests: MinSetpointDeadBand attribute" command: "readAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 response: value: 5 - label: "Writes the value below MinSetpointDeadBand" command: "writeAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 arguments: value: -1 response: @@ -978,7 +740,7 @@ tests: - label: "Writes the value above MinSetpointDeadBand " command: "writeAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 arguments: value: 30 response: @@ -987,14 +749,14 @@ tests: - label: "Writes the min limit of MinSetpointDeadBand" command: "writeAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 arguments: value: 0 - label: "Writes the max limit of MinSetpointDeadBand" command: "writeAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 arguments: value: 25 @@ -1003,7 +765,7 @@ tests: the value is valid" command: "readAttribute" attribute: "ControlSequenceOfOperation" - PICS: TSTAT.S.A001b + PICS: TSTAT.S.F00 || TSTAT.S.F01 response: value: 4 constraints: @@ -1016,14 +778,14 @@ tests: valid value" command: "writeAttribute" attribute: "ControlSequenceOfOperation" - PICS: TSTAT.S.A001b + PICS: TSTAT.S.F00 || TSTAT.S.F01 arguments: value: 2 - label: "Read it back again to confirm the successful write" command: "readAttribute" attribute: "ControlSequenceOfOperation" - PICS: TSTAT.S.A001b + PICS: TSTAT.S.F00 || TSTAT.S.F01 response: value: 2 @@ -1032,7 +794,7 @@ tests: meet deadband constraint" command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.F00 && A_MINHEATSETPOINTLIMIT && TSTAT.S.F05 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.F05 arguments: value: 2950 @@ -1044,25 +806,14 @@ tests: value: 2600 - label: "Sets OccupiedHeatingSetpoint to default value" - verification: | - ./chip-tool thermostat write occupied-heating-setpoint -30 1 1 - [1653575015.985079][16976:16981] CHIP:DMG: StatusIB = - [1653575015.985098][16976:16981] CHIP:DMG: { - [1653575015.985115][16976:16981] CHIP:DMG: status = 0x00 (SUCCESS), - [1653575015.985131][16976:16981] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0012 + command: "writeAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F00 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #issue #18545 SetpointRaise command is failing - - label: "Sends SetpointRaise Command" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00 + value: 2000 + + - label: "Sends SetpointRaise Command Heat Only" + PICS: TSTAT.S.F00 command: "SetpointRaiseLower" arguments: values: @@ -1076,31 +827,19 @@ tests: write" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012 + PICS: TSTAT.S.F00 response: value: 1700 - label: "Sets OccupiedHeatingSetpoint to default value" - verification: | - ./chip-tool thermostat write occupied-heating-setpoint 2000 1 1 - CHIP:ZCL: WriteResponse: - CHIP:ZCL: status: Success (0x0000) - CHIP:TOO: Default Success Response - CHIP:DMG: WriteClient moving to [Uninitiali] - CHIP:EM: Sending Standalone Ack for MessageCounter:1 on exchange 11247i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0012 + command: "writeAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F00 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #issue #18545 SetpointRaise command is failing - - label: "Sends SetpointRaise Command" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00 + value: 2000 + + - label: "Sends SetpointRaise Command Heat Only" + PICS: TSTAT.S.F00 command: "SetpointRaiseLower" arguments: values: @@ -1114,20 +853,12 @@ tests: write" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012 + PICS: TSTAT.S.F00 response: - value: 30 - - - label: "Sets OccupiedCoolingSetpoint to default value" - command: "writeAttribute" - attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 - arguments: - value: 2600 + value: 2300 - #issue #18545 SetpointRaise command is failing - - label: "Sends SetpointRaise Command" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00 + - label: "Sends SetpointRaise Command Cool Only" + PICS: TSTAT.S.F01 command: "SetpointRaiseLower" arguments: values: @@ -1141,20 +872,19 @@ tests: write" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011 + PICS: TSTAT.S.F01 response: value: 2300 - label: "Sets OccupiedCoolingSetpoint to default value" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 2600 - #issue #18545 SetpointRaise command is failing - - label: "Sends SetpointRaise Command" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00 + - label: "Sends SetpointRaise Command Cool Only" + PICS: TSTAT.S.F01 command: "SetpointRaiseLower" arguments: values: @@ -1168,39 +898,26 @@ tests: write" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011 + PICS: TSTAT.S.F01 response: value: 2900 - label: "Sets OccupiedCoolingSetpoint to default value" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 2600 - label: "Sets OccupiedHeatingSetpoint to default value" - verification: | - ./chip-tool thermostat read occupied-heating-setpoint 2000 1 1 - CHIP:ZCL: ReadAttributesResponse: - CHIP:ZCL: ClusterId: 0x0000_0201 - CHIP:ZCL: attributeId: 0x0000_0012 - CHIP:ZCL: status: Success (0x0000) - CHIP:ZCL: attribute TLV Type: 0x00 - CHIP:TOO: Int16s attribute Response: 2000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0012 + command: "writeAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F00 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #issue #18545 SetpointRaise command is failing - - label: "Sends SetpointRaise Command" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00 + value: 2000 + + - label: "Sends SetpointRaise Command Heat & Cool" + PICS: TSTAT.S.F00 || TSTAT.S.F01 command: "SetpointRaiseLower" arguments: values: @@ -1214,7 +931,7 @@ tests: write" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011 + PICS: TSTAT.S.F01 response: value: 2300 @@ -1223,39 +940,26 @@ tests: write" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012 + PICS: TSTAT.S.F00 response: value: 1700 - label: "Sets OccupiedCoolingSetpoint to default value" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 2600 - label: "Sets OccupiedHeatingSetpoint to default value" - verification: | - ./chip-tool thermostat read occupied-heating-setpoint 2000 1 1 - CHIP:ZCL: ReadAttributesResponse: - CHIP:ZCL: ClusterId: 0x0000_0201 - CHIP:ZCL: attributeId: 0x0000_0012 - CHIP:ZCL: status: Success (0x0000) - CHIP:ZCL: attribute TLV Type: 0x00 - CHIP:TOO: Int16s attribute Response: 2000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0012 + command: "writeAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F00 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #issue #18545 SetpointRaise command is failing - - label: "Sends SetpointRaise Command" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00 + value: 2000 + + - label: "Sends SetpointRaise Command Heat & Cool" + PICS: TSTAT.S.F00 || TSTAT.S.F01 command: "SetpointRaiseLower" arguments: values: @@ -1269,7 +973,7 @@ tests: write" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011 + PICS: TSTAT.S.F01 response: value: 2900 @@ -1278,6 +982,6 @@ tests: write" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012 + PICS: TSTAT.S.F00 response: value: 2300 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 fabe547f94e490..34cb80974ef93e 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 @@ -34,7 +34,7 @@ tests: response: value: 2 constraints: - type: uint16 + type: int16u - label: "Read FeatureMap attribute from the DUT" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml index bd11c9f5e0fd53..720b53de9e8c8e 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml @@ -38,7 +38,7 @@ tests: - label: "Verify device temperature displayed in °C" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0000 arguments: values: - name: "message" @@ -63,7 +63,7 @@ tests: - label: "Verify device temperature displayed in °F" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0000 arguments: values: - name: "message" @@ -106,7 +106,7 @@ tests: - label: "Verify all device functionality available to the user" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0001 arguments: values: - name: "message" @@ -131,7 +131,7 @@ tests: - label: "Verify device operates at Level 1 reduced functionality" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0001 arguments: values: - name: "message" @@ -156,7 +156,7 @@ tests: - label: "Verify device operates at Level 2 reduced functionality" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0001 arguments: values: - name: "message" @@ -181,7 +181,7 @@ tests: - label: "Verify device operates at Level 3 reduced functionality" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0001 arguments: values: - name: "message" @@ -206,7 +206,7 @@ tests: - label: "Verify device operates at Level 4 reduced functionality" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0001 arguments: values: - name: "message" @@ -231,7 +231,7 @@ tests: - label: "Verify device operates at least functionality level" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0001 arguments: values: - name: "message" @@ -265,7 +265,7 @@ tests: - label: "Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT" - PICS: TSUIC.S.A0001 + PICS: TSUIC.S.A0002 command: "writeAttribute" attribute: "schedule programming visibility" arguments: @@ -276,7 +276,7 @@ tests: thermostat" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0002 arguments: values: - name: "message" @@ -304,7 +304,7 @@ tests: thermostat" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0002 arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_3_1.yaml index cbaad5712e4885..e2baf5004b94a0 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_3_1.yaml @@ -25,76 +25,64 @@ tests: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" verification: | - ./chip-tool thermostatuserinterfaceconfiguration read temperature-display-mode 12345 1 - - - Verify in TH all-clusters-app Log: - - [1650966000.959191][11186:11191] CHIP:DMG: ReportDataMessage = - [1650966000.959287][11186:11191] CHIP:DMG: { - [1650966000.959338][11186:11191] CHIP:DMG: AttributeReportIBs = - [1650966000.959390][11186:11191] CHIP:DMG: [ - [1650966000.959430][11186:11191] CHIP:DMG: AttributeReportIB = - [1650966000.959504][11186:11191] CHIP:DMG: { - [1650966000.959548][11186:11191] CHIP:DMG: AttributeDataIB = - [1650966000.959613][11186:11191] CHIP:DMG: { - [1650966000.959682][11186:11191] CHIP:DMG: DataVersion = 0x90d9261a, - [1650966000.959736][11186:11191] CHIP:DMG: AttributePathIB = - [1650966000.959803][11186:11191] CHIP:DMG: { - [1650966000.959861][11186:11191] CHIP:DMG: Endpoint = 0x1, - [1650966000.959934][11186:11191] CHIP:DMG: Cluster = 0x204, - [1650966000.960001][11186:11191] CHIP:DMG: Attribute = 0x0000_0000, - [1650966000.960055][11186:11191] CHIP:DMG: } - [1650966000.960128][11186:11191] CHIP:DMG: - [1650966000.960191][11186:11191] CHIP:DMG: Data = 0, - [1650966000.960259][11186:11191] CHIP:DMG: }, - [1650966000.960328][11186:11191] CHIP:DMG: - [1650966000.960374][11186:11191] CHIP:DMG: }, - [1650966000.960441][11186:11191] CHIP:DMG: - [1650966000.960481][11186:11191] CHIP:DMG: ], - [1650966000.960545][11186:11191] CHIP:DMG: - [1650966000.960588][11186:11191] CHIP:DMG: SuppressResponse = true, - [1650966000.960645][11186:11191] CHIP:DMG: InteractionModelRevision = 1 - [1650966000.960684][11186:11191] CHIP:DMG: } - [1650966000.960934][11186:11191] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 2430150170 - [1650966000.961031][11186:11191] CHIP:TOO: temperature display mode: 0 - - - - - ./chip-tool thermostatuserinterfaceconfiguration read keypad-lockout 12345 1 - - Verify in TH all-clusters-app Log: - - - [1650966035.736227][11195:11200] CHIP:DMG: ReportDataMessage = - [1650966035.736277][11195:11200] CHIP:DMG: { - [1650966035.736317][11195:11200] CHIP:DMG: AttributeReportIBs = - [1650966035.736374][11195:11200] CHIP:DMG: [ - [1650966035.736419][11195:11200] CHIP:DMG: AttributeReportIB = - [1650966035.736484][11195:11200] CHIP:DMG: { - [1650966035.736532][11195:11200] CHIP:DMG: AttributeDataIB = - [1650966035.736589][11195:11200] CHIP:DMG: { - [1650966035.736649][11195:11200] CHIP:DMG: DataVersion = 0x90d9261a, - [1650966035.736708][11195:11200] CHIP:DMG: AttributePathIB = - [1650966035.736770][11195:11200] CHIP:DMG: { - [1650966035.736832][11195:11200] CHIP:DMG: Endpoint = 0x1, - [1650966035.736892][11195:11200] CHIP:DMG: Cluster = 0x204, - [1650966035.736962][11195:11200] CHIP:DMG: Attribute = 0x0000_0001, - [1650966035.737028][11195:11200] CHIP:DMG: } - [1650966035.737092][11195:11200] CHIP:DMG: - [1650966035.737155][11195:11200] CHIP:DMG: Data = 0, - [1650966035.737216][11195:11200] CHIP:DMG: }, - [1650966035.737279][11195:11200] CHIP:DMG: - [1650966035.737328][11195:11200] CHIP:DMG: }, - [1650966035.737387][11195:11200] CHIP:DMG: - [1650966035.737431][11195:11200] CHIP:DMG: ], - [1650966035.737486][11195:11200] CHIP:DMG: - [1650966035.737532][11195:11200] CHIP:DMG: SuppressResponse = true, - [1650966035.737579][11195:11200] CHIP:DMG: InteractionModelRevision = 1 - [1650966035.737622][11195:11200] CHIP:DMG: } - [1650966035.737848][11195:11200] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0001 DataVersion: 2430150170 - [1650966035.737952][11195:11200] CHIP:TOO: keypad lockout: 0" + ./chip-tool thermostatuserinterfaceconfiguration read temperature-display-mode 1 1 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + [1658142864.198892][13946:13946] CHIP:IM: Received Read request + [1658142864.198979][13946:13946] CHIP:DMG: ReadRequestMessage = + [1658142864.199008][13946:13946] CHIP:DMG: { + [1658142864.199032][13946:13946] CHIP:DMG: AttributePathIBs = + [1658142864.199059][13946:13946] CHIP:DMG: [ + [1658142864.199085][13946:13946] CHIP:DMG: AttributePathIB = + [1658142864.199114][13946:13946] CHIP:DMG: { + [1658142864.199144][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658142864.199181][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658142864.199221][13946:13946] CHIP:DMG: Attribute = 0x0000_0000, + [1658142864.199253][13946:13946] CHIP:DMG: } + [1658142864.199284][13946:13946] CHIP:DMG: + [1658142864.199311][13946:13946] CHIP:DMG: ], + [1658142864.199341][13946:13946] CHIP:DMG: + [1658142864.199369][13946:13946] CHIP:DMG: isFabricFiltered = true, + [1658142864.199396][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658142864.199421][13946:13946] CHIP:DMG: }, + [1658142864.199502][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent temperature display mode attribute value + [1658142864.203659][8868:8873] CHIP:DMG: } + [1658142864.203865][8868:8873] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 682086754 + [1658142864.203966][8868:8873] CHIP:TOO: temperature display mode: 0 + [1658142864.204082][8868:8873] CHIP:EM: Sending Standalone Ack for MessageCounter:26677540 on exchange 12305i + + + + + + ./chip-tool thermostatuserinterfaceconfiguration read keypad-lockout 1 1 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + [1658142905.390042][13946:13946] CHIP:IM: Received Read request + [1658142905.390148][13946:13946] CHIP:DMG: ReadRequestMessage = + [1658142905.390177][13946:13946] CHIP:DMG: { + [1658142905.390199][13946:13946] CHIP:DMG: AttributePathIBs = + [1658142905.390225][13946:13946] CHIP:DMG: [ + [1658142905.390249][13946:13946] CHIP:DMG: AttributePathIB = + [1658142905.390276][13946:13946] CHIP:DMG: { + [1658142905.390304][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658142905.390335][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658142905.390370][13946:13946] CHIP:DMG: Attribute = 0x0000_0001, + [1658142905.390400][13946:13946] CHIP:DMG: } + [1658142905.390430][13946:13946] CHIP:DMG: + [1658142905.390455][13946:13946] CHIP:DMG: ], + [1658142905.390483][13946:13946] CHIP:DMG: + [1658142905.390509][13946:13946] CHIP:DMG: isFabricFiltered = true, + [1658142905.390534][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658142905.390557][13946:13946] CHIP:DMG: }, + [1658142905.390634][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] + [1658142905.390718][13946:13946] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + + On DUT as a client side, verify that TH all-clusters-app sent keypad lockout attribute value + [1658142905.393178][8876:8881] CHIP:DMG: } + [1658142905.393364][8876:8881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0001 DataVersion: 682086754 + [1658142905.393454][8876:8881] CHIP:TOO: keypad lockout: 0 + [1658142905.393558][8876:8881] CHIP:EM: Sending Standalone Ack for MessageCounter:118574768 on exchange 20562i disabled: true - label: @@ -102,88 +90,107 @@ tests: a manufacturer specific order" verification: | ./chip-tool thermostatuserinterfaceconfiguration read schedule-programming-visibility 1 1 - - Verify in TH all-clusters-app Log: - [1654689278.722504][8215:8215] CHIP:DMG: ReadRequestMessage = - [1654689278.722531][8215:8215] CHIP:DMG: { - [1654689278.722552][8215:8215] CHIP:DMG: AttributePathIBs = - [1654689278.722578][8215:8215] CHIP:DMG: [ - [1654689278.722602][8215:8215] CHIP:DMG: AttributePathIB = - [1654689278.722638][8215:8215] CHIP:DMG: { - [1654689278.722667][8215:8215] CHIP:DMG: Endpoint = 0x1, - [1654689278.722703][8215:8215] CHIP:DMG: Cluster = 0x204, - [1654689278.722739][8215:8215] CHIP:DMG: Attribute = 0x0000_0002, - [1654689278.722766][8215:8215] CHIP:DMG: } - [1654689278.722792][8215:8215] CHIP:DMG: - [1654689278.722814][8215:8215] CHIP:DMG: ], - [1654689278.722843][8215:8215] CHIP:DMG: - [1654689278.722870][8215:8215] CHIP:DMG: isFabricFiltered = true, - [1654689278.722895][8215:8215] CHIP:DMG: InteractionModelRevision = 1 - [1654689278.722919][8215:8215] CHIP:DMG: }, - [1654689278.723033][8215:8215] CHIP:DMG: IM RH moving to [GeneratingReports] - [1654689278.723134][8215:8215] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + [1658143293.502829][13946:13946] CHIP:EM: Handling via exchange: 655r, Delegate: 0xaaaad3403ed0 + [1658143293.502867][13946:13946] CHIP:IM: Received Read request + [1658143293.502943][13946:13946] CHIP:DMG: ReadRequestMessage = + [1658143293.502969][13946:13946] CHIP:DMG: { + [1658143293.503018][13946:13946] CHIP:DMG: AttributePathIBs = + [1658143293.503046][13946:13946] CHIP:DMG: [ + [1658143293.503069][13946:13946] CHIP:DMG: AttributePathIB = + [1658143293.503097][13946:13946] CHIP:DMG: { + [1658143293.503125][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658143293.503159][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658143293.503190][13946:13946] CHIP:DMG: Attribute = 0x0000_0002, + [1658143293.503218][13946:13946] CHIP:DMG: } + [1658143293.503248][13946:13946] CHIP:DMG: + [1658143293.503273][13946:13946] CHIP:DMG: ], + [1658143293.503300][13946:13946] CHIP:DMG: + [1658143293.503326][13946:13946] CHIP:DMG: isFabricFiltered = true, + [1658143293.503351][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658143293.503374][13946:13946] CHIP:DMG: }, + [1658143293.503450][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent schedule programming visibility attribute value + [1658143293.447125][8901:8906] CHIP:DMG: } + [1658143293.447279][8901:8906] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0002 DataVersion: 682086754 + [1658143293.447352][8901:8906] CHIP:TOO: schedule programming visibility: 0 + [1658143293.447431][8901:8906] CHIP:EM: Sending Standalone Ack for MessageCounter:142018492 on exchange 655i disabled: true - label: "DUT writes a suitable value to all supported mandatory attributes on the TH one at a time in a manufacturer specific order" verification: | - ./chip-tool thermostatuserinterfaceconfiguration write temperature-display-mode 1 1 1 - - Verify in TH all-clusters-app Log: - [1649674212.150303][2241:2241] CHIP:DMG: WriteRequestMessage = - [1649674212.150341][2241:2241] CHIP:DMG: { - [1649674212.150375][2241:2241] CHIP:DMG: suppressResponse = false, - [1649674212.150414][2241:2241] CHIP:DMG: timedRequest = false, - [1649674212.150464][2241:2241] CHIP:DMG: AttributeDataIBs = - [1649674212.150509][2241:2241] CHIP:DMG: [ - [1649674212.150558][2241:2241] CHIP:DMG: AttributeDataIB = - [1649674212.150616][2241:2241] CHIP:DMG: { - [1649674212.150656][2241:2241] CHIP:DMG: AttributePathIB = - [1649674212.150714][2241:2241] CHIP:DMG: { - [1649674212.150766][2241:2241] CHIP:DMG: Endpoint = 0x1, - [1649674212.150830][2241:2241] CHIP:DMG: Cluster = 0x204, - [1649674212.150893][2241:2241] CHIP:DMG: Attribute = 0x0000_0000, - [1649674212.150945][2241:2241] CHIP:DMG: } - [1649674212.151007][2241:2241] CHIP:DMG: - [1649674212.151057][2241:2241] CHIP:DMG: Data = 1, - [1649674212.151114][2241:2241] CHIP:DMG: }, - [1649674212.151199][2241:2241] CHIP:DMG: - [1649674212.151239][2241:2241] CHIP:DMG: ], - [1649674212.151284][2241:2241] CHIP:DMG: - [1649674212.151333][2241:2241] CHIP:DMG: moreChunkedMessages = false, - [1649674212.151371][2241:2241] CHIP:DMG: InteractionModelRevision = 1 - [1649674212.151417][2241:2241] CHIP:DMG: }, - - - ./chip-tool thermostatuserinterfaceconfiguration write keypad-lockout 1 1 1 - - - Verify in TH all-clusters-app Log: - [1649674352.430976][2241:2241] CHIP:DMG: WriteRequestMessage = - [1649674352.431028][2241:2241] CHIP:DMG: { - [1649674352.431064][2241:2241] CHIP:DMG: suppressResponse = false, - [1649674352.431116][2241:2241] CHIP:DMG: timedRequest = false, - [1649674352.431153][2241:2241] CHIP:DMG: AttributeDataIBs = - [1649674352.431227][2241:2241] CHIP:DMG: [ - [1649674352.431277][2241:2241] CHIP:DMG: AttributeDataIB = - [1649674352.431342][2241:2241] CHIP:DMG: { - [1649674352.431382][2241:2241] CHIP:DMG: AttributePathIB = - [1649674352.431440][2241:2241] CHIP:DMG: { - [1649674352.431491][2241:2241] CHIP:DMG: Endpoint = 0x1, - [1649674352.431555][2241:2241] CHIP:DMG: Cluster = 0x204, - [1649674352.431618][2241:2241] CHIP:DMG: Attribute = 0x0000_0001, - [1649674352.431665][2241:2241] CHIP:DMG: } - [1649674352.431728][2241:2241] CHIP:DMG: - [1649674352.431778][2241:2241] CHIP:DMG: Data = 1, - [1649674352.431823][2241:2241] CHIP:DMG: }, - [1649674352.431883][2241:2241] CHIP:DMG: - [1649674352.431919][2241:2241] CHIP:DMG: ], - [1649674352.431975][2241:2241] CHIP:DMG: - [1649674352.432012][2241:2241] CHIP:DMG: moreChunkedMessages = false, - [1649674352.432062][2241:2241] CHIP:DMG: InteractionModelRevision = 1 - [1649674352.432097][2241:2241] CHIP:DMG: }, + verify On TH(Reference app) receives the right write Request Message for the data sent in the above command + [1658143515.699171][13946:13946] CHIP:DMG: WriteRequestMessage = + [1658143515.699197][13946:13946] CHIP:DMG: { + [1658143515.699221][13946:13946] CHIP:DMG: suppressResponse = false, + [1658143515.699248][13946:13946] CHIP:DMG: timedRequest = false, + [1658143515.699272][13946:13946] CHIP:DMG: AttributeDataIBs = + [1658143515.699302][13946:13946] CHIP:DMG: [ + [1658143515.699326][13946:13946] CHIP:DMG: AttributeDataIB = + [1658143515.699362][13946:13946] CHIP:DMG: { + [1658143515.699388][13946:13946] CHIP:DMG: AttributePathIB = + [1658143515.699419][13946:13946] CHIP:DMG: { + [1658143515.699451][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658143515.699484][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658143515.699514][13946:13946] CHIP:DMG: Attribute = 0x0000_0001, + [1658143515.699544][13946:13946] CHIP:DMG: } + [1658143515.699577][13946:13946] CHIP:DMG: + [1658143515.699609][13946:13946] CHIP:DMG: Data = 1, + [1658143515.699638][13946:13946] CHIP:DMG: }, + [1658143515.699667][13946:13946] CHIP:DMG: + [1658143515.699690][13946:13946] CHIP:DMG: ], + [1658143515.699719][13946:13946] CHIP:DMG: + [1658143515.699743][13946:13946] CHIP:DMG: moreChunkedMessages = false, + [1658143515.699768][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658143515.699792][13946:13946] CHIP:DMG: }, + [1658143515.699876][13946:13946] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=m + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1658143515.619630][8919:8924] CHIP:DMG: StatusIB = + [1658143515.619669][8919:8924] CHIP:DMG: { + [1658143515.619707][8919:8924] CHIP:DMG: status = 0x00 (SUCCESS), + [1658143515.619747][8919:8924] CHIP:DMG: }, + + + + + ./chip-tool thermostatuserinterfaceconfiguration write keypad-lockout 1 1 1 + verify On TH(Reference app) receives the right write Request Message for the data sent in the above command + [1658143708.436060][13946:13946] CHIP:DMG: WriteRequestMessage = + [1658143708.436090][13946:13946] CHIP:DMG: { + [1658143708.436115][13946:13946] CHIP:DMG: suppressResponse = false, + [1658143708.436148][13946:13946] CHIP:DMG: timedRequest = false, + [1658143708.436176][13946:13946] CHIP:DMG: AttributeDataIBs = + [1658143708.436210][13946:13946] CHIP:DMG: [ + [1658143708.436238][13946:13946] CHIP:DMG: AttributeDataIB = + [1658143708.436269][13946:13946] CHIP:DMG: { + [1658143708.436295][13946:13946] CHIP:DMG: AttributePathIB = + [1658143708.436330][13946:13946] CHIP:DMG: { + [1658143708.436368][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658143708.436406][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658143708.436444][13946:13946] CHIP:DMG: Attribute = 0x0000_0001, + [1658143708.436483][13946:13946] CHIP:DMG: } + [1658143708.436520][13946:13946] CHIP:DMG: + [1658143708.436561][13946:13946] CHIP:DMG: Data = 1, + [1658143708.436592][13946:13946] CHIP:DMG: }, + [1658143708.436627][13946:13946] CHIP:DMG: + [1658143708.436654][13946:13946] CHIP:DMG: ], + [1658143708.436686][13946:13946] CHIP:DMG: + [1658143708.436714][13946:13946] CHIP:DMG: moreChunkedMessages = false, + [1658143708.436743][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658143708.436770][13946:13946] CHIP:DMG: }, + [1658143708.436862][13946:13946] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=m + [1658143708.436903][13946:13946] CHIP:DMG: AccessControl: allowed + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1658143708.341102][8933:8938] CHIP:DMG: StatusIB = + [1658143708.341156][8933:8938] CHIP:DMG: { + [1658143708.341211][8933:8938] CHIP:DMG: status = 0x00 (SUCCESS), + [1658143708.341257][8933:8938] CHIP:DMG: }, disabled: true - label: @@ -191,20 +198,40 @@ tests: the TH one at a time in a manufacturer specific order" verification: | ./chip-tool thermostatuserinterfaceconfiguration write schedule-programming-visibility 1 1 1 - - - Verify in TH all-clusters-app Log: - [1649673609.998586][2338:2344] CHIP:DMG: AttributePathIB = - [1649673609.998644][2338:2344] CHIP:DMG: { - [1649673609.998690][2338:2344] CHIP:DMG: Endpoint = 0x1, - [1649673609.998748][2338:2344] CHIP:DMG: Cluster = 0x204, - [1649673609.998805][2338:2344] CHIP:DMG: Attribute = 0x0000_0002, - [1649673609.998844][2338:2344] CHIP:DMG: } - [1649673609.998902][2338:2344] CHIP:DMG: - [1649673609.998945][2338:2344] CHIP:DMG: StatusIB = - [1649673609.999000][2338:2344] CHIP:DMG: { - [1649673609.999057][2338:2344] CHIP:DMG: status = 0x00 (SUCCESS), - [1649673609.999101][2338:2344] CHIP:DMG: }, + verify On TH(Reference app) receives the right write Request Message for the data sent in the above command + [1658143828.619738][13946:13946] CHIP:DMG: WriteRequestMessage = + [1658143828.619764][13946:13946] CHIP:DMG: { + [1658143828.619787][13946:13946] CHIP:DMG: suppressResponse = false, + [1658143828.619814][13946:13946] CHIP:DMG: timedRequest = false, + [1658143828.619838][13946:13946] CHIP:DMG: AttributeDataIBs = + [1658143828.619867][13946:13946] CHIP:DMG: [ + [1658143828.619891][13946:13946] CHIP:DMG: AttributeDataIB = + [1658143828.619919][13946:13946] CHIP:DMG: { + [1658143828.619944][13946:13946] CHIP:DMG: AttributePathIB = + [1658143828.619980][13946:13946] CHIP:DMG: { + [1658143828.620011][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658143828.620045][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658143828.620078][13946:13946] CHIP:DMG: Attribute = 0x0000_0002, + [1658143828.620108][13946:13946] CHIP:DMG: } + [1658143828.620140][13946:13946] CHIP:DMG: + [1658143828.620172][13946:13946] CHIP:DMG: Data = 1, + [1658143828.620200][13946:13946] CHIP:DMG: }, + [1658143828.620228][13946:13946] CHIP:DMG: + [1658143828.620252][13946:13946] CHIP:DMG: ], + [1658143828.620280][13946:13946] CHIP:DMG: + [1658143828.620305][13946:13946] CHIP:DMG: moreChunkedMessages = false, + [1658143828.620330][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658143828.620353][13946:13946] CHIP:DMG: }, + [1658143828.620434][13946:13946] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=m + + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1658143828.519585][8944:8949] CHIP:DMG: + [1658143828.519632][8944:8949] CHIP:DMG: StatusIB = + [1658143828.519683][8944:8949] CHIP:DMG: { + [1658143828.519734][8944:8949] CHIP:DMG: status = 0x00 (SUCCESS), + [1658143828.519784][8944:8949] CHIP:DMG: }, + [1658143828.519834][8944:8949] CHIP:DMG: disabled: true - label: @@ -213,73 +240,64 @@ tests: also reflects this in global attributes such as FeatureMap and AttributeList. Commission DUT to TH again" verification: | - ./chip-tool thermostatuserinterfaceconfiguration read attribute-list 1 1 - - - Verify in TH all-clusters-minimal-app Log: - [1654248197885] [91899:4015040] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_FFFB DataVersion: 2039959817 - [1654248197885] [91899:4015040] CHIP: [TOO] AttributeList: 7 entries - [1654248197885] [91899:4015040] CHIP: [TOO] [1]: 0 - [1654248197885] [91899:4015040] CHIP: [TOO] [2]: 1 - [1654248197885] [91899:4015040] CHIP: [TOO] [3]: 65528 - [1654248197885] [91899:4015040] CHIP: [TOO] [4]: 65529 - [1654248197885] [91899:4015040] CHIP: [TOO] [5]: 65531 - [1654248197885] [91899:4015040] CHIP: [TOO] [6]: 65532 - [1654248197885] [91899:4015040] CHIP: [TOO] [7]: 65533 - - - ./chip-tool thermostatuserinterfaceconfiguration write temperature-display-mode 1 1 1 - Verify in TH all-clusters-minimal-app Log: - [1649674212.150303][2241:2241] CHIP:DMG: WriteRequestMessage = - [1649674212.150341][2241:2241] CHIP:DMG: { - [1649674212.150375][2241:2241] CHIP:DMG: suppressResponse = false, - [1649674212.150414][2241:2241] CHIP:DMG: timedRequest = false, - [1649674212.150464][2241:2241] CHIP:DMG: AttributeDataIBs = - [1649674212.150509][2241:2241] CHIP:DMG: [ - [1649674212.150558][2241:2241] CHIP:DMG: AttributeDataIB = - [1649674212.150616][2241:2241] CHIP:DMG: { - [1649674212.150656][2241:2241] CHIP:DMG: AttributePathIB = - [1649674212.150714][2241:2241] CHIP:DMG: { - [1649674212.150766][2241:2241] CHIP:DMG: Endpoint = 0x1, - [1649674212.150830][2241:2241] CHIP:DMG: Cluster = 0x204, - [1649674212.150893][2241:2241] CHIP:DMG: Attribute = 0x0000_0000, - [1649674212.150945][2241:2241] CHIP:DMG: } - [1649674212.151007][2241:2241] CHIP:DMG: - [1649674212.151057][2241:2241] CHIP:DMG: Data = 1, - [1649674212.151114][2241:2241] CHIP:DMG: }, - [1649674212.151199][2241:2241] CHIP:DMG: - [1649674212.151239][2241:2241] CHIP:DMG: ], - [1649674212.151284][2241:2241] CHIP:DMG: - [1649674212.151333][2241:2241] CHIP:DMG: moreChunkedMessages = false, - [1649674212.151371][2241:2241] CHIP:DMG: InteractionModelRevision = 1 - [1649674212.151417][2241:2241] CHIP:DMG: }, - - - ./chip-tool thermostatuserinterfaceconfiguration write keypad-lockout 1 1 1 - Verify in TH all-clusters-minimal-app Log: - [1649674352.430976][2241:2241] CHIP:DMG: WriteRequestMessage = - [1649674352.431028][2241:2241] CHIP:DMG: { - [1649674352.431064][2241:2241] CHIP:DMG: suppressResponse = false, - [1649674352.431116][2241:2241] CHIP:DMG: timedRequest = false, - [1649674352.431153][2241:2241] CHIP:DMG: AttributeDataIBs = - [1649674352.431227][2241:2241] CHIP:DMG: [ - [1649674352.431277][2241:2241] CHIP:DMG: AttributeDataIB = - [1649674352.431342][2241:2241] CHIP:DMG: { - [1649674352.431382][2241:2241] CHIP:DMG: AttributePathIB = - [1649674352.431440][2241:2241] CHIP:DMG: { - [1649674352.431491][2241:2241] CHIP:DMG: Endpoint = 0x1, - [1649674352.431555][2241:2241] CHIP:DMG: Cluster = 0x204, - [1649674352.431618][2241:2241] CHIP:DMG: Attribute = 0x0000_0001, - [1649674352.431665][2241:2241] CHIP:DMG: } - [1649674352.431728][2241:2241] CHIP:DMG: - [1649674352.431778][2241:2241] CHIP:DMG: Data = 1, - [1649674352.431823][2241:2241] CHIP:DMG: }, - [1649674352.431883][2241:2241] CHIP:DMG: - [1649674352.431919][2241:2241] CHIP:DMG: ], - [1649674352.431975][2241:2241] CHIP:DMG: - [1649674352.432012][2241:2241] CHIP:DMG: moreChunkedMessages = false, - [1649674352.432062][2241:2241] CHIP:DMG: InteractionModelRevision = 1 - [1649674352.432097][2241:2241] CHIP:DMG: }," + ./chip-tool thermostatuserinterfaceconfiguration read temperature-display-mode 1 1 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + [1658142864.198892][13946:13946] CHIP:IM: Received Read request + [1658142864.198979][13946:13946] CHIP:DMG: ReadRequestMessage = + [1658142864.199008][13946:13946] CHIP:DMG: { + [1658142864.199032][13946:13946] CHIP:DMG: AttributePathIBs = + [1658142864.199059][13946:13946] CHIP:DMG: [ + [1658142864.199085][13946:13946] CHIP:DMG: AttributePathIB = + [1658142864.199114][13946:13946] CHIP:DMG: { + [1658142864.199144][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658142864.199181][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658142864.199221][13946:13946] CHIP:DMG: Attribute = 0x0000_0000, + [1658142864.199253][13946:13946] CHIP:DMG: } + [1658142864.199284][13946:13946] CHIP:DMG: + [1658142864.199311][13946:13946] CHIP:DMG: ], + [1658142864.199341][13946:13946] CHIP:DMG: + [1658142864.199369][13946:13946] CHIP:DMG: isFabricFiltered = true, + [1658142864.199396][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658142864.199421][13946:13946] CHIP:DMG: }, + [1658142864.199502][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent temperature display mode attribute value + [1658142864.203659][8868:8873] CHIP:DMG: } + [1658142864.203865][8868:8873] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 682086754 + [1658142864.203966][8868:8873] CHIP:TOO: temperature display mode: 0 + [1658142864.204082][8868:8873] CHIP:EM: Sending Standalone Ack for MessageCounter:26677540 on exchange 12305i + + + + + + ./chip-tool thermostatuserinterfaceconfiguration read keypad-lockout 1 1 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + [1658142905.390042][13946:13946] CHIP:IM: Received Read request + [1658142905.390148][13946:13946] CHIP:DMG: ReadRequestMessage = + [1658142905.390177][13946:13946] CHIP:DMG: { + [1658142905.390199][13946:13946] CHIP:DMG: AttributePathIBs = + [1658142905.390225][13946:13946] CHIP:DMG: [ + [1658142905.390249][13946:13946] CHIP:DMG: AttributePathIB = + [1658142905.390276][13946:13946] CHIP:DMG: { + [1658142905.390304][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658142905.390335][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658142905.390370][13946:13946] CHIP:DMG: Attribute = 0x0000_0001, + [1658142905.390400][13946:13946] CHIP:DMG: } + [1658142905.390430][13946:13946] CHIP:DMG: + [1658142905.390455][13946:13946] CHIP:DMG: ], + [1658142905.390483][13946:13946] CHIP:DMG: + [1658142905.390509][13946:13946] CHIP:DMG: isFabricFiltered = true, + [1658142905.390534][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658142905.390557][13946:13946] CHIP:DMG: }, + [1658142905.390634][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] + [1658142905.390718][13946:13946] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + + On DUT as a client side, verify that TH all-clusters-app sent keypad lockout attribute value + [1658142905.393178][8876:8881] CHIP:DMG: } + [1658142905.393364][8876:8881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0001 DataVersion: 682086754 + [1658142905.393454][8876:8881] CHIP:TOO: keypad lockout: 0 + [1658142905.393558][8876:8881] CHIP:EM: Sending Standalone Ack for MessageCounter:118574768 on exchange 20562i disabled: true - label: @@ -288,6 +306,7 @@ tests: verification: | ./chip-tool thermostatuserinterfaceconfiguration read schedule-programming-visibility 1 1 + On DUT as a client side, verify that TH all-clusters-app sent UNSUPPORTED_ATTRIBUTE response General error: 0x86 (UNSUPPORTED_ATTRIBUTE) disabled: true @@ -296,6 +315,6 @@ tests: the TH one at a time in a manufacturer specific order" verification: | ./chip-tool thermostatuserinterfaceconfiguration write schedule-programming-visibility 1 1 1 - + On DUT as a client side, verify that TH all-clusters-app sent UNSUPPORTED_ATTRIBUTE response General error: 0x86 (UNSUPPORTED_ATTRIBUTE) disabled: true 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 e78deaba7ee13e..894da6642d1112 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 @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_2_2.yaml index b7a4a1502cccd6..9de3fe935077da 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_2_2.yaml @@ -54,5 +54,5 @@ tests: { label: "roomType", value: "bedroom" }, ] constraints: - - type: list - - minLength: 4 + type: list + minLength: 4 diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_2_3.yaml index 9321a7d0116a27..5377136bf16850 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_2_3.yaml @@ -46,7 +46,7 @@ tests: response: error: CONSTRAINT_ERROR - - label: "TH reads LabelList attribute of the DUT" + - label: "TH writes LabelList attribute of the DUT" PICS: ULABEL.S.A0000 command: "writeAttribute" attribute: "label list" diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_2_4.yaml index 2abf04ece85a4e..d47a05c741a128 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_2_4.yaml @@ -58,11 +58,11 @@ tests: command: "writeAttribute" attribute: "label list" arguments: - value: [] + value: [{ "label": "", "value": "" }] - label: "TH reads LabelList attribute of the DUT" PICS: ULABEL.S.A0000 command: "readAttribute" attribute: "label list" response: - value: [] + value: [{ "label": "", "value": "" }] diff --git a/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml b/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml index fe2d8887d782d3..ec2c6b4a0a79b9 100644 --- a/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -44,7 +44,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml index 377dd159bc0032..6062b499fc8e12 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml @@ -37,7 +37,7 @@ tests: response: value: 5 constraints: - type: uint16 + type: int16u minValue: 5 maxValue: 200 @@ -47,7 +47,7 @@ tests: attribute: "FeatureMap" response: constraints: - type: uint32 + type: bitmap32 minValue: 0 maxValue: 32768 diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml index 19843f0ab28679..6b30454bb892f2 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml @@ -50,7 +50,7 @@ tests: PICS: WNCV.S.A0007 response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 63 @@ -61,7 +61,7 @@ tests: PICS: WNCV.S.A000a response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 63 @@ -83,7 +83,7 @@ tests: PICS: WNCV.S.A0017 response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 15 @@ -155,7 +155,7 @@ tests: PICS: WNCV.S.A0010 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -167,7 +167,7 @@ tests: PICS: WNCV.S.A0011 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -179,7 +179,7 @@ tests: PICS: WNCV.S.A0012 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -191,7 +191,7 @@ tests: PICS: WNCV.S.A0013 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -203,7 +203,7 @@ tests: PICS: WNCV.S.A001a response: constraints: - type: map16 + type: bitmap16 minValue: 0 maxValue: 2047 @@ -215,7 +215,7 @@ tests: PICS: WNCV.S.A0001 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -227,7 +227,7 @@ tests: PICS: WNCV.S.A0002 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -238,7 +238,7 @@ tests: PICS: WNCV.S.A0003 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -249,7 +249,7 @@ tests: PICS: WNCV.S.A0004 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -261,7 +261,7 @@ tests: PICS: WNCV.S.A0005 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -273,7 +273,7 @@ tests: PICS: WNCV.S.A0006 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 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 a6381b88223273..80cb89614f5230 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 @@ -59,7 +59,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e response: constraints: - type: uint16 + type: Percent100ths minValue: 1 maxValue: 10000 @@ -72,7 +72,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008 response: constraints: - type: uint8 + type: Percent minValue: 1 maxValue: 100 @@ -85,7 +85,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f response: constraints: - type: uint16 + type: Percent100ths minValue: 1 maxValue: 10000 @@ -98,7 +98,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009 response: constraints: - type: uint8 + type: Percent minValue: 1 maxValue: 100 @@ -112,7 +112,7 @@ tests: maxInterval: 5 response: constraints: - type: map8 + type: bitmap8 ### MANDATORY Command - label: "2a: TH sends UpOrOpen command to DUT" @@ -169,7 +169,7 @@ tests: PICS: WNCV.S.A000a response: constraints: - type: map8 + type: bitmap8 minValue: 5 maxValue: 21 @@ -191,7 +191,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 9999 @@ -204,7 +204,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008 response: constraints: - type: uint8 + type: Percent minValue: 0 maxValue: 99 @@ -217,7 +217,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 9999 @@ -230,7 +230,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009 response: constraints: - type: uint8 + type: Percent minValue: 0 maxValue: 99 @@ -280,7 +280,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 9999 @@ -293,6 +293,6 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 9999 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 65a06134cee02b..de551662f251b8 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 @@ -59,7 +59,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 9999 @@ -72,7 +72,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008 response: constraints: - type: uint8 + type: Percent minValue: 0 maxValue: 99 @@ -85,7 +85,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 9999 @@ -98,7 +98,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009 response: constraints: - type: uint8 + type: Percent minValue: 0 maxValue: 99 @@ -112,7 +112,7 @@ tests: maxInterval: 5 response: constraints: - type: map8 + type: bitmap8 ### MANDATORY Command - label: "2a: TH sends DownOrClose command to DUT" @@ -169,7 +169,7 @@ tests: PICS: WNCV.S.A000a response: constraints: - type: map8 + type: bitmap8 minValue: 10 maxValue: 42 @@ -191,7 +191,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e response: constraints: - type: uint16 + type: Percent100ths minValue: 1 maxValue: 10000 @@ -204,7 +204,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008 response: constraints: - type: uint8 + type: Percent minValue: 1 maxValue: 100 @@ -217,7 +217,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f response: constraints: - type: uint16 + type: Percent100ths minValue: 1 maxValue: 10000 @@ -230,7 +230,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009 response: constraints: - type: uint8 + type: Percent minValue: 1 maxValue: 100 @@ -280,7 +280,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b response: constraints: - type: uint16 + type: Percent100ths minValue: 1 maxValue: 10000 @@ -293,6 +293,6 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c response: constraints: - type: uint16 + type: Percent100ths minValue: 1 maxValue: 10000 diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_3_3.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_3.yaml index 92cf1e63f7e46b..8e5f69b279ad53 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_3_3.yaml @@ -71,7 +71,7 @@ tests: maxInterval: 5 response: constraints: - type: map8 + type: bitmap8 ### MANDATORY Command - label: "2a: TH sends a StopMotion command to DUT" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_3_4.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_4.yaml index 49f015acee6085..608d5d39a31814 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_3_4.yaml @@ -21,10 +21,10 @@ config: cluster: "Window Covering" endpoint: 1 fastMotionDuration: - type: INT16U + type: int16u defaultValue: 3000 fullMotionDuration: - type: INT16U + type: int16u defaultValue: 6000 tests: diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_3_5.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_5.yaml index dab1669cb7adb2..2208f81bdfb8f1 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_3_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_3_5.yaml @@ -21,10 +21,10 @@ config: cluster: "Window Covering" endpoint: 1 fastMotionDuration: - type: INT16U + type: int16u defaultValue: 3000 fullMotionDuration: - type: INT16U + type: int16u defaultValue: 6000 tests: diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_4_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_4_1.yaml index d2e1a79ac88a6f..85f93558ad6348 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_4_1.yaml @@ -21,7 +21,7 @@ config: cluster: "Window Covering" endpoint: 1 fullMotionDuration: - type: INT16U + type: int16u defaultValue: 6000 tests: diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_4_2.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_4_2.yaml index b7d2df44d95fe8..a429d1206e9879 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_4_2.yaml @@ -21,7 +21,7 @@ config: cluster: "Window Covering" endpoint: 1 fullMotionDuration: - type: INT16U + type: int16u defaultValue: 6000 tests: diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 5ceff16ef6679b..4731553297c296 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -33,12 +33,6 @@ DGSW.S.A0001=1 DGSW.S.A0002=1 DGSW.S.A0003=1 DGSW.S.C00.Rsp=1 -A_OCCUPIEDCOOLINGSETPOINT=1 -A_OCCUPIEDHEATINGSETPOINT=1 -A_MINHEATSETPOINTLIMIT=1 -A_MAXHEATSETPOINTLIMIT=1 -A_MINCOOLSETPOINTLIMIT=1 -A_MAXCOOLSETPOINTLIMIT=1 VENDOR_SUBTYPE=1 DEVTYPE_SUBTYPE=1 @@ -56,18 +50,6 @@ PICS_SDK_CI_ONLY=1 OO_LT=1 MANUAL_FLOW_CHANGE=1 -#Thermostat Server -TSTAT.S.F00=0 -TSTAT.S.F01=0 -TSTAT.S.F02=0 -TSTAT.S.F03=0 -TSTAT.S.F04=0 -TSTAT.S.F05=0 -A_MINHEATSETPOINTLIMIT=1 -A_MAXHEATSETPOINTLIMIT=1 -A_MINCOOLSETPOINTLIMIT=1 -A_MAXCOOLSETPOINTLIMIT=1 - # WindowCovering aka WNCV WNCV.S.F00=1 WNCV.S.F02=1 @@ -322,9 +304,10 @@ CHANNEL.S.LI=1 CHANNEL.S.A0000=1 CHANNEL.S.A0001=1 CHANNEL.S.A0002=1 -CHANNEL.S.C0000=1 -CHANNEL.S.C0002=1 -CHANNEL.S.C0003=1 +CHANNEL.S.C00.Rsp=1 +CHANNEL.S.C02.Rsp=1 +CHANNEL.S.C03.Rsp=1 +CHANNEL.S.C01.Tx=1 MEDIAPLAYBACK.S.A0000=1 MEDIAPLAYBACK.S.A0001=1 @@ -334,29 +317,26 @@ MEDIAPLAYBACK.S.A0004=1 MEDIAPLAYBACK.S.A0005=1 MEDIAPLAYBACK.S.A0006=1 -MEDIAPLAYBACK.S.C0000=1 -MEDIAPLAYBACK.S.C0001=1 -MEDIAPLAYBACK.S.C0002=1 -MEDIAPLAYBACK.S.C0003=1 -MEDIAPLAYBACK.S.C0004=1 -MEDIAPLAYBACK.S.C0005=1 -MEDIAPLAYBACK.S.C0006=1 -MEDIAPLAYBACK.S.C0007=1 -MEDIAPLAYBACK.S.C0008=1 -MEDIAPLAYBACK.S.C0009=1 -MEDIAPLAYBACK.S.C000B=1 - -MEDIAPLAYBACK.C.C0000=1 -MEDIAPLAYBACK.C.C0001=1 -MEDIAPLAYBACK.C.C0002=1 -MEDIAPLAYBACK.C.C0003=1 -MEDIAPLAYBACK.C.C0004=1 -MEDIAPLAYBACK.C.C0005=1 -MEDIAPLAYBACK.C.C0006=1 -MEDIAPLAYBACK.C.C0007=1 -MEDIAPLAYBACK.C.C0008=1 -MEDIAPLAYBACK.C.C0009=1 -MEDIAPLAYBACK.C.C000B=1 +MEDIAPLAYBACK.S.C00.Rsp=1 +MEDIAPLAYBACK.S.C01.Rsp=1 +MEDIAPLAYBACK.S.C02.Rsp=1 +MEDIAPLAYBACK.S.C03.Rsp=1 +MEDIAPLAYBACK.S.C04.Rsp=1 +MEDIAPLAYBACK.S.C05.Rsp=1 +MEDIAPLAYBACK.S.C06.Rsp=1 +MEDIAPLAYBACK.S.C07.Rsp=1 +MEDIAPLAYBACK.S.C08.Rsp=1 +MEDIAPLAYBACK.S.C09.Rsp=1 +MEDIAPLAYBACK.S.C0B.Rsp=1 + +MEDIAPLAYBACK.C.C00.Tx=1 +MEDIAPLAYBACK.C.C01.Tx=1 +MEDIAPLAYBACK.C.C02.Tx=1 +MEDIAPLAYBACK.C.C03.Tx=1 +MEDIAPLAYBACK.C.C04.Tx=1 +MEDIAPLAYBACK.C.C05.Tx=1 +MEDIAPLAYBACK.C.C08.Tx=1 +MEDIAPLAYBACK.C.C09.Tx=1 AUDIOOUTPUT.S.A0000=1 AUDIOOUTPUT.S.C0000=1 @@ -466,6 +446,7 @@ PRS.S.F00=0 PRS.M.PressureChange=0 #Groups Cluster +G.S.F00=1 G.S.A0000=0 GRPKEY.S.A0001=0 G.S.C00.Rsp=0 @@ -532,10 +513,10 @@ S.C.C42.Tx=0 #Switch Cluster SWTCH.S.F00=1 -SWTCH.S.F01=1 -SWTCH.S.F02=1 -SWTCH.S.F03=1 -SWTCH.S.F04=1 +SWTCH.S.F01=0 +SWTCH.S.F02=0 +SWTCH.S.F03=0 +SWTCH.S.F04=0 SWTCH.C.F00=1 SWTCH.C.F01=1 SWTCH.C.M.RA=1 @@ -583,17 +564,19 @@ PICS_MF=1 PICS_MF_BCM=1 CADMIN.UserInterfaceDisplay=1 CADMIN.AudioInterface=1 -CADMIN.S.C0000=1 -CADMIN.S.C0001=1 -CADMIN.S.C0002=1 +CADMIN.S.C00.Rsp=1 +CADMIN.S.C01.Rsp=1 +CADMIN.S.C02.Rsp=1 OPCREDS.S.C0a.Rsp=1 OPCREDS.S.A0001=1 BINFO.S.A0005=1 CADMIN.S.A0000=1 -CADMIN.C.C0000=1 -CADMIN.C.C0001=1 -CADMIN.C.C0002=1 +CADMIN.C.C00.Tx=1 +CADMIN.C.C01.Tx=1 +CADMIN.C.C02.Tx=1 CADMIN.C.A0000=1 +CADMIN.S=1 +CADMIN.C=1 OPCREDS.C.C0a.Tx=1 OPCREDS.C.A0001=1 BINFO.C.A0005=1 @@ -741,7 +724,7 @@ GRPKEY.C.C00.Tx=1 G.C.C00.Tx=1 #Device Discovery -MCORE.DD.DT_SOFTAP=0 +MCORE.DD.DISCOVERY_SOFTAP=0 MCORE.DD.WIFI=0 MCORE.DD.BLE=1 MCORE.DD.CHIP_DEV=1 @@ -763,7 +746,7 @@ MCORE.DD.COMMISSIONER=1 MCORE.DD.CUSTOM_COMM_FLOW=1 MCORE.DD.DT_BLE=1 MCORE.DD.CONTROLLER=1 -MCORE.DD.DT_IP=1 +MCORE.DD.DISCOVERY_IP=1 MCORE.DD.STANDARD_COMM_FLOW=1 MCORE.DD.USER_INTENT_COMM_FLOW=1 MCORE.DD.CUSTOM_COMM_FLOW=1 @@ -774,6 +757,19 @@ MCORE.DD.SCAN_NFC=1 MCORE.DD.SCAN_QR_CODE=1 MCORE.DD.THREAD=1 MCORE.DD.WIRELESS=1 +MCORE.DD.TXT_KEY_VP=1 +MCORE.DD.TXT_KEY_DT=1 +MCORE.DD.DISCOVERY_BLE=1 +MCORE.DD.WIFI=1 +MCORE.DD.IE=1 +MCORE.DD.TXT_KEY_DN=1 +MCORE.DD.TXT_KEY_RI=1 +MCORE.DD.TXT_KEY_PH=1 +MCORE.DD.TXT_KEY_PI=1 +MCORE.DD.EXTENDED_DISCOVERY=1 +MCORE.DD.COMMISSIONING_SUBTYPE_V=1 +MCORE.DD.COMMISSIONING_SUBTYPE_T=1 + #Ethernet Network Diagnostics Cluster DGETH.S.C00.Rsp=1 @@ -1017,11 +1013,6 @@ ILL.S.A0002=1 ILL.S.A0003=1 ILL.S.A0004=1 -#Thermostat -#Client Commands -TSTAT.C.C00.Tx=1 -TSTAT.C.C04.Tx=1 - #Door Lock #server attributes DRLK.S.A0000=1 @@ -1284,6 +1275,7 @@ CNET.C.C08.Tx=1 #Node Operational Credential #Server Attributes +MCORE.FACTORY_RESET=1 OPCREDS.S.A0000=1 OPCREDS.S.A0001=1 OPCREDS.S.A0002=1 @@ -1332,6 +1324,14 @@ OPCREDS.C.C0a.Tx=1 OPCREDS.C.C0b.Tx=1 #Thermostat +#Thermostat Server +TSTAT.S.F00=1 +TSTAT.S.F01=1 +TSTAT.S.F02=0 +TSTAT.S.F03=0 +TSTAT.S.F04=0 +TSTAT.S.F05=1 + TSTAT.S.A0000=1 TSTAT.S.A0001=0 TSTAT.S.A0002=0 @@ -1382,12 +1382,17 @@ TSTAT.S.A0044=0 TSTAT.S.A0045=0 TSTAT.S.A0046=0 TSTAT.S.A0047=0 -#commands + +#Server commands TSTAT.S.C00.Rsp=1 -TSTAT.S.C01.Rsp=1 -TSTAT.S.C02.Rsp=1 -TSTAT.S.C03.Rsp=1 -TSTAT.S.C04.Rsp=1 +TSTAT.S.C01.Rsp=0 +TSTAT.S.C02.Rsp=0 +TSTAT.S.C03.Rsp=0 +TSTAT.S.C04.Rsp=0 + +#Client Commands +TSTAT.C.C00.Tx=1 +TSTAT.C.C04.Tx=0 #Access Control cluster ACL.S.A0000=1 @@ -1409,3 +1414,33 @@ MCORE.DA.CERTDECL_ORIGIN_VENDORID=1 MCORE.DA.CERTDECL_ORIGIN_PRODUCTID=1 MCORE.DA.CERTDECL_AUTH_PAA=1 MCORE.DA.ATTESTELEMENT_FW_INFO=1 + +#Descriptor Cluster TestPlan +DESC.S.A0000=1 +DESC.S.A0001=1 +DESC.S.A0002=1 +DESC.S.A0003=1 +DESC.S.A0004=1 + +DESC.C.A0000=1 +DESC.C.A0001=1 +DESC.C.A0002=1 +DESC.C.A0003=1 +DESC.C.A0004=1 + +#Secure Channel +MCORE.SC.SII_OP_DISCOVERY_KEY=1 +MCORE.SC.SAI_OP_DISCOVERY_KEY=1 +MCORE.SC.T_KEY=1 +MCORE.SC.BLE=1 +MCORE.SC.WIFI=1 +MCORE.SC.ETH=1 +MCORE.SC.THR=1 +MCORE.SC.VENDOR_SUBTYPE=1 +MCORE.SC.DEVTYPE_SUBTYPE=1 +MCORE.SC.VP_KEY=1 +MCORE.SC.DT_KEY=1 +MCORE.SC.DN_KEY=1 +MCORE.SC.RI_KEY=1 +MCORE.SC.PH_KEY=1 +MCORE.SC.PI_KEY=1 \ No newline at end of file diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp index ab15e920fb8cbb..7cba1a4751d203 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp @@ -125,8 +125,6 @@ void InteractionModel::OnSubscriptionEstablished(SubscriptionId subscriptionId) ContinueOnChipMainThread(CHIP_NO_ERROR); } -void InteractionModel::OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) {} - /////////// WriteClient Callback Interface ///////// void InteractionModel::OnResponse(const WriteClient * client, const ConcreteDataAttributePath & path, StatusIB status) { diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.h b/src/app/tests/suites/commands/interaction_model/InteractionModel.h index 6d444ef6e1c9db..e097fdc0efa1b6 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.h +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -436,7 +437,6 @@ class InteractionModel : public InteractionModelReports, void OnError(CHIP_ERROR error) override; void OnDone(chip::app::ReadClient * aReadClient) override; void OnSubscriptionEstablished(chip::SubscriptionId subscriptionId) override; - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override; /////////// WriteClient Callback Interface ///////// void OnResponse(const chip::app::WriteClient * client, const chip::app::ConcreteDataAttributePath & path, chip::app::StatusIB status) override; diff --git a/src/app/tests/suites/include/ConstraintsChecker.h b/src/app/tests/suites/include/ConstraintsChecker.h index f988b057ecdfa4..6578a4d7610e61 100644 --- a/src/app/tests/suites/include/ConstraintsChecker.h +++ b/src/app/tests/suites/include/ConstraintsChecker.h @@ -34,7 +34,13 @@ class ConstraintsChecker bool CheckConstraintType(const char * itemName, const char * current, const char * expected) { - ChipLogError(chipTool, "Warning: %s type checking is not implemented yet. Expected type: '%s'", itemName, expected); + if (strcmp(current, expected) != 0) + { + Exit(std::string(itemName) + " type (" + std::string(current) + ") is different than the expected type (" + + std::string(expected) + ")."); + return false; + } + return true; } @@ -59,13 +65,51 @@ class ConstraintsChecker { if (current > expected) { - Exit(std::string(itemName) + " length > minLength: " + std::to_string(current) + " > " + std::to_string(expected)); + Exit(std::string(itemName) + " length > maxLength: " + std::to_string(current) + " > " + std::to_string(expected)); return false; } return true; } + template + bool CheckConstraintMinLength(const char * itemName, const chip::Span & current, uint64_t expected) + { + return CheckConstraintMinLength(itemName, current.size(), expected); + } + + template + bool CheckConstraintMaxLength(const char * itemName, const chip::Span & current, uint64_t expected) + { + return CheckConstraintMaxLength(itemName, current.size(), expected); + } + + template + bool CheckConstraintMinLength(const char * itemName, const chip::app::DataModel::DecodableList & current, uint64_t expected) + { + size_t size; + CHIP_ERROR err = current.ComputeSize(&size); + if (err != CHIP_NO_ERROR) + { + Exit(std::string(itemName) + " length cannot be extracted: " + err.AsString()); + return false; + } + return CheckConstraintMinLength(itemName, size, expected); + } + + template + bool CheckConstraintMaxLength(const char * itemName, const chip::app::DataModel::DecodableList & current, uint64_t expected) + { + size_t size; + CHIP_ERROR err = current.ComputeSize(&size); + if (err != CHIP_NO_ERROR) + { + Exit(std::string(itemName) + " length cannot be extracted: " + err.AsString()); + return false; + } + return CheckConstraintMaxLength(itemName, size, expected); + } + bool CheckConstraintStartsWith(const char * itemName, const chip::CharSpan current, const char * expected) { std::string value(current.data(), current.size()); diff --git a/src/app/tests/suites/tests.js b/src/app/tests/suites/tests.js index cacacfc207b398..b869f8db1b4a8e 100644 --- a/src/app/tests/suites/tests.js +++ b/src/app/tests/suites/tests.js @@ -63,6 +63,7 @@ function getManualTests() { "Test_TC_DD_3_18", "Test_TC_DD_3_19", "Test_TC_DD_3_20", + "Test_TC_DD_3_21", ]; const Groups = [ @@ -122,8 +123,6 @@ function getManualTests() { "Test_TC_CNET_4_4", "Test_TC_CNET_4_5", "Test_TC_CNET_4_6", - "Test_TC_CNET_4_7", - "Test_TC_CNET_4_8", "Test_TC_CNET_4_9", "Test_TC_CNET_4_10", "Test_TC_CNET_4_11", @@ -160,7 +159,6 @@ function getManualTests() { const GeneralCommissioning = [ "Test_TC_CGEN_2_2", - "Test_TC_CGEN_2_3", "Test_TC_CGEN_2_4", ]; @@ -244,8 +242,6 @@ function getManualTests() { "Test_TC_CADMIN_1_20", "Test_TC_CADMIN_1_21", "Test_TC_CADMIN_1_22", - "Test_TC_CADMIN_1_23", - "Test_TC_CADMIN_1_24", // Slow tests that should not run in CI because they take many minutes each "Test_TC_CADMIN_1_3", "Test_TC_CADMIN_1_4", @@ -254,8 +250,8 @@ function getManualTests() { "Test_TC_CADMIN_1_9", "Test_TC_CADMIN_1_10", "Test_TC_CADMIN_1_13", - "Test_TC_CADMIN_1_25", - "Test_TC_CADMIN_1_26", + "Test_TC_CADMIN_1_23", + "Test_TC_CADMIN_1_24", ]; const ModeSelect = [ @@ -372,6 +368,8 @@ function getManualTests() { "Test_TC_CC_7_5", "Test_TC_CC_9_4", // Slow tests that should not run in CI because they take many minutes each + "Test_TC_CC_3_1", + "Test_TC_CC_7_1", "Test_TC_CC_9_1", "Test_TC_CC_9_2", "Test_TC_CC_9_3", @@ -412,7 +410,6 @@ function getManualTests() { ]; const Switch = [ - "Test_TC_SWTCH_1_1", "Test_TC_SWTCH_2_2", "Test_TC_SWTCH_3_1", "Test_TC_SWTCH_3_2", @@ -579,7 +576,6 @@ function getTests() { const ColorControl = [ "Test_TC_CC_1_1", "Test_TC_CC_2_1", - "Test_TC_CC_3_1", "Test_TC_CC_3_2", "Test_TC_CC_3_3", "Test_TC_CC_4_1", @@ -592,7 +588,6 @@ function getTests() { "Test_TC_CC_6_1", "Test_TC_CC_6_2", "Test_TC_CC_6_3", - "Test_TC_CC_7_1", "Test_TC_CC_7_2", "Test_TC_CC_7_3", "Test_TC_CC_7_4", @@ -750,6 +745,7 @@ function getTests() { ]; const Switch = [ + "Test_TC_SWTCH_1_1", "Test_TC_SWTCH_2_1", ]; @@ -842,6 +838,7 @@ function getTests() { "TestArmFailSafe", "TestFanControl", "TestAccessControlConstraints", + "TestLevelControlWithOnOffDependency" ]; const MultiAdmin = [ diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js index 354001d65a2a10..88b15d029d6e29 100644 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ b/src/app/zap-templates/common/ClusterTestGeneration.js @@ -25,6 +25,9 @@ const path = require('path'); // Import helpers from zap core const templateUtil = require(zapPath + 'dist/src-electron/generator/template-util.js') +const zclHelper = require(zapPath + 'dist/src-electron/generator/helper-zcl.js'); +const queryEnum = require(zapPath + 'dist/src-electron/db/query-enum'); +const queryBitmap = require(zapPath + 'dist/src-electron/db/query-bitmap'); const { getClusters, getCommands, getAttributes, getEvents, isTestOnlyCluster } = require('./simulated-clusters/SimulatedClusters.js'); @@ -1000,15 +1003,55 @@ async function chip_tests_only_cluster_response_parameters(options) function chip_tests_iterate_expected_list(values, options) { - values = values.map(value => { + let context = options.hash.context || this; + values = values.map(value => { return { - global: this.global, parent: this.parent, name: this.name, type: this.type, isArray: false, isNullable: false, value: value, + global: context.global, parent: context.parent, name: context.name, type: context.type, isArray: false, isNullable: false, + value: value, } }); return asBlocks.call(this, Promise.resolve(values), options); } +function chip_tests_iterate_constraints(constraints, options) +{ + let values = []; + for (let key of Object.keys(constraints)) { + // Skip "global", because that's not an actual constraint. + if (key == "global") { + continue; + } + values.push({ global : this.global, constraint : key, value : constraints[key] }) + } + + return asBlocks.call(this, Promise.resolve(values), options) +} + +async function asTestType(type, isList) +{ + if (isList) { + return 'list'; + } + + const pkgId = await templateUtil.ensureZclPackageId(this); + const db = this.global.db; + + const isEnum = await zclHelper.isEnum(db, type, pkgId); + if (isEnum != 'unknown') { + const enumObj = await queryEnum.selectEnumByName(db, type, pkgId); + return 'enum' + (8 * enumObj.size); + } + + const isBitmap = await zclHelper.isBitmap(db, type, pkgId); + if (isBitmap != 'unknown') { + const bitmapObj = await queryBitmap.selectBitmapByName(db, pkgId, type); + return 'bitmap' + (8 * bitmapObj.size); + } + + return type; +} + // // Module exports // @@ -1040,3 +1083,5 @@ exports.isHexString = isHexString; exports.octetStringLengthFromHexString = octetStringLengthFromHexString; exports.octetStringFromHexString = octetStringFromHexString; exports.chip_tests_iterate_expected_list = chip_tests_iterate_expected_list; +exports.chip_tests_iterate_constraints = chip_tests_iterate_constraints; +exports.asTestType = asTestType; diff --git a/src/app/zap-templates/common/override.js b/src/app/zap-templates/common/override.js index 429c37c9d4f41c..381db17a5ebae3 100644 --- a/src/app/zap-templates/common/override.js +++ b/src/app/zap-templates/common/override.js @@ -73,6 +73,7 @@ function atomicType(arg) case 'epoch_us': return 'uint64_t'; case 'epoch_s': + case 'utc': return 'uint32_t'; default: throw 'not overriding'; diff --git a/src/app/zap-templates/partials/cluster-objects-struct.zapt b/src/app/zap-templates/partials/cluster-objects-struct.zapt index 2939e4c375a664..23d22ef5965496 100644 --- a/src/app/zap-templates/partials/cluster-objects-struct.zapt +++ b/src/app/zap-templates/partials/cluster-objects-struct.zapt @@ -16,15 +16,15 @@ namespace {{asUpperCamelCase name}} { CHIP_ERROR Decode(TLV::TLVReader &reader); {{/unless}} - static constexpr bool kIsFabricScoped = {{struct_is_fabric_scoped}}; + static constexpr bool kIsFabricScoped = {{isFabricScoped}}; - {{#if struct_is_fabric_scoped}} + {{#if isFabricScoped}} auto GetFabricIndex() const { - return {{ asLowerCamelCase struct_fabric_idx_field }}; + return fabricIndex; } void SetFabricIndex(chip::FabricIndex fabricIndex_) { - {{ asLowerCamelCase struct_fabric_idx_field }} = fabricIndex_; + fabricIndex = fabricIndex_; } CHIP_ERROR EncodeForWrite(TLV::TLVWriter &writer, TLV::Tag tag) const; @@ -46,15 +46,15 @@ namespace {{asUpperCamelCase name}} { CHIP_ERROR Decode(TLV::TLVReader &reader); - static constexpr bool kIsFabricScoped = {{struct_is_fabric_scoped}}; + static constexpr bool kIsFabricScoped = {{isFabricScoped}}; - {{#if struct_is_fabric_scoped}} + {{#if isFabricScoped}} auto GetFabricIndex() const { - return {{ asLowerCamelCase struct_fabric_idx_field }}; + return fabricIndex; } void SetFabricIndex(chip::FabricIndex fabricIndex_) { - {{ asLowerCamelCase struct_fabric_idx_field }} = fabricIndex_; + fabricIndex = fabricIndex_; } {{/if}} }; @@ -65,7 +65,7 @@ namespace {{asUpperCamelCase name}} { } // namespace {{asUpperCamelCase name}} {{else}} namespace {{asUpperCamelCase name}} { -{{#if struct_is_fabric_scoped}} +{{#if isFabricScoped}} CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter &writer, TLV::Tag tag) const { return DoEncode(writer, tag, NullOptional); @@ -79,12 +79,12 @@ CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter &writer, TLV::Tag tag, FabricIndex CHIP_ERROR Type::DoEncode(TLV::TLVWriter &writer, TLV::Tag tag, const Optional & accessingFabricIndex) const { {{#if struct_has_fabric_sensitive_fields}} - bool includeSensitive = !accessingFabricIndex.HasValue() || (accessingFabricIndex.Value() == {{ asLowerCamelCase struct_fabric_idx_field }}); + bool includeSensitive = !accessingFabricIndex.HasValue() || (accessingFabricIndex.Value() == fabricIndex); {{/if}} TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); {{#zcl_struct_items}} - {{#if (isStrEqual label ../struct_fabric_idx_field)}} + {{#if (is_num_equal fieldIdentifier 254)}} if (accessingFabricIndex.HasValue()) { ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::k{{asUpperCamelCase label}})), {{asLowerCamelCase label}})); } diff --git a/src/app/zap-templates/partials/idl/command_request_response.zapt b/src/app/zap-templates/partials/idl/command_request_response.zapt index d2b3b425f08032..3f6babd4a40863 100644 --- a/src/app/zap-templates/partials/idl/command_request_response.zapt +++ b/src/app/zap-templates/partials/idl/command_request_response.zapt @@ -2,6 +2,7 @@ {{/first}} {{~indent 1~}} + {{#if isFabricScoped~}} fabric {{/if~}} {{#if mustUseTimedInvoke~}} timed {{/if~}} command {{!ensure space}} {{~#chip_access_elements entity="command"~}} diff --git a/src/app/zap-templates/partials/idl/structure_definition.zapt b/src/app/zap-templates/partials/idl/structure_definition.zapt index af6fbaea7124c0..9d58faef6735be 100644 --- a/src/app/zap-templates/partials/idl/structure_definition.zapt +++ b/src/app/zap-templates/partials/idl/structure_definition.zapt @@ -1,5 +1,6 @@ -{{#if struct_is_fabric_scoped}} -{{indent extraIndent~}} [fabric_scoped_by={{asUpperCamelCase struct_fabric_idx_field}}] +{{! TODO: IDL consumers can't parse the square bracket syntax }} +{{#if isFabricScoped_DISABLED_FOR_NOW}} +{{indent extraIndent~}} [fabric_scoped_by=FabricIndex] {{/if}} {{indent extraIndent~}} struct {{name}} { {{#zcl_struct_items}} diff --git a/src/app/zap-templates/templates/app/cluster-objects-src.zapt b/src/app/zap-templates/templates/app/cluster-objects-src.zapt index 8ae7efca79c57d..78b5c2e0dc4f44 100644 --- a/src/app/zap-templates/templates/app/cluster-objects-src.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects-src.zapt @@ -173,66 +173,32 @@ bool CommandNeedsTimedInvoke(ClusterId aCluster, CommandId aCommand) return false; } -// TODO(#20811): Actually generate the following based on ZAP metadata -// See https://github.com/project-chip/zap/issues/609 bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) { // Maybe it would be smaller code to codegen a table and walk over it? // Not sure. switch (aCluster) { - case Clusters::Groups::Id: { - switch (aCommand) - { - case Clusters::Groups::Commands::AddGroup::Id: - case Clusters::Groups::Commands::ViewGroup::Id: - case Clusters::Groups::Commands::GetGroupMembership::Id: - case Clusters::Groups::Commands::RemoveGroup::Id: - case Clusters::Groups::Commands::RemoveAllGroups::Id: - return true; - default: - return false; - } - } - case Clusters::GroupKeyManagement::Id: { - switch (aCommand) - { - case Clusters::GroupKeyManagement::Commands::KeySetWrite::Id: - case Clusters::GroupKeyManagement::Commands::KeySetRead::Id: - case Clusters::GroupKeyManagement::Commands::KeySetRemove::Id: - case Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id: - return true; - default: - return false; - } - } - case Clusters::GeneralCommissioning::Id: { - switch (aCommand) - { - case Clusters::GeneralCommissioning::Commands::CommissioningComplete::Id: - return true; - default: - return false; - } - } - case Clusters::Scenes::Id: { - // Entire cluster is fabric-scoped. - return true; - } - case Clusters::OperationalCredentials::Id: { - switch (aCommand) - { - case Clusters::OperationalCredentials::Commands::UpdateNOC::Id: - case Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id: - return true; - default: - return false; - } - } - default: - break; + {{#zcl_clusters}} + {{#zcl_commands}} + {{#first}} + case Clusters::{{asUpperCamelCase parent.name}}::Id: + { + switch (aCommand) { + {{/first}} + {{#if isFabricScoped}} + case Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Id: + return true; + {{/if}} + {{#last}} + default: + return false; + } + } + {{/last}} + {{/zcl_commands}} + {{/zcl_clusters}} } - return false; } diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index 93d7637b5005be..f88a85f578974b 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -177,15 +177,15 @@ public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } static constexpr EventId GetEventId() { return Events::{{asUpperCamelCase name}}::Id; } static constexpr ClusterId GetClusterId() { return Clusters::{{asUpperCamelCase parent.name}}::Id; } - static constexpr bool kIsFabricScoped = {{event_is_fabric_scoped}}; + static constexpr bool kIsFabricScoped = {{isFabricSensitive}}; {{#zcl_event_fields}} {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase name}}{{> cluster_objects_field_init}}; {{/zcl_event_fields}} - {{#if event_is_fabric_scoped}} + {{#if isFabricSensitive}} auto GetFabricIndex() const { - return {{ asLowerCamelCase event_fabric_idx_field }}; + return fabricIndex; } {{/if}} diff --git a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml index 97b8b8ad8b4f9b..e85f6c220f2c04 100644 --- a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml @@ -47,19 +47,17 @@ limitations under the License. - + - - + - @@ -103,22 +101,20 @@ limitations under the License. - + The cluster SHALL send AccessControlEntryChanged events whenever its ACL attribute data is changed by an Administrator. - - + The cluster SHALL send AccessControlExtensionChanged events whenever its extension attribute data is changed by an Administrator. - diff --git a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml index 25f79b10d73e59..b9ef8a0b06a4bd 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml @@ -25,7 +25,7 @@ limitations under the License. true This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. VendorName - VendorID + VendorID ApplicationName ProductID Application diff --git a/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml index f6a1ed2b4917f7..b111eaab078639 100644 --- a/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml @@ -75,6 +75,7 @@ limitations under the License. The Leave event SHOULD be emitted by a Node prior to permanently leaving the Fabric. + This event (when supported) SHALL be generated when there is a change in the Reachable attribute. diff --git a/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml index f7cecaf94bf083..61db59a1b29c74 100644 --- a/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml @@ -17,13 +17,12 @@ limitations under the License. - + - diff --git a/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml b/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml index 5dd8b9d7ba0aae..99d2fc6483e396 100644 --- a/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml +++ b/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml @@ -108,11 +108,10 @@ limitations under the License. - + - OTA Software Update Requestor diff --git a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml index 0d913e68dc9653..e67874d6bcd5dd 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml @@ -74,7 +74,7 @@ limitations under the License. - + Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. diff --git a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml index e38bde96295c61..980f5e45db6085 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml @@ -97,6 +97,7 @@ limitations under the License. Provide a means for certification tests to trigger some test-plan-specific events + diff --git a/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml index f278ce48644d30..5addebd25e05cf 100644 --- a/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml @@ -17,19 +17,17 @@ limitations under the License. - + - - + - @@ -65,13 +63,13 @@ limitations under the License. MaxGroupsPerFabric MaxGroupKeysPerFabric - + Revoke a Root Key from a Group - + Revoke a Root Key from a Group @@ -84,13 +82,13 @@ limitations under the License. - + Revoke a Root Key from a Group - + Return the list of Group Key Sets associated with the accessing fabric 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 36ffc95d2f7deb..705816a3852d9f 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 @@ -240,9 +240,6 @@ limitations under the License. CLIENT_LIST PARTS_LIST - - BINDING - GROUP_NAME_SUPPORT AddGroup @@ -289,7 +286,7 @@ limitations under the License. OnWithRecallGlobalScene OnWithTimedOff - + CURRENT_LEVEL OPTIONS LEVEL_CONTROL_REMAINING_TIME @@ -303,7 +300,7 @@ limitations under the License. StepWithOnOff StopWithOnOff - + diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml index 7fe5aa904143fd..a7356263f60138 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml @@ -17,14 +17,13 @@ limitations under the License. - + - @@ -36,17 +35,15 @@ limitations under the License. - - + - @@ -64,7 +61,7 @@ limitations under the License. SupportedFabrics CommissionedFabrics TrustedRootCertificates - CurrentFabricIndex + CurrentFabricIndex Sender is requesting attestation information from the receiver. @@ -113,7 +110,7 @@ limitations under the License. - + Sender is requesting to update the node operational certificates. @@ -127,7 +124,7 @@ limitations under the License. - + This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. 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 a7f8957b52f902..3653e5c1db6530 100644 --- a/src/app/zap-templates/zcl/data-model/chip/scene.xml +++ b/src/app/zap-templates/zcl/data-model/chip/scene.xml @@ -52,7 +52,7 @@ limitations under the License. NameSupport LastConfiguredBy - + Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' @@ -64,7 +64,7 @@ limitations under the License. - + Retrieves the requested scene entry from its Scene table. @@ -72,7 +72,7 @@ limitations under the License. - + Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table @@ -81,7 +81,7 @@ limitations under the License. - + Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table @@ -89,7 +89,7 @@ limitations under the License. - + Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint @@ -98,7 +98,7 @@ limitations under the License. - + Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table @@ -107,14 +107,14 @@ limitations under the License. - + Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group - + Allows a scene to be added using a finer scene transition time than the AddScene command. @@ -124,14 +124,14 @@ limitations under the License. - + Allows a scene to be retrieved using a finer scene transition time than the ViewScene command - + Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. @@ -234,4 +234,4 @@ limitations under the License. - \ No newline at end of file + diff --git a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml index 2af47d21b36e31..ba5db80d1708ef 100644 --- a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml @@ -22,7 +22,7 @@ limitations under the License. - + @@ -31,7 +31,6 @@ limitations under the License. - @@ -575,9 +574,8 @@ limitations under the License. - + Example test event - diff --git a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml index b1f0608e9f0be5..00d568567a8ddc 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml @@ -111,7 +111,7 @@ limitations under the License. ThermostatRunningState SetpointChangeSource SetpointChangeAmount - SetpointChangeSourceTimestamp + SetpointChangeSourceTimestamp OccupiedSetback diff --git a/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml index 6049f4e0d0e204..d6c7adf1e5dccc 100644 --- a/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml @@ -35,7 +35,7 @@ limitations under the License. mechanism by which they can be configured to use a user’s preferred unit. - TemperatureUnit + TemperatureUnit diff --git a/src/app/zap-templates/zcl/data-model/silabs/general.xml b/src/app/zap-templates/zcl/data-model/silabs/general.xml index d384934248d8eb..aa193556df3bd8 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/general.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -100,7 +100,7 @@ limitations under the License. name support - + Command description for AddGroup @@ -108,32 +108,32 @@ limitations under the License. - + Command description for ViewGroup - + Command description for GetGroupMembership - + Command description for RemoveGroup - + Command description for RemoveAllGroups - + Command description for AddGroupIfIdentifying @@ -216,8 +216,8 @@ limitations under the License. - - + + @@ -225,8 +225,8 @@ limitations under the License. - - + + @@ -235,15 +235,15 @@ limitations under the License. - - + + Command description for Stop - - + + @@ -251,6 +251,8 @@ limitations under the License. + + @@ -258,6 +260,8 @@ limitations under the License. + + @@ -266,11 +270,15 @@ limitations under the License. + + Command description for StopWithOnOff + + 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 40c98531cb6c03..83b1b3daec0dbb 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -259,5 +259,11 @@ ] }, "defaultReportingPolicy": "mandatory", - "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"] + "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], + "fabricHandling": { + "automaticallyCreateFields": true, + "indexFieldId": 254, + "indexFieldName": "FabricIndex", + "indexType": "fabric_idx" + } } diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index c66942a00ce454..525bf98efe4a82 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -253,5 +253,11 @@ ] }, "defaultReportingPolicy": "mandatory", - "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"] + "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], + "fabricHandling": { + "automaticallyCreateFields": true, + "indexFieldId": 254, + "indexFieldName": "FabricIndex", + "indexType": "fabric_idx" + } } diff --git a/src/ble/BleConnectionDelegate.h b/src/ble/BleConnectionDelegate.h index 811874c95b9299..694cb26e5bf36b 100644 --- a/src/ble/BleConnectionDelegate.h +++ b/src/ble/BleConnectionDelegate.h @@ -27,6 +27,7 @@ #include #include +#include namespace chip { namespace Ble { @@ -51,8 +52,8 @@ class DLL_EXPORT BleConnectionDelegate OnConnectionErrorFunct OnConnectionError; // Call this function to delegate the connection steps required to get a BLE_CONNECTION_OBJECT - // out of a peripheral discriminator. - virtual void NewConnection(BleLayer * bleLayer, void * appState, uint16_t connDiscriminator) = 0; + // out of a peripheral that matches the given discriminator. + virtual void NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) = 0; // Call this function to stop the connection virtual CHIP_ERROR CancelConnection() = 0; diff --git a/src/ble/BleLayer.cpp b/src/ble/BleLayer.cpp index 624270446f6226..881ba991cc3036 100644 --- a/src/ble/BleLayer.cpp +++ b/src/ble/BleLayer.cpp @@ -371,7 +371,7 @@ CHIP_ERROR BleLayer::CancelBleIncompleteConnection() return err; } -CHIP_ERROR BleLayer::NewBleConnectionByDiscriminator(uint16_t connDiscriminator, void * appState, +CHIP_ERROR BleLayer::NewBleConnectionByDiscriminator(const SetupDiscriminator & connDiscriminator, void * appState, BleConnectionDelegate::OnConnectionCompleteFunct onSuccess, BleConnectionDelegate::OnConnectionErrorFunct onError) { diff --git a/src/ble/BleLayer.h b/src/ble/BleLayer.h index c4bc3582dcc7ad..9d57ddee8536e9 100644 --- a/src/ble/BleLayer.h +++ b/src/ble/BleLayer.h @@ -54,6 +54,7 @@ #include +#include #include #include @@ -245,7 +246,7 @@ class DLL_EXPORT BleLayer void Shutdown(); CHIP_ERROR CancelBleIncompleteConnection(); - CHIP_ERROR NewBleConnectionByDiscriminator(uint16_t connDiscriminator, void * appState = nullptr, + CHIP_ERROR NewBleConnectionByDiscriminator(const SetupDiscriminator & connDiscriminator, void * appState = nullptr, BleConnectionDelegate::OnConnectionCompleteFunct onSuccess = OnConnectionComplete, BleConnectionDelegate::OnConnectionErrorFunct onError = OnConnectionError); CHIP_ERROR NewBleConnectionByObject(BLE_CONNECTION_OBJECT connObj); diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index 4ddd081e46ed04..0feec835699252 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -45,6 +45,12 @@ void AutoCommissioner::SetOperationalCredentialsDelegate(OperationalCredentialsD CHIP_ERROR AutoCommissioner::SetCommissioningParameters(const CommissioningParameters & params) { mParams = params; + if (params.GetFailsafeTimerSeconds().HasValue()) + { + ChipLogProgress(Controller, "Setting failsafe timer from parameters"); + mParams.SetFailsafeTimerSeconds(params.GetFailsafeTimerSeconds().Value()); + } + if (params.GetThreadOperationalDataset().HasValue()) { ByteSpan dataset = params.GetThreadOperationalDataset().Value(); @@ -57,6 +63,13 @@ CHIP_ERROR AutoCommissioner::SetCommissioningParameters(const CommissioningParam ChipLogProgress(Controller, "Setting thread operational dataset from parameters"); mParams.SetThreadOperationalDataset(ByteSpan(mThreadOperationalDataset, dataset.size())); } + + if (params.GetAttemptThreadNetworkScan().HasValue()) + { + ChipLogProgress(Controller, "Setting attempt thread scan from parameters"); + mParams.SetAttemptThreadNetworkScan(params.GetAttemptThreadNetworkScan().Value()); + } + if (params.GetWiFiCredentials().HasValue()) { WiFiCredentials creds = params.GetWiFiCredentials().Value(); @@ -73,6 +86,12 @@ CHIP_ERROR AutoCommissioner::SetCommissioningParameters(const CommissioningParam WiFiCredentials(ByteSpan(mSsid, creds.ssid.size()), ByteSpan(mCredentials, creds.credentials.size()))); } + if (params.GetAttemptWiFiNetworkScan().HasValue()) + { + ChipLogProgress(Controller, "Setting attempt wifi scan from parameters"); + mParams.SetAttemptWiFiNetworkScan(params.GetAttemptWiFiNetworkScan().Value()); + } + if (params.GetCountryCode().HasValue()) { auto & code = params.GetCountryCode().Value(); @@ -159,6 +178,25 @@ CommissioningStage AutoCommissioner::GetNextCommissioningStageInternal(Commissio } return CommissioningStage::kArmFailsafe; case CommissioningStage::kArmFailsafe: + if (mNeedsNetworkSetup) + { + // if there is a WiFi or a Thread endpoint, then perform scan + if ((mParams.GetAttemptWiFiNetworkScan().ValueOr(false) && + mDeviceCommissioningInfo.network.wifi.endpoint != kInvalidEndpointId) || + (mParams.GetAttemptThreadNetworkScan().ValueOr(false) && + mDeviceCommissioningInfo.network.thread.endpoint != kInvalidEndpointId)) + { + return CommissioningStage::kScanNetworks; + } + ChipLogProgress(Controller, "No NetworkScan enabled or WiFi/Thread endpoint not specified, skipping ScanNetworks"); + } + else + { + ChipLogProgress(Controller, "Not a BLE connection, skipping ScanNetworks"); + } + // skip scan step + return CommissioningStage::kConfigRegulatory; + case CommissioningStage::kScanNetworks: return CommissioningStage::kConfigRegulatory; case CommissioningStage::kConfigRegulatory: return CommissioningStage::kSendPAICertificateRequest; @@ -490,26 +528,68 @@ CHIP_ERROR AutoCommissioner::CommissioningStepFinished(CHIP_ERROR err, Commissio { completionStatus.err = err; } + mParams.SetCompletionStatus(completionStatus); + + if (mCommissioningPaused) + { + mPausedStage = nextStage; + + if (GetDeviceProxyForStep(nextStage) == nullptr) + { + ChipLogError(Controller, "Invalid device for commissioning"); + return CHIP_ERROR_INCORRECT_STATE; + } + return CHIP_NO_ERROR; + } + return PerformStep(nextStage); +} - DeviceProxy * proxy = mCommissioneeDeviceProxy; +DeviceProxy * AutoCommissioner::GetDeviceProxyForStep(CommissioningStage nextStage) +{ if (nextStage == CommissioningStage::kSendComplete || (nextStage == CommissioningStage::kCleanup && mOperationalDeviceProxy != nullptr)) { - proxy = mOperationalDeviceProxy; + return mOperationalDeviceProxy; } + return mCommissioneeDeviceProxy; +} +CHIP_ERROR AutoCommissioner::PerformStep(CommissioningStage nextStage) +{ + DeviceProxy * proxy = GetDeviceProxyForStep(nextStage); if (proxy == nullptr) { ChipLogError(Controller, "Invalid device for commissioning"); return CHIP_ERROR_INCORRECT_STATE; } - mParams.SetCompletionStatus(completionStatus); mCommissioner->PerformCommissioningStep(proxy, nextStage, mParams, this, GetEndpoint(nextStage), GetCommandTimeout(proxy, nextStage)); return CHIP_NO_ERROR; } +void AutoCommissioner::PauseCommissioning() +{ + mCommissioningPaused = true; +} + +CHIP_ERROR AutoCommissioner::ResumeCommissioning() +{ + VerifyOrReturnError(mCommissioningPaused, CHIP_ERROR_INCORRECT_STATE); + mCommissioningPaused = false; + + // if no new step was attempted + if (mPausedStage == CommissioningStage::kError) + { + return CHIP_NO_ERROR; + } + + CommissioningStage nextStage = mPausedStage; + mPausedStage = CommissioningStage::kError; + + return PerformStep(nextStage); +} + void AutoCommissioner::ReleaseDAC() { if (mDAC != nullptr) diff --git a/src/controller/AutoCommissioner.h b/src/controller/AutoCommissioner.h index b6df47deb6bf64..422b6ef26911d9 100644 --- a/src/controller/AutoCommissioner.h +++ b/src/controller/AutoCommissioner.h @@ -38,11 +38,32 @@ class AutoCommissioner : public CommissioningDelegate CHIP_ERROR CommissioningStepFinished(CHIP_ERROR err, CommissioningDelegate::CommissioningReport report) override; + /** + * @brief + * This function puts the AutoCommissioner in a paused state to prevent advancing to the next stage. + * It is expected that a DevicePairingDelegate may call this method when processing the + * OnCommissioningStatusUpdate, for example, in order to obtain network credentials from the user based + * upon the results of the NetworkScan. + * Use ResumeCommissioning to continue the commissioning process. + * + */ + void PauseCommissioning(); + + /** + * @brief + * An error return value means resume failed, for example: + * - AutoCommissioner was not in a paused state. + * - AutoCommissioner was unable to continue (no DeviceProxy) + */ + CHIP_ERROR ResumeCommissioning(); + protected: CommissioningStage GetNextCommissioningStage(CommissioningStage currentStage, CHIP_ERROR & lastErr); DeviceCommissioner * GetCommissioner() { return mCommissioner; } + CHIP_ERROR PerformStep(CommissioningStage nextStage); private: + DeviceProxy * GetDeviceProxyForStep(CommissioningStage nextStage); void ReleaseDAC(); void ReleasePAI(); @@ -75,6 +96,9 @@ class AutoCommissioner : public CommissioningDelegate bool mNeedsNetworkSetup = false; ReadCommissioningInfo mDeviceCommissioningInfo; + CommissioningStage mPausedStage = CommissioningStage::kError; + bool mCommissioningPaused = false; + // TODO: Why were the nonces statically allocated, but the certs dynamically allocated? uint8_t * mDAC = nullptr; uint16_t mDACLen = 0; diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 9543c1c3414e94..d8217d2833b89b 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -97,8 +97,6 @@ using namespace chip::Encoding; using namespace chip::Protocols::UserDirectedCommissioning; #endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY -constexpr uint32_t kSessionEstablishmentTimeout = 40 * kMillisecondsPerSecond; - DeviceController::DeviceController() { mState = State::NotInitialized; @@ -323,14 +321,14 @@ void DeviceController::ReleaseOperationalDevice(NodeId remoteNodeId) { VerifyOrReturn(mState == State::Initialized && mFabricIndex != kUndefinedFabricIndex, ChipLogError(Controller, "ReleaseOperationalDevice was called in incorrect state")); - mSystemState->CASESessionMgr()->ReleaseSession(PeerId(GetCompressedFabricId(), remoteNodeId)); + mSystemState->CASESessionMgr()->ReleaseSession(GetPeerScopedId(remoteNodeId)); } CHIP_ERROR DeviceController::DisconnectDevice(NodeId nodeId) { ChipLogProgress(Controller, "Force close session for node 0x%" PRIx64, nodeId); - OperationalDeviceProxy * proxy = mSystemState->CASESessionMgr()->FindExistingSession(PeerId(GetCompressedFabricId(), nodeId)); + OperationalDeviceProxy * proxy = mSystemState->CASESessionMgr()->FindExistingSession(GetPeerScopedId(nodeId)); if (proxy == nullptr) { ChipLogProgress(Controller, "Attempted to close a session that does not exist."); @@ -355,11 +353,11 @@ CHIP_ERROR DeviceController::DisconnectDevice(NodeId nodeId) return CHIP_NO_ERROR; } -CHIP_ERROR DeviceController::GetPeerAddressAndPort(PeerId peerId, Inet::IPAddress & addr, uint16_t & port) +CHIP_ERROR DeviceController::GetPeerAddressAndPort(NodeId peerId, Inet::IPAddress & addr, uint16_t & port) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); Transport::PeerAddress peerAddr; - ReturnErrorOnFailure(mSystemState->CASESessionMgr()->GetPeerAddress(peerId, peerAddr)); + ReturnErrorOnFailure(mSystemState->CASESessionMgr()->GetPeerAddress(GetPeerScopedId(peerId), peerAddr)); addr = peerAddr.GetIPAddress(); port = peerAddr.GetPort(); return CHIP_NO_ERROR; @@ -368,8 +366,8 @@ CHIP_ERROR DeviceController::GetPeerAddressAndPort(PeerId peerId, Inet::IPAddres CHIP_ERROR DeviceController::GetPeerAddress(NodeId nodeId, Transport::PeerAddress & addr) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mSystemState->CASESessionMgr()->GetPeerAddress( - PeerId().SetCompressedFabricId(GetCompressedFabricId()).SetNodeId(nodeId), addr)); + ReturnErrorOnFailure(mSystemState->CASESessionMgr()->GetPeerAddress(GetPeerScopedId(nodeId), addr)); + return CHIP_NO_ERROR; } @@ -546,6 +544,10 @@ void DeviceCommissioner::ReleaseCommissioneeDevice(CommissioneeDeviceProxy * dev { mDeviceInPASEEstablishment = nullptr; } + if (mDeviceBeingCommissioned == device) + { + mDeviceBeingCommissioned = nullptr; + } } CHIP_ERROR DeviceCommissioner::GetDeviceBeingCommissioned(NodeId deviceId, CommissioneeDeviceProxy ** out_device) @@ -682,7 +684,9 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re } else if (params.HasDiscriminator()) { - SuccessOrExit(err = mSystemState->BleLayer()->NewBleConnectionByDiscriminator(params.GetDiscriminator())); + SetupDiscriminator discriminator; + discriminator.SetLongValue(params.GetDiscriminator()); + SuccessOrExit(err = mSystemState->BleLayer()->NewBleConnectionByDiscriminator(discriminator)); } else { @@ -759,9 +763,6 @@ CHIP_ERROR DeviceCommissioner::Commission(NodeId remoteDeviceId) ChipLogProgress(Controller, "Commission called for node ID 0x" ChipLogFormatX64, ChipLogValueX64(remoteDeviceId)); - mSystemState->SystemLayer()->StartTimer(chip::System::Clock::Milliseconds32(kSessionEstablishmentTimeout), - OnSessionEstablishmentTimeoutCallback, this); - mDefaultCommissioner->SetOperationalCredentialsDelegate(mOperationalCredentialsDelegate); if (device->IsSecureConnected()) { @@ -859,9 +860,6 @@ void DeviceCommissioner::RendezvousCleanup(CHIP_ERROR status) void DeviceCommissioner::OnSessionEstablishmentError(CHIP_ERROR err) { - // PASE session establishment failure. - mSystemState->SystemLayer()->CancelTimer(OnSessionEstablishmentTimeoutCallback, this); - if (mPairingDelegate != nullptr) { mPairingDelegate->OnStatusUpdate(DevicePairingDelegate::SecurePairingFailed); @@ -977,6 +975,12 @@ void DeviceCommissioner::OnDeviceAttestationInformationVerification(void * conte MATTER_TRACE_EVENT_SCOPE("OnDeviceAttestationInformationVerification", "DeviceCommissioner"); DeviceCommissioner * commissioner = reinterpret_cast(context); + if (!commissioner->mDeviceBeingCommissioned) + { + ChipLogError(Controller, "Device attestation verification result received when we're not commissioning a device"); + return; + } + if (result != AttestationVerificationResult::kSuccess) { CommissioningDelegate::CommissioningReport report; @@ -1277,8 +1281,6 @@ CHIP_ERROR DeviceCommissioner::ConvertFromOperationalCertStatus(OperationalCrede return CHIP_ERROR_INVALID_ADMIN_SUBJECT; case OperationalCertStatus::kFabricConflict: return CHIP_ERROR_FABRIC_EXISTS; - case OperationalCertStatus::kInsufficientPrivilege: - return CHIP_ERROR_INSUFFICIENT_PRIVILEGE; case OperationalCertStatus::kLabelConflict: return CHIP_ERROR_INVALID_ARGUMENT; case OperationalCertStatus::kInvalidFabricIndex: @@ -1365,8 +1367,6 @@ CHIP_ERROR DeviceCommissioner::OnOperationalCredentialsProvisioningCompletion(De ChipLogProgress(Controller, "Operational credentials provisioned on device %p", device); VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - mSystemState->SystemLayer()->CancelTimer(OnSessionEstablishmentTimeoutCallback, this); - if (mPairingDelegate != nullptr) { mPairingDelegate->OnStatusUpdate(DevicePairingDelegate::SecurePairingSuccess); @@ -1397,26 +1397,6 @@ void DeviceCommissioner::CloseBleConnection() } #endif -void DeviceCommissioner::OnSessionEstablishmentTimeout() -{ - // This is called from the session establishment timer. Please see - // https://github.com/project-chip/connectedhomeip/issues/14650 - VerifyOrReturn(mState == State::Initialized); - VerifyOrReturn(mDeviceBeingCommissioned != nullptr); - - StopPairing(mDeviceBeingCommissioned->GetDeviceId()); - - if (mPairingDelegate != nullptr) - { - mPairingDelegate->OnPairingComplete(CHIP_ERROR_TIMEOUT); - } -} - -void DeviceCommissioner::OnSessionEstablishmentTimeoutCallback(System::Layer * aLayer, void * aAppState) -{ - static_cast(aAppState)->OnSessionEstablishmentTimeout(); -} - CHIP_ERROR DeviceCommissioner::DiscoverCommissionableNodes(Dnssd::DiscoveryFilter filter) { ReturnErrorOnFailure(SetUpNodeDiscovery()); @@ -1524,6 +1504,10 @@ void DeviceCommissioner::OnDisarmFailsafeFailure(void * context, CHIP_ERROR erro void DeviceCommissioner::DisarmDone() { + // If someone nulled out our mDeviceBeingCommissioned, there's nothing else + // to do here. + VerifyOrReturn(mDeviceBeingCommissioned != nullptr); + // At this point, we also want to close off the pase session so we need to re-establish CommissioneeDeviceProxy * commissionee = FindCommissioneeDevice(mDeviceBeingCommissioned->GetDeviceId()); @@ -1572,6 +1556,7 @@ void DeviceCommissioner::CommissioningStageComplete(CHIP_ERROR err, Commissionin { mPairingDelegate->OnCommissioningStatusUpdate(PeerId(GetCompressedFabricId(), nodeId), mCommissioningStage, err); } + if (mCommissioningDelegate == nullptr) { return; @@ -1619,7 +1604,7 @@ void DeviceCommissioner::OnDeviceConnectedFn(void * context, OperationalDevicePr } } -void DeviceCommissioner::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error) +void DeviceCommissioner::OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { // CASE session establishment failed. DeviceCommissioner * commissioner = static_cast(context); @@ -1727,20 +1712,27 @@ void DeviceCommissioner::OnDone(app::ReadClient *) { if (features.Has(app::Clusters::NetworkCommissioning::NetworkCommissioningFeature::kWiFiNetworkInterface)) { + ChipLogProgress(Controller, "----- NetworkCommissioning Features: has WiFi. endpointid = %u", + path.mEndpointId); info.network.wifi.endpoint = path.mEndpointId; } else if (features.Has( app::Clusters::NetworkCommissioning::NetworkCommissioningFeature::kThreadNetworkInterface)) { + ChipLogProgress(Controller, "----- NetworkCommissioning Features: has Thread. endpointid = %u", + path.mEndpointId); info.network.thread.endpoint = path.mEndpointId; } else if (features.Has( app::Clusters::NetworkCommissioning::NetworkCommissioningFeature::kEthernetNetworkInterface)) { + ChipLogProgress(Controller, "----- NetworkCommissioning Features: has Ethernet. endpointid = %u", + path.mEndpointId); info.network.eth.endpoint = path.mEndpointId; } else { + ChipLogProgress(Controller, "----- NetworkCommissioning Features: no features."); // TODO: Gross workaround for the empty feature map on all clusters. Remove. if (info.network.thread.endpoint == kInvalidEndpointId) { @@ -1789,6 +1781,12 @@ void DeviceCommissioner::OnDone(app::ReadClient *) } mAttributeCache = nullptr; mReadClient = nullptr; + + if (mPairingDelegate != nullptr) + { + mPairingDelegate->OnReadCommissioningInfo(info); + } + CommissioningDelegate::CommissioningReport report; report.Set(info); CommissioningStageComplete(return_err, report); @@ -1827,6 +1825,39 @@ void DeviceCommissioner::OnSetRegulatoryConfigResponse( commissioner->CommissioningStageComplete(err, report); } +void DeviceCommissioner::OnScanNetworksFailure(void * context, CHIP_ERROR error) +{ + ChipLogProgress(Controller, "Received ScanNetworks failure response %" CHIP_ERROR_FORMAT, error.Format()); + + DeviceCommissioner * commissioner = static_cast(context); + if (commissioner->GetPairingDelegate() != nullptr) + { + commissioner->GetPairingDelegate()->OnScanNetworksFailure(error); + } + // need to advance to next step + // clear error so that we don't abort the commissioning when ScanNetworks fails + commissioner->CommissioningStageComplete(CHIP_NO_ERROR); +} + +void DeviceCommissioner::OnScanNetworksResponse(void * context, + const NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & data) +{ + CommissioningDelegate::CommissioningReport report; + + ChipLogProgress(Controller, "Received ScanNetwork response, networkingStatus=%u debugText=%s", + to_underlying(data.networkingStatus), + (data.debugText.HasValue() ? std::string(data.debugText.Value().data(), data.debugText.Value().size()).c_str() + : "none provided")); + DeviceCommissioner * commissioner = static_cast(context); + + if (commissioner->GetPairingDelegate() != nullptr) + { + commissioner->GetPairingDelegate()->OnScanNetworksSuccess(data); + } + // need to advance to next step + commissioner->CommissioningStageComplete(CHIP_NO_ERROR); +} + void DeviceCommissioner::OnNetworkConfigResponse(void * context, const NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data) { @@ -1956,6 +1987,16 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio mReadClient = std::move(readClient); } break; + case CommissioningStage::kScanNetworks: { + NetworkCommissioning::Commands::ScanNetworks::Type request; + if (params.GetWiFiCredentials().HasValue()) + { + request.ssid.Emplace(params.GetWiFiCredentials().Value().ssid); + } + request.breadcrumb.Emplace(breadcrumb); + SendCommand(proxy, request, OnScanNetworksResponse, OnScanNetworksFailure, endpoint, timeout); + break; + } case CommissioningStage::kConfigRegulatory: { // To set during config phase: // UTC time @@ -2121,6 +2162,7 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio CommissioningStageComplete(err); return; } + err = proxy->SetPeerId(params.GetRootCert().Value(), params.GetNoc().Value()); if (err != CHIP_NO_ERROR) { @@ -2235,18 +2277,18 @@ CHIP_ERROR DeviceController::UpdateDevice(NodeId peerNodeId) { VerifyOrReturnError(mState == State::Initialized && mFabricIndex != kUndefinedFabricIndex, CHIP_ERROR_INCORRECT_STATE); - OperationalDeviceProxy * proxy = GetDeviceSession(PeerId(GetCompressedFabricId(), peerNodeId)); + OperationalDeviceProxy * proxy = GetDeviceSession(GetPeerScopedId(peerNodeId)); VerifyOrReturnError(proxy != nullptr, CHIP_ERROR_NOT_FOUND); return proxy->LookupPeerAddress(); } -OperationalDeviceProxy * DeviceController::GetDeviceSession(const PeerId & peerId) +OperationalDeviceProxy * DeviceController::GetDeviceSession(const ScopedNodeId & peerId) { return mSystemState->CASESessionMgr()->FindExistingSession(peerId); } -OperationalDeviceProxy * DeviceCommissioner::GetDeviceSession(const PeerId & peerId) +OperationalDeviceProxy * DeviceCommissioner::GetDeviceSession(const ScopedNodeId & peerId) { mSystemState->CASESessionMgr()->FindOrEstablishSession(peerId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 3ac9f77ebfa2d7..e963a300ef47a3 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -165,19 +165,21 @@ class DLL_EXPORT DeviceController : public AbstractDnssdDiscoveryController return nullptr; } - CHIP_ERROR GetPeerAddressAndPort(PeerId peerId, Inet::IPAddress & addr, uint16_t & port); + CHIP_ERROR GetPeerAddressAndPort(NodeId peerId, Inet::IPAddress & addr, uint16_t & port); /** * @brief * Looks up the PeerAddress for an established CASE session. * - * @param[in] nodeId the PeerId of the session to be found + * @param[in] nodeId the NodeId of the target. * @param[out] addr the PeerAddress to be filled on success * * @return CHIP_ERROR CHIP_ERROR_NOT_CONNECTED if no CASE session exists for the device */ CHIP_ERROR GetPeerAddress(NodeId nodeId, Transport::PeerAddress & addr); + ScopedNodeId GetPeerScopedId(NodeId nodeId) { return ScopedNodeId(nodeId, GetFabricIndex()); } + /** * This function finds the device corresponding to deviceId, and establishes * a CASE session with it. @@ -196,8 +198,7 @@ class DLL_EXPORT DeviceController : public AbstractDnssdDiscoveryController chip::Callback::Callback * onFailure) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); - mSystemState->CASESessionMgr()->FindOrEstablishSession(PeerId(GetCompressedFabricId(), peerNodeId), onConnection, - onFailure); + mSystemState->CASESessionMgr()->FindOrEstablishSession(ScopedNodeId(peerNodeId, GetFabricIndex()), onConnection, onFailure); return CHIP_NO_ERROR; } @@ -358,7 +359,7 @@ class DLL_EXPORT DeviceController : public AbstractDnssdDiscoveryController /// Fetches the session to use for the current device. Allows overriding /// in case subclasses want to create the session if it does not yet exist - virtual OperationalDeviceProxy * GetDeviceSession(const PeerId & peerId); + virtual OperationalDeviceProxy * GetDeviceSession(const ScopedNodeId & peerId); DiscoveredNodeList GetDiscoveredNodes() override { return DiscoveredNodeList(mCommissionableNodes); } @@ -648,7 +649,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, void OnDone(app::ReadClient *) override; // Commissioner will establish new device connections after PASE. - OperationalDeviceProxy * GetDeviceSession(const PeerId & peerId) override; + OperationalDeviceProxy * GetDeviceSession(const ScopedNodeId & peerId) override; // Issue an NOC chain using the associated OperationalCredentialsDelegate. The NOC chain will // be provided in X509 DER format. @@ -677,10 +678,6 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, CHIP_ERROR LoadKeyId(PersistentStorageDelegate * delegate, uint16_t & out); - void OnSessionEstablishmentTimeout(); - - static void OnSessionEstablishmentTimeoutCallback(System::Layer * aLayer, void * aAppState); - /* This function sends a Device Attestation Certificate chain request to the device. The function does not hold a reference to the device object. */ @@ -752,7 +749,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, static void OnRootCertFailureResponse(void * context, CHIP_ERROR error); static void OnDeviceConnectedFn(void * context, OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); static void OnDeviceAttestationInformationVerification(void * context, Credentials::AttestationVerificationResult result); @@ -764,8 +761,12 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, void * context, const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & data); static void + OnScanNetworksResponse(void * context, + const app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & data); + static void OnScanNetworksFailure(void * context, CHIP_ERROR err); + static void OnNetworkConfigResponse(void * context, - const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data); + const app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data); static void OnConnectNetworkResponse( void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & data); static void OnCommissioningCompleteResponse( diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index 84f67a96883003..701259d6989308 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -205,8 +205,6 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) InitDataModelHandler(stateParams.exchangeMgr); - ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->Init(stateParams.exchangeMgr, stateParams.fabricTable)); - ReturnErrorOnFailure(Dnssd::Resolver::Instance().Init(stateParams.udpEndPointManager)); if (params.enableServerInteractions) @@ -266,6 +264,9 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) stateParams.caseSessionManager = Platform::New(); ReturnErrorOnFailure(stateParams.caseSessionManager->Init(stateParams.systemLayer, sessionManagerConfig)); + ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->Init(stateParams.exchangeMgr, stateParams.fabricTable, + stateParams.caseSessionManager)); + // store the system state mSystemState = chip::Platform::New(std::move(stateParams)); mSystemState->SetTempFabricTable(tempFabricTable); diff --git a/src/controller/CommissioningDelegate.cpp b/src/controller/CommissioningDelegate.cpp index 82834ce3854ae8..01d9c6ecd90f88 100644 --- a/src/controller/CommissioningDelegate.cpp +++ b/src/controller/CommissioningDelegate.cpp @@ -41,6 +41,10 @@ const char * StageToString(CommissioningStage stage) return "ArmFailSafe"; break; + case kScanNetworks: + return "ScanNetworks"; + break; + case kConfigRegulatory: return "ConfigRegulatory"; break; diff --git a/src/controller/CommissioningDelegate.h b/src/controller/CommissioningDelegate.h index 58cc4131569690..22d651e2c4be03 100644 --- a/src/controller/CommissioningDelegate.h +++ b/src/controller/CommissioningDelegate.h @@ -52,6 +52,9 @@ enum CommissioningStage : uint8_t kFindOperational, kSendComplete, kCleanup, + // ScanNetworks can happen anytime after kArmFailsafe. + // However, the circ tests fail if it is earlier in the list + kScanNetworks, }; const char * StageToString(CommissioningStage stage); @@ -261,10 +264,12 @@ class CommissioningParameters return *this; } + // If a ThreadOperationalDataset is provided, then the ThreadNetworkScan will not be attempted CommissioningParameters & SetThreadOperationalDataset(ByteSpan threadOperationalDataset) { mThreadOperationalDataset.SetValue(threadOperationalDataset); + mAttemptThreadNetworkScan = MakeOptional(static_cast(false)); return *this; } // This parameter should be set with the information returned from kSendOpCertSigningRequest. It must be set before calling @@ -352,6 +357,26 @@ class CommissioningParameters Credentials::DeviceAttestationDelegate * GetDeviceAttestationDelegate() const { return mDeviceAttestationDelegate; } + // If an SSID is provided, and AttemptWiFiNetworkScan is true, + // then a directed scan will be performed using the SSID provided in the WiFiCredentials object + Optional GetAttemptWiFiNetworkScan() const { return mAttemptWiFiNetworkScan; } + CommissioningParameters & SetAttemptWiFiNetworkScan(bool attemptWiFiNetworkScan) + { + mAttemptWiFiNetworkScan = MakeOptional(attemptWiFiNetworkScan); + return *this; + } + + // If a ThreadOperationalDataset is provided, then the ThreadNetworkScan will not be attempted + Optional GetAttemptThreadNetworkScan() const { return mAttemptThreadNetworkScan; } + CommissioningParameters & SetAttemptThreadNetworkScan(bool attemptThreadNetworkScan) + { + if (!mThreadOperationalDataset.HasValue()) + { + mAttemptThreadNetworkScan = MakeOptional(attemptThreadNetworkScan); + } + return *this; + } + private: // Items that can be set by the commissioner Optional mFailsafeTimerSeconds; @@ -379,6 +404,8 @@ class CommissioningParameters CompletionStatus completionStatus; Credentials::DeviceAttestationDelegate * mDeviceAttestationDelegate = nullptr; // Delegate to handle device attestation failures during commissioning + Optional mAttemptWiFiNetworkScan; + Optional mAttemptThreadNetworkScan; // This automatically gets set to false when a ThreadOperationalDataset is set }; struct RequestedCertificate diff --git a/src/controller/CommissioningWindowOpener.cpp b/src/controller/CommissioningWindowOpener.cpp index c0761cac49e111..95eb4d7c7d2a77 100644 --- a/src/controller/CommissioningWindowOpener.cpp +++ b/src/controller/CommissioningWindowOpener.cpp @@ -96,8 +96,8 @@ CHIP_ERROR CommissioningWindowOpener::OpenCommissioningWindow(NodeId deviceId, S mPBKDFSalt = ByteSpan(mPBKDFSaltBuffer); } - mSetupPayload.version = 0; - mSetupPayload.discriminator = discriminator; + mSetupPayload.version = 0; + mSetupPayload.discriminator.SetLongValue(discriminator); mSetupPayload.rendezvousInformation = RendezvousInformationFlags(RendezvousInformationFlag::kOnNetwork); mCommissioningWindowCallback = callback; @@ -142,7 +142,7 @@ CHIP_ERROR CommissioningWindowOpener::OpenCommissioningWindowInternal(Operationa AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; request.commissioningTimeout = mCommissioningWindowTimeout.count(); request.PAKEVerifier = serializedVerifierSpan; - request.discriminator = mSetupPayload.discriminator; + request.discriminator = mSetupPayload.discriminator.GetLongValue(); request.iterations = mPBKDFIterations; request.salt = mPBKDFSalt; @@ -308,7 +308,7 @@ void CommissioningWindowOpener::OnDeviceConnectedCallback(void * context, Operat } } -void CommissioningWindowOpener::OnDeviceConnectionFailureCallback(void * context, PeerId peerId, CHIP_ERROR error) +void CommissioningWindowOpener::OnDeviceConnectionFailureCallback(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { OnOpenCommissioningWindowFailure(context, error); } diff --git a/src/controller/CommissioningWindowOpener.h b/src/controller/CommissioningWindowOpener.h index 30be3d90051557..63a073122e8d3e 100644 --- a/src/controller/CommissioningWindowOpener.h +++ b/src/controller/CommissioningWindowOpener.h @@ -127,7 +127,7 @@ class CommissioningWindowOpener static void OnOpenCommissioningWindowSuccess(void * context, const app::DataModel::NullObjectType &); static void OnOpenCommissioningWindowFailure(void * context, CHIP_ERROR error); static void OnDeviceConnectedCallback(void * context, OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureCallback(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureCallback(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); DeviceController * const mController = nullptr; Step mNextStep = Step::kAcceptCommissioningStart; diff --git a/src/controller/DevicePairingDelegate.h b/src/controller/DevicePairingDelegate.h index 8f89cea7050723..2e9fc0558c2221 100644 --- a/src/controller/DevicePairingDelegate.h +++ b/src/controller/DevicePairingDelegate.h @@ -17,6 +17,7 @@ #pragma once +#include #include #include #include @@ -75,6 +76,26 @@ class DLL_EXPORT DevicePairingDelegate {} virtual void OnCommissioningStatusUpdate(PeerId peerId, CommissioningStage stageCompleted, CHIP_ERROR error) {} + + /** + * @brief + * Called with the ReadCommissioningInfo returned from the target + */ + virtual void OnReadCommissioningInfo(const ReadCommissioningInfo & info) {} + + /** + * @brief + * Called with the NetworkScanResponse returned from the target + */ + virtual void + OnScanNetworksSuccess(const app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & dataResponse) + {} + + /** + * @brief + * Called when the NetworkScan request fails. + */ + virtual void OnScanNetworksFailure(CHIP_ERROR error) {} }; } // namespace Controller diff --git a/src/controller/SetUpCodePairer.cpp b/src/controller/SetUpCodePairer.cpp index 98af2e86ea4ad1..12b6b3cf1e0bb5 100644 --- a/src/controller/SetUpCodePairer.cpp +++ b/src/controller/SetUpCodePairer.cpp @@ -154,10 +154,17 @@ CHIP_ERROR SetUpCodePairer::StartDiscoverOverIP(SetupPayload & payload) { ChipLogProgress(Controller, "Starting commissioning discovery over DNS-SD"); - currentFilter.type = payload.isShortDiscriminator ? Dnssd::DiscoveryFilterType::kShortDiscriminator - : Dnssd::DiscoveryFilterType::kLongDiscriminator; - currentFilter.code = - payload.isShortDiscriminator ? static_cast((payload.discriminator >> 8) & 0x0F) : payload.discriminator; + auto & discriminator = payload.discriminator; + if (discriminator.IsShortDiscriminator()) + { + currentFilter.type = Dnssd::DiscoveryFilterType::kShortDiscriminator; + currentFilter.code = discriminator.GetShortValue(); + } + else + { + currentFilter.type = Dnssd::DiscoveryFilterType::kLongDiscriminator; + currentFilter.code = discriminator.GetLongValue(); + } // Handle possibly-sync callbacks. mWaitingForDiscovery[kIPTransport] = true; CHIP_ERROR err = mCommissioner->DiscoverCommissionableNodes(currentFilter); diff --git a/src/controller/TypedReadCallback.h b/src/controller/TypedReadCallback.h index 91bee1629bfa81..7fa58df7c932b4 100644 --- a/src/controller/TypedReadCallback.h +++ b/src/controller/TypedReadCallback.h @@ -124,12 +124,16 @@ class TypedReadAttributeCallback final : public app::ReadClient::Callback } } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override + CHIP_ERROR OnResubscriptionNeeded(chip::app::ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override { + ReturnErrorOnFailure(app::ReadClient::Callback::OnResubscriptionNeeded(apReadClient, aTerminationCause)); + if (mOnResubscriptionAttempt) { - mOnResubscriptionAttempt(*mReadClient.get(), aTerminationCause, aNextResubscribeIntervalMsec); + mOnResubscriptionAttempt(*mReadClient.get(), aTerminationCause, apReadClient->ComputeTimeTillNextSubscription()); } + + return CHIP_NO_ERROR; } void OnDeallocatePaths(chip::app::ReadPrepareParams && aReadPrepareParams) override @@ -246,12 +250,16 @@ class TypedReadEventCallback final : public app::ReadClient::Callback } } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override + CHIP_ERROR OnResubscriptionNeeded(chip::app::ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override { + ReturnErrorOnFailure(app::ReadClient::Callback::OnResubscriptionNeeded(apReadClient, aTerminationCause)); + if (mOnResubscriptionAttempt) { - mOnResubscriptionAttempt(*mReadClient.get(), aTerminationCause, aNextResubscribeIntervalMsec); + mOnResubscriptionAttempt(*mReadClient.get(), aTerminationCause, apReadClient->ComputeTimeTillNextSubscription()); } + + return CHIP_NO_ERROR; } OnSuccessCallbackType mOnSuccess; diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index be7d85fa71e7c7..d423ab0497bdf8 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -105,12 +105,12 @@ client cluster Groups = 4 { group_id groupId = 1; } - command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + 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; } client cluster Scenes = 5 { @@ -215,13 +215,13 @@ client cluster Scenes = 5 { optional INT8U sceneList[] = 3; } - command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + 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; } client cluster OnOff = 6 { @@ -338,44 +338,55 @@ client cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -385,7 +396,7 @@ client cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } client cluster BinaryInputBasic = 15 { @@ -478,7 +489,7 @@ client cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -486,7 +497,7 @@ client cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -676,6 +687,7 @@ client cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -1075,7 +1087,7 @@ client cluster GeneralCommissioning = 48 { command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } client cluster NetworkCommissioning = 49 { @@ -1356,7 +1368,7 @@ client cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } client cluster SoftwareDiagnostics = 52 { @@ -1771,7 +1783,6 @@ client cluster OperationalCredentials = 62 { kMissingCsr = 4; kTableFull = 5; kInvalidAdminSubject = 6; - kInsufficientPrivilege = 8; kFabricConflict = 9; kLabelConflict = 10; kInvalidFabricIndex = 11; @@ -1797,7 +1808,7 @@ client cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; @@ -1866,8 +1877,8 @@ client cluster OperationalCredentials = 62 { command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + 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; } @@ -1936,10 +1947,10 @@ client cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + 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(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } client cluster FixedLabel = 64 { @@ -4001,7 +4012,7 @@ client cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationBasicApplication application = 4; @@ -4169,7 +4180,7 @@ client cluster TestCluster = 4294048773 { } info event TestFabricScopedEvent = 2 { - fabric_idx arg1 = 254; + fabric_idx fabricIndex = 254; } attribute boolean boolean = 0; diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index 588f47c14a9389..1966bd59ecca68 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -82,7 +82,7 @@ void GetConnectedDeviceCallback::OnDeviceConnectedFn(void * context, Operational env->CallVoidMethod(javaCallback, successMethod, reinterpret_cast(device)); } -void GetConnectedDeviceCallback::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error) +void GetConnectedDeviceCallback::OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); auto * self = static_cast(context); @@ -547,22 +547,23 @@ void ReportEventCallback::OnSubscriptionEstablished(SubscriptionId aSubscription JniReferences::GetInstance().CallSubscriptionEstablished(mSubscriptionEstablishedCallbackRef); } -void ReportEventCallback::OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) +CHIP_ERROR ReportEventCallback::OnResubscriptionNeeded(app::ReadClient * apReadClient, CHIP_ERROR aTerminationCause) { - VerifyOrReturn(mResubscriptionAttemptCallbackRef != nullptr, - ChipLogError(Controller, "mResubscriptionAttemptCallbackRef is null")); + VerifyOrReturnLogError(mResubscriptionAttemptCallbackRef != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ReturnErrorOnFailure(app::ReadClient::Callback::OnResubscriptionNeeded(apReadClient, aTerminationCause)); jmethodID onResubscriptionAttemptMethod; - err = JniReferences::GetInstance().FindMethod(env, mResubscriptionAttemptCallbackRef, "onResubscriptionAttempt", "(II)V", - &onResubscriptionAttemptMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Could not find onResubscriptionAttempt method")); + ReturnLogErrorOnFailure(JniReferences::GetInstance().FindMethod( + env, mResubscriptionAttemptCallbackRef, "onResubscriptionAttempt", "(II)V", &onResubscriptionAttemptMethod)); DeviceLayer::StackUnlock unlock; env->CallVoidMethod(mResubscriptionAttemptCallbackRef, onResubscriptionAttemptMethod, aTerminationCause.AsInteger(), - aNextResubscribeIntervalMsec); + apReadClient->ComputeTimeTillNextSubscription()); + + return CHIP_NO_ERROR; } void ReportEventCallback::ReportError(jobject attributePath, CHIP_ERROR err) diff --git a/src/controller/java/AndroidCallbacks.h b/src/controller/java/AndroidCallbacks.h index 51c38d3c2b4e1a..9ba97362f53340 100644 --- a/src/controller/java/AndroidCallbacks.h +++ b/src/controller/java/AndroidCallbacks.h @@ -34,7 +34,7 @@ struct GetConnectedDeviceCallback ~GetConnectedDeviceCallback(); static void OnDeviceConnectedFn(void * context, OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); Callback::Callback mOnSuccess; Callback::Callback mOnFailure; @@ -98,7 +98,7 @@ struct ReportEventCallback : public app::ReadClient::Callback void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override; - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override; + CHIP_ERROR OnResubscriptionNeeded(app::ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override; /** Report errors back to Java layer. attributePath may be nullptr for general errors. */ void ReportError(jobject eventPath, CHIP_ERROR err); diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index b3c969c2577b74..6ccdb94fc2abfe 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -74,7 +74,8 @@ AndroidDeviceControllerWrapper * AndroidDeviceControllerWrapper::AllocateNew( chip::Inet::EndPointManager * tcpEndPointManager, chip::Inet::EndPointManager * udpEndPointManager, AndroidOperationalCredentialsIssuerPtr opCredsIssuerPtr, jobject keypairDelegate, jbyteArray rootCertificate, jbyteArray intermediateCertificate, jbyteArray nodeOperationalCertificate, - jbyteArray ipkEpochKey, uint16_t listenPort, CHIP_ERROR * errInfoOnFailure) + jbyteArray ipkEpochKey, uint16_t listenPort, uint16_t controllerVendorId, uint16_t failsafeTimerSeconds, + bool attemptNetworkScanWiFi, bool attemptNetworkScanThread, CHIP_ERROR * errInfoOnFailure) { if (errInfoOnFailure == nullptr) { @@ -143,13 +144,20 @@ AndroidDeviceControllerWrapper * AndroidDeviceControllerWrapper::AllocateNew( initParams.bleLayer = DeviceLayer::ConnectivityMgr().GetBleLayer(); #endif initParams.listenPort = listenPort; - setupParams.controllerVendorId = VendorId::NotSpecified; + setupParams.controllerVendorId = static_cast(controllerVendorId); setupParams.pairingDelegate = wrapper.get(); setupParams.operationalCredentialsDelegate = opCredsIssuer; + setupParams.defaultCommissioner = &wrapper->mAutoCommissioner; initParams.fabricIndependentStorage = wrapperStorage; wrapper->mGroupDataProvider.SetStorageDelegate(wrapperStorage); + CommissioningParameters params = wrapper->mAutoCommissioner.GetCommissioningParameters(); + params.SetFailsafeTimerSeconds(failsafeTimerSeconds); + params.SetAttemptWiFiNetworkScan(attemptNetworkScanWiFi); + params.SetAttemptThreadNetworkScan(attemptNetworkScanThread); + wrapper->UpdateCommissioningParameters(params); + CHIP_ERROR err = wrapper->mGroupDataProvider.Init(); if (err != CHIP_NO_ERROR) { @@ -358,6 +366,13 @@ CHIP_ERROR AndroidDeviceControllerWrapper::ApplyNetworkCredentials(chip::Control return err; } +CHIP_ERROR AndroidDeviceControllerWrapper::UpdateCommissioningParameters(const chip::Controller::CommissioningParameters & params) +{ + // this will wipe out any custom attestationNonce and csrNonce that was being used. + // however, Android APIs don't allow these to be set to custom values today. + return mAutoCommissioner.SetCommissioningParameters(params); +} + void AndroidDeviceControllerWrapper::OnStatusUpdate(chip::Controller::DevicePairingDelegate::Status status) { chip::DeviceLayer::StackUnlock unlock; @@ -403,6 +418,210 @@ void AndroidDeviceControllerWrapper::OnCommissioningComplete(NodeId deviceId, CH } } +void AndroidDeviceControllerWrapper::OnCommissioningStatusUpdate(PeerId peerId, chip::Controller::CommissioningStage stageCompleted, + CHIP_ERROR error) +{ + chip::DeviceLayer::StackUnlock unlock; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jmethodID onCommissioningStatusUpdateMethod; + CHIP_ERROR err = JniReferences::GetInstance().FindMethod(env, mJavaObjectRef, "onCommissioningStatusUpdate", + "(JLJAVA/LANG/STRING;I)V", &onCommissioningStatusUpdateMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Error finding Java method: %" CHIP_ERROR_FORMAT, err.Format())); + + UtfString jStageCompleted(env, StageToString(stageCompleted)); + env->CallVoidMethod(mJavaObjectRef, onCommissioningStatusUpdateMethod, static_cast(peerId.GetNodeId()), + jStageCompleted.jniValue(), error.AsInteger()); +} + +void AndroidDeviceControllerWrapper::OnReadCommissioningInfo(const chip::Controller::ReadCommissioningInfo & info) +{ + // calls: onReadCommissioningInfo(int vendorId, int productId, int wifiEndpointId, int threadEndpointId) + chip::DeviceLayer::StackUnlock unlock; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jmethodID onReadCommissioningInfoMethod; + CHIP_ERROR err = JniReferences::GetInstance().FindMethod(env, mJavaObjectRef, "onReadCommissioningInfo", "(IIII)V", + &onReadCommissioningInfoMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Error finding Java method: %" CHIP_ERROR_FORMAT, err.Format())); + + env->CallVoidMethod(mJavaObjectRef, onReadCommissioningInfoMethod, static_cast(info.basic.vendorId), + static_cast(info.basic.productId), static_cast(info.network.wifi.endpoint), + static_cast(info.network.thread.endpoint)); +} + +void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( + const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + err = JniReferences::GetInstance().FindMethod( + env, mJavaObjectRef, "onScanNetworksSuccess", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject NetworkingStatus; + std::string NetworkingStatusClassName = "java/lang/Integer"; + std::string NetworkingStatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), + static_cast(dataResponse.networkingStatus), NetworkingStatus); + jobject DebugText; + if (!dataResponse.debugText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, DebugText); + } + else + { + jobject DebugTextInsideOptional; + DebugTextInsideOptional = + env->NewStringUTF(std::string(dataResponse.debugText.Value().data(), dataResponse.debugText.Value().size()).c_str()); + chip::JniReferences::GetInstance().CreateOptional(DebugTextInsideOptional, DebugText); + } + jobject WiFiScanResults; + if (!dataResponse.wiFiScanResults.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, WiFiScanResults); + } + else + { + // TODO: use this + jobject WiFiScanResultsInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(WiFiScanResultsInsideOptional); + + auto iter_WiFiScanResultsInsideOptional = dataResponse.wiFiScanResults.Value().begin(); + while (iter_WiFiScanResultsInsideOptional.Next()) + { + auto & entry = iter_WiFiScanResultsInsideOptional.GetValue(); + jobject newElement_security; + std::string newElement_securityClassName = "java/lang/Integer"; + std::string newElement_securityCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_securityClassName.c_str(), + newElement_securityCtorSignature.c_str(), + entry.security.Raw(), newElement_security); + jobject newElement_ssid; + jbyteArray newElement_ssidByteArray = env->NewByteArray(static_cast(entry.ssid.size())); + env->SetByteArrayRegion(newElement_ssidByteArray, 0, static_cast(entry.ssid.size()), + reinterpret_cast(entry.ssid.data())); + newElement_ssid = newElement_ssidByteArray; + jobject newElement_bssid; + jbyteArray newElement_bssidByteArray = env->NewByteArray(static_cast(entry.bssid.size())); + env->SetByteArrayRegion(newElement_bssidByteArray, 0, static_cast(entry.bssid.size()), + reinterpret_cast(entry.bssid.data())); + newElement_bssid = newElement_bssidByteArray; + jobject newElement_channel; + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.channel, + newElement_channel); + jobject newElement_wiFiBand; + chip::JniReferences::GetInstance().CreateBoxedObject( + "java/lang/Integer", "(I)V", static_cast(entry.wiFiBand), newElement_wiFiBand); + jobject newElement_rssi; + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.rssi, newElement_rssi); + + jclass wiFiInterfaceScanResultStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResult", + wiFiInterfaceScanResultStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResult"); + return; + } + jmethodID wiFiInterfaceScanResultStructCtor = + env->GetMethodID(wiFiInterfaceScanResultStructClass, "", + "(Ljava/lang/Integer;[B[BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (wiFiInterfaceScanResultStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResult constructor"); + return; + } + + jobject newElement = + env->NewObject(wiFiInterfaceScanResultStructClass, wiFiInterfaceScanResultStructCtor, newElement_security, + newElement_ssid, newElement_bssid, newElement_channel, newElement_wiFiBand, newElement_rssi); + chip::JniReferences::GetInstance().AddToList(WiFiScanResultsInsideOptional, newElement); + } + chip::JniReferences::GetInstance().CreateOptional(WiFiScanResultsInsideOptional, WiFiScanResults); + } + jobject ThreadScanResults; + if (!dataResponse.threadScanResults.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, ThreadScanResults); + } + else + { + jobject ThreadScanResultsInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(ThreadScanResultsInsideOptional); + + auto iter_ThreadScanResultsInsideOptional = dataResponse.threadScanResults.Value().begin(); + while (iter_ThreadScanResultsInsideOptional.Next()) + { + auto & entry = iter_ThreadScanResultsInsideOptional.GetValue(); + jobject newElement_panId; + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.panId, + newElement_panId); + jobject newElement_extendedPanId; + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Long", "(J)V", entry.extendedPanId, + newElement_extendedPanId); + jobject newElement_networkName; + newElement_networkName = env->NewStringUTF(std::string(entry.networkName.data(), entry.networkName.size()).c_str()); + jobject newElement_channel; + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.channel, + newElement_channel); + jobject newElement_version; + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.version, + newElement_version); + jobject newElement_extendedAddress; + jbyteArray newElement_extendedAddressByteArray = env->NewByteArray(static_cast(entry.extendedAddress.size())); + env->SetByteArrayRegion(newElement_extendedAddressByteArray, 0, static_cast(entry.extendedAddress.size()), + reinterpret_cast(entry.extendedAddress.data())); + newElement_extendedAddress = newElement_extendedAddressByteArray; + jobject newElement_rssi; + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.rssi, newElement_rssi); + jobject newElement_lqi; + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.lqi, newElement_lqi); + + jclass threadInterfaceScanResultStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResult", + threadInterfaceScanResultStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResult"); + return; + } + jmethodID threadInterfaceScanResultStructCtor = + env->GetMethodID(threadInterfaceScanResultStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/" + "Integer;[BLjava/lang/Integer;Ljava/lang/Integer;)V"); + if (threadInterfaceScanResultStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResult constructor"); + return; + } + + jobject newElement = + env->NewObject(threadInterfaceScanResultStructClass, threadInterfaceScanResultStructCtor, newElement_panId, + newElement_extendedPanId, newElement_networkName, newElement_channel, newElement_version, + newElement_extendedAddress, newElement_rssi, newElement_lqi); + chip::JniReferences::GetInstance().AddToList(ThreadScanResultsInsideOptional, newElement); + } + chip::JniReferences::GetInstance().CreateOptional(ThreadScanResultsInsideOptional, ThreadScanResults); + } + + env->CallVoidMethod(mJavaObjectRef, javaMethod, NetworkingStatus, DebugText, WiFiScanResults, ThreadScanResults); +} + +void AndroidDeviceControllerWrapper::OnScanNetworksFailure(CHIP_ERROR error) +{ + chip::DeviceLayer::StackUnlock unlock; + + CallJavaMethod("onScanNetworksFailure", static_cast(error.AsInteger())); +} + CHIP_ERROR AndroidDeviceControllerWrapper::SyncGetKeyValue(const char * key, void * value, uint16_t & size) { ChipLogProgress(chipTool, "KVS: Getting key %s", key); diff --git a/src/controller/java/AndroidDeviceControllerWrapper.h b/src/controller/java/AndroidDeviceControllerWrapper.h index a8c374ac7ede0f..e5809340fea39c 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.h +++ b/src/controller/java/AndroidDeviceControllerWrapper.h @@ -70,17 +70,35 @@ class AndroidDeviceControllerWrapper : public chip::Controller::DevicePairingDel */ CHIP_ERROR ApplyNetworkCredentials(chip::Controller::CommissioningParameters & params, jobject networkCredentials); + /** + * Update the CommissioningParameters used by the active device commissioner + */ + CHIP_ERROR UpdateCommissioningParameters(const chip::Controller::CommissioningParameters & params); + // DevicePairingDelegate implementation 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; + void OnCommissioningStatusUpdate(chip::PeerId peerId, chip::Controller::CommissioningStage stageCompleted, + CHIP_ERROR error) override; + void OnReadCommissioningInfo(const chip::Controller::ReadCommissioningInfo & info) override; + void OnScanNetworksSuccess( + const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & dataResponse) override; + void OnScanNetworksFailure(CHIP_ERROR error) override; // PersistentStorageDelegate implementation CHIP_ERROR SyncSetKeyValue(const char * key, const void * value, uint16_t size) override; CHIP_ERROR SyncGetKeyValue(const char * key, void * buffer, uint16_t & size) override; CHIP_ERROR SyncDeleteKeyValue(const char * key) override; + chip::Controller::AutoCommissioner * GetAutoCommissioner() { return &mAutoCommissioner; } + + const chip::Controller::CommissioningParameters & GetCommissioningParameters() const + { + return mAutoCommissioner.GetCommissioningParameters(); + } + static AndroidDeviceControllerWrapper * FromJNIHandle(jlong handle) { return reinterpret_cast(handle); @@ -113,16 +131,20 @@ class AndroidDeviceControllerWrapper : public chip::Controller::DevicePairingDel * @param[in] nodeOperationalCertificate an X.509 DER-encoded operational certificate for this node * @param[in] ipkEpochKey the IPK epoch key to use for this node * @param[in] listenPort the UDP port to listen on + * @param[in] controllerVendorId the vendor ID identifying the controller + * @param[in] failsafeTimerSeconds the failsafe timer in seconds + * @param[in] attemptNetworkScanWiFi whether to attempt a network scan when configuring the network for a WiFi device + * @param[in] attemptNetworkScanThread whether to attempt a network scan when configuring the network for a Thread device * @param[out] errInfoOnFailure a pointer to a CHIP_ERROR that will be populated if this method returns nullptr */ - static AndroidDeviceControllerWrapper * AllocateNew(JavaVM * vm, jobject deviceControllerObj, chip::NodeId nodeId, - const chip::CATValues & cats, chip::System::Layer * systemLayer, - chip::Inet::EndPointManager * tcpEndPointManager, - chip::Inet::EndPointManager * udpEndPointManager, - AndroidOperationalCredentialsIssuerPtr opCredsIssuer, - jobject keypairDelegate, jbyteArray rootCertificate, - jbyteArray intermediateCertificate, jbyteArray nodeOperationalCertificate, - jbyteArray ipkEpochKey, uint16_t listenPort, CHIP_ERROR * errInfoOnFailure); + static AndroidDeviceControllerWrapper * + AllocateNew(JavaVM * vm, jobject deviceControllerObj, chip::NodeId nodeId, const chip::CATValues & cats, + chip::System::Layer * systemLayer, chip::Inet::EndPointManager * tcpEndPointManager, + chip::Inet::EndPointManager * udpEndPointManager, + AndroidOperationalCredentialsIssuerPtr opCredsIssuer, jobject keypairDelegate, jbyteArray rootCertificate, + jbyteArray intermediateCertificate, jbyteArray nodeOperationalCertificate, jbyteArray ipkEpochKey, + uint16_t listenPort, uint16_t controllerVendorId, uint16_t failsafeTimerSeconds, bool attemptNetworkScanWiFi, + bool attemptNetworkScanThread, CHIP_ERROR * errInfoOnFailure); private: using ChipDeviceControllerPtr = std::unique_ptr; @@ -146,6 +168,8 @@ class AndroidDeviceControllerWrapper : public chip::Controller::DevicePairingDel jbyteArray operationalDatasetBytes = nullptr; jbyte * operationalDataset = nullptr; + chip::Controller::AutoCommissioner mAutoCommissioner; + AndroidDeviceControllerWrapper(ChipDeviceControllerPtr controller, AndroidOperationalCredentialsIssuerPtr opCredsIssuer) : mController(std::move(controller)), mOpCredsIssuer(std::move(opCredsIssuer)) {} diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 9b39ed0748c8e5..3e8db12d8f0794 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -169,6 +169,25 @@ JNI_METHOD(jlong, newDeviceController)(JNIEnv * env, jobject self, jobject contr err = chip::JniReferences::GetInstance().FindMethod(env, controllerParams, "getUdpListenPort", "()I", &getUdpListenPort); SuccessOrExit(err); + jmethodID getControllerVendorId; + err = chip::JniReferences::GetInstance().FindMethod(env, controllerParams, "getControllerVendorId", "()I", + &getControllerVendorId); + + jmethodID getFailsafeTimerSeconds; + err = chip::JniReferences::GetInstance().FindMethod(env, controllerParams, "getFailsafeTimerSeconds", "()I", + &getFailsafeTimerSeconds); + SuccessOrExit(err); + + jmethodID getAttemptNetworkScanWiFi; + err = chip::JniReferences::GetInstance().FindMethod(env, controllerParams, "getAttemptNetworkScanWiFi", "()Z", + &getAttemptNetworkScanWiFi); + SuccessOrExit(err); + + jmethodID getAttemptNetworkScanThread; + err = chip::JniReferences::GetInstance().FindMethod(env, controllerParams, "getAttemptNetworkScanThread", "()Z", + &getAttemptNetworkScanThread); + SuccessOrExit(err); + jmethodID getKeypairDelegate; err = chip::JniReferences::GetInstance().FindMethod(env, controllerParams, "getKeypairDelegate", "()Lchip/devicecontroller/KeypairDelegate;", &getKeypairDelegate); @@ -194,18 +213,23 @@ JNI_METHOD(jlong, newDeviceController)(JNIEnv * env, jobject self, jobject contr { uint16_t listenPort = env->CallIntMethod(controllerParams, getUdpListenPort); + uint16_t controllerVendorId = env->CallIntMethod(controllerParams, getControllerVendorId); jobject keypairDelegate = env->CallObjectMethod(controllerParams, getKeypairDelegate); jbyteArray rootCertificate = (jbyteArray) env->CallObjectMethod(controllerParams, getRootCertificate); jbyteArray intermediateCertificate = (jbyteArray) env->CallObjectMethod(controllerParams, getIntermediateCertificate); jbyteArray operationalCertificate = (jbyteArray) env->CallObjectMethod(controllerParams, getOperationalCertificate); jbyteArray ipk = (jbyteArray) env->CallObjectMethod(controllerParams, getIpk); + uint16_t failsafeTimerSeconds = env->CallIntMethod(controllerParams, getFailsafeTimerSeconds); + bool attemptNetworkScanWiFi = env->CallIntMethod(controllerParams, getAttemptNetworkScanWiFi); + bool attemptNetworkScanThread = env->CallIntMethod(controllerParams, getAttemptNetworkScanThread); std::unique_ptr opCredsIssuer( new chip::Controller::AndroidOperationalCredentialsIssuer()); wrapper = AndroidDeviceControllerWrapper::AllocateNew( sJVM, self, kLocalDeviceId, chip::kUndefinedCATs, &DeviceLayer::SystemLayer(), DeviceLayer::TCPEndPointManager(), DeviceLayer::UDPEndPointManager(), std::move(opCredsIssuer), keypairDelegate, rootCertificate, intermediateCertificate, - operationalCertificate, ipk, listenPort, &err); + operationalCertificate, ipk, listenPort, controllerVendorId, failsafeTimerSeconds, attemptNetworkScanWiFi, + attemptNetworkScanThread, &err); SuccessOrExit(err); } @@ -378,6 +402,48 @@ JNI_METHOD(void, establishPaseConnectionByAddress) } } +JNI_METHOD(void, pauseCommissioning) +(JNIEnv * env, jobject self, jlong handle) +{ + ChipLogProgress(Controller, "pauseCommissioning() called"); + chip::DeviceLayer::StackLock lock; + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); + + wrapper->GetAutoCommissioner()->PauseCommissioning(); +} + +JNI_METHOD(void, resumeCommissioning) +(JNIEnv * env, jobject self, jlong handle) +{ + ChipLogProgress(Controller, "resumeCommissioning() called"); + chip::DeviceLayer::StackLock lock; + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); + + wrapper->GetAutoCommissioner()->ResumeCommissioning(); +} + +JNI_METHOD(void, updateCommissioningNetworkCredentials) +(JNIEnv * env, jobject self, jlong handle, jobject networkCredentials) +{ + ChipLogProgress(Controller, "updateCommissioningNetworkCredentials() called"); + chip::DeviceLayer::StackLock lock; + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); + + CommissioningParameters commissioningParams = wrapper->GetCommissioningParameters(); + CHIP_ERROR err = wrapper->ApplyNetworkCredentials(commissioningParams, networkCredentials); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "ApplyNetworkCredentials failed. Err = %" CHIP_ERROR_FORMAT, err.Format()); + JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, err); + } + err = wrapper->UpdateCommissioningParameters(commissioningParams); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "UpdateCommissioningParameters failed. Err = %" CHIP_ERROR_FORMAT, err.Format()); + JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, err); + } +} + JNI_METHOD(jbyteArray, convertX509CertToMatterCert) (JNIEnv * env, jobject self, jbyteArray x509Cert) { @@ -517,11 +583,7 @@ JNI_METHOD(jstring, getIpAddress)(JNIEnv * env, jobject self, jlong handle, jlon uint16_t port; char addrStr[50]; - CHIP_ERROR err = - wrapper->Controller()->GetPeerAddressAndPort(PeerId() - .SetCompressedFabricId(wrapper->Controller()->GetCompressedFabricId()) - .SetNodeId(static_cast(deviceId)), - addr, port); + CHIP_ERROR err = wrapper->Controller()->GetPeerAddressAndPort(deviceId, addr, port); if (err != CHIP_NO_ERROR) { diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 032f373e424a81..6b1197ae28cdc5 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -23,7 +23,9 @@ import chip.devicecontroller.GetConnectedDeviceCallbackJni.GetConnectedDeviceCallback; import chip.devicecontroller.model.ChipAttributePath; import chip.devicecontroller.model.ChipEventPath; +import java.util.ArrayList; import java.util.List; +import java.util.Optional; /** Controller to interact with the CHIP device. */ public class ChipDeviceController { @@ -31,6 +33,7 @@ public class ChipDeviceController { private long deviceControllerPtr; private int connectionId; private CompletionListener completionListener; + private ScanNetworksListener scanNetworksListener; /** * To load class and jni, we need to new AndroidChipPlatform after jni load but before new @@ -54,6 +57,10 @@ public void setCompletionListener(CompletionListener listener) { completionListener = listener; } + public void setScanNetworksListener(ScanNetworksListener listener) { + scanNetworksListener = listener; + } + public void pairDevice( BluetoothGatt bleServer, int connId, @@ -168,6 +175,28 @@ public void commissionDevice( commissionDevice(deviceControllerPtr, deviceId, csrNonce, networkCredentials); } + public void pauseCommissioning() { + pauseCommissioning(deviceControllerPtr); + } + + public void resumeCommissioning() { + resumeCommissioning(deviceControllerPtr); + } + + /** + * Update the network credentials held by the commissioner for the current commissioning session. + * The updated values will be used by the commissioner if the network credentials haven't already + * been sent to the device. + * + *

Its expected that this method will be called in response to the NetworkScan or the + * ReadCommissioningInfo callbacks. + * + * @param networkCredentials the credentials (Wi-Fi or Thread) to use in commissioning + */ + public void updateCommissioningNetworkCredentials(NetworkCredentials networkCredentials) { + updateCommissioningNetworkCredentials(deviceControllerPtr, networkCredentials); + } + public void unpairDevice(long deviceId) { unpairDevice(deviceControllerPtr, deviceId); } @@ -220,6 +249,39 @@ public void onCommissioningComplete(long nodeId, int errorCode) { } } + public void onCommissioningStatusUpdate(long nodeId, String stage, int errorCode) { + if (completionListener != null) { + completionListener.onCommissioningStatusUpdate(nodeId, stage, errorCode); + } + } + + public void onReadCommissioningInfo( + int vendorId, int productId, int wifiEndpointId, int threadEndpointId) { + if (completionListener != null) { + completionListener.onReadCommissioningInfo( + vendorId, productId, wifiEndpointId, threadEndpointId); + } + } + + public void onScanNetworksFailure(int errorCode) { + if (scanNetworksListener != null) { + scanNetworksListener.onScanNetworksFailure(errorCode); + } + } + + public void onScanNetworksSuccess( + Integer networkingStatus, + Optional debugText, + Optional> + wiFiScanResults, + Optional> + threadScanResults) { + if (scanNetworksListener != null) { + scanNetworksListener.onScanNetworksSuccess( + networkingStatus, debugText, wiFiScanResults, threadScanResults); + } + } + public void onOpCSRGenerationComplete(byte[] csr) { if (completionListener != null) { completionListener.onOpCSRGenerationComplete(csr); @@ -567,6 +629,13 @@ private native boolean openPairingWindowWithPINCallback( private native byte[] getAttestationChallenge(long deviceControllerPtr, long devicePtr); + private native void pauseCommissioning(long deviceControllerPtr); + + private native void resumeCommissioning(long deviceControllerPtr); + + private native void updateCommissioningNetworkCredentials( + long deviceControllerPtr, NetworkCredentials networkCredentials); + private native void shutdownSubscriptions(long deviceControllerPtr, long devicePtr); private native void shutdownCommissioning(long deviceControllerPtr); @@ -585,6 +654,20 @@ protected void finalize() throws Throwable { } } + /** Interface to listen for callbacks from CHIPDeviceController. */ + public interface ScanNetworksListener { + /** Notifies when scan networks call fails. */ + void onScanNetworksFailure(int errorCode); + + void onScanNetworksSuccess( + Integer networkingStatus, + Optional debugText, + Optional> + wiFiScanResults, + Optional> + threadScanResults); + } + /** Interface to listen for callbacks from CHIPDeviceController. */ public interface CompletionListener { @@ -603,6 +686,13 @@ public interface CompletionListener { /** Notifies the completion of commissioning. */ void onCommissioningComplete(long nodeId, int errorCode); + /** Notifies the completion of each stage of commissioning. */ + void onReadCommissioningInfo( + int vendorId, int productId, int wifiEndpointId, int threadEndpointId); + + /** Notifies the completion of each stage of commissioning. */ + void onCommissioningStatusUpdate(long nodeId, String stage, int errorCode); + /** Notifies that the Chip connection has been closed. */ void onNotifyChipConnectionClosed(); diff --git a/src/controller/java/src/chip/devicecontroller/ControllerParams.java b/src/controller/java/src/chip/devicecontroller/ControllerParams.java index ee7f7d09d63faa..87fb85a375adf1 100644 --- a/src/controller/java/src/chip/devicecontroller/ControllerParams.java +++ b/src/controller/java/src/chip/devicecontroller/ControllerParams.java @@ -6,17 +6,22 @@ public final class ControllerParams { private final int udpListenPort; + private final int controllerVendorId; @Nullable private final KeypairDelegate keypairDelegate; @Nullable private final byte[] rootCertificate; @Nullable private final byte[] intermediateCertificate; @Nullable private final byte[] operationalCertificate; @Nullable private final byte[] ipk; + private final int failsafeTimerSeconds = 30; + private final boolean attemptNetworkScanWiFi = false; + private final boolean attemptNetworkScanThread = true; private static final int LEGACY_GLOBAL_CHIP_PORT = 5540; /** @param udpListenPort the UDP listening port, or 0 to pick any available port. */ private ControllerParams(Builder builder) { this.udpListenPort = builder.udpListenPort; + this.controllerVendorId = builder.controllerVendorId; this.keypairDelegate = builder.keypairDelegate; this.rootCertificate = builder.rootCertificate; this.intermediateCertificate = builder.intermediateCertificate; @@ -29,6 +34,10 @@ public int getUdpListenPort() { return udpListenPort; } + public int getControllerVendorId() { + return controllerVendorId; + } + public KeypairDelegate getKeypairDelegate() { return keypairDelegate; } @@ -49,6 +58,18 @@ public byte[] getIpk() { return ipk; } + public int getFailsafeTimerSeconds() { + return failsafeTimerSeconds; + } + + public boolean getAttemptNetworkScanWiFi() { + return attemptNetworkScanWiFi; + } + + public boolean getAttemptNetworkScanThread() { + return attemptNetworkScanThread; + } + /** Returns parameters with ephemerally generated operational credentials */ public static Builder newBuilder() { return new Builder(); @@ -70,11 +91,15 @@ public static Builder newBuilder(OperationalKeyConfig operationalKeyConfig) { /** Builder for {@link ControllerParams}. */ public static class Builder { private int udpListenPort = LEGACY_GLOBAL_CHIP_PORT + 1; + private int controllerVendorId = 0xFFFF; @Nullable private KeypairDelegate keypairDelegate = null; @Nullable private byte[] rootCertificate = null; @Nullable private byte[] intermediateCertificate = null; @Nullable private byte[] operationalCertificate = null; @Nullable private byte[] ipk = null; + private int failsafeTimerSeconds = 30; + private boolean attemptNetworkScanWiFi = false; + private boolean attemptNetworkScanThread = true; private Builder() {} @@ -86,6 +111,29 @@ public Builder setUdpListenPort(int udpListenPort) { return this; } + public Builder setControllerVendorId(int controllerVendorId) { + this.controllerVendorId = controllerVendorId; + return this; + } + + public Builder setFailsafeTimerSeconds(int failsafeTimerSeconds) { + if (failsafeTimerSeconds < 1 || failsafeTimerSeconds > 900) { + throw new IllegalArgumentException("failsafeTimerSeconds must be between 0 and 900"); + } + this.failsafeTimerSeconds = failsafeTimerSeconds; + return this; + } + + public Builder setAttemptNetworkScanWiFi(boolean attemptNetworkScanWiFi) { + this.attemptNetworkScanWiFi = attemptNetworkScanWiFi; + return this; + } + + public Builder setAttemptNetworkScanThread(boolean attemptNetworkScanThread) { + this.attemptNetworkScanThread = attemptNetworkScanThread; + return this; + } + public Builder setKeypairDelegate(KeypairDelegate keypairDelegate) { this.keypairDelegate = keypairDelegate; return this; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index af18e87a079d4f..c21a0947ccea70 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -16388,7 +16388,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::ApplicationName::Id: { diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index de6775d3df51d3..c51197fc6dd9ae 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -319,12 +319,12 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_latestValue_fabricIndex); } - jobject value_adminFabricIndex; - std::string value_adminFabricIndexClassName = "java/lang/Integer"; - std::string value_adminFabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_adminFabricIndexClassName.c_str(), - value_adminFabricIndexCtorSignature.c_str(), - cppValue.adminFabricIndex, value_adminFabricIndex); + jobject value_fabricIndex; + std::string value_fabricIndexClassName = "java/lang/Integer"; + std::string value_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + cppValue.fabricIndex, value_fabricIndex); jclass accessControlEntryChangedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -347,7 +347,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value = env->NewObject(accessControlEntryChangedStructClass, accessControlEntryChangedStructCtor, value_adminNodeID, - value_adminPasscodeID, value_changeType, value_latestValue, value_adminFabricIndex); + value_adminPasscodeID, value_changeType, value_latestValue, value_fabricIndex); return value; } @@ -434,12 +434,12 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_latestValue_fabricIndex); } - jobject value_adminFabricIndex; - std::string value_adminFabricIndexClassName = "java/lang/Integer"; - std::string value_adminFabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_adminFabricIndexClassName.c_str(), - value_adminFabricIndexCtorSignature.c_str(), - cppValue.adminFabricIndex, value_adminFabricIndex); + jobject value_fabricIndex; + std::string value_fabricIndexClassName = "java/lang/Integer"; + std::string value_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + cppValue.fabricIndex, value_fabricIndex); jclass accessControlExtensionChangedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -463,7 +463,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value = env->NewObject(accessControlExtensionChangedStructClass, accessControlExtensionChangedStructCtor, value_adminNodeID, - value_adminPasscodeID, value_changeType, value_latestValue, value_adminFabricIndex); + value_adminPasscodeID, value_changeType, value_latestValue, value_fabricIndex); return value; } @@ -653,6 +653,13 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } + jobject value_fabricIndex; + std::string value_fabricIndexClassName = "java/lang/Integer"; + std::string value_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + cppValue.fabricIndex, value_fabricIndex); + jclass leaveStructClass; err = chip::JniReferences::GetInstance().GetClassRef( env, "chip/devicecontroller/ChipEventStructs$BasicClusterLeaveEvent", leaveStructClass); @@ -661,14 +668,14 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & ChipLogError(Zcl, "Could not find class ChipEventStructs$BasicClusterLeaveEvent"); return nullptr; } - jmethodID leaveStructCtor = env->GetMethodID(leaveStructClass, "", "()V"); + jmethodID leaveStructCtor = env->GetMethodID(leaveStructClass, "", "(Ljava/lang/Integer;)V"); if (leaveStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipEventStructs$BasicClusterLeaveEvent constructor"); return nullptr; } - jobject value = env->NewObject(leaveStructClass, leaveStructCtor); + jobject value = env->NewObject(leaveStructClass, leaveStructCtor, value_fabricIndex); return value; } @@ -3394,11 +3401,12 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } - jobject value_arg1; - std::string value_arg1ClassName = "java/lang/Integer"; - std::string value_arg1CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_arg1ClassName.c_str(), value_arg1CtorSignature.c_str(), cppValue.arg1, value_arg1); + jobject value_fabricIndex; + std::string value_fabricIndexClassName = "java/lang/Integer"; + std::string value_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + cppValue.fabricIndex, value_fabricIndex); jclass testFabricScopedEventStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -3417,7 +3425,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & return nullptr; } - jobject value = env->NewObject(testFabricScopedEventStructClass, testFabricScopedEventStructCtor, value_arg1); + jobject value = env->NewObject(testFabricScopedEventStructClass, testFabricScopedEventStructCtor, value_fabricIndex); return value; } diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index c9bbe64cc955f9..2cf7e3f32c7e26 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -12245,65 +12245,6 @@ void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::~CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::CallbackFn(void * context, chip::FabricIndex value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value, - javaValue); - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CHIPOperationalCredentialsGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), @@ -24323,6 +24264,63 @@ void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPApplicationBasicVendorIDAttributeCallback::CHIPApplicationBasicVendorIDAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPApplicationBasicVendorIDAttributeCallback::~CHIPApplicationBasicVendorIDAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPApplicationBasicVendorIDAttributeCallback::CallbackFn(void * context, chip::VendorId value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + static_cast(value), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPApplicationBasicAllowedVendorListAttributeCallback::CHIPApplicationBasicAllowedVendorListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index ebce0164633adc..992e58ddaf34de 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -5054,36 +5054,6 @@ class CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback bool keepAlive; }; -class CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback - : public chip::Callback::Callback -{ -public: - CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback(); - - static void maybeDestroy(CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback * callback) - { - if (!callback->keepAlive) - { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, chip::FabricIndex value); - static void OnSubscriptionEstablished(void * context) - { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( - reinterpret_cast(context)->javaCallbackRef); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - class CHIPOperationalCredentialsGeneratedCommandListAttributeCallback : public chip::Callback::Callback { @@ -10172,6 +10142,36 @@ class CHIPApplicationLauncherAttributeListAttributeCallback bool keepAlive; }; +class CHIPApplicationBasicVendorIDAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPApplicationBasicVendorIDAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPApplicationBasicVendorIDAttributeCallback(); + + static void maybeDestroy(CHIPApplicationBasicVendorIDAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, chip::VendorId value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPApplicationBasicAllowedVendorListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index fd4f7047d05ed6..6a3e45eca10dc1 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -1510,26 +1510,26 @@ public void moveToLevel( DefaultClusterCallback callback, Integer level, Integer transitionTime, - Integer optionMask, - Integer optionOverride) { + Integer optionsMask, + Integer optionsOverride) { moveToLevel( - chipClusterPtr, callback, level, transitionTime, optionMask, optionOverride, null); + chipClusterPtr, callback, level, transitionTime, optionsMask, optionsOverride, null); } public void moveToLevel( DefaultClusterCallback callback, Integer level, Integer transitionTime, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, int timedInvokeTimeoutMs) { moveToLevel( chipClusterPtr, callback, level, transitionTime, - optionMask, - optionOverride, + optionsMask, + optionsOverride, timedInvokeTimeoutMs); } @@ -1537,25 +1537,25 @@ public void move( DefaultClusterCallback callback, Integer moveMode, Integer rate, - Integer optionMask, - Integer optionOverride) { - move(chipClusterPtr, callback, moveMode, rate, optionMask, optionOverride, null); + Integer optionsMask, + Integer optionsOverride) { + move(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); } public void move( DefaultClusterCallback callback, Integer moveMode, Integer rate, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, int timedInvokeTimeoutMs) { move( chipClusterPtr, callback, moveMode, rate, - optionMask, - optionOverride, + optionsMask, + optionsOverride, timedInvokeTimeoutMs); } @@ -1564,16 +1564,16 @@ public void step( Integer stepMode, Integer stepSize, Integer transitionTime, - Integer optionMask, - Integer optionOverride) { + Integer optionsMask, + Integer optionsOverride) { step( chipClusterPtr, callback, stepMode, stepSize, transitionTime, - optionMask, - optionOverride, + optionsMask, + optionsOverride, null); } @@ -1582,8 +1582,8 @@ public void step( Integer stepMode, Integer stepSize, Integer transitionTime, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, int timedInvokeTimeoutMs) { step( chipClusterPtr, @@ -1591,51 +1591,93 @@ public void step( stepMode, stepSize, transitionTime, - optionMask, - optionOverride, + optionsMask, + optionsOverride, timedInvokeTimeoutMs); } - public void stop(DefaultClusterCallback callback, Integer optionMask, Integer optionOverride) { - stop(chipClusterPtr, callback, optionMask, optionOverride, null); + public void stop( + DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride) { + stop(chipClusterPtr, callback, optionsMask, optionsOverride, null); } public void stop( DefaultClusterCallback callback, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, int timedInvokeTimeoutMs) { - stop(chipClusterPtr, callback, optionMask, optionOverride, timedInvokeTimeoutMs); + stop(chipClusterPtr, callback, optionsMask, optionsOverride, timedInvokeTimeoutMs); } public void moveToLevelWithOnOff( - DefaultClusterCallback callback, Integer level, Integer transitionTime) { - moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime, null); + DefaultClusterCallback callback, + Integer level, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride) { + moveToLevelWithOnOff( + chipClusterPtr, callback, level, transitionTime, optionsMask, optionsOverride, null); } public void moveToLevelWithOnOff( DefaultClusterCallback callback, Integer level, Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, int timedInvokeTimeoutMs) { - moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime, timedInvokeTimeoutMs); + moveToLevelWithOnOff( + chipClusterPtr, + callback, + level, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } - public void moveWithOnOff(DefaultClusterCallback callback, Integer moveMode, Integer rate) { - moveWithOnOff(chipClusterPtr, callback, moveMode, rate, null); + public void moveWithOnOff( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionsMask, + Integer optionsOverride) { + moveWithOnOff(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); } public void moveWithOnOff( - DefaultClusterCallback callback, Integer moveMode, Integer rate, int timedInvokeTimeoutMs) { - moveWithOnOff(chipClusterPtr, callback, moveMode, rate, timedInvokeTimeoutMs); + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveWithOnOff( + chipClusterPtr, + callback, + moveMode, + rate, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void stepWithOnOff( DefaultClusterCallback callback, Integer stepMode, Integer stepSize, - Integer transitionTime) { - stepWithOnOff(chipClusterPtr, callback, stepMode, stepSize, transitionTime, null); + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride) { + stepWithOnOff( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionsMask, + optionsOverride, + null); } public void stepWithOnOff( @@ -1643,18 +1685,31 @@ public void stepWithOnOff( Integer stepMode, Integer stepSize, Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, int timedInvokeTimeoutMs) { stepWithOnOff( - chipClusterPtr, callback, stepMode, stepSize, transitionTime, timedInvokeTimeoutMs); + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } - public void stopWithOnOff(DefaultClusterCallback callback) { - stopWithOnOff(chipClusterPtr, callback, null); + public void stopWithOnOff( + DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride) { + stopWithOnOff(chipClusterPtr, callback, optionsMask, optionsOverride, null); } - public void stopWithOnOff(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { - - stopWithOnOff(chipClusterPtr, callback, timedInvokeTimeoutMs); + public void stopWithOnOff( + DefaultClusterCallback callback, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + stopWithOnOff(chipClusterPtr, callback, optionsMask, optionsOverride, timedInvokeTimeoutMs); } private native void moveToLevel( @@ -1662,8 +1717,8 @@ private native void moveToLevel( DefaultClusterCallback Callback, Integer level, Integer transitionTime, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void move( @@ -1671,8 +1726,8 @@ private native void move( DefaultClusterCallback Callback, Integer moveMode, Integer rate, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void step( @@ -1681,15 +1736,15 @@ private native void step( Integer stepMode, Integer stepSize, Integer transitionTime, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void stop( long chipClusterPtr, DefaultClusterCallback Callback, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void moveToLevelWithOnOff( @@ -1697,6 +1752,8 @@ private native void moveToLevelWithOnOff( DefaultClusterCallback Callback, Integer level, Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void moveWithOnOff( @@ -1704,6 +1761,8 @@ private native void moveWithOnOff( DefaultClusterCallback Callback, Integer moveMode, Integer rate, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void stepWithOnOff( @@ -1712,11 +1771,15 @@ private native void stepWithOnOff( Integer stepMode, Integer stepSize, Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void stopWithOnOff( long chipClusterPtr, DefaultClusterCallback Callback, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); public interface OnLevelAttributeCallback { @@ -9975,14 +10038,6 @@ public interface TrustedRootCertificatesAttributeCallback { default void onSubscriptionEstablished() {} } - public interface CurrentFabricIndexAttributeCallback { - void onSuccess(Integer value); - - void onError(Exception ex); - - default void onSubscriptionEstablished() {} - } - public interface GeneratedCommandListAttributeCallback { void onSuccess(List valueList); @@ -10053,12 +10108,12 @@ public void subscribeTrustedRootCertificatesAttribute( subscribeTrustedRootCertificatesAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readCurrentFabricIndexAttribute(CurrentFabricIndexAttributeCallback callback) { + public void readCurrentFabricIndexAttribute(IntegerAttributeCallback callback) { readCurrentFabricIndexAttribute(chipClusterPtr, callback); } public void subscribeCurrentFabricIndexAttribute( - CurrentFabricIndexAttributeCallback callback, int minInterval, int maxInterval) { + IntegerAttributeCallback callback, int minInterval, int maxInterval) { subscribeCurrentFabricIndexAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -10140,13 +10195,10 @@ private native void subscribeTrustedRootCertificatesAttribute( int maxInterval); private native void readCurrentFabricIndexAttribute( - long chipClusterPtr, CurrentFabricIndexAttributeCallback callback); + long chipClusterPtr, IntegerAttributeCallback callback); private native void subscribeCurrentFabricIndexAttribute( - long chipClusterPtr, - CurrentFabricIndexAttributeCallback callback, - int minInterval, - int maxInterval); + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); private native void readGeneratedCommandListAttribute( long chipClusterPtr, GeneratedCommandListAttributeCallback callback); @@ -21027,6 +21079,14 @@ public ApplicationBasicCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface VendorIDAttributeCallback { + void onSuccess(Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public interface AllowedVendorListAttributeCallback { void onSuccess(List valueList); @@ -21068,12 +21128,12 @@ public void subscribeVendorNameAttribute( subscribeVendorNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readVendorIDAttribute(IntegerAttributeCallback callback) { + public void readVendorIDAttribute(VendorIDAttributeCallback callback) { readVendorIDAttribute(chipClusterPtr, callback); } public void subscribeVendorIDAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + VendorIDAttributeCallback callback, int minInterval, int maxInterval) { subscribeVendorIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -21177,10 +21237,10 @@ private native void subscribeVendorNameAttribute( int maxInterval); private native void readVendorIDAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, VendorIDAttributeCallback callback); private native void subscribeVendorIDAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, VendorIDAttributeCallback callback, int minInterval, int maxInterval); private native void readApplicationNameAttribute( long chipClusterPtr, CharStringAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java index aac77c2687c54b..a6468550e3545b 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java @@ -29,19 +29,19 @@ public static class AccessControlClusterAccessControlEntryChangedEvent { public @Nullable Integer adminPasscodeID; public Integer changeType; public @Nullable ChipStructs.AccessControlClusterAccessControlEntry latestValue; - public Integer adminFabricIndex; + public Integer fabricIndex; public AccessControlClusterAccessControlEntryChangedEvent( @Nullable Long adminNodeID, @Nullable Integer adminPasscodeID, Integer changeType, @Nullable ChipStructs.AccessControlClusterAccessControlEntry latestValue, - Integer adminFabricIndex) { + Integer fabricIndex) { this.adminNodeID = adminNodeID; this.adminPasscodeID = adminPasscodeID; this.changeType = changeType; this.latestValue = latestValue; - this.adminFabricIndex = adminFabricIndex; + this.fabricIndex = fabricIndex; } @Override @@ -60,8 +60,8 @@ public String toString() { output.append("\tlatestValue: "); output.append(latestValue); output.append("\n"); - output.append("\tadminFabricIndex: "); - output.append(adminFabricIndex); + output.append("\tfabricIndex: "); + output.append(fabricIndex); output.append("\n"); output.append("}\n"); return output.toString(); @@ -73,19 +73,19 @@ public static class AccessControlClusterAccessControlExtensionChangedEvent { public @Nullable Integer adminPasscodeID; public Integer changeType; public @Nullable ChipStructs.AccessControlClusterExtensionEntry latestValue; - public Integer adminFabricIndex; + public Integer fabricIndex; public AccessControlClusterAccessControlExtensionChangedEvent( @Nullable Long adminNodeID, @Nullable Integer adminPasscodeID, Integer changeType, @Nullable ChipStructs.AccessControlClusterExtensionEntry latestValue, - Integer adminFabricIndex) { + Integer fabricIndex) { this.adminNodeID = adminNodeID; this.adminPasscodeID = adminPasscodeID; this.changeType = changeType; this.latestValue = latestValue; - this.adminFabricIndex = adminFabricIndex; + this.fabricIndex = fabricIndex; } @Override @@ -104,8 +104,8 @@ public String toString() { output.append("\tlatestValue: "); output.append(latestValue); output.append("\n"); - output.append("\tadminFabricIndex: "); - output.append(adminFabricIndex); + output.append("\tfabricIndex: "); + output.append(fabricIndex); output.append("\n"); output.append("}\n"); return output.toString(); @@ -210,13 +210,19 @@ public String toString() { } public static class BasicClusterLeaveEvent { + public Integer fabricIndex; - public BasicClusterLeaveEvent() {} + public BasicClusterLeaveEvent(Integer fabricIndex) { + this.fabricIndex = fabricIndex; + } @Override public String toString() { StringBuilder output = new StringBuilder(); output.append("BasicClusterLeaveEvent {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); output.append("}\n"); return output.toString(); } @@ -1248,18 +1254,18 @@ public String toString() { } public static class TestClusterClusterTestFabricScopedEventEvent { - public Integer arg1; + public Integer fabricIndex; - public TestClusterClusterTestFabricScopedEventEvent(Integer arg1) { - this.arg1 = arg1; + public TestClusterClusterTestFabricScopedEventEvent(Integer fabricIndex) { + this.fabricIndex = fabricIndex; } @Override public String toString() { StringBuilder output = new StringBuilder(); output.append("TestClusterClusterTestFabricScopedEventEvent {\n"); - output.append("\targ1: "); - output.append(arg1); + output.append("\tfabricIndex: "); + output.append(fabricIndex); output.append("\n"); output.append("}\n"); return output.toString(); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 7c587859ab2e0f..a7431df44035e6 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -8007,15 +8007,15 @@ public Map> getCommandMap() { levelControlmoveToLevelCommandParams.put( "transitionTime", levelControlmoveToLeveltransitionTimeCommandParameterInfo); - CommandParameterInfo levelControlmoveToLeveloptionMaskCommandParameterInfo = - new CommandParameterInfo("optionMask", Integer.class, Integer.class); + CommandParameterInfo levelControlmoveToLeveloptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); levelControlmoveToLevelCommandParams.put( - "optionMask", levelControlmoveToLeveloptionMaskCommandParameterInfo); + "optionsMask", levelControlmoveToLeveloptionsMaskCommandParameterInfo); - CommandParameterInfo levelControlmoveToLeveloptionOverrideCommandParameterInfo = - new CommandParameterInfo("optionOverride", Integer.class, Integer.class); + CommandParameterInfo levelControlmoveToLeveloptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); levelControlmoveToLevelCommandParams.put( - "optionOverride", levelControlmoveToLeveloptionOverrideCommandParameterInfo); + "optionsOverride", levelControlmoveToLeveloptionsOverrideCommandParameterInfo); InteractionInfo levelControlmoveToLevelInteractionInfo = new InteractionInfo( @@ -8025,8 +8025,8 @@ public Map> getCommandMap() { (DefaultClusterCallback) callback, (Integer) commandArguments.get("level"), (Integer) commandArguments.get("transitionTime"), - (Integer) commandArguments.get("optionMask"), - (Integer) commandArguments.get("optionOverride")); + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlmoveToLevelCommandParams); @@ -8042,14 +8042,15 @@ public Map> getCommandMap() { new CommandParameterInfo("rate", Integer.class, Integer.class); levelControlmoveCommandParams.put("rate", levelControlmoverateCommandParameterInfo); - CommandParameterInfo levelControlmoveoptionMaskCommandParameterInfo = - new CommandParameterInfo("optionMask", Integer.class, Integer.class); - levelControlmoveCommandParams.put("optionMask", levelControlmoveoptionMaskCommandParameterInfo); + CommandParameterInfo levelControlmoveoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlmoveCommandParams.put( + "optionsMask", levelControlmoveoptionsMaskCommandParameterInfo); - CommandParameterInfo levelControlmoveoptionOverrideCommandParameterInfo = - new CommandParameterInfo("optionOverride", Integer.class, Integer.class); + CommandParameterInfo levelControlmoveoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); levelControlmoveCommandParams.put( - "optionOverride", levelControlmoveoptionOverrideCommandParameterInfo); + "optionsOverride", levelControlmoveoptionsOverrideCommandParameterInfo); InteractionInfo levelControlmoveInteractionInfo = new InteractionInfo( @@ -8059,8 +8060,8 @@ public Map> getCommandMap() { (DefaultClusterCallback) callback, (Integer) commandArguments.get("moveMode"), (Integer) commandArguments.get("rate"), - (Integer) commandArguments.get("optionMask"), - (Integer) commandArguments.get("optionOverride")); + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlmoveCommandParams); @@ -8080,14 +8081,15 @@ public Map> getCommandMap() { levelControlstepCommandParams.put( "transitionTime", levelControlsteptransitionTimeCommandParameterInfo); - CommandParameterInfo levelControlstepoptionMaskCommandParameterInfo = - new CommandParameterInfo("optionMask", Integer.class, Integer.class); - levelControlstepCommandParams.put("optionMask", levelControlstepoptionMaskCommandParameterInfo); + CommandParameterInfo levelControlstepoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlstepCommandParams.put( + "optionsMask", levelControlstepoptionsMaskCommandParameterInfo); - CommandParameterInfo levelControlstepoptionOverrideCommandParameterInfo = - new CommandParameterInfo("optionOverride", Integer.class, Integer.class); + CommandParameterInfo levelControlstepoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); levelControlstepCommandParams.put( - "optionOverride", levelControlstepoptionOverrideCommandParameterInfo); + "optionsOverride", levelControlstepoptionsOverrideCommandParameterInfo); InteractionInfo levelControlstepInteractionInfo = new InteractionInfo( @@ -8098,22 +8100,23 @@ public Map> getCommandMap() { (Integer) commandArguments.get("stepMode"), (Integer) commandArguments.get("stepSize"), (Integer) commandArguments.get("transitionTime"), - (Integer) commandArguments.get("optionMask"), - (Integer) commandArguments.get("optionOverride")); + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlstepCommandParams); levelControlClusterInteractionInfoMap.put("step", levelControlstepInteractionInfo); Map levelControlstopCommandParams = new LinkedHashMap(); - CommandParameterInfo levelControlstopoptionMaskCommandParameterInfo = - new CommandParameterInfo("optionMask", Integer.class, Integer.class); - levelControlstopCommandParams.put("optionMask", levelControlstopoptionMaskCommandParameterInfo); + CommandParameterInfo levelControlstopoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlstopCommandParams.put( + "optionsMask", levelControlstopoptionsMaskCommandParameterInfo); - CommandParameterInfo levelControlstopoptionOverrideCommandParameterInfo = - new CommandParameterInfo("optionOverride", Integer.class, Integer.class); + CommandParameterInfo levelControlstopoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); levelControlstopCommandParams.put( - "optionOverride", levelControlstopoptionOverrideCommandParameterInfo); + "optionsOverride", levelControlstopoptionsOverrideCommandParameterInfo); InteractionInfo levelControlstopInteractionInfo = new InteractionInfo( @@ -8121,8 +8124,8 @@ public Map> getCommandMap() { ((ChipClusters.LevelControlCluster) cluster) .stop( (DefaultClusterCallback) callback, - (Integer) commandArguments.get("optionMask"), - (Integer) commandArguments.get("optionOverride")); + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlstopCommandParams); @@ -8139,6 +8142,16 @@ public Map> getCommandMap() { levelControlmoveToLevelWithOnOffCommandParams.put( "transitionTime", levelControlmoveToLevelWithOnOfftransitionTimeCommandParameterInfo); + CommandParameterInfo levelControlmoveToLevelWithOnOffoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlmoveToLevelWithOnOffCommandParams.put( + "optionsMask", levelControlmoveToLevelWithOnOffoptionsMaskCommandParameterInfo); + + CommandParameterInfo levelControlmoveToLevelWithOnOffoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + levelControlmoveToLevelWithOnOffCommandParams.put( + "optionsOverride", levelControlmoveToLevelWithOnOffoptionsOverrideCommandParameterInfo); + InteractionInfo levelControlmoveToLevelWithOnOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8146,7 +8159,9 @@ public Map> getCommandMap() { .moveToLevelWithOnOff( (DefaultClusterCallback) callback, (Integer) commandArguments.get("level"), - (Integer) commandArguments.get("transitionTime")); + (Integer) commandArguments.get("transitionTime"), + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlmoveToLevelWithOnOffCommandParams); @@ -8164,6 +8179,16 @@ public Map> getCommandMap() { levelControlmoveWithOnOffCommandParams.put( "rate", levelControlmoveWithOnOffrateCommandParameterInfo); + CommandParameterInfo levelControlmoveWithOnOffoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlmoveWithOnOffCommandParams.put( + "optionsMask", levelControlmoveWithOnOffoptionsMaskCommandParameterInfo); + + CommandParameterInfo levelControlmoveWithOnOffoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + levelControlmoveWithOnOffCommandParams.put( + "optionsOverride", levelControlmoveWithOnOffoptionsOverrideCommandParameterInfo); + InteractionInfo levelControlmoveWithOnOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8171,7 +8196,9 @@ public Map> getCommandMap() { .moveWithOnOff( (DefaultClusterCallback) callback, (Integer) commandArguments.get("moveMode"), - (Integer) commandArguments.get("rate")); + (Integer) commandArguments.get("rate"), + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlmoveWithOnOffCommandParams); @@ -8194,6 +8221,16 @@ public Map> getCommandMap() { levelControlstepWithOnOffCommandParams.put( "transitionTime", levelControlstepWithOnOfftransitionTimeCommandParameterInfo); + CommandParameterInfo levelControlstepWithOnOffoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlstepWithOnOffCommandParams.put( + "optionsMask", levelControlstepWithOnOffoptionsMaskCommandParameterInfo); + + CommandParameterInfo levelControlstepWithOnOffoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + levelControlstepWithOnOffCommandParams.put( + "optionsOverride", levelControlstepWithOnOffoptionsOverrideCommandParameterInfo); + InteractionInfo levelControlstepWithOnOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8202,7 +8239,9 @@ public Map> getCommandMap() { (DefaultClusterCallback) callback, (Integer) commandArguments.get("stepMode"), (Integer) commandArguments.get("stepSize"), - (Integer) commandArguments.get("transitionTime")); + (Integer) commandArguments.get("transitionTime"), + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlstepWithOnOffCommandParams); @@ -8210,11 +8249,24 @@ public Map> getCommandMap() { "stepWithOnOff", levelControlstepWithOnOffInteractionInfo); Map levelControlstopWithOnOffCommandParams = new LinkedHashMap(); + CommandParameterInfo levelControlstopWithOnOffoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlstopWithOnOffCommandParams.put( + "optionsMask", levelControlstopWithOnOffoptionsMaskCommandParameterInfo); + + CommandParameterInfo levelControlstopWithOnOffoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + levelControlstopWithOnOffCommandParams.put( + "optionsOverride", levelControlstopWithOnOffoptionsOverrideCommandParameterInfo); + InteractionInfo levelControlstopWithOnOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) - .stopWithOnOff((DefaultClusterCallback) callback); + .stopWithOnOff( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlstopWithOnOffCommandParams); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 6ad1a6f0886652..b38fa1876d9b89 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -5439,9 +5439,7 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.OperationalCredentialsCluster) cluster) .readCurrentFabricIndexAttribute( - (ChipClusters.OperationalCredentialsCluster - .CurrentFabricIndexAttributeCallback) - callback); + (ChipClusters.IntegerAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readOperationalCredentialsCurrentFabricIndexCommandParams); @@ -10852,7 +10850,8 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ApplicationBasicCluster) cluster) - .readVendorIDAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readVendorIDAttribute( + (ChipClusters.ApplicationBasicCluster.VendorIDAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readApplicationBasicVendorIDCommandParams); diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index 5297f0d2fba9c8..3baf852afba26c 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -67,6 +67,7 @@ shared_library("ChipDeviceCtrl") { "chip/internal/ChipThreadWork.h", "chip/internal/CommissionerImpl.cpp", "chip/logging/LoggingRedirect.cpp", + "chip/utils/DeviceProxyUtils.cpp", ] } else { sources += [ @@ -358,7 +359,7 @@ chip_python_wheel_action("chip-clusters") { py_package_name = "chip-clusters" py_platform_tag = "any" - output_name = "chip_clusters-${chip_python_version}-py3-any.whl" + output_name = "chip_clusters-${chip_python_version}-py3-none-any.whl" } chip_python_wheel_action("chip-repl") { @@ -406,5 +407,5 @@ chip_python_wheel_action("chip-repl") { ":chip-core", ] - output_name = "chip_repl-${chip_python_version}-py3-any.whl" + output_name = "chip_repl-${chip_python_version}-py3-none-any.whl" } diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index 6927c6c65f4b1e..f181f3273da52b 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -109,7 +109,7 @@ chip::NodeId kDefaultLocalDeviceId = chip::kTestControllerNodeId; chip::NodeId kRemoteDeviceId = chip::kTestDeviceNodeId; extern "C" { -ChipError::StorageType pychip_DeviceController_StackInit(uint32_t bluetoothAdapterId); +ChipError::StorageType pychip_DeviceController_StackInit(); ChipError::StorageType pychip_DeviceController_StackShutdown(); ChipError::StorageType pychip_DeviceController_NewDeviceController(chip::Controller::DeviceCommissioner ** outDevCtrl, @@ -222,17 +222,10 @@ chip::Controller::Python::StorageAdapter * pychip_Storage_GetStorageAdapter() return sStorageAdapter; } -ChipError::StorageType pychip_DeviceController_StackInit(uint32_t bluetoothAdapterId) +ChipError::StorageType pychip_DeviceController_StackInit() { VerifyOrDie(sStorageAdapter != nullptr); -#if CHIP_DEVICE_LAYER_TARGET_LINUX && CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE - // By default, Linux device is configured as a BLE peripheral while the controller needs a BLE central. - CHIP_ERROR err = - chip::DeviceLayer::Internal::BLEMgrImpl().ConfigureBle(/* BLE adapter ID */ bluetoothAdapterId, /* BLE central */ true); - VerifyOrReturnError(err == CHIP_NO_ERROR, err.AsInteger()); -#endif - FactoryInitParams factoryParams; factoryParams.fabricIndependentStorage = sStorageAdapter; @@ -298,12 +291,9 @@ ChipError::StorageType pychip_DeviceController_GetAddressAndPort(chip::Controlle uint16_t * outPort) { Inet::IPAddress address; - ReturnErrorOnFailure( - devCtrl - ->GetPeerAddressAndPort(PeerId().SetCompressedFabricId(devCtrl->GetCompressedFabricId()).SetNodeId(nodeId), address, - *outPort) - .AsInteger()); - VerifyOrReturnError(address.ToString(outAddress, maxAddressLen), CHIP_ERROR_BUFFER_TOO_SMALL.AsInteger()); + ReturnErrorOnFailure(devCtrl->GetPeerAddressAndPort(nodeId, address, *outPort).AsInteger()); + VerifyOrReturnError(address.ToString(outAddress, static_cast(maxAddressLen)), + CHIP_ERROR_BUFFER_TOO_SMALL.AsInteger()); return CHIP_NO_ERROR.AsInteger(); } @@ -621,7 +611,7 @@ struct GetDeviceCallbacks delete self; } - static void OnConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error) + static void OnConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { auto * self = static_cast(context); self->mCallback(nullptr, error.AsInteger()); diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index edc2944afea6aa..5aa1c14efca6df 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -563,7 +563,7 @@ def GetClusterHandler(self): return self._Cluster - def GetConnectedDeviceSync(self, nodeid, allowPASE=True): + def GetConnectedDeviceSync(self, nodeid, allowPASE=True, timeoutMs: int = None): self.CheckIsActive() returnDevice = c_void_p(None) @@ -582,13 +582,13 @@ def DeviceAvailableCallback(device, err): if allowPASE: res = self._ChipStack.Call(lambda: self._dmLib.pychip_GetDeviceBeingCommissioned( - self.devCtrl, nodeid, byref(returnDevice))) + self.devCtrl, nodeid, byref(returnDevice)), timeoutMs) if res == 0: print('Using PASE connection') return returnDevice res = self._ChipStack.Call(lambda: self._dmLib.pychip_GetConnectedDeviceByNodeId( - self.devCtrl, nodeid, DeviceAvailableCallback)) + self.devCtrl, nodeid, DeviceAvailableCallback), timeoutMs) if res != 0: raise self._ChipStack.ErrorToException(res) @@ -596,43 +596,66 @@ def DeviceAvailableCallback(device, err): # Check if the device is already set before waiting for the callback. if returnDevice.value is None: with deviceAvailableCV: - deviceAvailableCV.wait() + timeout = None + if (timeoutMs): + timeout = float(timeoutMs) / 1000 + + ret = deviceAvailableCV.wait(timeout) + if ret is False: + raise TimeoutError("Timed out waiting for DNS-SD resolution") if returnDevice.value is None: raise self._ChipStack.ErrorToException(returnErr) return returnDevice - async def SendCommand(self, nodeid: int, endpoint: int, payload: ClusterObjects.ClusterCommand, responseType=None, timedRequestTimeoutMs: int = None): + def ComputeRoundTripTimeout(self, nodeid, upperLayerProcessingTimeoutMs: int = 0): + ''' Returns a computed timeout value based on the round-trip time it takes for the peer at the other end of the session to + receive a message, process it and send it back. This is computed based on the session type, the type of transport, sleepy + characteristics of the target and a caller-provided value for the time it takes to process a message at the upper layer on + the target For group sessions. + + This will result in a session being established if one wasn't already. + ''' + device = self.GetConnectedDeviceSync(nodeid) + res = self._ChipStack.Call(lambda: self._dmLib.pychip_DeviceProxy_ComputeRoundTripTimeout( + device, upperLayerProcessingTimeoutMs)) + return res + + async def SendCommand(self, nodeid: int, endpoint: int, payload: ClusterObjects.ClusterCommand, responseType=None, timedRequestTimeoutMs: int = None, interactionTimeoutMs: int = None): ''' Send a cluster-object encapsulated command to a node and get returned a future that can be awaited upon to receive the response. If a valid responseType is passed in, that will be used to deserialize the object. If not, the type will be automatically deduced from the metadata received over the wire. timedWriteTimeoutMs: Timeout for a timed invoke request. Omit or set to 'None' to indicate a non-timed request. + interactionTimeoutMs: Overall timeout for the interaction. Omit or set to 'None' to have the SDK automatically compute the right + timeout value based on transport characteristics as well as the responsiveness of the target. ''' self.CheckIsActive() eventLoop = asyncio.get_running_loop() future = eventLoop.create_future() - device = self.GetConnectedDeviceSync(nodeid) + device = self.GetConnectedDeviceSync(nodeid, timeoutMs=interactionTimeoutMs) res = ClusterCommand.SendCommand( future, eventLoop, responseType, device, ClusterCommand.CommandPath( EndpointId=endpoint, ClusterId=payload.cluster_id, CommandId=payload.command_id, - ), payload, timedRequestTimeoutMs=timedRequestTimeoutMs) + ), payload, timedRequestTimeoutMs=timedRequestTimeoutMs, interactionTimeoutMs=interactionTimeoutMs) if res != 0: future.set_exception(self._ChipStack.ErrorToException(res)) return await future - async def WriteAttribute(self, nodeid: int, attributes: typing.List[typing.Tuple[int, ClusterObjects.ClusterAttributeDescriptor, int]], timedRequestTimeoutMs: int = None): + async def WriteAttribute(self, nodeid: int, attributes: typing.List[typing.Tuple[int, ClusterObjects.ClusterAttributeDescriptor, int]], timedRequestTimeoutMs: int = None, interactionTimeoutMs: int = None): ''' Write a list of attributes on a target node. nodeId: Target's Node ID timedWriteTimeoutMs: Timeout for a timed write request. Omit or set to 'None' to indicate a non-timed request. attributes: A list of tuples of type (endpoint, cluster-object): + interactionTimeoutMs: Overall timeout for the interaction. Omit or set to 'None' to have the SDK automatically compute the right + timeout value based on transport characteristics as well as the responsiveness of the target. E.g (1, Clusters.TestCluster.Attributes.XYZAttribute('hello')) -- Write 'hello' to the XYZ attribute on the test cluster to endpoint 1 @@ -642,7 +665,7 @@ async def WriteAttribute(self, nodeid: int, attributes: typing.List[typing.Tuple eventLoop = asyncio.get_running_loop() future = eventLoop.create_future() - device = self.GetConnectedDeviceSync(nodeid) + device = self.GetConnectedDeviceSync(nodeid, timeoutMs=interactionTimeoutMs) attrs = [] for v in attributes: @@ -654,7 +677,7 @@ async def WriteAttribute(self, nodeid: int, attributes: typing.List[typing.Tuple v[0], v[1], v[2], 1, v[1].value)) res = ClusterAttribute.WriteAttributes( - future, eventLoop, device, attrs, timedRequestTimeoutMs=timedRequestTimeoutMs) + future, eventLoop, device, attrs, timedRequestTimeoutMs=timedRequestTimeoutMs, interactionTimeoutMs=interactionTimeoutMs) if res != 0: raise self._ChipStack.ErrorToException(res) return await future diff --git a/src/controller/python/chip/ChipReplStartup.py b/src/controller/python/chip/ChipReplStartup.py index 3fe949c174c30a..91ac26337480bf 100644 --- a/src/controller/python/chip/ChipReplStartup.py +++ b/src/controller/python/chip/ChipReplStartup.py @@ -12,6 +12,7 @@ import argparse import builtins import chip.FabricAdmin +import chip.native from chip.utils import CommissioningBuildingBlocks import atexit @@ -140,6 +141,8 @@ def mattersetdebug(enableDebugMode: bool = True): "-d", "--debug", help="Set default logging level to debug.", action="store_true") args = parser.parse_args() +chip.native.Init() + ReplInit(args.debug) chipStack = ChipStack(persistentStoragePath=args.storagepath) fabricAdmins = LoadFabricAdmins() diff --git a/src/controller/python/chip/ChipStack.py b/src/controller/python/chip/ChipStack.py index ef1cd597d9ef9e..ffe321a5fc4bdf 100644 --- a/src/controller/python/chip/ChipStack.py +++ b/src/controller/python/chip/ChipStack.py @@ -151,10 +151,17 @@ def __call__(self): self._cv.notify_all() pythonapi.Py_DecRef(py_object(self)) - def Wait(self): + def Wait(self, timeoutMs: int = None): + timeout = None + if timeoutMs is not None: + timeout = float(timeoutMs) / 1000 + with self._cv: while self._finish is False: - self._cv.wait() + res = self._cv.wait(timeout) + if res is False: + raise TimeoutError("Timed out waiting for task to finish executing on the Matter thread") + if self._exc is not None: raise self._exc return self._res @@ -258,11 +265,8 @@ def HandleChipThreadRun(callback): # self._persistentStorage = PersistentStorage(persistentStoragePath) - if (bluetoothAdapter is None): - bluetoothAdapter = 0 - # Initialize the chip stack. - res = self._ChipStackLib.pychip_DeviceController_StackInit(bluetoothAdapter) + res = self._ChipStackLib.pychip_DeviceController_StackInit() if res != 0: raise self.ErrorToException(res) @@ -335,7 +339,7 @@ def Shutdown(self): self.devMgr = None self.callbackRes = None - def Call(self, callFunct): + def Call(self, callFunct, timeoutMs: int = None): '''Run a Python function on CHIP stack, and wait for the response. This function is a wrapper of PostTaskOnChipThread, which includes some handling of application specific logics. Calling this function on CHIP on CHIP mainloop thread will cause deadlock. @@ -344,7 +348,7 @@ def Call(self, callFunct): self.callbackRes = None self.completeEvent.clear() with self.networkLock: - res = self.PostTaskOnChipThread(callFunct).Wait() + res = self.PostTaskOnChipThread(callFunct).Wait(timeoutMs) self.completeEvent.set() if res == 0 and self.callbackRes != None: return self.callbackRes @@ -433,7 +437,7 @@ def _loadLib(self): self._ChipStackLib = chip.native.GetLibraryHandle() self._chipDLLPath = chip.native.FindNativeLibraryPath() - self._ChipStackLib.pychip_DeviceController_StackInit.argtypes = [c_uint32] + self._ChipStackLib.pychip_DeviceController_StackInit.argtypes = [] self._ChipStackLib.pychip_DeviceController_StackInit.restype = c_uint32 self._ChipStackLib.pychip_DeviceController_StackShutdown.argtypes = [] self._ChipStackLib.pychip_DeviceController_StackShutdown.restype = c_uint32 diff --git a/src/controller/python/chip/FabricAdmin.py b/src/controller/python/chip/FabricAdmin.py index cd0a5f7b7aa81c..f1ab5f7b746834 100644 --- a/src/controller/python/chip/FabricAdmin.py +++ b/src/controller/python/chip/FabricAdmin.py @@ -64,13 +64,16 @@ class FabricAdmin: boot for a given fabric and ensuring it automatically picks up the right ICAC/RCAC details as well. ''' - _handle = chip.native.GetLibraryHandle() _isActive = False activeFabricIndexList = set() activeFabricIdList = set() activeAdmins = set() vendorId = None + @classmethod + def _Handle(cls): + return chip.native.GetLibraryHandle() + def AllocateNextFabricIndex(self): ''' Allocate the next un-used fabric index. ''' @@ -133,10 +136,10 @@ def __init__(self, vendorId: int, rcac: bytes = None, icac: bytes = None, fabric print( f"New FabricAdmin: FabricId: {self._fabricId}({self._fabricIndex}), VendorId = {hex(self.vendorId)}") - self._handle.pychip_OpCreds_InitializeDelegate.restype = c_void_p + self._Handle().pychip_OpCreds_InitializeDelegate.restype = c_void_p self.closure = builtins.chipStack.Call( - lambda: self._handle.pychip_OpCreds_InitializeDelegate( + lambda: self._Handle().pychip_OpCreds_InitializeDelegate( ctypes.py_object(self), ctypes.c_uint32(self._fabricIndex)) ) @@ -195,7 +198,7 @@ def Shutdown(self, deleteFromStorage: bool = True): ''' if (self._isActive): builtins.chipStack.Call( - lambda: self._handle.pychip_OpCreds_FreeDelegate( + lambda: self._Handle().pychip_OpCreds_FreeDelegate( ctypes.c_void_p(self.closure)) ) diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index a11d324d5890a4..db29b86974a284 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -474,6 +474,9 @@ def __init__(self, transaction: 'AsyncReadTransaction', subscriptionId, devCtrl) self._subscriptionId = subscriptionId self._devCtrl = devCtrl self._isDone = False + self._onResubscriptionSucceededCb = None + self._onResubscriptionSucceededCb_isAsync = False + self._onResubscriptionAttemptedCb_isAsync = False def GetAttributes(self): ''' Returns the attribute value cache tracking the latest state on the publisher. @@ -493,14 +496,35 @@ def GetAttribute(self, path: TypedAttributePath) -> Any: def GetEvents(self): return self._readTransaction.GetAllEventValues() - def SetResubscriptionAttemptedCallback(self, callback: Callable[[SubscriptionTransaction, int, int], None]): + def OverrideLivenessTimeoutMs(self, timeoutMs: int): + handle = chip.native.GetLibraryHandle() + builtins.chipStack.Call( + lambda: handle.pychip_ReadClient_OverrideLivenessTimeout(self._readTransaction._pReadClient, timeoutMs) + ) + + def SetResubscriptionAttemptedCallback(self, callback: Callable[[SubscriptionTransaction, int, int], None], isAsync=False): ''' Sets the callback function that gets invoked anytime a re-subscription is attempted. The callback is expected to have the following signature: def Callback(transaction: SubscriptionTransaction, errorEncountered: int, nextResubscribeIntervalMsec: int) + + If the callback is an awaitable co-routine, isAsync should be set to True. ''' if callback is not None: self._onResubscriptionAttemptedCb = callback + self._onResubscriptionAttemptedCb_isAsync = isAsync + + def SetResubscriptionSucceededCallback(self, callback: Callback[[SubscriptionTransaction], None], isAsync=False): + ''' + Sets the callback function that gets invoked when a re-subscription attempt succeeds. The callback + is expected to have the following signature: + def Callback(transaction: SubscriptionTransaction) + + If the callback is an awaitable co-routine, isAsync should be set to True. + ''' + if callback is not None: + self._onResubscriptionSucceededCb = callback + self._onResubscriptionSucceededCb_isAsync = isAsync def SetAttributeUpdateCallback(self, callback: Callable[[TypedAttributePath, SubscriptionTransaction], None]): ''' @@ -550,7 +574,7 @@ def __repr__(self): return f'' -def DefaultResubscriptionAttemptedCallback(transaction: SubscriptionTransaction, terminationError, nextResubscribeIntervalMsec): +async def DefaultResubscriptionAttemptedCallback(transaction: SubscriptionTransaction, terminationError, nextResubscribeIntervalMsec): print(f"Previous subscription failed with Error: {terminationError} - re-subscribing in {nextResubscribeIntervalMsec}ms...") @@ -691,14 +715,26 @@ def _handleSubscriptionEstablished(self, subscriptionId): self._subscription_handler = SubscriptionTransaction( self, subscriptionId, self._devCtrl) self._future.set_result(self._subscription_handler) + else: + logging.info("Re-subscription succeeded!") + if self._subscription_handler._onResubscriptionSucceededCb is not None: + if (self._subscription_handler._onResubscriptionSucceededCb_isAsync): + self._event_loop.create_task( + self._subscription_handler._onResubscriptionSucceededCb(self._subscription_handler)) + else: + self._subscription_handler._onResubscriptionSucceededCb(self._subscription_handler) def handleSubscriptionEstablished(self, subscriptionId): self._event_loop.call_soon_threadsafe( self._handleSubscriptionEstablished, subscriptionId) def handleResubscriptionAttempted(self, terminationCause: int, nextResubscribeIntervalMsec: int): - self._event_loop.call_soon_threadsafe( - self._subscription_handler._onResubscriptionAttemptedCb, self._subscription_handler, terminationCause, nextResubscribeIntervalMsec) + if (self._subscription_handler._onResubscriptionAttemptedCb_isAsync): + self._event_loop.create_task(self._subscription_handler._onResubscriptionAttemptedCb( + self._subscription_handler, terminationCause, nextResubscribeIntervalMsec)) + else: + self._event_loop.call_soon_threadsafe( + self._subscription_handler._onResubscriptionAttemptedCb, self._subscription_handler, terminationCause, nextResubscribeIntervalMsec) def _handleReportBegin(self): pass @@ -873,7 +909,7 @@ def _OnWriteDoneCallback(closure): closure.handleDone() -def WriteAttributes(future: Future, eventLoop, device, attributes: List[AttributeWriteRequest], timedRequestTimeoutMs: int = None) -> int: +def WriteAttributes(future: Future, eventLoop, device, attributes: List[AttributeWriteRequest], timedRequestTimeoutMs: int = None, interactionTimeoutMs: int = None) -> int: handle = chip.native.GetLibraryHandle() writeargs = [] @@ -898,7 +934,7 @@ def WriteAttributes(future: Future, eventLoop, device, attributes: List[Attribut ctypes.pythonapi.Py_IncRef(ctypes.py_object(transaction)) res = builtins.chipStack.Call( lambda: handle.pychip_WriteClient_WriteAttributes( - ctypes.py_object(transaction), device, ctypes.c_uint16(0 if timedRequestTimeoutMs is None else timedRequestTimeoutMs), ctypes.c_size_t(len(attributes)), *writeargs)) + ctypes.py_object(transaction), device, ctypes.c_uint16(0 if timedRequestTimeoutMs is None else timedRequestTimeoutMs), ctypes.c_uint16(0 if interactionTimeoutMs is None else interactionTimeoutMs), ctypes.c_size_t(len(attributes)), *writeargs)) if res != 0: ctypes.pythonapi.Py_DecRef(ctypes.py_object(transaction)) return res diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index b729e83bbc1284..ea60bc87d43032 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -480,8 +480,8 @@ class ChipClusters: "args": { "level": "int", "transitionTime": "int", - "optionMask": "int", - "optionOverride": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000001: { @@ -490,8 +490,8 @@ class ChipClusters: "args": { "moveMode": "int", "rate": "int", - "optionMask": "int", - "optionOverride": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000002: { @@ -501,16 +501,16 @@ class ChipClusters: "stepMode": "int", "stepSize": "int", "transitionTime": "int", - "optionMask": "int", - "optionOverride": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000003: { "commandId": 0x00000003, "commandName": "Stop", "args": { - "optionMask": "int", - "optionOverride": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000004: { @@ -519,6 +519,8 @@ class ChipClusters: "args": { "level": "int", "transitionTime": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000005: { @@ -527,6 +529,8 @@ class ChipClusters: "args": { "moveMode": "int", "rate": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000006: { @@ -536,12 +540,16 @@ class ChipClusters: "stepMode": "int", "stepSize": "int", "transitionTime": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000007: { "commandId": 0x00000007, "commandName": "StopWithOnOff", "args": { + "optionsMask": "int", + "optionsOverride": "int", }, }, }, diff --git a/src/controller/python/chip/clusters/Command.py b/src/controller/python/chip/clusters/Command.py index 7d53b21784ff5e..74101d4edb47cf 100644 --- a/src/controller/python/chip/clusters/Command.py +++ b/src/controller/python/chip/clusters/Command.py @@ -145,13 +145,18 @@ def _OnCommandSenderDoneCallback(closure): ctypes.pythonapi.Py_DecRef(ctypes.py_object(closure)) -def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPath: CommandPath, payload: ClusterCommand, timedRequestTimeoutMs: int = None) -> int: +def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPath: CommandPath, payload: ClusterCommand, timedRequestTimeoutMs: int = None, interactionTimeoutMs: int = None) -> int: ''' Send a cluster-object encapsulated command to a device and does the following: - On receipt of a successful data response, returns the cluster-object equivalent through the provided future. - None (on a successful response containing no data) - Raises an exception if any errors are encountered. If no response type is provided above, the type will be automatically deduced. + + If a valid timedRequestTimeoutMs is provided, a timed interaction will be initiated instead. + If a valid interactionTimeoutMs is provided, the interaction will terminate with a CHIP_ERROR_TIMEOUT if a response + has not been received within that timeout. If it isn't provided, a sensible value will be automatically computed that + accounts for the underlying characteristics of both the transport and the responsiveness of the receiver. ''' if (responseType is not None) and (not issubclass(responseType, ClusterCommand)): raise ValueError("responseType must be a ClusterCommand or None") @@ -166,7 +171,7 @@ def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPa ctypes.pythonapi.Py_IncRef(ctypes.py_object(transaction)) return builtins.chipStack.Call( lambda: handle.pychip_CommandSender_SendCommand(ctypes.py_object( - transaction), device, c_uint16(0 if timedRequestTimeoutMs is None else timedRequestTimeoutMs), commandPath.EndpointId, commandPath.ClusterId, commandPath.CommandId, payloadTLV, len(payloadTLV))) + transaction), device, c_uint16(0 if timedRequestTimeoutMs is None else timedRequestTimeoutMs), commandPath.EndpointId, commandPath.ClusterId, commandPath.CommandId, payloadTLV, len(payloadTLV), ctypes.c_uint16(0 if interactionTimeoutMs is None else interactionTimeoutMs))) def Init(): diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 723dc91cb1797a..4951b401531cdf 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -1649,14 +1649,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="level", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="optionMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionOverride", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) level: 'uint' = 0 transitionTime: 'uint' = 0 - optionMask: 'uint' = 0 - optionOverride: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class Move(ClusterCommand): @@ -1670,14 +1670,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=LevelControl.Enums.MoveMode), ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="optionMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionOverride", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) moveMode: 'LevelControl.Enums.MoveMode' = 0 rate: 'uint' = 0 - optionMask: 'uint' = 0 - optionOverride: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class Step(ClusterCommand): @@ -1692,15 +1692,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=LevelControl.Enums.StepMode), ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionOverride", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) stepMode: 'LevelControl.Enums.StepMode' = 0 stepSize: 'uint' = 0 transitionTime: 'uint' = 0 - optionMask: 'uint' = 0 - optionOverride: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class Stop(ClusterCommand): @@ -1712,12 +1712,12 @@ class Stop(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="optionMask", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="optionOverride", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), ]) - optionMask: 'uint' = 0 - optionOverride: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class MoveToLevelWithOnOff(ClusterCommand): @@ -1731,10 +1731,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="level", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) level: 'uint' = 0 transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class MoveWithOnOff(ClusterCommand): @@ -1748,10 +1752,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=LevelControl.Enums.MoveMode), ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) moveMode: 'LevelControl.Enums.MoveMode' = 0 rate: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class StepWithOnOff(ClusterCommand): @@ -1766,11 +1774,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=LevelControl.Enums.StepMode), ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) stepMode: 'LevelControl.Enums.StepMode' = 0 stepSize: 'uint' = 0 transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class StopWithOnOff(ClusterCommand): @@ -1782,8 +1794,12 @@ class StopWithOnOff(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), ]) + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class MoveToClosestFrequency(ClusterCommand): @@ -3106,14 +3122,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.AccessControlEntry]), - ClusterObjectFieldDescriptor(Label="adminFabricIndex", Tag=254, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) adminNodeID: 'typing.Union[Nullable, uint]' = NullValue adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlEntry]' = NullValue - adminFabricIndex: 'uint' = 0 + fabricIndex: 'uint' = 0 @dataclass class AccessControlExtensionChanged(ClusterEvent): @@ -3133,14 +3149,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.ExtensionEntry]), - ClusterObjectFieldDescriptor(Label="adminFabricIndex", Tag=254, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) adminNodeID: 'typing.Union[Nullable, uint]' = NullValue adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 latestValue: 'typing.Union[Nullable, AccessControl.Structs.ExtensionEntry]' = NullValue - adminFabricIndex: 'uint' = 0 + fabricIndex: 'uint' = 0 @dataclass @@ -4179,8 +4195,10 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=0, Type=uint), ]) + fabricIndex: 'uint' = 0 @dataclass class ReachableChanged(ClusterEvent): @@ -11042,7 +11060,6 @@ class OperationalCertStatus(IntEnum): kMissingCsr = 0x04 kTableFull = 0x05 kInvalidAdminSubject = 0x06 - kInsufficientPrivilege = 0x08 kFabricConflict = 0x09 kLabelConflict = 0x0A kInvalidFabricIndex = 0x0B @@ -28682,9 +28699,9 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="arg1", Tag=254, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - arg1: 'uint' = 0 + fabricIndex: 'uint' = 0 diff --git a/src/controller/python/chip/clusters/attribute.cpp b/src/controller/python/chip/clusters/attribute.cpp index e4480a3bb1e059..488c1bc1c47521 100644 --- a/src/controller/python/chip/clusters/attribute.cpp +++ b/src/controller/python/chip/clusters/attribute.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include "system/SystemClock.h" #include #include #include @@ -22,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -29,6 +31,8 @@ #include #include +#include + using namespace chip; using namespace chip::app; @@ -144,9 +148,12 @@ class ReadClientCallback : public ReadClient::Callback gOnSubscriptionEstablishedCallback(mAppContext, aSubscriptionId); } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override + CHIP_ERROR OnResubscriptionNeeded(ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override { - gOnResubscriptionAttemptedCallback(mAppContext, aTerminationCause.AsInteger(), aNextResubscribeIntervalMsec); + ReturnErrorOnFailure(ReadClient::Callback::OnResubscriptionNeeded(apReadClient, aTerminationCause)); + gOnResubscriptionAttemptedCallback(mAppContext, aTerminationCause.AsInteger(), + apReadClient->ComputeTimeTillNextSubscription()); + return CHIP_NO_ERROR; } void OnEventData(const EventHeader & aEventHeader, TLV::TLVReader * apData, const StatusIB * apStatus) override @@ -241,7 +248,8 @@ struct __attribute__((packed)) PyReadAttributeParams // Encodes n attribute write requests, follows 3 * n arguments, in the (AttributeWritePath*=void *, uint8_t*, size_t) order. chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, - uint16_t timedWriteTimeoutMs, size_t n, ...); + uint16_t timedWriteTimeoutMs, uint16_t interactionTimeoutMs, + size_t n, ...); chip::ChipError::StorageType pychip_ReadClient_ReadAttributes(void * appContext, ReadClient ** pReadClient, ReadClientCallback ** pCallback, DeviceProxy * device, uint8_t * readParamsBuf, size_t n, size_t total, ...); @@ -319,7 +327,8 @@ void pychip_ReadClient_InitCallbacks(OnReadAttributeDataCallback onReadAttribute } chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, - uint16_t timedWriteTimeoutMs, size_t n, ...) + uint16_t timedWriteTimeoutMs, uint16_t interactionTimeoutMs, + size_t n, ...) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -331,7 +340,7 @@ chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContex va_list args; va_start(args, n); - VerifyOrExit(device != nullptr && device->GetSecureSession().HasValue(), err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(device != nullptr && device->GetSecureSession().HasValue(), err = CHIP_ERROR_MISSING_SECURE_SESSION); { for (size_t i = 0; i < n; i++) @@ -359,7 +368,9 @@ chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContex } } - SuccessOrExit(err = client->SendWriteRequest(device->GetSecureSession().Value())); + SuccessOrExit(err = client->SendWriteRequest(device->GetSecureSession().Value(), + interactionTimeoutMs != 0 ? System::Clock::Milliseconds32(interactionTimeoutMs) + : System::Clock::kZero)); client.release(); callback.release(); @@ -377,6 +388,12 @@ void pychip_ReadClient_Abort(ReadClient * apReadClient, ReadClientCallback * apC delete apCallback; } +void pychip_ReadClient_OverrideLivenessTimeout(ReadClient * pReadClient, uint32_t livenessTimeoutMs) +{ + VerifyOrDie(pReadClient != nullptr); + pReadClient->OverrideLivenessTimeout(System::Clock::Milliseconds32(livenessTimeoutMs)); +} + chip::ChipError::StorageType pychip_ReadClient_Read(void * appContext, ReadClient ** pReadClient, ReadClientCallback ** pCallback, DeviceProxy * device, uint8_t * readParamsBuf, size_t numAttributePaths, size_t numDataversionFilters, size_t numEventPaths, ...) @@ -458,7 +475,6 @@ chip::ChipError::StorageType pychip_ReadClient_Read(void * appContext, ReadClien params.mMinIntervalFloorSeconds = pyParams.minInterval; params.mMaxIntervalCeilingSeconds = pyParams.maxInterval; params.mKeepSubscriptions = pyParams.keepSubscriptions; - params.mResubscribePolicy = PythonResubscribePolicy; dataVersionFilters.release(); attributePaths.release(); diff --git a/src/controller/python/chip/clusters/command.cpp b/src/controller/python/chip/clusters/command.cpp index e87a2252048b26..342e624698ed18 100644 --- a/src/controller/python/chip/clusters/command.cpp +++ b/src/controller/python/chip/clusters/command.cpp @@ -35,7 +35,8 @@ extern "C" { chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, uint16_t timedRequestTimeoutMs, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::CommandId commandId, - const uint8_t * payload, size_t length); + const uint8_t * payload, size_t length, + uint16_t interactionTimeoutMs); } namespace chip { @@ -127,10 +128,12 @@ void pychip_CommandSender_InitCallbacks(OnCommandSenderResponseCallback onComman chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, uint16_t timedRequestTimeoutMs, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::CommandId commandId, - const uint8_t * payload, size_t length) + const uint8_t * payload, size_t length, uint16_t interactionTimeoutMs) { CHIP_ERROR err = CHIP_NO_ERROR; + VerifyOrReturnError(device->GetSecureSession().HasValue(), CHIP_ERROR_MISSING_SECURE_SESSION.AsInteger()); + std::unique_ptr callback = std::make_unique(appContext); std::unique_ptr sender = std::make_unique(callback.get(), device->GetExchangeManager(), /* is timed request */ timedRequestTimeoutMs != 0); @@ -151,7 +154,11 @@ chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, SuccessOrExit(err = sender->FinishCommand(timedRequestTimeoutMs != 0 ? Optional(timedRequestTimeoutMs) : Optional::Missing())); - SuccessOrExit(err = device->SendCommands(sender.get())); + + SuccessOrExit(err = sender->SendCommandRequest(device->GetSecureSession().Value(), + interactionTimeoutMs != 0 + ? MakeOptional(System::Clock::Milliseconds32(interactionTimeoutMs)) + : Optional::Missing())); sender.release(); callback.release(); diff --git a/src/controller/python/chip/native/CommonStackInit.cpp b/src/controller/python/chip/native/CommonStackInit.cpp index 5fa470713b2079..ef1dca2c875c5d 100644 --- a/src/controller/python/chip/native/CommonStackInit.cpp +++ b/src/controller/python/chip/native/CommonStackInit.cpp @@ -38,14 +38,29 @@ #include #include -static_assert(std::is_same::value, "python assumes CHIP_ERROR maps to c_uint32"); +using namespace chip; + +static_assert(std::is_same::value, "python assumes CHIP_ERROR maps to c_uint32"); extern "C" { -chip::ChipError::StorageType pychip_CommonStackInit() +struct __attribute__((packed)) PyCommonStackInitParams +{ + uint32_t mBluetoothAdapterId; +}; + +ChipError::StorageType pychip_CommonStackInit(const PyCommonStackInitParams * aParams) { - ReturnErrorOnFailure(chip::Platform::MemoryInit().AsInteger()); - ReturnErrorOnFailure(chip::DeviceLayer::PlatformMgr().InitChipStack().AsInteger()); + ReturnErrorOnFailure(Platform::MemoryInit().AsInteger()); + +#if CHIP_DEVICE_LAYER_TARGET_LINUX && CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + // By default, Linux device is configured as a BLE peripheral while the controller needs a BLE central. + ReturnErrorOnFailure( + DeviceLayer::Internal::BLEMgrImpl().ConfigureBle(aParams->mBluetoothAdapterId, /* BLE central */ true).AsInteger()); +#endif + + ReturnErrorOnFailure(DeviceLayer::PlatformMgr().InitChipStack().AsInteger()); + return CHIP_NO_ERROR.AsInteger(); } @@ -55,7 +70,7 @@ void pychip_CommonStackShutdown() // We cannot actually call this because the destructor for the MdnsContexts singleton on Darwin only gets called // on termination of the program, and that unfortunately makes a bunch of Platform::MemoryFree calls. // - chip::Platform::MemoryShutdown(); + Platform::MemoryShutdown(); #endif } }; diff --git a/src/controller/python/chip/native/__init__.py b/src/controller/python/chip/native/__init__.py index 44b4ccd89f015e..f0c175237e7b8a 100644 --- a/src/controller/python/chip/native/__init__.py +++ b/src/controller/python/chip/native/__init__.py @@ -2,6 +2,7 @@ import glob import os import platform +import construct NATIVE_LIBRARY_BASE_NAME = "_ChipDeviceCtrl.so" @@ -69,19 +70,30 @@ def Set(self, methodName: str, resultType, argumentTypes: list): _nativeLibraryHandle: ctypes.CDLL = None -def GetLibraryHandle() -> ctypes.CDLL: +def _GetLibraryHandle(shouldInit: bool) -> ctypes.CDLL: """Get a memoized handle to the chip native code dll.""" global _nativeLibraryHandle if _nativeLibraryHandle is None: + if shouldInit: + raise Exception("Common stack has not been initialized!") _nativeLibraryHandle = ctypes.CDLL(FindNativeLibraryPath()) setter = NativeLibraryHandleMethodArguments(_nativeLibraryHandle) - setter.Set("pychip_CommonStackInit", ctypes.c_uint32, []) - - # - # We've a split initialization model with some init happening here and some other - # bits of init happening in ChipStack. #20437 tracks consolidating those. - # - _nativeLibraryHandle.pychip_CommonStackInit() + setter.Set("pychip_CommonStackInit", ctypes.c_uint32, [ctypes.c_char_p]) return _nativeLibraryHandle + + +def Init(bluetoothAdapter: int = None): + CommonStackParams = construct.Struct( + "BluetoothAdapterId" / construct.Int32ul, + ) + params = CommonStackParams.parse(b'\x00' * CommonStackParams.sizeof()) + params.BluetoothAdapterId = bluetoothAdapter if bluetoothAdapter is not None else 0 + params = CommonStackParams.build(params) + + _GetLibraryHandle(False).pychip_CommonStackInit(ctypes.c_char_p(params)) + + +def GetLibraryHandle(): + return _GetLibraryHandle(True) diff --git a/src/controller/python/chip/setup_payload/Generator.cpp b/src/controller/python/chip/setup_payload/Generator.cpp index 21115b501f7949..803768964df417 100644 --- a/src/controller/python/chip/setup_payload/Generator.cpp +++ b/src/controller/python/chip/setup_payload/Generator.cpp @@ -35,11 +35,11 @@ extern "C" ChipError::StorageType pychip_SetupPayload_PrintOnboardingCodes(uint3 SetupPayload payload; RendezvousInformationFlags rendezvousFlags = RendezvousInformationFlag::kNone; - payload.version = version; - payload.setUpPINCode = passcode; - payload.vendorID = vendorId; - payload.productID = productId; - payload.discriminator = discriminator; + payload.version = version; + payload.setUpPINCode = passcode; + payload.vendorID = vendorId; + payload.productID = productId; + payload.discriminator.SetLongValue(discriminator); payload.rendezvousInformation = rendezvousFlags.SetRaw(capabilities); switch (customFlow) diff --git a/src/controller/python/chip/setup_payload/Parser.cpp b/src/controller/python/chip/setup_payload/Parser.cpp index 6dc75c793348d9..29b5ec1a8af5d8 100644 --- a/src/controller/python/chip/setup_payload/Parser.cpp +++ b/src/controller/python/chip/setup_payload/Parser.cpp @@ -39,7 +39,14 @@ void YieldSetupPayloadAttributes(const SetupPayload & payload, AttributeVisitor attrVisitor("ProductID", std::to_string(payload.productID).c_str()); attrVisitor("CommissioningFlow", std::to_string(static_cast(payload.commissioningFlow)).c_str()); attrVisitor("RendezvousInformation", std::to_string(payload.rendezvousInformation.Raw()).c_str()); - attrVisitor("Discriminator", std::to_string(payload.discriminator).c_str()); + if (payload.discriminator.IsShortDiscriminator()) + { + attrVisitor("Short discriminator", std::to_string(payload.discriminator.GetShortValue()).c_str()); + } + else + { + attrVisitor("Long discriminator", std::to_string(payload.discriminator.GetLongValue()).c_str()); + } attrVisitor("SetUpPINCode", std::to_string(payload.setUpPINCode).c_str()); std::string serialNumber; diff --git a/src/controller/python/chip/utils/DeviceProxyUtils.cpp b/src/controller/python/chip/utils/DeviceProxyUtils.cpp new file mode 100644 index 00000000000000..ea6add7a039609 --- /dev/null +++ b/src/controller/python/chip/utils/DeviceProxyUtils.cpp @@ -0,0 +1,63 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * Copyright (c) 2019-2020 Google LLC. + * Copyright (c) 2013-2018 Nest Labs, Inc. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Implementation of the native methods expected by the Python + * version of Chip Device Manager. + * + */ + +#include "system/SystemClock.h" +#include +#include +#include + +using namespace chip; + +static_assert(std::is_same::value, "python assumes CHIP_ERROR maps to c_uint32"); + +extern "C" { + +/** + * @brief + * + * This computes the value for a timeout based on the round trip time it takes for a message to be sent to a peer, + * the message to be processed given the upperLayerProcessingTimeoutMs argument, and a response to come back. + * + * See Session::ComputeRoundTripTimeout for more specific details. + * + * A valid DeviceProxy pointer with a valid, established session is required for this method. + * + * + */ +uint32_t pychip_DeviceProxy_ComputeRoundTripTimeout(DeviceProxy * device, uint32_t upperLayerProcessingTimeoutMs) +{ + VerifyOrDie(device != nullptr); + + auto * deviceProxy = static_cast(device); + VerifyOrDie(deviceProxy->GetSecureSession().HasValue()); + + return deviceProxy->GetSecureSession() + .Value() + ->ComputeRoundTripTimeout(System::Clock::Milliseconds32(upperLayerProcessingTimeoutMs)) + .count(); +} +} diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index 6cd812371f32c2..636f2989cac4f1 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -34,6 +34,7 @@ import chip.clusters.Attribute as Attribute from chip.utils import CommissioningBuildingBlocks from chip.ChipStack import * +import chip.native import chip.FabricAdmin import copy import secrets @@ -170,6 +171,8 @@ def assertValueEqual(self, expected): class BaseTestHelper: def __init__(self, nodeid: int, paaTrustStorePath: str, testCommissioner: bool = False): + chip.native.Init() + self.chipStack = ChipStack('/tmp/repl_storage.json') self.fabricAdmin = chip.FabricAdmin.FabricAdmin(vendorId=0XFFF1, fabricId=1, fabricIndex=1) @@ -756,6 +759,52 @@ def CompareUnfilteredData(accessingFabric, otherFabric, expectedData): if (expectedDataFabric1 != readListDataFabric1): raise AssertionError("Got back mismatched data") + async def TestResubscription(self, nodeid: int): + ''' This validates the re-subscription logic by triggering a liveness failure caused by the expiration + of the underlying CASE session and the resultant failure to receive reports from the server. This should + trigger CASE session establishment and subscription restablishment. Both the attempt and successful + restablishment of the subscription are validated. + ''' + cv = asyncio.Condition() + resubAttempted = False + resubSucceeded = True + + async def OnResubscriptionAttempted(transaction, errorEncountered: int, nextResubscribeIntervalMsec: int): + self.logger.info("Re-subscription Attempted") + nonlocal resubAttempted + resubAttempted = True + + async def OnResubscriptionSucceeded(transaction): + self.logger.info("Re-subscription Succeeded") + nonlocal cv + async with cv: + cv.notify() + + subscription = await self.devCtrl.ReadAttribute(nodeid, [(Clusters.Basic.Attributes.ClusterRevision)], reportInterval=(0, 5)) + + # + # Register async callbacks that will fire when a re-sub is attempted or succeeds. + # + subscription.SetResubscriptionAttemptedCallback(OnResubscriptionAttempted, True) + subscription.SetResubscriptionSucceededCallback(OnResubscriptionSucceeded, True) + + # + # Over-ride the default liveness timeout (which is set quite high to accomodate for + # transport delays) to something very small. This ensures that our liveness timer will + # fire quickly and cause a re-subscription to occur naturally. + # + subscription.OverrideLivenessTimeoutMs(100) + + async with cv: + if (not(resubAttempted) or not(resubSucceeded)): + res = await asyncio.wait_for(cv.wait(), 3) + if not res: + self.logger.error("Timed out waiting for resubscription to succeed") + return False + + subscription.Shutdown() + return True + def TestCloseSession(self, nodeid: int): self.logger.info(f"Closing sessions with device {nodeid}") try: @@ -796,7 +845,7 @@ def TestLevelControlCluster(self, nodeid: int, endpoint: int, group: int): self.logger.info( f"Sending MoveToLevel command to device {nodeid} endpoint {endpoint}") try: - commonArgs = dict(transitionTime=0, optionMask=1, optionOverride=1) + commonArgs = dict(transitionTime=0, optionsMask=1, optionsOverride=1) # Move to 1 self.devCtrl.ZCLSend("LevelControl", "MoveToLevel", nodeid, diff --git a/src/controller/python/test/test_scripts/mobile-device-test.py b/src/controller/python/test/test_scripts/mobile-device-test.py index f02a93dc388953..b6b7a1d4e91595 100755 --- a/src/controller/python/test/test_scripts/mobile-device-test.py +++ b/src/controller/python/test/test_scripts/mobile-device-test.py @@ -140,6 +140,10 @@ def TestDatamodel(test: BaseTestHelper, device_nodeid: int): FailIfNot(test.TestSubscription(nodeid=device_nodeid, endpoint=LIGHTING_ENDPOINT_ID), "Failed to subscribe attributes.") + logger.info("Testing re-subscription") + FailIfNot(asyncio.run(test.TestResubscription(nodeid=device_nodeid)), + "Failed to validated re-subscription") + logger.info("Testing on off cluster over resolved connection") FailIfNot(test.TestOnOffCluster(nodeid=device_nodeid, endpoint=LIGHTING_ENDPOINT_ID, diff --git a/src/controller/tests/TestEventCaching.cpp b/src/controller/tests/TestEventCaching.cpp index b2368f5207916c..eaf57af6bdf8ff 100644 --- a/src/controller/tests/TestEventCaching.cpp +++ b/src/controller/tests/TestEventCaching.cpp @@ -22,7 +22,7 @@ #include "app/ConcreteAttributePath.h" #include "protocols/interaction_model/Constants.h" #include -#include +#include #include #include #include diff --git a/src/controller/tests/TestEventChunking.cpp b/src/controller/tests/TestEventChunking.cpp index 5dc88eb8dcd434..6764bb95e307c3 100644 --- a/src/controller/tests/TestEventChunking.cpp +++ b/src/controller/tests/TestEventChunking.cpp @@ -21,7 +21,7 @@ #include "app/ConcreteAttributePath.h" #include "protocols/interaction_model/Constants.h" #include -#include +#include #include #include #include @@ -157,8 +157,6 @@ class TestReadCallback : public app::ReadClient::Callback void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override { mOnSubscriptionEstablished = true; } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override {} - uint32_t mAttributeCount = 0; uint32_t mEventCount = 0; bool mOnReportEnd = false; diff --git a/src/controller/tests/TestReadChunking.cpp b/src/controller/tests/TestReadChunking.cpp index 7b7f4247b86781..5dc6006edc09ba 100644 --- a/src/controller/tests/TestReadChunking.cpp +++ b/src/controller/tests/TestReadChunking.cpp @@ -21,7 +21,7 @@ #include "app/ConcreteAttributePath.h" #include "protocols/interaction_model/Constants.h" #include -#include +#include #include #include #include @@ -136,8 +136,6 @@ class TestReadCallback : public app::ReadClient::Callback void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override { mOnSubscriptionEstablished = true; } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override {} - uint32_t mAttributeCount = 0; bool mOnReportEnd = false; bool mOnSubscriptionEstablished = false; @@ -306,7 +304,6 @@ class TestMutableReadCallback : public app::ReadClient::Callback void OnReportEnd() override { mOnReportEnd = true; } void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override { mOnSubscriptionEstablished = true; } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override {} uint32_t mAttributeCount = 0; // We record every dataversion field from every attribute IB. diff --git a/src/controller/tests/TestServerCommandDispatch.cpp b/src/controller/tests/TestServerCommandDispatch.cpp index 37fd1cda9bf069..c4860023702755 100644 --- a/src/controller/tests/TestServerCommandDispatch.cpp +++ b/src/controller/tests/TestServerCommandDispatch.cpp @@ -26,7 +26,7 @@ #include "app-common/zap-generated/ids/Clusters.h" #include "protocols/interaction_model/Constants.h" #include -#include +#include #include #include #include diff --git a/src/controller/tests/TestWriteChunking.cpp b/src/controller/tests/TestWriteChunking.cpp index e47134c34e1f85..bd27e649bd79d1 100644 --- a/src/controller/tests/TestWriteChunking.cpp +++ b/src/controller/tests/TestWriteChunking.cpp @@ -21,7 +21,7 @@ #include "app/ConcreteAttributePath.h" #include "protocols/interaction_model/Constants.h" #include -#include +#include #include #include #include diff --git a/src/controller/tests/data_model/TestCommands.cpp b/src/controller/tests/data_model/TestCommands.cpp index e2d314cb18defd..360425e031604b 100644 --- a/src/controller/tests/data_model/TestCommands.cpp +++ b/src/controller/tests/data_model/TestCommands.cpp @@ -24,7 +24,7 @@ #include "app/data-model/NullObject.h" #include -#include +#include #include #include #include diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index 6c1f85cf686cf6..0dda7e31483ce4 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -16,6 +16,7 @@ * limitations under the License. */ +#include "system/SystemClock.h" #include "transport/SecureSession.h" #include #include @@ -1472,66 +1473,111 @@ void TestReadInteraction::TestReadAttributeTimeout(nlTestSuite * apSuite, void * NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } -// After client initiated subscription request, test expire session so that subscription fails to establish, and trigger the timeout -// error. Client would automatically try to resubscribe and bump the value for numResubscriptionAttemptedCalls. -void TestReadInteraction::TestSubscribeAttributeTimeout(nlTestSuite * apSuite, void * apContext) +class TestResubscriptionCallback : public app::ReadClient::Callback { - TestContext & ctx = *static_cast(apContext); - auto sessionHandle = ctx.GetSessionBobToAlice(); - bool onSuccessCbInvoked = false, onFailureCbInvoked = false; - responseDirective = kSendDataError; - uint32_t numSubscriptionEstablishedCalls = 0, numResubscriptionAttemptedCalls = 0; - // Passing of stack variables by reference is only safe because of synchronous completion of the interaction. Otherwise, it's - // not safe to do so. - auto onSuccessCb = [&onSuccessCbInvoked](const app::ConcreteDataAttributePath & attributePath, const auto & dataResponse) { - onSuccessCbInvoked = true; - }; +public: + TestResubscriptionCallback() {} - // Passing of stack variables by reference is only safe because of synchronous completion of the interaction. Otherwise, it's - // not safe to do so. - auto onFailureCb = [&onFailureCbInvoked, apSuite](const app::ConcreteDataAttributePath * attributePath, CHIP_ERROR aError) { - NL_TEST_ASSERT(apSuite, aError == CHIP_ERROR_TIMEOUT); - onFailureCbInvoked = true; - }; + void SetReadClient(app::ReadClient * apReadClient) { mpReadClient = apReadClient; } - auto onSubscriptionEstablishedCb = [&numSubscriptionEstablishedCalls](const app::ReadClient & readClient) { - numSubscriptionEstablishedCalls++; - }; + void OnDone(app::ReadClient *) override { mOnDone++; } - auto onSubscriptionAttemptedCb = [&numResubscriptionAttemptedCalls](const app::ReadClient & readClient, CHIP_ERROR aError, - uint32_t aNextResubscribeIntervalMsec) { - numResubscriptionAttemptedCalls++; - }; + void OnError(CHIP_ERROR aError) override + { + mOnError++; + mLastError = aError; + } - Controller::SubscribeAttribute( - &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 20, onSubscriptionEstablishedCb, - onSubscriptionAttemptedCb, false, true); + void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override + { + mOnSubscriptionEstablishedCount++; - ctx.ExpireSessionAliceToBob(); + // + // Set the liveness timeout to a super small number that isn't 0 to + // force the liveness timeout to fire. + // + mpReadClient->OverrideLivenessTimeout(System::Clock::Milliseconds32(10)); + } - ctx.DrainAndServiceIO(); + CHIP_ERROR OnResubscriptionNeeded(app::ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override + { + mOnResubscriptionsAttempted++; + return apReadClient->ScheduleResubscription(apReadClient->ComputeTimeTillNextSubscription(), NullOptional, false); + } - NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 1); + void ClearCounters() + { + mOnSubscriptionEstablishedCount = 0; + mOnDone = 0; + mOnError = 0; + mOnResubscriptionsAttempted = 0; + mLastError = CHIP_NO_ERROR; + } - ctx.ExpireSessionBobToAlice(); + int32_t mAttributeCount = 0; + int32_t mOnReportEnd = 0; + int32_t mOnSubscriptionEstablishedCount = 0; + int32_t mOnResubscriptionsAttempted = 0; + int32_t mOnDone = 0; + int32_t mOnError = 0; + CHIP_ERROR mLastError = CHIP_NO_ERROR; + app::ReadClient * mpReadClient = nullptr; +}; - ctx.DrainAndServiceIO(); +// +// This validates the re-subscription logic within ReadClient. This achieves it by overriding the timeout for the liveness +// timer within ReadClient to be a smaller value than the nominal max interval of the subscription. This causes the +// subscription to fail on the client side, triggering re-subscription. +// +// TODO: This does not validate the CASE establishment pathways since we're limited by the PASE-centric TestContext. +// +// +void TestReadInteraction::TestSubscribeAttributeTimeout(nlTestSuite * apSuite, void * apContext) +{ + TestContext & ctx = *static_cast(apContext); + auto sessionHandle = ctx.GetSessionBobToAlice(); - NL_TEST_ASSERT(apSuite, - !onSuccessCbInvoked && !onFailureCbInvoked && numSubscriptionEstablishedCalls == 0 && - numResubscriptionAttemptedCalls == 1); + { + TestResubscriptionCallback callback; + app::ReadClient readClient(app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), callback, + app::ReadClient::InteractionType::Subscribe); - NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); + callback.SetReadClient(&readClient); - NL_TEST_ASSERT(apSuite, app::InteractionModelEngine::GetInstance()->GetNumActiveReadHandlers() == 0); + app::ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); - // - // Let's put back the sessions so that the next tests (which assume a valid initialized set of sessions) - // can function correctly. - // - ctx.CreateSessionAliceToBob(); - ctx.CreateSessionBobToAlice(); + // Read full wildcard paths, repeat twice to ensure chunking. + app::AttributePathParams attributePathParams[1]; + readPrepareParams.mpAttributePathParamsList = attributePathParams; + readPrepareParams.mAttributePathParamsListSize = ArraySize(attributePathParams); + + attributePathParams[0].mClusterId = app::Clusters::TestCluster::Id; + attributePathParams[0].mAttributeId = app::Clusters::TestCluster::Attributes::Boolean::Id; + + readPrepareParams.mMaxIntervalCeilingSeconds = 1; + + readClient.SendAutoResubscribeRequest(std::move(readPrepareParams)); + + // + // Drive servicing IO till we have established a subscription at least 2 times. + // + ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(2), + [&]() { return callback.mOnSubscriptionEstablishedCount > 1; }); + + NL_TEST_ASSERT(apSuite, callback.mOnDone == 0); + // + // With re-sub enabled, we shouldn't encounter any errors. + // + NL_TEST_ASSERT(apSuite, callback.mOnError == 0); + + // + // We should have attempted just one re-subscription. + // + NL_TEST_ASSERT(apSuite, callback.mOnResubscriptionsAttempted == 1); + } + + app::InteractionModelEngine::GetInstance()->ShutdownActiveReads(); NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } @@ -4270,7 +4316,6 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadHandler_TwoSubscribesMultipleReads", TestReadInteraction::TestReadHandler_TwoSubscribesMultipleReads), NL_TEST_DEF("TestReadHandlerResourceExhaustion_MultipleReads", TestReadInteraction::TestReadHandlerResourceExhaustion_MultipleReads), NL_TEST_DEF("TestReadAttributeTimeout", TestReadInteraction::TestReadAttributeTimeout), - NL_TEST_DEF("TestSubscribeAttributeTimeout", TestReadInteraction::TestSubscribeAttributeTimeout), NL_TEST_DEF("TestReadHandler_SubscriptionReportingIntervalsTest1", TestReadInteraction::TestReadHandler_SubscriptionReportingIntervalsTest1), NL_TEST_DEF("TestReadHandler_SubscriptionReportingIntervalsTest2", TestReadInteraction::TestReadHandler_SubscriptionReportingIntervalsTest2), NL_TEST_DEF("TestReadHandler_SubscriptionReportingIntervalsTest3", TestReadInteraction::TestReadHandler_SubscriptionReportingIntervalsTest3), @@ -4289,6 +4334,7 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadAttribute_ManyDataValues", TestReadInteraction::TestReadAttribute_ManyDataValues), NL_TEST_DEF("TestReadAttribute_ManyDataValuesWrongPath", TestReadInteraction::TestReadAttribute_ManyDataValuesWrongPath), NL_TEST_DEF("TestReadAttribute_ManyErrors", TestReadInteraction::TestReadAttribute_ManyErrors), + NL_TEST_DEF("TestSubscribeAttributeTimeout", TestReadInteraction::TestSubscribeAttributeTimeout), NL_TEST_SENTINEL() }; // clang-format on diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index bf380af1a74136..b9f4952ed74968 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -554,6 +554,24 @@ CHIP_ERROR FabricTable::FetchRootCert(FabricIndex fabricIndex, MutableByteSpan & return mOpCertStore->GetCertificate(fabricIndex, CertChainElement::kRcac, outCert); } +CHIP_ERROR FabricTable::FetchPendingNonFabricAssociatedRootCert(MutableByteSpan & outCert) const +{ + VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); + if (!mStateFlags.Has(StateFlags::kIsTrustedRootPending)) + { + return CHIP_ERROR_NOT_FOUND; + } + + if (mStateFlags.Has(StateFlags::kIsAddPending)) + { + // The root certificate is already associated with a pending fabric, so + // does not exist for purposes of this API. + return CHIP_ERROR_NOT_FOUND; + } + + return FetchRootCert(mFabricIndexWithPendingState, outCert); +} + CHIP_ERROR FabricTable::FetchICACert(FabricIndex fabricIndex, MutableByteSpan & outCert) const { VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -889,6 +907,18 @@ CHIP_ERROR FabricTable::Delete(FabricIndex fabricIndex) VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_ARGUMENT); + { + FabricTable::Delegate * delegate = mDelegateListRoot; + while (delegate) + { + // It is possible that delegate will remove itself from the list in FabricWillBeRemoved, + // so we grab the next delegate in the list now. + FabricTable::Delegate * nextDelegate = delegate->next; + delegate->FabricWillBeRemoved(*this, fabricIndex); + delegate = nextDelegate; + } + } + FabricInfo * fabricInfo = GetMutableFabricByIndex(fabricIndex); if (fabricInfo == &mPendingFabric) { diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 68f9f9c8e132a1..068c6b98a19359 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -360,6 +360,13 @@ class DLL_EXPORT FabricTable Delegate() {} virtual ~Delegate() {} + /** + * Gets called when a fabric is about to be deleted, such as on + * FabricTable::Delete(). This allows actions to be taken that need the + * fabric to still be around before we delete it. + **/ + virtual void FabricWillBeRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) {} + /** * Gets called when a fabric is deleted, such as on FabricTable::Delete(). **/ @@ -514,19 +521,6 @@ class DLL_EXPORT FabricTable ConstFabricIterator begin() const { return cbegin(); } ConstFabricIterator end() const { return cend(); } - /** - * @brief Get a mutable FabricInfo entry from the table by FabricIndex. - * - * NOTE: This is private for use within the FabricTable itself. All mutations have to go through the - * FabricTable public methods that take a FabricIndex so that there are no mutations about which - * the FabricTable is unaware, since this would break expectations regarding shadow/pending - * entries used during fail-safe. - * - * @param fabricIndex - fabric index for which to get a mutable FabricInfo entry - * @return the FabricInfo entry for the fabricIndex if found, or nullptr if not found - */ - FabricInfo * GetMutableFabricByIndex(FabricIndex fabricIndex); - /** * @brief Get the RCAC (operational root certificate) associated with a fabric. * @@ -541,6 +535,22 @@ class DLL_EXPORT FabricTable */ CHIP_ERROR FetchRootCert(FabricIndex fabricIndex, MutableByteSpan & outCert) const; + /** + * @brief Get the pending root certificate which is not associated with a fabric, if there is one. + * + * If a root is pending from `AddNewPendingTrustedRootCert`, and there is no + * fabric associated with the corresponding fabric index yet + * (i.e. `AddNewPendingFabric*` has not been called yet) it is returned. + * + * @param outCert - MutableByteSpan to receive the certificate. Resized to actual size. + * @retval CHIP_NO_ERROR on success + * @retval CHIP_ERROR_BUFFER_TOO_SMALL if `outCert` is too small. + * @retval CHIP_ERROR_NOT_FOUND if there is no pending root certificate + * that's not yet associated with a fabric. + * @retval other CHIP_ERROR values on invalid arguments or internal errors. + */ + CHIP_ERROR FetchPendingNonFabricAssociatedRootCert(MutableByteSpan & outCert) const; + /** * @brief Get the ICAC (operational intermediate certificate) associated with a fabric. * @@ -948,6 +958,19 @@ class DLL_EXPORT FabricTable bool isAddition = false; }; + /** + * @brief Get a mutable FabricInfo entry from the table by FabricIndex. + * + * NOTE: This is private for use within the FabricTable itself. All mutations have to go through the + * FabricTable public methods that take a FabricIndex so that there are no mutations about which + * the FabricTable is unaware, since this would break expectations regarding shadow/pending + * entries used during fail-safe. + * + * @param fabricIndex - fabric index for which to get a mutable FabricInfo entry + * @return the FabricInfo entry for the fabricIndex if found, or nullptr if not found + */ + FabricInfo * GetMutableFabricByIndex(FabricIndex fabricIndex); + // Load a FabricInfo metatada item from storage for a given new fabric index. Returns internal error on failure. CHIP_ERROR LoadFromStorage(FabricInfo * fabric, FabricIndex newFabricIndex); diff --git a/src/credentials/tests/BUILD.gn b/src/credentials/tests/BUILD.gn index f4fb7845271ed8..87c694bb8aa364 100644 --- a/src/credentials/tests/BUILD.gn +++ b/src/credentials/tests/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2021 Project CHIP Authors +# Copyright (c) 2020-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. @@ -26,6 +26,8 @@ static_library("cert_test_vectors") { sources = [ "CHIPAttCert_test_vectors.cpp", "CHIPAttCert_test_vectors.h", + "CHIPCert_error_test_vectors.cpp", + "CHIPCert_error_test_vectors.h", "CHIPCert_test_vectors.cpp", "CHIPCert_test_vectors.h", "CHIPCert_unit_test_vectors.cpp", diff --git a/src/credentials/tests/CHIPCert_error_test_vectors.cpp b/src/credentials/tests/CHIPCert_error_test_vectors.cpp new file mode 100644 index 00000000000000..c1b44945a0c33d --- /dev/null +++ b/src/credentials/tests/CHIPCert_error_test_vectors.cpp @@ -0,0 +1,86 @@ +/* + * + * 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 "CHIPCert_error_test_vectors.h" + +namespace chip { +namespace TestCerts { + +const uint8_t kTestErrorCert_NOC_0001_InvCATVerZero_Cert_Array[275] = { + 0x15, 0x30, 0x01, 0x08, 0x3b, 0x75, 0x5b, 0xc1, 0x54, 0xbe, 0x8b, 0x60, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0x03, + 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, + 0x37, 0x06, 0x27, 0x11, 0x01, 0x00, 0xee, 0xee, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xb0, 0xfa, 0x26, 0x16, 0x00, 0x00, 0xcd, 0xab, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0xff, + 0x23, 0x5d, 0x91, 0xf3, 0x3c, 0x04, 0x7f, 0x82, 0xf0, 0x2c, 0x86, 0x70, 0xbb, 0xd2, 0xb4, 0x34, 0x42, 0x44, 0x6b, 0xc2, + 0xb8, 0x38, 0x6a, 0x36, 0x90, 0x92, 0x36, 0xed, 0x5b, 0x4e, 0x63, 0x81, 0xe6, 0x6b, 0x30, 0x0f, 0x45, 0x75, 0xab, 0x88, + 0xba, 0xcb, 0xad, 0x4e, 0x5f, 0xfe, 0x7e, 0x83, 0x5f, 0xb3, 0xf1, 0xb3, 0x3a, 0x5d, 0xa7, 0x83, 0xf5, 0x07, 0x0e, 0xcf, + 0x91, 0xfb, 0x2b, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x01, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, + 0x30, 0x04, 0x14, 0x1b, 0xc5, 0xf6, 0x12, 0xf9, 0x6a, 0x92, 0xa1, 0x14, 0xbf, 0x2c, 0x77, 0x2f, 0x13, 0xcd, 0xd7, 0x14, + 0x2f, 0x14, 0xc8, 0x30, 0x05, 0x14, 0x34, 0x3d, 0xbd, 0x99, 0xff, 0xaf, 0xb3, 0x1e, 0xeb, 0x4f, 0x81, 0x4f, 0x6f, 0x9a, + 0x14, 0x74, 0xf1, 0xd4, 0x4f, 0xeb, 0x18, 0x30, 0x0b, 0x40, 0xb9, 0x80, 0xee, 0x56, 0xf7, 0x61, 0xd6, 0x85, 0xf8, 0x55, + 0x1a, 0x57, 0x07, 0xc1, 0x25, 0xbd, 0x6a, 0xc7, 0x80, 0x46, 0x85, 0x5b, 0x80, 0x28, 0x2e, 0x35, 0xf0, 0x60, 0x72, 0x68, + 0xf5, 0xe7, 0xd9, 0x9f, 0x3e, 0x27, 0xef, 0x29, 0x8b, 0xbf, 0x73, 0x05, 0xa2, 0x56, 0x73, 0x6e, 0xac, 0x8c, 0xd9, 0xf2, + 0xca, 0x59, 0x6e, 0xb1, 0x75, 0xf5, 0x74, 0xa9, 0x2e, 0x27, 0x1b, 0x7a, 0xba, 0x20, 0x18, +}; +const uint8_t kTestErrorCert_NOC_0001_InvCATVerZero_PublicKey_Array[65] = { + 0x04, 0xff, 0x23, 0x5d, 0x91, 0xf3, 0x3c, 0x04, 0x7f, 0x82, 0xf0, 0x2c, 0x86, 0x70, 0xbb, 0xd2, 0xb4, + 0x34, 0x42, 0x44, 0x6b, 0xc2, 0xb8, 0x38, 0x6a, 0x36, 0x90, 0x92, 0x36, 0xed, 0x5b, 0x4e, 0x63, 0x81, + 0xe6, 0x6b, 0x30, 0x0f, 0x45, 0x75, 0xab, 0x88, 0xba, 0xcb, 0xad, 0x4e, 0x5f, 0xfe, 0x7e, 0x83, 0x5f, + 0xb3, 0xf1, 0xb3, 0x3a, 0x5d, 0xa7, 0x83, 0xf5, 0x07, 0x0e, 0xcf, 0x91, 0xfb, 0x2b, +}; +const uint8_t kTestErrorCert_NOC_0001_InvCATVerZero_PrivateKey_Array[32] = { + 0x95, 0xa3, 0xa7, 0x23, 0x79, 0x8a, 0xf7, 0x44, 0x17, 0xe2, 0xa5, 0xa4, 0x4d, 0x18, 0xb5, 0x32, + 0x3e, 0x24, 0x83, 0x60, 0xcf, 0xdc, 0x5a, 0x13, 0xd1, 0xa8, 0xb4, 0x0a, 0x65, 0xe4, 0x0f, 0xbc, +}; + +ByteSpan kTestErrorCert_NOC_0001_InvCATVerZero_Cert = ByteSpan(kTestErrorCert_NOC_0001_InvCATVerZero_Cert_Array); +ByteSpan kTestErrorCert_NOC_0001_InvCATVerZero_PrivateKey = ByteSpan(kTestErrorCert_NOC_0001_InvCATVerZero_PrivateKey_Array); +ByteSpan kTestErrorCert_NOC_0001_InvCATVerZero_PublicKey = ByteSpan(kTestErrorCert_NOC_0001_InvCATVerZero_PublicKey_Array); + +const uint8_t kTestErrorCert_NOC_0002_InvCATMulVers_Cert_Array[287] = { + 0x15, 0x30, 0x01, 0x08, 0x32, 0xf6, 0xd3, 0x7c, 0xfa, 0xd4, 0x71, 0xe2, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0x03, 0x00, + 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, + 0x26, 0x16, 0x04, 0x00, 0xcd, 0xab, 0x26, 0x16, 0x10, 0x00, 0x22, 0x22, 0x26, 0x16, 0x02, 0x00, 0xcd, 0xab, 0x27, 0x11, 0x02, + 0x00, 0xee, 0xee, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, + 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x0e, 0x40, 0x23, 0x8b, 0xf6, 0x6e, 0xb5, 0x26, 0x01, 0xc4, 0xac, 0x57, 0x97, 0xdd, + 0xc3, 0x9a, 0x1a, 0x01, 0x85, 0xf4, 0x38, 0x34, 0x0d, 0xd5, 0x00, 0x5b, 0x8e, 0x23, 0x26, 0x18, 0x47, 0x3c, 0x47, 0x71, 0xb6, + 0x05, 0xe2, 0xab, 0x73, 0xd7, 0x95, 0xbf, 0xfc, 0x55, 0xdf, 0x31, 0x51, 0x40, 0xb0, 0xdd, 0x16, 0x47, 0x58, 0xca, 0xfd, 0x3c, + 0x65, 0x00, 0xa9, 0x0a, 0x9a, 0x85, 0xec, 0x72, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x01, 0x36, 0x03, 0x04, + 0x02, 0x04, 0x01, 0x18, 0x30, 0x04, 0x14, 0x19, 0xf2, 0x66, 0x00, 0x88, 0xac, 0x5a, 0xf5, 0xd0, 0xac, 0xa3, 0xf8, 0xac, 0xec, + 0xb8, 0x6e, 0x3f, 0xe2, 0x77, 0x4f, 0x30, 0x05, 0x14, 0x34, 0x3d, 0xbd, 0x99, 0xff, 0xaf, 0xb3, 0x1e, 0xeb, 0x4f, 0x81, 0x4f, + 0x6f, 0x9a, 0x14, 0x74, 0xf1, 0xd4, 0x4f, 0xeb, 0x18, 0x30, 0x0b, 0x40, 0xba, 0xa7, 0xaf, 0x18, 0x14, 0x52, 0xe6, 0x06, 0x2d, + 0xd1, 0x0a, 0x9a, 0x6d, 0xd0, 0x5d, 0xdb, 0xc2, 0x2c, 0xd3, 0x17, 0x94, 0x75, 0x9e, 0x1c, 0x2b, 0x57, 0x4e, 0xbb, 0xd6, 0xa4, + 0x58, 0x52, 0x5a, 0x80, 0x60, 0xf2, 0x43, 0x21, 0x4b, 0xba, 0x9d, 0xd2, 0xc9, 0x2a, 0x3b, 0xe6, 0xab, 0x22, 0xe9, 0xe2, 0x29, + 0xc2, 0x13, 0xac, 0xf0, 0xf2, 0x4e, 0x6c, 0x63, 0xea, 0xfa, 0xb8, 0xaa, 0xc3, 0x18, +}; +const uint8_t kTestErrorCert_NOC_0002_InvCATMulVers_PublicKey_Array[65] = { + 0x04, 0x0e, 0x40, 0x23, 0x8b, 0xf6, 0x6e, 0xb5, 0x26, 0x01, 0xc4, 0xac, 0x57, 0x97, 0xdd, 0xc3, 0x9a, + 0x1a, 0x01, 0x85, 0xf4, 0x38, 0x34, 0x0d, 0xd5, 0x00, 0x5b, 0x8e, 0x23, 0x26, 0x18, 0x47, 0x3c, 0x47, + 0x71, 0xb6, 0x05, 0xe2, 0xab, 0x73, 0xd7, 0x95, 0xbf, 0xfc, 0x55, 0xdf, 0x31, 0x51, 0x40, 0xb0, 0xdd, + 0x16, 0x47, 0x58, 0xca, 0xfd, 0x3c, 0x65, 0x00, 0xa9, 0x0a, 0x9a, 0x85, 0xec, 0x72, +}; +const uint8_t kTestErrorCert_NOC_0002_InvCATMulVers_PrivateKey_Array[32] = { + 0x06, 0x1b, 0x1e, 0xfd, 0xac, 0x86, 0x9b, 0xec, 0xd3, 0x82, 0xc9, 0x8e, 0x63, 0x63, 0x2a, 0x35, + 0xc2, 0xef, 0x2a, 0x8e, 0x2d, 0xb1, 0x7b, 0x72, 0x55, 0x8c, 0x1c, 0xc7, 0x83, 0x8e, 0xaa, 0xee, +}; + +ByteSpan kTestErrorCert_NOC_0002_InvCATMulVers_Cert = ByteSpan(kTestErrorCert_NOC_0002_InvCATMulVers_Cert_Array); +ByteSpan kTestErrorCert_NOC_0002_InvCATMulVers_PrivateKey = ByteSpan(kTestErrorCert_NOC_0002_InvCATMulVers_PrivateKey_Array); +ByteSpan kTestErrorCert_NOC_0002_InvCATMulVers_PublicKey = ByteSpan(kTestErrorCert_NOC_0002_InvCATMulVers_PublicKey_Array); + +} // namespace TestCerts +} // namespace chip diff --git a/src/credentials/tests/CHIPCert_error_test_vectors.h b/src/credentials/tests/CHIPCert_error_test_vectors.h new file mode 100644 index 00000000000000..49f46f5121622f --- /dev/null +++ b/src/credentials/tests/CHIPCert_error_test_vectors.h @@ -0,0 +1,44 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#include + +namespace chip { +namespace TestCerts { + +extern const uint8_t kTestErrorCert_NOC_0001_InvCATVerZero_Cert_Array[275]; +extern const uint8_t kTestErrorCert_NOC_0001_InvCATVerZero_PublicKey_Array[65]; +extern const uint8_t kTestErrorCert_NOC_0001_InvCATVerZero_PrivateKey_Array[32]; + +extern ByteSpan kTestErrorCert_NOC_0001_InvCATVerZero_Cert; +extern ByteSpan kTestErrorCert_NOC_0001_InvCATVerZero_PrivateKey; +extern ByteSpan kTestErrorCert_NOC_0001_InvCATVerZero_PublicKey; + +extern const uint8_t kTestErrorCert_NOC_0002_InvCATMulVers_Cert_Array[287]; +extern const uint8_t kTestErrorCert_NOC_0002_InvCATMulVers_PublicKey_Array[65]; +extern const uint8_t kTestErrorCert_NOC_0002_InvCATMulVers_PrivateKey_Array[32]; + +extern ByteSpan kTestErrorCert_NOC_0002_InvCATMulVers_Cert; +extern ByteSpan kTestErrorCert_NOC_0002_InvCATMulVers_PrivateKey; +extern ByteSpan kTestErrorCert_NOC_0002_InvCATMulVers_PublicKey; + +} // namespace TestCerts +} // namespace chip diff --git a/src/credentials/tests/TestChipCert.cpp b/src/credentials/tests/TestChipCert.cpp index afdf04caf166ee..97c00d7ca555bd 100644 --- a/src/credentials/tests/TestChipCert.cpp +++ b/src/credentials/tests/TestChipCert.cpp @@ -37,6 +37,7 @@ #include +#include "CHIPCert_error_test_vectors.h" #include "CHIPCert_test_vectors.h" using namespace chip; @@ -1765,7 +1766,7 @@ static void TestChipCert_ExtractOperationalDiscoveryId(nlTestSuite * inSuite, vo } } -static void TestChipCert_ExtractCATsFromOpCert(nlTestSuite * inSuite, void * inContext) +static void TestChipCert_ExtractAndValidateCATsFromOpCert(nlTestSuite * inSuite, void * inContext) { struct TestCase { @@ -1835,6 +1836,20 @@ static void TestChipCert_ExtractCATsFromOpCert(nlTestSuite * inSuite, void * inC certSet.Release(); } + + // Error case: NOC with invalid CAT version. + { + CATValues cats; + CHIP_ERROR err = ExtractCATsFromOpCert(kTestErrorCert_NOC_0001_InvCATVerZero_Cert, cats); + NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INVALID_ARGUMENT); + } + + // Error case: NOC with multiple versions of the same CAT tag. + { + CATValues cats; + CHIP_ERROR err = ExtractCATsFromOpCert(kTestErrorCert_NOC_0002_InvCATMulVers_Cert, cats); + NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_WRONG_CERT_DN); + } } static void TestChipCert_ExtractSubjectDNFromChipCert(nlTestSuite * inSuite, void * inContext) @@ -2007,7 +2022,7 @@ static const nlTest sTests[] = { NL_TEST_DEF("Test CHIP Verify Generated Cert Chain No ICA", TestChipCert_VerifyGeneratedCertsNoICA), NL_TEST_DEF("Test extracting Node ID and Fabric ID from node certificate", TestChipCert_ExtractNodeIdFabricId), NL_TEST_DEF("Test extracting Operational Discovery ID from node and root certificate", TestChipCert_ExtractOperationalDiscoveryId), - NL_TEST_DEF("Test extracting CASE Authenticated Tags from node certificate", TestChipCert_ExtractCATsFromOpCert), + NL_TEST_DEF("Test extracting and validating CASE Authenticated Tags from NOC", TestChipCert_ExtractAndValidateCATsFromOpCert), NL_TEST_DEF("Test extracting Subject DN from chip certificate", TestChipCert_ExtractSubjectDNFromChipCert), NL_TEST_DEF("Test extracting PublicKey and SKID from chip certificate", TestChipCert_ExtractPublicKeyAndSKID), NL_TEST_SENTINEL() diff --git a/src/credentials/tests/TestFabricTable.cpp b/src/credentials/tests/TestFabricTable.cpp index 2b8debafffa37d..c0923279a0d1f9 100644 --- a/src/credentials/tests/TestFabricTable.cpp +++ b/src/credentials/tests/TestFabricTable.cpp @@ -478,7 +478,21 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, saw1 == false); } + uint8_t rcacBuf[Credentials::kMaxCHIPCertLength]; + { + // No pending root cert yet. + MutableByteSpan fetchedSpan{ rcacBuf }; + NL_TEST_ASSERT(inSuite, fabricTable.FetchPendingNonFabricAssociatedRootCert(fetchedSpan) == CHIP_ERROR_NOT_FOUND); + } + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); + { + // Now have a pending root cert. + MutableByteSpan fetchedSpan{ rcacBuf }; + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.FetchPendingNonFabricAssociatedRootCert(fetchedSpan)); + NL_TEST_ASSERT(inSuite, fetchedSpan.data_equal(rcac)); + } + FabricIndex newFabricIndex = kUndefinedFabricIndex; bool keyIsExternallyOwned = true; @@ -488,6 +502,11 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) keyIsExternallyOwned, &newFabricIndex)); NL_TEST_ASSERT(inSuite, newFabricIndex == 1); NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 1); + { + // No more pending root cert; it's associated with a fabric now. + MutableByteSpan fetchedSpan{ rcacBuf }; + NL_TEST_ASSERT(inSuite, fabricTable.FetchPendingNonFabricAssociatedRootCert(fetchedSpan) == CHIP_ERROR_NOT_FOUND); + } // No storage yet NL_TEST_ASSERT(inSuite, storage.GetNumKeys() == numStorageKeysAtStart); @@ -1750,6 +1769,51 @@ void TestUpdateNocFailSafe(nlTestSuite * inSuite, void * inContext) } } +void TestAddRootCertFailSafe(nlTestSuite * inSuite, void * inContext) +{ + Credentials::TestOnlyLocalCertificateAuthority fabric11CertAuthority; + + chip::TestPersistentStorageDelegate storage; + + NL_TEST_ASSERT(inSuite, fabric11CertAuthority.Init().IsSuccess()); + + // Initialize a fabric table. + ScopedFabricTable fabricTableHolder; + NL_TEST_ASSERT(inSuite, fabricTableHolder.Init(&storage) == CHIP_NO_ERROR); + FabricTable & fabricTable = fabricTableHolder.GetFabricTable(); + + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + + // Add a root cert, see that pending works, and that revert works + { + ByteSpan rcac = fabric11CertAuthority.GetRcac(); + + uint8_t rcacBuf[Credentials::kMaxCHIPCertLength]; + { + // No pending root cert yet. + MutableByteSpan fetchedSpan{ rcacBuf }; + NL_TEST_ASSERT(inSuite, fabricTable.FetchPendingNonFabricAssociatedRootCert(fetchedSpan) == CHIP_ERROR_NOT_FOUND); + } + + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); + { + // Now have a pending root cert. + MutableByteSpan fetchedSpan{ rcacBuf }; + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.FetchPendingNonFabricAssociatedRootCert(fetchedSpan)); + NL_TEST_ASSERT(inSuite, fetchedSpan.data_equal(rcac)); + } + + // Revert + fabricTable.RevertPendingFabricData(); + + { + // No pending root cert anymore. + MutableByteSpan fetchedSpan{ rcacBuf }; + NL_TEST_ASSERT(inSuite, fabricTable.FetchPendingNonFabricAssociatedRootCert(fetchedSpan) == CHIP_ERROR_NOT_FOUND); + } + } +} + void TestSequenceErrors(nlTestSuite * inSuite, void * inContext) { // TODO: Write test @@ -2436,6 +2500,7 @@ static const nlTest sTests[] = NL_TEST_DEF("Validate fabrics are loaded from persistence at FabricTable::init", TestPersistence), NL_TEST_DEF("Test fail-safe handling during AddNOC", TestAddNocFailSafe), NL_TEST_DEF("Test fail-safe handling during UpdateNoc", TestUpdateNocFailSafe), + NL_TEST_DEF("Test fail-safe handling for root cert", TestAddRootCertFailSafe), NL_TEST_DEF("Test interlock sequencing errors", TestSequenceErrors), NL_TEST_DEF("Test fabric label changes", TestFabricLabelChange), NL_TEST_DEF("Test compressed fabric ID is properly generated", TestCompressedFabricId), diff --git a/src/crypto/BUILD.gn b/src/crypto/BUILD.gn index 359bb9d289cf0a..a5e176c3fe5212 100644 --- a/src/crypto/BUILD.gn +++ b/src/crypto/BUILD.gn @@ -57,6 +57,8 @@ if (chip_crypto == "openssl") { import("//build_overrides/boringssl.gni") } else if (chip_crypto == "mbedtls") { import("//build_overrides/mbedtls.gni") +} else if (chip_crypto == "tinycrypt") { + import("//build_overrides/mbedtls.gni") } static_library("crypto") { @@ -99,6 +101,9 @@ static_library("crypto") { # BoringSSL is close enough to OpenSSL that isd uses same PAL, with minor #ifdef differences sources += [ "CHIPCryptoPALOpenSSL.cpp" ] public_deps += [ "${boringssl_root}:boringssl" ] + } else if (chip_crypto == "tinycrypt") { + sources += [ "CHIPCryptoPALTinyCrypt.cpp" ] + public_deps += [ "${mbedtls_root}:mbedtls" ] } else { assert(false, "Invalid CHIP crypto") } diff --git a/src/crypto/CHIPCryptoPALTinyCrypt.cpp b/src/crypto/CHIPCryptoPALTinyCrypt.cpp new file mode 100644 index 00000000000000..2b86f418cb27d3 --- /dev/null +++ b/src/crypto/CHIPCryptoPALTinyCrypt.cpp @@ -0,0 +1,1500 @@ +/* + * + * Copyright (c) 2020-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. + */ + +/** + * @file + * mbedTLS based implementation of CHIP crypto primitives + */ + +#include "CHIPCryptoPAL.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(MBEDTLS_X509_CRT_PARSE_C) +#include +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace chip { +namespace Crypto { + +#define MAX_ERROR_STR_LEN 128 +#define NUM_BYTES_IN_SHA256_HASH 32 + +// In mbedTLS 3.0.0 direct access to structure fields was replaced with using MBEDTLS_PRIVATE macro. +#if (MBEDTLS_VERSION_NUMBER >= 0x03000000) +#define CHIP_CRYPTO_PAL_PRIVATE(x) MBEDTLS_PRIVATE(x) +#else +#define CHIP_CRYPTO_PAL_PRIVATE(x) x +#endif + +#if (MBEDTLS_VERSION_NUMBER >= 0x03000000 && MBEDTLS_VERSION_NUMBER < 0x03010000) +#define CHIP_CRYPTO_PAL_PRIVATE_X509(x) MBEDTLS_PRIVATE(x) +#else +#define CHIP_CRYPTO_PAL_PRIVATE_X509(x) x +#endif + +typedef struct +{ + bool mInitialized; + bool mDRBGSeeded; + mbedtls_ctr_drbg_context mDRBGCtxt; + mbedtls_entropy_context mEntropy; +} EntropyContext; + +static EntropyContext gsEntropyContext; + +static void _log_mbedTLS_error(int error_code) +{ + if (error_code != 0 && error_code != UECC_SUCCESS) + { +#if defined(MBEDTLS_ERROR_C) + char error_str[MAX_ERROR_STR_LEN]; + mbedtls_strerror(error_code, error_str, sizeof(error_str)); + ChipLogError(Crypto, "mbedTLS error: %s", error_str); +#else + // Error codes defined in 16-bit negative hex numbers. Ease lookup by printing likewise + ChipLogError(Crypto, "mbedTLS error: -0x%04X", -static_cast(error_code)); +#endif + } +} + +static bool _isValidTagLength(size_t tag_length) +{ + if (tag_length == 8 || tag_length == 12 || tag_length == 16) + { + return true; + } + return false; +} + +static bool _isValidKeyLength(size_t length) +{ + // 16 bytes key for AES-CCM-128, 32 for AES-CCM-256 + if (length == 16 || length == 32) + { + return true; + } + return false; +} + +CHIP_ERROR AES_CCM_encrypt(const uint8_t * plaintext, size_t plaintext_length, const uint8_t * aad, size_t aad_length, + const uint8_t * key, size_t key_length, const uint8_t * nonce, size_t nonce_length, uint8_t * ciphertext, + uint8_t * tag, size_t tag_length) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + int result = 1; + + mbedtls_ccm_context context; + mbedtls_ccm_init(&context); + + VerifyOrExit(plaintext != nullptr || plaintext_length == 0, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(ciphertext != nullptr || plaintext_length == 0, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(key != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(_isValidKeyLength(key_length), error = CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE); + VerifyOrExit(nonce != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(nonce_length > 0, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(tag != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(_isValidTagLength(tag_length), error = CHIP_ERROR_INVALID_ARGUMENT); + if (aad_length > 0) + { + VerifyOrExit(aad != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); + } + + // Size of key = key_length * number of bits in a byte (8) + // Cast is safe because we called _isValidKeyLength above. + result = + mbedtls_ccm_setkey(&context, MBEDTLS_CIPHER_ID_AES, Uint8::to_const_uchar(key), static_cast(key_length * 8)); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + // Encrypt + result = mbedtls_ccm_encrypt_and_tag(&context, plaintext_length, Uint8::to_const_uchar(nonce), nonce_length, + Uint8::to_const_uchar(aad), aad_length, Uint8::to_const_uchar(plaintext), + Uint8::to_uchar(ciphertext), Uint8::to_uchar(tag), tag_length); + _log_mbedTLS_error(result); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + +exit: + mbedtls_ccm_free(&context); + return error; +} + +CHIP_ERROR AES_CCM_decrypt(const uint8_t * ciphertext, size_t ciphertext_len, const uint8_t * aad, size_t aad_len, + const uint8_t * tag, size_t tag_length, const uint8_t * key, size_t key_length, const uint8_t * nonce, + size_t nonce_length, uint8_t * plaintext) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + int result = 1; + + mbedtls_ccm_context context; + mbedtls_ccm_init(&context); + + VerifyOrExit(plaintext != nullptr || ciphertext_len == 0, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(ciphertext != nullptr || ciphertext_len == 0, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(tag != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(_isValidTagLength(tag_length), error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(key != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(_isValidKeyLength(key_length), error = CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE); + VerifyOrExit(nonce != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(nonce_length > 0, error = CHIP_ERROR_INVALID_ARGUMENT); + if (aad_len > 0) + { + VerifyOrExit(aad != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); + } + + // Size of key = key_length * number of bits in a byte (8) + // Cast is safe because we called _isValidKeyLength above. + result = + mbedtls_ccm_setkey(&context, MBEDTLS_CIPHER_ID_AES, Uint8::to_const_uchar(key), static_cast(key_length * 8)); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + // Decrypt + result = mbedtls_ccm_auth_decrypt(&context, ciphertext_len, Uint8::to_const_uchar(nonce), nonce_length, + Uint8::to_const_uchar(aad), aad_len, Uint8::to_const_uchar(ciphertext), + Uint8::to_uchar(plaintext), Uint8::to_const_uchar(tag), tag_length); + _log_mbedTLS_error(result); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + +exit: + mbedtls_ccm_free(&context); + return error; +} + +CHIP_ERROR Hash_SHA256(const uint8_t * data, const size_t data_length, uint8_t * out_buffer) +{ + // zero data length hash is supported. + VerifyOrReturnError(data != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(out_buffer != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + +#if (MBEDTLS_VERSION_NUMBER >= 0x03000000) + const int result = mbedtls_sha256(Uint8::to_const_uchar(data), data_length, Uint8::to_uchar(out_buffer), 0); +#else + const int result = mbedtls_sha256_ret(Uint8::to_const_uchar(data), data_length, Uint8::to_uchar(out_buffer), 0); +#endif + + VerifyOrReturnError(result == 0, CHIP_ERROR_INTERNAL); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR Hash_SHA1(const uint8_t * data, const size_t data_length, uint8_t * out_buffer) +{ + // zero data length hash is supported. + VerifyOrReturnError(out_buffer != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + +#if (MBEDTLS_VERSION_NUMBER >= 0x03000000) + const int result = mbedtls_sha1(Uint8::to_const_uchar(data), data_length, Uint8::to_uchar(out_buffer)); +#else + const int result = mbedtls_sha1_ret(Uint8::to_const_uchar(data), data_length, Uint8::to_uchar(out_buffer)); +#endif + + VerifyOrReturnError(result == 0, CHIP_ERROR_INTERNAL); + + return CHIP_NO_ERROR; +} + +static_assert(kMAX_Hash_SHA256_Context_Size >= sizeof(mbedtls_sha256_context), + "kMAX_Hash_SHA256_Context_Size is too small for the size of underlying mbedtls_sha256_context"); + +static inline mbedtls_sha256_context * to_inner_hash_sha256_context(HashSHA256OpaqueContext * context) +{ + return SafePointerCast(context); +} + +Hash_SHA256_stream::Hash_SHA256_stream(void) +{ + mbedtls_sha256_context * context = to_inner_hash_sha256_context(&mContext); + mbedtls_sha256_init(context); +} + +Hash_SHA256_stream::~Hash_SHA256_stream(void) +{ + mbedtls_sha256_context * context = to_inner_hash_sha256_context(&mContext); + mbedtls_sha256_free(context); + Clear(); +} + +CHIP_ERROR Hash_SHA256_stream::Begin(void) +{ + mbedtls_sha256_context * const context = to_inner_hash_sha256_context(&mContext); + +#if (MBEDTLS_VERSION_NUMBER >= 0x03000000) + const int result = mbedtls_sha256_starts(context, 0); +#else + const int result = mbedtls_sha256_starts_ret(context, 0); +#endif + + VerifyOrReturnError(result == 0, CHIP_ERROR_INTERNAL); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR Hash_SHA256_stream::AddData(const ByteSpan data) +{ + mbedtls_sha256_context * const context = to_inner_hash_sha256_context(&mContext); + +#if (MBEDTLS_VERSION_NUMBER >= 0x03000000) + const int result = mbedtls_sha256_update(context, Uint8::to_const_uchar(data.data()), data.size()); +#else + const int result = mbedtls_sha256_update_ret(context, Uint8::to_const_uchar(data.data()), data.size()); +#endif + + VerifyOrReturnError(result == 0, CHIP_ERROR_INTERNAL); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR Hash_SHA256_stream::GetDigest(MutableByteSpan & out_buffer) +{ + mbedtls_sha256_context * context = to_inner_hash_sha256_context(&mContext); + + // Back-up context as we are about to finalize the hash to extract digest. + mbedtls_sha256_context previous_ctx; + mbedtls_sha256_init(&previous_ctx); + mbedtls_sha256_clone(&previous_ctx, context); + + // Pad + compute digest, then finalize context. It is restored next line to continue. + CHIP_ERROR result = Finish(out_buffer); + + // Restore context prior to finalization. + mbedtls_sha256_clone(context, &previous_ctx); + mbedtls_sha256_free(&previous_ctx); + + return result; +} + +CHIP_ERROR Hash_SHA256_stream::Finish(MutableByteSpan & out_buffer) +{ + VerifyOrReturnError(out_buffer.size() >= kSHA256_Hash_Length, CHIP_ERROR_BUFFER_TOO_SMALL); + mbedtls_sha256_context * const context = to_inner_hash_sha256_context(&mContext); + +#if (MBEDTLS_VERSION_NUMBER >= 0x03000000) + const int result = mbedtls_sha256_finish(context, Uint8::to_uchar(out_buffer.data())); +#else + const int result = mbedtls_sha256_finish_ret(context, Uint8::to_uchar(out_buffer.data())); +#endif + + VerifyOrReturnError(result == 0, CHIP_ERROR_INTERNAL); + out_buffer = out_buffer.SubSpan(0, kSHA256_Hash_Length); + + return CHIP_NO_ERROR; +} + +void Hash_SHA256_stream::Clear(void) +{ + mbedtls_platform_zeroize(this, sizeof(*this)); +} + +CHIP_ERROR HKDF_sha::HKDF_SHA256(const uint8_t * secret, const size_t secret_length, const uint8_t * salt, const size_t salt_length, + const uint8_t * info, const size_t info_length, uint8_t * out_buffer, size_t out_length) +{ + VerifyOrReturnError(secret != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(secret_length > 0, CHIP_ERROR_INVALID_ARGUMENT); + + // Salt is optional + if (salt_length > 0) + { + VerifyOrReturnError(salt != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + } + + VerifyOrReturnError(info_length > 0, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(info != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(out_length > 0, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(out_buffer != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + const mbedtls_md_info_t * const md = mbedtls_md_info_from_type(MBEDTLS_MD_SHA256); + VerifyOrReturnError(md != nullptr, CHIP_ERROR_INTERNAL); + + const int result = mbedtls_hkdf(md, Uint8::to_const_uchar(salt), salt_length, Uint8::to_const_uchar(secret), secret_length, + Uint8::to_const_uchar(info), info_length, Uint8::to_uchar(out_buffer), out_length); + _log_mbedTLS_error(result); + VerifyOrReturnError(result == 0, CHIP_ERROR_INTERNAL); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR HMAC_sha::HMAC_SHA256(const uint8_t * key, size_t key_length, const uint8_t * message, size_t message_length, + uint8_t * out_buffer, size_t out_length) +{ + VerifyOrReturnError(key != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(key_length > 0, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(message != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(message_length > 0, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(out_length >= kSHA256_Hash_Length, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(out_buffer != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + const mbedtls_md_info_t * const md = mbedtls_md_info_from_type(MBEDTLS_MD_SHA256); + VerifyOrReturnError(md != nullptr, CHIP_ERROR_INTERNAL); + + const int result = + mbedtls_md_hmac(md, Uint8::to_const_uchar(key), key_length, Uint8::to_const_uchar(message), message_length, out_buffer); + + _log_mbedTLS_error(result); + VerifyOrReturnError(result == 0, CHIP_ERROR_INTERNAL); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR PBKDF2_sha256::pbkdf2_sha256(const uint8_t * password, size_t plen, const uint8_t * salt, size_t slen, + unsigned int iteration_count, uint32_t key_length, uint8_t * output) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + int result = 0; + const mbedtls_md_info_t * md_info; + mbedtls_md_context_t md_ctxt; + constexpr int use_hmac = 1; + + bool free_md_ctxt = false; + + VerifyOrExit(password != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(plen > 0, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(salt != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(slen >= kSpake2p_Min_PBKDF_Salt_Length, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(slen <= kSpake2p_Max_PBKDF_Salt_Length, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(key_length > 0, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(output != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); + + md_info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA256); + VerifyOrExit(md_info != nullptr, error = CHIP_ERROR_INTERNAL); + + mbedtls_md_init(&md_ctxt); + free_md_ctxt = true; + + result = mbedtls_md_setup(&md_ctxt, md_info, use_hmac); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + result = mbedtls_pkcs5_pbkdf2_hmac(&md_ctxt, Uint8::to_const_uchar(password), plen, Uint8::to_const_uchar(salt), slen, + iteration_count, key_length, Uint8::to_uchar(output)); + + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + +exit: + _log_mbedTLS_error(result); + + if (free_md_ctxt) + { + mbedtls_md_free(&md_ctxt); + } + + return error; +} + +static EntropyContext * get_entropy_context() +{ + if (!gsEntropyContext.mInitialized) + { + mbedtls_entropy_init(&gsEntropyContext.mEntropy); + mbedtls_ctr_drbg_init(&gsEntropyContext.mDRBGCtxt); + + gsEntropyContext.mInitialized = true; + } + + return &gsEntropyContext; +} + +static mbedtls_ctr_drbg_context * get_drbg_context() +{ + EntropyContext * const context = get_entropy_context(); + + mbedtls_ctr_drbg_context * const drbgCtxt = &context->mDRBGCtxt; + + if (!context->mDRBGSeeded) + { + const int status = mbedtls_ctr_drbg_seed(drbgCtxt, mbedtls_entropy_func, &context->mEntropy, nullptr, 0); + if (status != 0) + { + _log_mbedTLS_error(status); + return nullptr; + } + + context->mDRBGSeeded = true; + } + + return drbgCtxt; +} + +CHIP_ERROR add_entropy_source(entropy_source fn_source, void * p_source, size_t threshold) +{ + VerifyOrReturnError(fn_source != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + EntropyContext * const entropy_ctxt = get_entropy_context(); + VerifyOrReturnError(entropy_ctxt != nullptr, CHIP_ERROR_INTERNAL); + + const int result = + mbedtls_entropy_add_source(&entropy_ctxt->mEntropy, fn_source, p_source, threshold, MBEDTLS_ENTROPY_SOURCE_STRONG); + VerifyOrReturnError(result == 0, CHIP_ERROR_INTERNAL); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DRBG_get_bytes(uint8_t * out_buffer, const size_t out_length) +{ + VerifyOrReturnError(out_buffer != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(out_length > 0, CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_ctr_drbg_context * const drbg_ctxt = get_drbg_context(); + VerifyOrReturnError(drbg_ctxt != nullptr, CHIP_ERROR_INTERNAL); + + const int result = mbedtls_ctr_drbg_random(drbg_ctxt, Uint8::to_uchar(out_buffer), out_length); + VerifyOrReturnError(result == 0, CHIP_ERROR_INTERNAL); + + return CHIP_NO_ERROR; +} + +static int CryptoRNG(void * ctxt, uint8_t * out_buffer, size_t out_length) +{ + return (chip::Crypto::DRBG_get_bytes(out_buffer, out_length) == CHIP_NO_ERROR) ? 0 : 1; +} + +mbedtls_ecp_group_id MapECPGroupId(SupportedECPKeyTypes keyType) +{ + switch (keyType) + { + case SupportedECPKeyTypes::ECP256R1: + return MBEDTLS_ECP_DP_SECP256R1; + default: + return MBEDTLS_ECP_DP_NONE; + } +} + +static inline mbedtls_uecc_keypair * to_keypair(P256KeypairContext * context) +{ + return SafePointerCast(context); +} + +static inline const mbedtls_uecc_keypair * to_const_keypair(const P256KeypairContext * context) +{ + return SafePointerCast(context); +} + +CHIP_ERROR P256Keypair::ECDSA_sign_msg(const uint8_t * msg, const size_t msg_length, P256ECDSASignature & out_signature) const +{ + VerifyOrReturnError(mInitialized, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError((msg != nullptr) && (msg_length > 0), CHIP_ERROR_INVALID_ARGUMENT); + + uint8_t digest[kSHA256_Hash_Length]; + memset(&digest[0], 0, sizeof(digest)); + ReturnErrorOnFailure(Hash_SHA256(msg, msg_length, &digest[0])); + + CHIP_ERROR error = CHIP_NO_ERROR; + int result = UECC_FAILURE; + + const mbedtls_uecc_keypair * keypair = to_const_keypair(&mKeypair); + + result = uECC_sign(keypair->private_key, digest, sizeof(digest), out_signature.Bytes()); + + VerifyOrExit(result == UECC_SUCCESS, error = CHIP_ERROR_INTERNAL); + VerifyOrExit(out_signature.SetLength(kP256_ECDSA_Signature_Length_Raw) == CHIP_NO_ERROR, error = CHIP_ERROR_INTERNAL); + + keypair = nullptr; + +exit: + return error; +} + +CHIP_ERROR P256PublicKey::ECDSA_validate_msg_signature(const uint8_t * msg, const size_t msg_length, + const P256ECDSASignature & signature) const +{ +#if defined(MBEDTLS_ECDSA_C) + VerifyOrReturnError((msg != nullptr) && (msg_length > 0), CHIP_ERROR_INVALID_ARGUMENT); + + uint8_t digest[kSHA256_Hash_Length]; + memset(&digest[0], 0, sizeof(digest)); + ReturnErrorOnFailure(Hash_SHA256(msg, msg_length, &digest[0])); + + return ECDSA_validate_hash_signature(&digest[0], sizeof(digest), signature); +#else + return CHIP_ERROR_NOT_IMPLEMENTED; +#endif +} + +CHIP_ERROR P256PublicKey::ECDSA_validate_hash_signature(const uint8_t * hash, const size_t hash_length, + const P256ECDSASignature & signature) const +{ + VerifyOrReturnError(hash != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(hash_length == kSHA256_Hash_Length, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(signature.Length() == kP256_ECDSA_Signature_Length_Raw, CHIP_ERROR_INVALID_ARGUMENT); + + CHIP_ERROR error = CHIP_NO_ERROR; + int result = UECC_FAILURE; + + const uint8_t * public_key = *this; + + // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed + result = uECC_verify(public_key + 1, hash, hash_length, Uint8::to_const_uchar(signature.ConstBytes())); + VerifyOrExit(result == UECC_SUCCESS, error = CHIP_ERROR_INVALID_SIGNATURE); + +exit: + return error; +} + +CHIP_ERROR P256Keypair::ECDH_derive_secret(const P256PublicKey & remote_public_key, P256ECDHDerivedSecret & out_secret) const +{ +#if defined(MBEDTLS_ECDH_C) + CHIP_ERROR error = CHIP_NO_ERROR; + int result = 0; + size_t secret_length = (out_secret.Length() == 0) ? out_secret.Capacity() : out_secret.Length(); + + const mbedtls_uecc_keypair * keypair = to_const_keypair(&mKeypair); + + VerifyOrExit(mInitialized, error = CHIP_ERROR_INCORRECT_STATE); + + // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed + result = uECC_shared_secret(remote_public_key.ConstBytes() + 1, keypair->private_key, Uint8::to_uchar(out_secret)); + VerifyOrExit(result == UECC_SUCCESS, error = CHIP_ERROR_INTERNAL); + + SuccessOrExit(out_secret.SetLength(secret_length)); + +exit: + keypair = nullptr; + _log_mbedTLS_error(result); + return error; +#else + return CHIP_ERROR_NOT_IMPLEMENTED; +#endif +} + +void ClearSecretData(uint8_t * buf, size_t len) +{ + mbedtls_platform_zeroize(buf, len); +} + +// THE BELOW IS FROM `third_party/openthread/repo/third_party/mbedtls/repo/library/constant_time.c` since +// mbedtls_ct_memcmp is not available on Linux somehow :( +int mbedtls_ct_memcmp_copy(const void * a, const void * b, size_t n) +{ + size_t i; + volatile const unsigned char * A = (volatile const unsigned char *) a; + volatile const unsigned char * B = (volatile const unsigned char *) b; + volatile unsigned char diff = 0; + + for (i = 0; i < n; i++) + { + /* Read volatile data in order before computing diff. + * This avoids IAR compiler warning: + * 'the order of volatile accesses is undefined ..' */ + unsigned char x = A[i], y = B[i]; + diff |= x ^ y; + } + + return ((int) diff); +} + +bool IsBufferContentEqualConstantTime(const void * a, const void * b, size_t n) +{ + return mbedtls_ct_memcmp_copy(a, b, n) == 0; +} + +CHIP_ERROR P256Keypair::Initialize() +{ + CHIP_ERROR error = CHIP_NO_ERROR; + int result = UECC_FAILURE; + + Clear(); + + mbedtls_uecc_keypair * keypair = to_keypair(&mKeypair); + + result = uECC_make_key(keypair->public_key, keypair->private_key); + VerifyOrExit(result == UECC_SUCCESS, error = CHIP_ERROR_INTERNAL); + + // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed + Uint8::to_uchar(mPublicKey)[0] = 0x04; + memcpy(Uint8::to_uchar(mPublicKey) + 1, keypair->public_key, 2 * NUM_ECC_BYTES); + + keypair = nullptr; + mInitialized = true; + +exit: + _log_mbedTLS_error(result); + return error; +} + +CHIP_ERROR P256Keypair::Serialize(P256SerializedKeypair & output) const +{ + const mbedtls_uecc_keypair * keypair = to_const_keypair(&mKeypair); + size_t len = output.Length() == 0 ? output.Capacity() : output.Length(); + Encoding::BufferWriter bbuf(output, len); + uint8_t privkey[kP256_PrivateKey_Length]; + CHIP_ERROR error = CHIP_NO_ERROR; + int result = 0; + + bbuf.Put(mPublicKey, mPublicKey.Length()); + + VerifyOrExit(bbuf.Available() == sizeof(privkey), error = CHIP_ERROR_INTERNAL); + VerifyOrExit(sizeof(keypair->private_key) <= bbuf.Available(), error = CHIP_ERROR_INTERNAL); + + memcpy(privkey, keypair->private_key, sizeof(privkey)); + + bbuf.Put(privkey, sizeof(privkey)); + VerifyOrExit(bbuf.Fit(), error = CHIP_ERROR_BUFFER_TOO_SMALL); + + output.SetLength(bbuf.Needed()); + +exit: + memset(privkey, 0, sizeof(privkey)); + _log_mbedTLS_error(result); + return error; +} + +CHIP_ERROR P256Keypair::Deserialize(P256SerializedKeypair & input) +{ + int result = 0; + CHIP_ERROR error = CHIP_NO_ERROR; + Encoding::BufferWriter bbuf(mPublicKey, mPublicKey.Length()); + + Clear(); + + mbedtls_uecc_keypair * keypair = to_keypair(&mKeypair); + + // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed + memcpy(keypair->public_key, Uint8::to_uchar(input) + 1, 2 * NUM_ECC_BYTES); + memcpy(keypair->private_key, Uint8::to_uchar(input) + mPublicKey.Length(), NUM_ECC_BYTES); + + keypair = nullptr; + + VerifyOrExit(input.Length() == mPublicKey.Length() + kP256_PrivateKey_Length, error = CHIP_ERROR_INVALID_ARGUMENT); + bbuf.Put((const uint8_t *) input, mPublicKey.Length()); + VerifyOrExit(bbuf.Fit(), error = CHIP_ERROR_NO_MEMORY); + + mInitialized = true; + + _log_mbedTLS_error(result); + +exit: + return error; +} + +void P256Keypair::Clear() +{ + if (mInitialized) + { + mbedtls_uecc_keypair * keypair = to_keypair(&mKeypair); + memset(keypair, 0, sizeof(mbedtls_uecc_keypair)); + mInitialized = false; + } +} + +P256Keypair::~P256Keypair() +{ + Clear(); +} + +CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t & csr_length) const +{ + CHIP_ERROR error = CHIP_NO_ERROR; + int result = 0; + size_t out_length; + + mbedtls_x509write_csr csr; + mbedtls_x509write_csr_init(&csr); + + mbedtls_pk_context pk; + pk.CHIP_CRYPTO_PAL_PRIVATE(pk_info) = mbedtls_pk_info_from_type(MBEDTLS_PK_ECKEY); + pk.CHIP_CRYPTO_PAL_PRIVATE(pk_ctx) = to_keypair(&mKeypair); + VerifyOrExit(pk.CHIP_CRYPTO_PAL_PRIVATE(pk_info) != nullptr, error = CHIP_ERROR_INTERNAL); + + VerifyOrExit(mInitialized, error = CHIP_ERROR_INCORRECT_STATE); + + mbedtls_x509write_csr_set_key(&csr, &pk); + + mbedtls_x509write_csr_set_md_alg(&csr, MBEDTLS_MD_SHA256); + + // TODO: mbedTLS CSR parser fails if the subject name is not set (or if empty). + // CHIP Spec doesn't specify the subject name that can be used. + // Figure out the correct value and update this code. + result = mbedtls_x509write_csr_set_subject_name(&csr, "O=CSR"); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + result = mbedtls_x509write_csr_der(&csr, out_csr, csr_length, CryptoRNG, nullptr); + VerifyOrExit(result > 0, error = CHIP_ERROR_INTERNAL); + VerifyOrExit(CanCastTo(result), error = CHIP_ERROR_INTERNAL); + + out_length = static_cast(result); + result = 0; + VerifyOrExit(out_length <= csr_length, error = CHIP_ERROR_INTERNAL); + + if (csr_length != out_length) + { + // mbedTLS API writes the CSR at the end of the provided buffer. + // Let's move it to the start of the buffer. + size_t offset = csr_length - out_length; + memmove(out_csr, &out_csr[offset], out_length); + } + + csr_length = out_length; + +exit: + mbedtls_x509write_csr_free(&csr); + + _log_mbedTLS_error(result); + return error; +} + +CHIP_ERROR VerifyCertificateSigningRequest(const uint8_t * csr_buf, size_t csr_length, P256PublicKey & pubkey) +{ +#if defined(MBEDTLS_X509_CSR_PARSE_C) + // TODO: For some embedded targets, mbedTLS library doesn't have mbedtls_x509_csr_parse_der, and mbedtls_x509_csr_parse_free. + // Taking a step back, embedded targets likely will not process CSR requests. Adding this action item to reevaluate + // this if there's a need for this processing for embedded targets. + CHIP_ERROR error = CHIP_NO_ERROR; + size_t pubkey_size = 0; + + mbedtls_ecp_keypair * keypair = nullptr; + + P256ECDSASignature signature; + MutableByteSpan out_raw_sig_span(signature.Bytes(), signature.Capacity()); + + mbedtls_x509_csr csr; + mbedtls_x509_csr_init(&csr); + + int result = mbedtls_x509_csr_parse_der(&csr, csr_buf, csr_length); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + // Verify the signature algorithm and public key type + VerifyOrExit(csr.CHIP_CRYPTO_PAL_PRIVATE(sig_md) == MBEDTLS_MD_SHA256, error = CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE); + VerifyOrExit(csr.CHIP_CRYPTO_PAL_PRIVATE(sig_pk) == MBEDTLS_PK_ECDSA, error = CHIP_ERROR_WRONG_KEY_TYPE); + + keypair = mbedtls_pk_ec(csr.CHIP_CRYPTO_PAL_PRIVATE_X509(pk)); + + // Copy the public key from the CSR + result = mbedtls_ecp_point_write_binary(&keypair->CHIP_CRYPTO_PAL_PRIVATE(grp), &keypair->CHIP_CRYPTO_PAL_PRIVATE(Q), + MBEDTLS_ECP_PF_UNCOMPRESSED, &pubkey_size, Uint8::to_uchar(pubkey), pubkey.Length()); + + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + VerifyOrExit(pubkey_size == pubkey.Length(), error = CHIP_ERROR_INTERNAL); + + // Convert DER signature to raw signature + error = EcdsaAsn1SignatureToRaw(kP256_FE_Length, + ByteSpan{ csr.CHIP_CRYPTO_PAL_PRIVATE(sig).CHIP_CRYPTO_PAL_PRIVATE_X509(p), + csr.CHIP_CRYPTO_PAL_PRIVATE(sig).CHIP_CRYPTO_PAL_PRIVATE_X509(len) }, + out_raw_sig_span); + + VerifyOrExit(error == CHIP_NO_ERROR, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(out_raw_sig_span.size() == (kP256_FE_Length * 2), error = CHIP_ERROR_INTERNAL); + signature.SetLength(out_raw_sig_span.size()); + + // Verify the signature using the public key + error = pubkey.ECDSA_validate_msg_signature(csr.CHIP_CRYPTO_PAL_PRIVATE_X509(cri).CHIP_CRYPTO_PAL_PRIVATE_X509(p), + csr.CHIP_CRYPTO_PAL_PRIVATE_X509(cri).CHIP_CRYPTO_PAL_PRIVATE_X509(len), signature); + + SuccessOrExit(error); + +exit: + mbedtls_x509_csr_free(&csr); + _log_mbedTLS_error(result); + return error; +#else + ChipLogError(Crypto, "MBEDTLS_X509_CSR_PARSE_C is not enabled. CSR cannot be parsed"); + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +typedef struct Spake2p_Context +{ + const mbedtls_md_info_t * md_info; + uECC_word_t M[2 * NUM_ECC_WORDS]; + uECC_word_t N[2 * NUM_ECC_WORDS]; + uECC_word_t X[2 * NUM_ECC_WORDS]; + uECC_word_t Y[2 * NUM_ECC_WORDS]; + uECC_word_t L[2 * NUM_ECC_WORDS]; + uECC_word_t Z[2 * NUM_ECC_WORDS]; + uECC_word_t V[2 * NUM_ECC_WORDS]; + + uECC_word_t w0[NUM_ECC_WORDS]; + uECC_word_t w1[NUM_ECC_WORDS]; + uECC_word_t xy[NUM_ECC_WORDS]; + uECC_word_t tempbn[NUM_ECC_WORDS]; +} Spake2p_Context; + +static inline Spake2p_Context * to_inner_spake2p_context(Spake2pOpaqueContext * context) +{ + return SafePointerCast(context); +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::InitInternal(void) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + int result = 0; + + Spake2p_Context * context = to_inner_spake2p_context(&mSpake2pContext); + + memset(context, 0, sizeof(Spake2p_Context)); + + M = context->M; + N = context->N; + X = context->X; + Y = context->Y; + L = context->L; + V = context->V; + Z = context->Z; + + w0 = context->w0; + w1 = context->w1; + xy = context->xy; + tempbn = context->tempbn; + + G = curve_G; + + return error; + +exit: + _log_mbedTLS_error(result); + Clear(); + return error; +} + +void Spake2p_P256_SHA256_HKDF_HMAC::Clear() +{ + VerifyOrReturn(state != CHIP_SPAKE2P_STATE::PREINIT); + + Spake2p_Context * context = to_inner_spake2p_context(&mSpake2pContext); + memset(&context->M, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); + memset(&context->N, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); + memset(&context->X, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); + memset(&context->Y, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); + memset(&context->L, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); + memset(&context->Z, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); + memset(&context->V, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); + + memset(&context->w0, 0, NUM_ECC_WORDS * sizeof(uECC_word_t)); + memset(&context->w1, 0, NUM_ECC_WORDS * sizeof(uECC_word_t)); + memset(&context->xy, 0, NUM_ECC_WORDS * sizeof(uECC_word_t)); + memset(&context->tempbn, 0, NUM_ECC_WORDS * sizeof(uECC_word_t)); + + G = NULL; + state = CHIP_SPAKE2P_STATE::PREINIT; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::Mac(const uint8_t * key, size_t key_len, const uint8_t * in, size_t in_len, + MutableByteSpan & out_span) +{ + HMAC_sha hmac; + VerifyOrReturnError(out_span.size() >= kSHA256_Hash_Length, CHIP_ERROR_BUFFER_TOO_SMALL); + ReturnErrorOnFailure(hmac.HMAC_SHA256(key, key_len, in, in_len, out_span.data(), kSHA256_Hash_Length)); + out_span = out_span.SubSpan(0, kSHA256_Hash_Length); + return CHIP_NO_ERROR; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::MacVerify(const uint8_t * key, size_t key_len, const uint8_t * mac, size_t mac_len, + const uint8_t * in, size_t in_len) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + int result = 0; + + uint8_t computed_mac[kSHA256_Hash_Length]; + MutableByteSpan computed_mac_span{ computed_mac }; + VerifyOrExit(mac_len == kSHA256_Hash_Length, error = CHIP_ERROR_INVALID_ARGUMENT); + + SuccessOrExit(error = Mac(key, key_len, in, in_len, computed_mac_span)); + VerifyOrExit(computed_mac_span.size() == mac_len, error = CHIP_ERROR_INTERNAL); + + VerifyOrExit(IsBufferContentEqualConstantTime(mac, computed_mac, kSHA256_Hash_Length), error = CHIP_ERROR_INTERNAL); + +exit: + _log_mbedTLS_error(result); + return error; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FELoad(const uint8_t * in, size_t in_len, void * fe) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + int result = 0; + + uECC_word_t tmp[2 * NUM_ECC_WORDS] = { 0 }; + uECC_vli_bytesToNative(tmp, in, NUM_ECC_BYTES); + + uECC_vli_mmod((uECC_word_t *) fe, tmp, curve_n); + +exit: + _log_mbedTLS_error(result); + return error; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FEWrite(const void * fe, uint8_t * out, size_t out_len) +{ + uECC_vli_nativeToBytes(out, NUM_ECC_BYTES, (const unsigned int *) fe); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FEGenerate(void * fe) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + int result = 0; + + mbedtls_uecc_keypair keypair; + + result = UECC_FAILURE; + + result = uECC_make_key(keypair.public_key, keypair.private_key); + VerifyOrExit(result == UECC_SUCCESS, error = CHIP_ERROR_INTERNAL); + + uECC_vli_bytesToNative((uECC_word_t *) fe, keypair.private_key, NUM_ECC_BYTES); + +exit: + _log_mbedTLS_error(result); + return error; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FEMul(void * fer, const void * fe1, const void * fe2) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + int result = 0; + + uECC_vli_modMult((uECC_word_t *) fer, (const uECC_word_t *) fe1, (const uECC_word_t *) fe2, (const uECC_word_t *) curve_n); + +exit: + _log_mbedTLS_error(result); + return error; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointLoad(const uint8_t * in, size_t in_len, void * R) +{ + uint8_t tmp[2 * NUM_ECC_BYTES]; + + // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed + memcpy(tmp, in + 1, 2 * NUM_ECC_BYTES); + + uECC_vli_bytesToNative((uECC_word_t *) R, tmp, NUM_ECC_BYTES); + uECC_vli_bytesToNative((uECC_word_t *) R + NUM_ECC_WORDS, tmp + NUM_ECC_BYTES, NUM_ECC_BYTES); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointWrite(const void * R, uint8_t * out, size_t out_len) +{ + memset(out, 0, out_len); + + // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed + out[0] = 0x04; + uECC_vli_nativeToBytes(out + 1, NUM_ECC_BYTES, (uECC_word_t *) R); + uECC_vli_nativeToBytes(out + NUM_ECC_BYTES + 1, NUM_ECC_BYTES, (uECC_word_t *) R + NUM_ECC_WORDS); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointMul(void * R, const void * P1, const void * fe1) +{ + + if (EccPoint_mult_safer((uECC_word_t *) R, (const uECC_word_t *) P1, (const uECC_word_t *) fe1) != UECC_SUCCESS) + { + return CHIP_ERROR_INTERNAL; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointAddMul(void * R, const void * P1, const void * fe1, const void * P2, + const void * fe2) +{ + uECC_word_t R1[2 * NUM_ECC_WORDS]; + uECC_word_t R2[2 * NUM_ECC_WORDS]; + uECC_word_t z[NUM_ECC_WORDS]; + uint8_t ret = UECC_SUCCESS; + + if (EccPoint_mult_safer(R1, (const uECC_word_t *) P1, (const uECC_word_t *) fe1) != UECC_SUCCESS) + { + return CHIP_ERROR_INTERNAL; + } + + if (EccPoint_mult_safer(R2, (const uECC_word_t *) P2, (const uECC_word_t *) fe2) != UECC_SUCCESS) + { + return CHIP_ERROR_INTERNAL; + } + + uECC_vli_modSub(z, R2, R1, curve_p); + XYcZ_add(R1, R1 + NUM_ECC_WORDS, R2, R2 + NUM_ECC_WORDS); + uECC_vli_modInv(z, z, curve_p); + apply_z(R2, R2 + NUM_ECC_WORDS, z); + + memcpy((uECC_word_t *) R, R2, 2 * NUM_ECC_BYTES); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointInvert(void * R) +{ + uECC_word_t tmp[NUM_ECC_WORDS] = { 0 }; + + uECC_vli_sub(tmp, curve_p, (uECC_word_t *) R + NUM_ECC_WORDS); + memcpy((uECC_word_t *) R + NUM_ECC_WORDS, tmp, NUM_ECC_BYTES); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointCofactorMul(void * R) +{ + return CHIP_NO_ERROR; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::ComputeL(uint8_t * Lout, size_t * L_len, const uint8_t * w1in, size_t w1in_len) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + int result = 0; + + result = UECC_SUCCESS; + uECC_word_t tmp[2 * NUM_ECC_WORDS]; + uECC_word_t w1_bn[NUM_ECC_WORDS]; + uECC_word_t L_tmp[2 * NUM_ECC_WORDS]; + + uECC_vli_bytesToNative(tmp, w1in, NUM_ECC_BYTES); + + uECC_vli_mmod(w1_bn, tmp, curve_n); + + result = EccPoint_mult_safer(L_tmp, curve_G, w1_bn); + VerifyOrExit(result == UECC_SUCCESS, error = CHIP_ERROR_INTERNAL); + + // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed + Lout[0] = 0x04; + uECC_vli_nativeToBytes(Lout + 1, NUM_ECC_BYTES, L_tmp); + uECC_vli_nativeToBytes(Lout + NUM_ECC_BYTES + 1, NUM_ECC_BYTES, L_tmp + NUM_ECC_WORDS); + +exit: + _log_mbedTLS_error(result); + + return error; +} + +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointIsValid(void * R) +{ + if (uECC_valid_point((const uECC_word_t *) R) != 0) + { + return CHIP_ERROR_INTERNAL; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ValidateCertificateChain(const uint8_t * rootCertificate, size_t rootCertificateLen, const uint8_t * caCertificate, + size_t caCertificateLen, const uint8_t * leafCertificate, size_t leafCertificateLen, + CertificateChainValidationResult & result) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_NO_ERROR; + mbedtls_x509_crt certChain; + mbedtls_x509_crt rootCert; + int mbedResult; + uint32_t flags; + + result = CertificateChainValidationResult::kInternalFrameworkError; + + VerifyOrReturnError(rootCertificate != nullptr && rootCertificateLen != 0, + (result = CertificateChainValidationResult::kRootArgumentInvalid, CHIP_ERROR_INVALID_ARGUMENT)); + VerifyOrReturnError(caCertificate != nullptr && caCertificateLen != 0, + (result = CertificateChainValidationResult::kICAArgumentInvalid, CHIP_ERROR_INVALID_ARGUMENT)); + VerifyOrReturnError(leafCertificate != nullptr && leafCertificateLen != 0, + (result = CertificateChainValidationResult::kLeafArgumentInvalid, CHIP_ERROR_INVALID_ARGUMENT)); + + mbedtls_x509_crt_init(&certChain); + mbedtls_x509_crt_init(&rootCert); + + /* Start of chain */ + mbedResult = mbedtls_x509_crt_parse(&certChain, Uint8::to_const_uchar(leafCertificate), leafCertificateLen); + VerifyOrExit(mbedResult == 0, (result = CertificateChainValidationResult::kLeafFormatInvalid, error = CHIP_ERROR_INTERNAL)); + + /* Add the intermediate to the chain */ + mbedResult = mbedtls_x509_crt_parse(&certChain, Uint8::to_const_uchar(caCertificate), caCertificateLen); + VerifyOrExit(mbedResult == 0, (result = CertificateChainValidationResult::kICAFormatInvalid, error = CHIP_ERROR_INTERNAL)); + + /* Parse the root cert */ + mbedResult = mbedtls_x509_crt_parse(&rootCert, Uint8::to_const_uchar(rootCertificate), rootCertificateLen); + VerifyOrExit(mbedResult == 0, (result = CertificateChainValidationResult::kRootFormatInvalid, error = CHIP_ERROR_INTERNAL)); + + /* Verify the chain against the root */ + mbedResult = mbedtls_x509_crt_verify(&certChain, &rootCert, NULL, NULL, &flags, NULL, NULL); + + switch (mbedResult) + { + case 0: + VerifyOrExit(flags == 0, (result = CertificateChainValidationResult::kInternalFrameworkError, error = CHIP_ERROR_INTERNAL)); + result = CertificateChainValidationResult::kSuccess; + break; + case MBEDTLS_ERR_X509_CERT_VERIFY_FAILED: + result = CertificateChainValidationResult::kChainInvalid; + error = CHIP_ERROR_CERT_NOT_TRUSTED; + break; + default: + SuccessOrExit((result = CertificateChainValidationResult::kInternalFrameworkError, error = CHIP_ERROR_INTERNAL)); + } + +exit: + _log_mbedTLS_error(mbedResult); + mbedtls_x509_crt_free(&certChain); + mbedtls_x509_crt_free(&rootCert); + +#else + (void) rootCertificate; + (void) rootCertificateLen; + (void) caCertificate; + (void) caCertificateLen; + (void) leafCertificate; + (void) leafCertificateLen; + (void) result; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + +inline bool IsTimeGreaterThanEqual(const mbedtls_x509_time * const timeA, const mbedtls_x509_time * const timeB) +{ + + // checks if two values are different and if yes, then returns first > second. +#define RETURN_STRICTLY_GREATER_IF_DIFFERENT(component) \ + { \ + auto valueA = timeA->CHIP_CRYPTO_PAL_PRIVATE_X509(component); \ + auto valueB = timeB->CHIP_CRYPTO_PAL_PRIVATE_X509(component); \ + \ + if (valueA != valueB) \ + { \ + return valueA > valueB; \ + } \ + } + + RETURN_STRICTLY_GREATER_IF_DIFFERENT(year); + RETURN_STRICTLY_GREATER_IF_DIFFERENT(mon); + RETURN_STRICTLY_GREATER_IF_DIFFERENT(day); + RETURN_STRICTLY_GREATER_IF_DIFFERENT(hour); + RETURN_STRICTLY_GREATER_IF_DIFFERENT(min); + RETURN_STRICTLY_GREATER_IF_DIFFERENT(sec); + + // all above are equal + return true; +} + +CHIP_ERROR IsCertificateValidAtIssuance(const ByteSpan & referenceCertificate, const ByteSpan & toBeEvaluatedCertificate) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_NO_ERROR; + mbedtls_x509_crt mbedReferenceCertificate; + mbedtls_x509_crt mbedToBeEvaluatedCertificate; + mbedtls_x509_time refNotBeforeTime; + mbedtls_x509_time tbeNotBeforeTime; + mbedtls_x509_time tbeNotAfterTime; + int result; + + VerifyOrReturnError(!referenceCertificate.empty() && !toBeEvaluatedCertificate.empty(), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbedReferenceCertificate); + mbedtls_x509_crt_init(&mbedToBeEvaluatedCertificate); + + result = mbedtls_x509_crt_parse(&mbedReferenceCertificate, Uint8::to_const_uchar(referenceCertificate.data()), + referenceCertificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + result = mbedtls_x509_crt_parse(&mbedToBeEvaluatedCertificate, Uint8::to_const_uchar(toBeEvaluatedCertificate.data()), + toBeEvaluatedCertificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + refNotBeforeTime = mbedReferenceCertificate.CHIP_CRYPTO_PAL_PRIVATE_X509(valid_from); + tbeNotBeforeTime = mbedToBeEvaluatedCertificate.CHIP_CRYPTO_PAL_PRIVATE_X509(valid_from); + tbeNotAfterTime = mbedToBeEvaluatedCertificate.CHIP_CRYPTO_PAL_PRIVATE_X509(valid_to); + + // check if referenceCertificate is issued at or after tbeCertificate's notBefore timestamp + VerifyOrExit(IsTimeGreaterThanEqual(&refNotBeforeTime, &tbeNotBeforeTime), error = CHIP_ERROR_CERT_EXPIRED); + + // check if referenceCertificate is issued at or before tbeCertificate's notAfter timestamp + VerifyOrExit(IsTimeGreaterThanEqual(&tbeNotAfterTime, &refNotBeforeTime), error = CHIP_ERROR_CERT_EXPIRED); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbedReferenceCertificate); + mbedtls_x509_crt_free(&mbedToBeEvaluatedCertificate); + +#else + (void) referenceCertificate; + (void) toBeEvaluatedCertificate; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + +CHIP_ERROR IsCertificateValidAtCurrentTime(const ByteSpan & certificate) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_NO_ERROR; + mbedtls_x509_crt mbedCertificate; + int result; + + VerifyOrReturnError(!certificate.empty(), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbedCertificate); + + result = mbedtls_x509_crt_parse(&mbedCertificate, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + // check if certificate's notBefore timestamp is earlier than or equal to current time. + result = mbedtls_x509_time_is_past(&mbedCertificate.CHIP_CRYPTO_PAL_PRIVATE_X509(valid_from)); + VerifyOrExit(result == 1, error = CHIP_ERROR_CERT_EXPIRED); + + // check if certificate's notAfter timestamp is later than current time. + result = mbedtls_x509_time_is_future(&mbedCertificate.CHIP_CRYPTO_PAL_PRIVATE_X509(valid_to)); + VerifyOrExit(result == 1, error = CHIP_ERROR_CERT_EXPIRED); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbedCertificate); + +#else + (void) certificate; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + +CHIP_ERROR ExtractPubkeyFromX509Cert(const ByteSpan & certificate, Crypto::P256PublicKey & pubkey) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_NO_ERROR; + mbedtls_x509_crt mbed_cert; + mbedtls_ecp_keypair * keypair = nullptr; + size_t pubkey_size = 0; + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + VerifyOrExit(mbedtls_pk_get_type(&(mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(pk))) == MBEDTLS_PK_ECKEY, + error = CHIP_ERROR_INVALID_ARGUMENT); + + keypair = mbedtls_pk_ec(mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(pk)); + VerifyOrExit(keypair->CHIP_CRYPTO_PAL_PRIVATE(grp).id == MapECPGroupId(pubkey.Type()), error = CHIP_ERROR_INVALID_ARGUMENT); + // Copy the public key from the cert in raw point format + result = + mbedtls_ecp_point_write_binary(&keypair->CHIP_CRYPTO_PAL_PRIVATE(grp), &keypair->CHIP_CRYPTO_PAL_PRIVATE(Q), + MBEDTLS_ECP_PF_UNCOMPRESSED, &pubkey_size, Uint8::to_uchar(pubkey.Bytes()), pubkey.Length()); + + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + VerifyOrExit(pubkey_size == pubkey.Length(), error = CHIP_ERROR_INTERNAL); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) pubkey; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + +namespace { + +CHIP_ERROR ExtractKIDFromX509Cert(bool extractSKID, const ByteSpan & certificate, MutableByteSpan & kid) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_NO_ERROR; + mbedtls_x509_crt mbed_cert; + unsigned char * p; + const unsigned char * end; + size_t len; + + constexpr uint8_t sOID_Extension_SubjectKeyIdentifier[] = { 0x55, 0x1D, 0x0E }; + constexpr uint8_t sOID_Extension_AuthorityKeyIdentifier[] = { 0x55, 0x1D, 0x23 }; + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + // TODO: The mbedTLS team is working on supporting SKID and AKID extensions processing. + // Once it is supported, this code should be updated. + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + bool extractCurrentExtSKID = extractSKID && (sizeof(sOID_Extension_SubjectKeyIdentifier) == len) && + (memcmp(p, sOID_Extension_SubjectKeyIdentifier, len) == 0); + bool extractCurrentExtAKID = !extractSKID && (sizeof(sOID_Extension_AuthorityKeyIdentifier) == len) && + (memcmp(p, sOID_Extension_AuthorityKeyIdentifier, len) == 0); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + if (extractCurrentExtSKID || extractCurrentExtAKID) + { + if (extractCurrentExtSKID) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + } + else + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + // Other optional fields, authorityCertIssuer and authorityCertSerialNumber, + // will be skipped if present. + } + VerifyOrExit(len == kSubjectKeyIdentifierLength, error = CHIP_ERROR_WRONG_CERT_TYPE); + VerifyOrExit(len <= kid.size(), error = CHIP_ERROR_BUFFER_TOO_SMALL); + memcpy(kid.data(), p, len); + if (kid.size() > len) + { + kid.reduce_size(len); + } + break; + } + p += len; + } + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) kid; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + +} // namespace + +CHIP_ERROR ExtractSKIDFromX509Cert(const ByteSpan & certificate, MutableByteSpan & skid) +{ + return ExtractKIDFromX509Cert(true, certificate, skid); +} + +CHIP_ERROR ExtractAKIDFromX509Cert(const ByteSpan & certificate, MutableByteSpan & akid) +{ + return ExtractKIDFromX509Cert(false, certificate, akid); +} + +CHIP_ERROR ExtractVIDPIDFromX509Cert(const ByteSpan & certificate, AttestationCertVidPid & vidpid) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + constexpr uint8_t sOID_AttributeType_CommonName[] = { 0x55, 0x04, 0x03 }; + constexpr uint8_t sOID_AttributeType_MatterVendorId[] = { 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0xA2, 0x7C, 0x02, 0x01 }; + constexpr uint8_t sOID_AttributeType_MatterProductId[] = { 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0xA2, 0x7C, 0x02, 0x02 }; + + CHIP_ERROR error = CHIP_NO_ERROR; + mbedtls_x509_crt mbed_cert; + mbedtls_asn1_named_data * dnIterator = nullptr; + AttestationCertVidPid vidpidFromCN; + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + for (dnIterator = &mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(subject); dnIterator != nullptr; + dnIterator = dnIterator->CHIP_CRYPTO_PAL_PRIVATE_X509(next)) + { + size_t oid_len = dnIterator->CHIP_CRYPTO_PAL_PRIVATE_X509(oid).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + uint8_t * oid_p = dnIterator->CHIP_CRYPTO_PAL_PRIVATE_X509(oid).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + size_t val_len = dnIterator->CHIP_CRYPTO_PAL_PRIVATE_X509(val).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + uint8_t * val_p = dnIterator->CHIP_CRYPTO_PAL_PRIVATE_X509(val).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + + if (oid_p != nullptr && val_p != nullptr) + { + DNAttrType attrType = DNAttrType::kUnspecified; + if ((oid_len == sizeof(sOID_AttributeType_CommonName)) && (memcmp(sOID_AttributeType_CommonName, oid_p, oid_len) == 0)) + { + attrType = DNAttrType::kCommonName; + } + else if ((oid_len == sizeof(sOID_AttributeType_MatterVendorId)) && + (memcmp(sOID_AttributeType_MatterVendorId, oid_p, oid_len) == 0)) + { + attrType = DNAttrType::kMatterVID; + } + else if ((oid_len == sizeof(sOID_AttributeType_MatterProductId)) && + (memcmp(sOID_AttributeType_MatterProductId, oid_p, oid_len) == 0)) + { + attrType = DNAttrType::kMatterPID; + } + + error = ExtractVIDPIDFromAttributeString(attrType, ByteSpan(val_p, val_len), vidpid, vidpidFromCN); + SuccessOrExit(error); + } + } + + // If Matter Attributes were not found use values extracted from the CN Attribute, + // which might be uninitialized as well. + if (!vidpid.Initialized()) + { + vidpid = vidpidFromCN; + } + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) vidpid; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + +} // namespace Crypto +} // namespace chip diff --git a/src/crypto/CHIPCryptoPALmbedTLS.cpp b/src/crypto/CHIPCryptoPALmbedTLS.cpp index f06c36a0c61c6c..59b11d1e34a681 100644 --- a/src/crypto/CHIPCryptoPALmbedTLS.cpp +++ b/src/crypto/CHIPCryptoPALmbedTLS.cpp @@ -44,13 +44,6 @@ #include #include -#if defined(MBEDTLS_USE_TINYCRYPT) -#include -#include -#include -#include -#endif // defined(MBEDTLS_USE_TINYCRYPT) - #include #include #include @@ -93,11 +86,7 @@ static EntropyContext gsEntropyContext; static void _log_mbedTLS_error(int error_code) { -#if defined(MBEDTLS_USE_TINYCRYPT) - if (error_code != 0 && error_code != UECC_SUCCESS) -#else if (error_code != 0) -#endif { #if defined(MBEDTLS_ERROR_C) char error_str[MAX_ERROR_STR_LEN]; @@ -496,24 +485,6 @@ static int CryptoRNG(void * ctxt, uint8_t * out_buffer, size_t out_length) return (chip::Crypto::DRBG_get_bytes(out_buffer, out_length) == CHIP_NO_ERROR) ? 0 : 1; } -#if defined(MBEDTLS_USE_TINYCRYPT) - -static int uecc_rng_wrapper(uint8_t * dest, unsigned int size) -{ - int ret; - - ret = CryptoRNG(NULL, dest, size); - - return (ret == 0) ? size : 0; -} - -static int uECC_is_rng_set(void) -{ - return (uecc_rng_wrapper == uECC_get_rng()) ? 1 : 0; -} - -#endif - mbedtls_ecp_group_id MapECPGroupId(SupportedECPKeyTypes keyType) { switch (keyType) @@ -525,20 +496,6 @@ mbedtls_ecp_group_id MapECPGroupId(SupportedECPKeyTypes keyType) } } -#if defined(MBEDTLS_USE_TINYCRYPT) - -static inline mbedtls_uecc_keypair * to_keypair(P256KeypairContext * context) -{ - return SafePointerCast(context); -} - -static inline const mbedtls_uecc_keypair * to_const_keypair(const P256KeypairContext * context) -{ - return SafePointerCast(context); -} - -#else - static inline mbedtls_ecp_keypair * to_keypair(P256KeypairContext * context) { return SafePointerCast(context); @@ -549,8 +506,6 @@ static inline const mbedtls_ecp_keypair * to_const_keypair(const P256KeypairCont return SafePointerCast(context); } -#endif - CHIP_ERROR P256Keypair::ECDSA_sign_msg(const uint8_t * msg, const size_t msg_length, P256ECDSASignature & out_signature) const { VerifyOrReturnError(mInitialized, CHIP_ERROR_INCORRECT_STATE); @@ -560,24 +515,9 @@ CHIP_ERROR P256Keypair::ECDSA_sign_msg(const uint8_t * msg, const size_t msg_len memset(&digest[0], 0, sizeof(digest)); ReturnErrorOnFailure(Hash_SHA256(msg, msg_length, &digest[0])); -#if defined(MBEDTLS_USE_TINYCRYPT) - CHIP_ERROR error = CHIP_NO_ERROR; - int result = UECC_FAILURE; - - const mbedtls_uecc_keypair * keypair = to_const_keypair(&mKeypair); - - result = uECC_sign(keypair->private_key, digest, sizeof(digest), out_signature.Bytes()); - - VerifyOrExit(result == UECC_SUCCESS, error = CHIP_ERROR_INTERNAL); - VerifyOrExit(out_signature.SetLength(kP256_ECDSA_Signature_Length_Raw) == CHIP_NO_ERROR, error = CHIP_ERROR_INTERNAL); - - keypair = nullptr; - -exit: - return error; -#elif defined(MBEDTLS_ECDSA_C) +#if defined(MBEDTLS_ECDSA_C) CHIP_ERROR error = CHIP_NO_ERROR; - int result = 0; + int result = 0; mbedtls_mpi r, s; mbedtls_mpi_init(&r); mbedtls_mpi_init(&s); @@ -638,29 +578,13 @@ CHIP_ERROR P256PublicKey::ECDSA_validate_msg_signature(const uint8_t * msg, cons CHIP_ERROR P256PublicKey::ECDSA_validate_hash_signature(const uint8_t * hash, const size_t hash_length, const P256ECDSASignature & signature) const { -#if defined(MBEDTLS_USE_TINYCRYPT) - VerifyOrReturnError(hash != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(hash_length == kSHA256_Hash_Length, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(signature.Length() == kP256_ECDSA_Signature_Length_Raw, CHIP_ERROR_INVALID_ARGUMENT); - - CHIP_ERROR error = CHIP_NO_ERROR; - int result = UECC_FAILURE; - - const uint8_t * public_key = *this; - - // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed - result = uECC_verify(public_key + 1, hash, hash_length, Uint8::to_const_uchar(signature.ConstBytes())); - VerifyOrExit(result == UECC_SUCCESS, error = CHIP_ERROR_INVALID_SIGNATURE); - -exit: - return error; -#elif defined(MBEDTLS_ECDSA_C) +#if defined(MBEDTLS_ECDSA_C) VerifyOrReturnError(hash != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(hash_length == kSHA256_Hash_Length, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(signature.Length() == kP256_ECDSA_Signature_Length_Raw, CHIP_ERROR_INVALID_ARGUMENT); CHIP_ERROR error = CHIP_NO_ERROR; - int result = 0; + int result = 0; mbedtls_mpi r, s; mbedtls_mpi_init(&r); @@ -712,26 +636,6 @@ CHIP_ERROR P256Keypair::ECDH_derive_secret(const P256PublicKey & remote_public_k { #if defined(MBEDTLS_ECDH_C) -#if defined(MBEDTLS_USE_TINYCRYPT) - CHIP_ERROR error = CHIP_NO_ERROR; - int result = 0; - size_t secret_length = (out_secret.Length() == 0) ? out_secret.Capacity() : out_secret.Length(); - - const mbedtls_uecc_keypair * keypair = to_const_keypair(&mKeypair); - - VerifyOrExit(mInitialized, error = CHIP_ERROR_INCORRECT_STATE); - - // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed - result = uECC_shared_secret(remote_public_key.ConstBytes() + 1, keypair->private_key, Uint8::to_uchar(out_secret)); - VerifyOrExit(result == UECC_SUCCESS, error = CHIP_ERROR_INTERNAL); - - SuccessOrExit(out_secret.SetLength(secret_length)); - -exit: - keypair = nullptr; - _log_mbedTLS_error(result); - return error; -#else CHIP_ERROR error = CHIP_NO_ERROR; int result = 0; size_t secret_length = (out_secret.Length() == 0) ? out_secret.Capacity() : out_secret.Length(); @@ -771,7 +675,6 @@ CHIP_ERROR P256Keypair::ECDH_derive_secret(const P256PublicKey & remote_public_k mbedtls_ecp_point_free(&ecp_pubkey); _log_mbedTLS_error(result); return error; -#endif #else return CHIP_ERROR_NOT_IMPLEMENTED; @@ -811,34 +714,8 @@ bool IsBufferContentEqualConstantTime(const void * a, const void * b, size_t n) CHIP_ERROR P256Keypair::Initialize() { -#if defined(MBEDTLS_USE_TINYCRYPT) - CHIP_ERROR error = CHIP_NO_ERROR; - int result = UECC_FAILURE; - - Clear(); - - mbedtls_uecc_keypair * keypair = to_keypair(&mKeypair); - if (!uECC_is_rng_set()) - { - uECC_set_rng(&uecc_rng_wrapper); - } - - result = uECC_make_key(keypair->public_key, keypair->private_key); - VerifyOrExit(result == UECC_SUCCESS, error = CHIP_ERROR_INTERNAL); - - // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed - Uint8::to_uchar(mPublicKey)[0] = 0x04; - memcpy(Uint8::to_uchar(mPublicKey) + 1, keypair->public_key, 2 * NUM_ECC_BYTES); - - keypair = nullptr; - mInitialized = true; - -exit: - _log_mbedTLS_error(result); - return error; -#else CHIP_ERROR error = CHIP_NO_ERROR; - int result = 0; + int result = 0; size_t pubkey_size = 0; @@ -858,7 +735,7 @@ CHIP_ERROR P256Keypair::Initialize() VerifyOrExit(result == 0, error = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(pubkey_size == mPublicKey.Length(), error = CHIP_ERROR_INVALID_ARGUMENT); - keypair = nullptr; + keypair = nullptr; mInitialized = true; exit: @@ -870,42 +747,16 @@ CHIP_ERROR P256Keypair::Initialize() _log_mbedTLS_error(result); return error; -#endif } CHIP_ERROR P256Keypair::Serialize(P256SerializedKeypair & output) const { -#if defined(MBEDTLS_USE_TINYCRYPT) - const mbedtls_uecc_keypair * keypair = to_const_keypair(&mKeypair); - size_t len = output.Length() == 0 ? output.Capacity() : output.Length(); - Encoding::BufferWriter bbuf(output, len); - uint8_t privkey[kP256_PrivateKey_Length]; - CHIP_ERROR error = CHIP_NO_ERROR; - int result = 0; - - bbuf.Put(mPublicKey, mPublicKey.Length()); - - VerifyOrExit(bbuf.Available() == sizeof(privkey), error = CHIP_ERROR_INTERNAL); - VerifyOrExit(sizeof(keypair->private_key) <= bbuf.Available(), error = CHIP_ERROR_INTERNAL); - - memcpy(privkey, keypair->private_key, sizeof(privkey)); - - bbuf.Put(privkey, sizeof(privkey)); - VerifyOrExit(bbuf.Fit(), error = CHIP_ERROR_BUFFER_TOO_SMALL); - - output.SetLength(bbuf.Needed()); - -exit: - memset(privkey, 0, sizeof(privkey)); - _log_mbedTLS_error(result); - return error; -#else const mbedtls_ecp_keypair * keypair = to_const_keypair(&mKeypair); - size_t len = output.Length() == 0 ? output.Capacity() : output.Length(); + size_t len = output.Length() == 0 ? output.Capacity() : output.Length(); Encoding::BufferWriter bbuf(output, len); uint8_t privkey[kP256_PrivateKey_Length]; CHIP_ERROR error = CHIP_NO_ERROR; - int result = 0; + int result = 0; bbuf.Put(mPublicKey, mPublicKey.Length()); @@ -925,44 +776,13 @@ CHIP_ERROR P256Keypair::Serialize(P256SerializedKeypair & output) const ClearSecretData(privkey, sizeof(privkey)); _log_mbedTLS_error(result); return error; -#endif } CHIP_ERROR P256Keypair::Deserialize(P256SerializedKeypair & input) { -#if defined(MBEDTLS_USE_TINYCRYPT) - int result = 0; - CHIP_ERROR error = CHIP_NO_ERROR; - Encoding::BufferWriter bbuf(mPublicKey, mPublicKey.Length()); - - Clear(); - - mbedtls_uecc_keypair * keypair = to_keypair(&mKeypair); - if (!uECC_is_rng_set()) - { - uECC_set_rng(&uecc_rng_wrapper); - } - - // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed - memcpy(keypair->public_key, Uint8::to_uchar(input) + 1, 2 * NUM_ECC_BYTES); - memcpy(keypair->private_key, Uint8::to_uchar(input) + mPublicKey.Length(), NUM_ECC_BYTES); - - keypair = nullptr; - - VerifyOrExit(input.Length() == mPublicKey.Length() + kP256_PrivateKey_Length, error = CHIP_ERROR_INVALID_ARGUMENT); - bbuf.Put((const uint8_t *) input, mPublicKey.Length()); - VerifyOrExit(bbuf.Fit(), error = CHIP_ERROR_NO_MEMORY); - - mInitialized = true; - - _log_mbedTLS_error(result); - -exit: - return error; -#else Encoding::BufferWriter bbuf(mPublicKey, mPublicKey.Length()); - int result = 0; + int result = 0; CHIP_ERROR error = CHIP_NO_ERROR; Clear(); @@ -993,22 +813,15 @@ CHIP_ERROR P256Keypair::Deserialize(P256SerializedKeypair & input) exit: _log_mbedTLS_error(result); return error; -#endif } void P256Keypair::Clear() { if (mInitialized) { -#if defined(MBEDTLS_USE_TINYCRYPT) - mbedtls_uecc_keypair * keypair = to_keypair(&mKeypair); - memset(keypair, 0, sizeof(mbedtls_uecc_keypair)); - mInitialized = false; -#else mbedtls_ecp_keypair * keypair = to_keypair(&mKeypair); mbedtls_ecp_keypair_free(keypair); mInitialized = false; -#endif } } @@ -1134,21 +947,6 @@ CHIP_ERROR VerifyCertificateSigningRequest(const uint8_t * csr_buf, size_t csr_l typedef struct Spake2p_Context { -#if defined(MBEDTLS_USE_TINYCRYPT) - const mbedtls_md_info_t * md_info; - uECC_word_t M[2 * NUM_ECC_WORDS]; - uECC_word_t N[2 * NUM_ECC_WORDS]; - uECC_word_t X[2 * NUM_ECC_WORDS]; - uECC_word_t Y[2 * NUM_ECC_WORDS]; - uECC_word_t L[2 * NUM_ECC_WORDS]; - uECC_word_t Z[2 * NUM_ECC_WORDS]; - uECC_word_t V[2 * NUM_ECC_WORDS]; - - uECC_word_t w0[NUM_ECC_WORDS]; - uECC_word_t w1[NUM_ECC_WORDS]; - uECC_word_t xy[NUM_ECC_WORDS]; - uECC_word_t tempbn[NUM_ECC_WORDS]; -#else mbedtls_ecp_group curve; const mbedtls_md_info_t * md_info; mbedtls_ecp_point M; @@ -1163,7 +961,6 @@ typedef struct Spake2p_Context mbedtls_mpi w1; mbedtls_mpi xy; mbedtls_mpi tempbn; -#endif } Spake2p_Context; static inline Spake2p_Context * to_inner_spake2p_context(Spake2pOpaqueContext * context) @@ -1180,27 +977,6 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::InitInternal(void) memset(context, 0, sizeof(Spake2p_Context)); -#if defined(MBEDTLS_USE_TINYCRYPT) - M = context->M; - N = context->N; - X = context->X; - Y = context->Y; - L = context->L; - V = context->V; - Z = context->Z; - - w0 = context->w0; - w1 = context->w1; - xy = context->xy; - tempbn = context->tempbn; - - G = curve_G; - - if (!uECC_is_rng_set()) - { - uECC_set_rng(&uecc_rng_wrapper); - } -#else mbedtls_ecp_group_init(&context->curve); result = mbedtls_ecp_group_load(&context->curve, MBEDTLS_ECP_DP_SECP256R1); VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); @@ -1227,14 +1003,13 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::InitInternal(void) mbedtls_mpi_init(&context->w1); mbedtls_mpi_init(&context->xy); mbedtls_mpi_init(&context->tempbn); - w0 = &context->w0; - w1 = &context->w1; - xy = &context->xy; + w0 = &context->w0; + w1 = &context->w1; + xy = &context->xy; tempbn = &context->tempbn; - G = &context->curve.G; + G = &context->curve.G; order = &context->curve.N; -#endif return error; @@ -1249,22 +1024,6 @@ void Spake2p_P256_SHA256_HKDF_HMAC::Clear() VerifyOrReturn(state != CHIP_SPAKE2P_STATE::PREINIT); Spake2p_Context * context = to_inner_spake2p_context(&mSpake2pContext); -#if defined(MBEDTLS_USE_TINYCRYPT) - memset(&context->M, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); - memset(&context->N, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); - memset(&context->X, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); - memset(&context->Y, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); - memset(&context->L, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); - memset(&context->Z, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); - memset(&context->V, 0, 2 * NUM_ECC_WORDS * sizeof(uECC_word_t)); - - memset(&context->w0, 0, NUM_ECC_WORDS * sizeof(uECC_word_t)); - memset(&context->w1, 0, NUM_ECC_WORDS * sizeof(uECC_word_t)); - memset(&context->xy, 0, NUM_ECC_WORDS * sizeof(uECC_word_t)); - memset(&context->tempbn, 0, NUM_ECC_WORDS * sizeof(uECC_word_t)); - - G = NULL; -#else mbedtls_ecp_point_free(&context->M); mbedtls_ecp_point_free(&context->N); mbedtls_ecp_point_free(&context->X); @@ -1279,7 +1038,6 @@ void Spake2p_P256_SHA256_HKDF_HMAC::Clear() mbedtls_mpi_free(&context->tempbn); mbedtls_ecp_group_free(&context->curve); -#endif state = CHIP_SPAKE2P_STATE::PREINIT; } @@ -1318,18 +1076,11 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FELoad(const uint8_t * in, size_t in_l CHIP_ERROR error = CHIP_NO_ERROR; int result = 0; -#if defined(MBEDTLS_USE_TINYCRYPT) - uECC_word_t tmp[2 * NUM_ECC_WORDS] = { 0 }; - uECC_vli_bytesToNative(tmp, in, NUM_ECC_BYTES); - - uECC_vli_mmod((uECC_word_t *) fe, tmp, curve_n); -#else result = mbedtls_mpi_read_binary((mbedtls_mpi *) fe, Uint8::to_const_uchar(in), in_len); VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); result = mbedtls_mpi_mod_mpi((mbedtls_mpi *) fe, (mbedtls_mpi *) fe, (const mbedtls_mpi *) order); VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); -#endif exit: _log_mbedTLS_error(result); @@ -1338,14 +1089,10 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FELoad(const uint8_t * in, size_t in_l CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FEWrite(const void * fe, uint8_t * out, size_t out_len) { -#if defined(MBEDTLS_USE_TINYCRYPT) - uECC_vli_nativeToBytes(out, NUM_ECC_BYTES, (const unsigned int *) fe); -#else if (mbedtls_mpi_write_binary((const mbedtls_mpi *) fe, Uint8::to_uchar(out), out_len) != 0) { return CHIP_ERROR_INTERNAL; } -#endif return CHIP_NO_ERROR; } @@ -1354,21 +1101,10 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FEGenerate(void * fe) CHIP_ERROR error = CHIP_NO_ERROR; int result = 0; -#if defined(MBEDTLS_USE_TINYCRYPT) - mbedtls_uecc_keypair keypair; - - result = UECC_FAILURE; - - result = uECC_make_key(keypair.public_key, keypair.private_key); - VerifyOrExit(result == UECC_SUCCESS, error = CHIP_ERROR_INTERNAL); - - uECC_vli_bytesToNative((uECC_word_t *) fe, keypair.private_key, NUM_ECC_BYTES); -#else Spake2p_Context * context = to_inner_spake2p_context(&mSpake2pContext); result = mbedtls_ecp_gen_privkey(&context->curve, (mbedtls_mpi *) fe, CryptoRNG, nullptr); VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); -#endif exit: _log_mbedTLS_error(result); @@ -1380,15 +1116,11 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FEMul(void * fer, const void * fe1, co CHIP_ERROR error = CHIP_NO_ERROR; int result = 0; -#if defined(MBEDTLS_USE_TINYCRYPT) - uECC_vli_modMult((uECC_word_t *) fer, (const uECC_word_t *) fe1, (const uECC_word_t *) fe2, (const uECC_word_t *) curve_n); -#else result = mbedtls_mpi_mul_mpi((mbedtls_mpi *) fer, (const mbedtls_mpi *) fe1, (const mbedtls_mpi *) fe2); VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); result = mbedtls_mpi_mod_mpi((mbedtls_mpi *) fer, (mbedtls_mpi *) fer, (const mbedtls_mpi *) order); VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); -#endif exit: _log_mbedTLS_error(result); @@ -1397,22 +1129,12 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FEMul(void * fer, const void * fe1, co CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointLoad(const uint8_t * in, size_t in_len, void * R) { -#if defined(MBEDTLS_USE_TINYCRYPT) - uint8_t tmp[2 * NUM_ECC_BYTES]; - - // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed - memcpy(tmp, in + 1, 2 * NUM_ECC_BYTES); - - uECC_vli_bytesToNative((uECC_word_t *) R, tmp, NUM_ECC_BYTES); - uECC_vli_bytesToNative((uECC_word_t *) R + NUM_ECC_WORDS, tmp + NUM_ECC_BYTES, NUM_ECC_BYTES); -#else Spake2p_Context * context = to_inner_spake2p_context(&mSpake2pContext); if (mbedtls_ecp_point_read_binary(&context->curve, (mbedtls_ecp_point *) R, Uint8::to_const_uchar(in), in_len) != 0) { return CHIP_ERROR_INTERNAL; } -#endif return CHIP_NO_ERROR; } @@ -1421,12 +1143,6 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointWrite(const void * R, uint8_t * o { memset(out, 0, out_len); -#if defined(MBEDTLS_USE_TINYCRYPT) - // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed - out[0] = 0x04; - uECC_vli_nativeToBytes(out + 1, NUM_ECC_BYTES, (uECC_word_t *) R); - uECC_vli_nativeToBytes(out + NUM_ECC_BYTES + 1, NUM_ECC_BYTES, (uECC_word_t *) R + NUM_ECC_WORDS); -#else size_t mbedtls_out_len = out_len; Spake2p_Context * context = to_inner_spake2p_context(&mSpake2pContext); @@ -1436,22 +1152,16 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointWrite(const void * R, uint8_t * o { return CHIP_ERROR_INTERNAL; } -#endif return CHIP_NO_ERROR; } CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointMul(void * R, const void * P1, const void * fe1) { - -#if defined(MBEDTLS_USE_TINYCRYPT) - if (EccPoint_mult_safer((uECC_word_t *) R, (const uECC_word_t *) P1, (const uECC_word_t *) fe1) != UECC_SUCCESS) -#else Spake2p_Context * context = to_inner_spake2p_context(&mSpake2pContext); if (mbedtls_ecp_mul(&context->curve, (mbedtls_ecp_point *) R, (const mbedtls_mpi *) fe1, (const mbedtls_ecp_point *) P1, CryptoRNG, nullptr) != 0) -#endif { return CHIP_ERROR_INTERNAL; } @@ -1462,29 +1172,6 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointMul(void * R, const void * P1, co CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointAddMul(void * R, const void * P1, const void * fe1, const void * P2, const void * fe2) { -#if defined(MBEDTLS_USE_TINYCRYPT) - uECC_word_t R1[2 * NUM_ECC_WORDS]; - uECC_word_t R2[2 * NUM_ECC_WORDS]; - uECC_word_t z[NUM_ECC_WORDS]; - uint8_t ret = UECC_SUCCESS; - - if (EccPoint_mult_safer(R1, (const uECC_word_t *) P1, (const uECC_word_t *) fe1) != UECC_SUCCESS) - { - return CHIP_ERROR_INTERNAL; - } - - if (EccPoint_mult_safer(R2, (const uECC_word_t *) P2, (const uECC_word_t *) fe2) != UECC_SUCCESS) - { - return CHIP_ERROR_INTERNAL; - } - - uECC_vli_modSub(z, R2, R1, curve_p); - XYcZ_add(R1, R1 + NUM_ECC_WORDS, R2, R2 + NUM_ECC_WORDS); - uECC_vli_modInv(z, z, curve_p); - apply_z(R2, R2 + NUM_ECC_WORDS, z); - - memcpy((uECC_word_t *) R, R2, 2 * NUM_ECC_BYTES); -#else Spake2p_Context * context = to_inner_spake2p_context(&mSpake2pContext); if (mbedtls_ecp_muladd(&context->curve, (mbedtls_ecp_point *) R, (const mbedtls_mpi *) fe1, (const mbedtls_ecp_point *) P1, @@ -1492,27 +1179,19 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointAddMul(void * R, const void * P1, { return CHIP_ERROR_INTERNAL; } -#endif return CHIP_NO_ERROR; } CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointInvert(void * R) { -#if defined(MBEDTLS_USE_TINYCRYPT) - uECC_word_t tmp[NUM_ECC_WORDS] = { 0 }; - - uECC_vli_sub(tmp, curve_p, (uECC_word_t *) R + NUM_ECC_WORDS); - memcpy((uECC_word_t *) R + NUM_ECC_WORDS, tmp, NUM_ECC_BYTES); -#else - mbedtls_ecp_point * Rp = (mbedtls_ecp_point *) R; + mbedtls_ecp_point * Rp = (mbedtls_ecp_point *) R; Spake2p_Context * context = to_inner_spake2p_context(&mSpake2pContext); if (mbedtls_mpi_sub_mpi(&Rp->CHIP_CRYPTO_PAL_PRIVATE(Y), &context->curve.P, &Rp->CHIP_CRYPTO_PAL_PRIVATE(Y)) != 0) { return CHIP_ERROR_INTERNAL; } -#endif return CHIP_NO_ERROR; } @@ -1527,24 +1206,6 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::ComputeL(uint8_t * Lout, size_t * L_le CHIP_ERROR error = CHIP_NO_ERROR; int result = 0; -#if defined(MBEDTLS_USE_TINYCRYPT) - result = UECC_SUCCESS; - uECC_word_t tmp[2 * NUM_ECC_WORDS]; - uECC_word_t w1_bn[NUM_ECC_WORDS]; - uECC_word_t L_tmp[2 * NUM_ECC_WORDS]; - - uECC_vli_bytesToNative(tmp, w1in, NUM_ECC_BYTES); - - uECC_vli_mmod(w1_bn, tmp, curve_n); - - result = EccPoint_mult_safer(L_tmp, curve_G, w1_bn); - VerifyOrExit(result == UECC_SUCCESS, error = CHIP_ERROR_INTERNAL); - - // Fully padded raw uncompressed points expected, first byte is always 0x04 i.e uncompressed - Lout[0] = 0x04; - uECC_vli_nativeToBytes(Lout + 1, NUM_ECC_BYTES, L_tmp); - uECC_vli_nativeToBytes(Lout + NUM_ECC_BYTES + 1, NUM_ECC_BYTES, L_tmp + NUM_ECC_WORDS); -#else mbedtls_ecp_group curve; mbedtls_mpi w1_bn; mbedtls_ecp_point Ltemp; @@ -1569,28 +1230,21 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::ComputeL(uint8_t * Lout, size_t * L_le result = mbedtls_ecp_point_write_binary(&curve, &Ltemp, MBEDTLS_ECP_PF_UNCOMPRESSED, L_len, Uint8::to_uchar(Lout), *L_len); VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); -#endif exit: _log_mbedTLS_error(result); -#if !defined(MBEDTLS_USE_TINYCRYPT) mbedtls_ecp_point_free(&Ltemp); mbedtls_mpi_free(&w1_bn); mbedtls_ecp_group_free(&curve); -#endif return error; } CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointIsValid(void * R) { -#if defined(MBEDTLS_USE_TINYCRYPT) - if (uECC_valid_point((const uECC_word_t *) R) != 0) -#else Spake2p_Context * context = to_inner_spake2p_context(&mSpake2pContext); if (mbedtls_ecp_check_pubkey(&context->curve, (mbedtls_ecp_point *) R) != 0) -#endif { return CHIP_ERROR_INTERNAL; } @@ -1634,7 +1288,7 @@ CHIP_ERROR ValidateCertificateChain(const uint8_t * rootCertificate, size_t root VerifyOrExit(mbedResult == 0, (result = CertificateChainValidationResult::kRootFormatInvalid, error = CHIP_ERROR_INTERNAL)); /* Verify the chain against the root */ - mbedResult = mbedtls_x509_crt_verify(&certChain, &rootCert, NULL, NULL, &flags, NULL, NULL); + mbedResult = mbedtls_x509_crt_verify(&certChain, &rootCert, nullptr, nullptr, &flags, nullptr, nullptr); switch (mbedResult) { diff --git a/src/crypto/crypto.gni b/src/crypto/crypto.gni index 80d94e042224c7..c77f91a4823083 100644 --- a/src/crypto/crypto.gni +++ b/src/crypto/crypto.gni @@ -30,5 +30,5 @@ if (chip_crypto == "") { assert( chip_crypto == "mbedtls" || chip_crypto == "openssl" || - chip_crypto == "boringssl", - "Please select a valid crypto implementation: mbedtls, openssl, boringssl") + chip_crypto == "tinycrypt" || chip_crypto == "boringssl", + "Please select a valid crypto implementation: mbedtls, openssl, tinycrypt, boringssl") diff --git a/src/darwin/Framework/CHIP/MTRCluster.h b/src/darwin/Framework/CHIP/MTRCluster.h index 3517772447353e..fb85a93de6e786 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.h +++ b/src/darwin/Framework/CHIP/MTRCluster.h @@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * CHIPWriteParams + * MTRWriteParams * This is used to control the behavior of cluster writes. * If not provided (i.e. nil passed for the CHIPWriteParams argument), will be * treated as if a default-initialized object was passed in. @@ -54,7 +54,7 @@ NS_ASSUME_NONNULL_BEGIN * This value is specified in milliseconds * */ -@property (strong, nonatomic, nullable) NSNumber * timedWriteTimeout; +@property (nonatomic, copy, nullable) NSNumber * timedWriteTimeout; /** * Sets the data version for the Write Request for the interaction. @@ -62,7 +62,7 @@ NS_ASSUME_NONNULL_BEGIN * If not nil, the write will only succeed if the current data version of * the cluster matches the provided data version. */ -@property (strong, nonatomic, nullable) NSNumber * dataVersion; +@property (nonatomic, copy, nullable) NSNumber * dataVersion; - (instancetype)init; @@ -86,7 +86,7 @@ NS_ASSUME_NONNULL_BEGIN * If NO, the read/subscribe is not fabric-filtered and will see all * non-fabric-sensitive data for the given attribute path. */ -@property (strong, nonatomic, nullable) NSNumber * fabricFiltered; +@property (nonatomic, copy, nullable) NSNumber * fabricFiltered; - (instancetype)init; @@ -109,7 +109,7 @@ NS_ASSUME_NONNULL_BEGIN * * If YES, the subscribe will allow any previous subscriptions to remain. */ -@property (strong, nonatomic, nullable) NSNumber * keepPreviousSubscriptions; +@property (nonatomic, copy, nullable) NSNumber * keepPreviousSubscriptions; /** * Whether the subscription should automatically try to re-establish if it @@ -123,7 +123,7 @@ NS_ASSUME_NONNULL_BEGIN * called again. * */ -@property (strong, nonatomic, nullable) NSNumber * autoResubscribe; +@property (nonatomic, copy, nullable) NSNumber * autoResubscribe; - (instancetype)init; diff --git a/src/darwin/Framework/CHIP/MTRCluster.mm b/src/darwin/Framework/CHIP/MTRCluster.mm index 17d943996bdba8..dc453efb35e78e 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.mm +++ b/src/darwin/Framework/CHIP/MTRCluster.mm @@ -18,6 +18,7 @@ #import "MTRBaseDevice.h" #import "MTRCluster_internal.h" #import "NSDataSpanConversion.h" +#import "NSStringSpanConversion.h" using namespace ::chip; @@ -37,8 +38,7 @@ - (instancetype)initWithQueue:(dispatch_queue_t)queue - (chip::CharSpan)asCharSpan:(NSString *)value { - return chip::CharSpan(static_cast([value dataUsingEncoding:NSUTF8StringEncoding].bytes), - [value lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); + return AsCharSpan(value); } @end diff --git a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h index 04936d041e0fe3..51c13d686cdd01 100644 --- a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h +++ b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h @@ -30,31 +30,31 @@ NS_ASSUME_NONNULL_BEGIN /** * The CSRNonce */ -@property (nonatomic, nullable, copy, readwrite) NSData * CSRNonce; +@property (nonatomic, copy, nullable) NSData * CSRNonce; /** * The AttestationNonce */ -@property (nonatomic, nullable, copy, readwrite) NSData * attestationNonce; +@property (nonatomic, copy, nullable) NSData * attestationNonce; /** * The Wi-Fi SSID */ -@property (nonatomic, nullable, copy, readwrite) NSData * wifiSSID; +@property (nonatomic, copy, nullable) NSData * wifiSSID; /** * The Wi-Fi Credentials */ -@property (nonatomic, nullable, copy, readwrite) NSData * wifiCredentials; +@property (nonatomic, copy, nullable) NSData * wifiCredentials; /** * The Thread operational dataset */ -@property (nonatomic, nullable, copy, readwrite) NSData * threadOperationalDataset; +@property (nonatomic, copy, nullable) NSData * threadOperationalDataset; /** * The Device Attestation status delegate */ -@property (nonatomic, nullable, strong, readwrite) id deviceAttestationDelegate; +@property (nonatomic, strong, nullable) id deviceAttestationDelegate; /** * The timeout in secs to set for fail-safe when attestation fails */ -@property (nonatomic, nullable, copy, readwrite) NSNumber * failSafeExpiryTimeoutSecs; +@property (nonatomic, copy, nullable) NSNumber * failSafeExpiryTimeoutSecs; @end diff --git a/src/darwin/Framework/CHIP/MTRControllerFactory.h b/src/darwin/Framework/CHIP/MTRControllerFactory.h index 5c457b957dd39c..8e8eb8a9fcf318 100644 --- a/src/darwin/Framework/CHIP/MTRControllerFactory.h +++ b/src/darwin/Framework/CHIP/MTRControllerFactory.h @@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol MTRPersistentStorageDelegate; +@protocol MTROTAProviderDelegate; @protocol MTRKeypair; @class MTRDeviceController; @@ -36,23 +37,30 @@ NS_ASSUME_NONNULL_BEGIN * controllers. It is used to store persistent information for the fabrics the * controllers ends up interacting with. */ -@property (strong, nonatomic, readonly) id storageDelegate; +@property (nonatomic, strong, readonly) id storageDelegate; + +/* + * OTA Provider delegate to be called when an OTA Requestor is requesting a software update. + * Defaults to nil. + */ +@property (nonatomic, strong, nullable) id otaProviderDelegate; + /* * The Product Attestation Authority certificates that are trusted to sign * device attestation information. Defaults to nil. * */ -@property (strong, nonatomic, nullable) NSArray * paaCerts; +@property (nonatomic, copy, nullable) NSArray * paaCerts; /* * The network port to bind to. If not specified, an ephemeral port will be * used. */ -@property (strong, nonatomic, nullable) NSNumber * port; +@property (nonatomic, copy, nullable) NSNumber * port; /* * Whether to run a server capable of accepting incoming CASE * connections. Defaults to NO. */ -@property (nonatomic) BOOL startServer; +@property (nonatomic, assign) BOOL startServer; - (instancetype)init NS_UNAVAILABLE; - (instancetype)initWithStorage:(id)storageDelegate; diff --git a/src/darwin/Framework/CHIP/MTRControllerFactory.mm b/src/darwin/Framework/CHIP/MTRControllerFactory.mm index 676455d5916a74..38d0cfe927388c 100644 --- a/src/darwin/Framework/CHIP/MTRControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRControllerFactory.mm @@ -26,6 +26,7 @@ #import "MTRDeviceController_Internal.h" #import "MTRLogging.h" #import "MTRMemory.h" +#import "MTROTAProviderDelegateBridge.h" #import "MTRP256KeypairBridge.h" #import "MTRPersistentStorageDelegateBridge.h" #import "NSDataSpanConversion.h" @@ -53,6 +54,7 @@ static NSString * const kErrorControllerFactoryInit = @"Init failure while initializing controller factory"; static NSString * const kErrorKeystoreInit = @"Init failure while initializing persistent storage keystore"; static NSString * const kErrorCertStoreInit = @"Init failure while initializing persistent storage operational certificate store"; +static NSString * const kErrorOtaProviderInit = @"Init failure while creating an OTA provider delegate"; @interface MTRControllerFactory () @@ -60,6 +62,7 @@ @interface MTRControllerFactory () @property (readonly) DeviceControllerFactory * controllerFactory; @property (readonly) MTRPersistentStorageDelegateBridge * persistentStorageDelegateBridge; @property (readonly) MTRAttestationTrustStoreBridge * attestationTrustStoreBridge; +@property (readonly) MTROTAProviderDelegateBridge * otaProviderDelegateBridge; // We use TestPersistentStorageDelegate just to get an in-memory store to back // our group data provider impl. We initialize this store correctly on every // controller startup, so don't need to actually persist it. @@ -171,6 +174,11 @@ - (void)cleanupStartupObjects _attestationTrustStoreBridge = nullptr; } + if (_otaProviderDelegateBridge) { + delete _otaProviderDelegateBridge; + _otaProviderDelegateBridge = nullptr; + } + if (_keystore) { _keystore->Finish(); delete _keystore; @@ -211,6 +219,14 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams return; } + if (startupParams.otaProviderDelegate) { + _otaProviderDelegateBridge = new MTROTAProviderDelegateBridge(startupParams.otaProviderDelegate); + if (_otaProviderDelegateBridge == nil) { + MTR_LOG_ERROR("Error: %@", kErrorOtaProviderInit); + return; + } + } + // TODO: Allow passing a different keystore implementation via startupParams. _keystore = new PersistentStorageOperationalKeystore(); if (_keystore == nullptr) { @@ -446,6 +462,11 @@ - (MTRDeviceController * _Nullable)createController // Bringing up the first controller. Start the event loop now. If we // fail to bring it up, its cleanup will stop the event loop again. chip::DeviceLayer::PlatformMgrImpl().StartEventLoopTask(); + + if (_otaProviderDelegateBridge) { + auto systemState = _controllerFactory->GetSystemState(); + _otaProviderDelegateBridge->Init(systemState->SystemLayer(), systemState->ExchangeMgr()); + } } // Add the controller to _controllers now, so if we fail partway through its @@ -521,6 +542,10 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller [_controllers removeObject:controller]; if ([_controllers count] == 0) { + if (_otaProviderDelegateBridge) { + _otaProviderDelegateBridge->Shutdown(); + } + // That was our last controller. Stop the event loop before it // shuts down, because shutdown of the last controller will tear // down most of the world. @@ -556,6 +581,7 @@ - (instancetype)initWithStorage:(id)storageDelegat } _storageDelegate = storageDelegate; + _otaProviderDelegate = nil; _paaCerts = nil; _port = nil; _startServer = NO; diff --git a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.h b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.h index 95148931005c42..a748d8b2dba34c 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.h +++ b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.h @@ -50,7 +50,7 @@ class MTRDeviceConnectionBridge : public chip::ReferenceCounted mOnConnectFailed; static void OnConnected(void * context, chip::OperationalDeviceProxy * device); - static void OnConnectionFailure(void * context, chip::PeerId peerId, CHIP_ERROR error); + static void OnConnectionFailure(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); }; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm index 2ad2c2f6c08f83..da739514e3b4c1 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm @@ -29,7 +29,7 @@ }); } -void MTRDeviceConnectionBridge::OnConnectionFailure(void * context, chip::PeerId peerId, CHIP_ERROR error) +void MTRDeviceConnectionBridge::OnConnectionFailure(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error) { auto * object = static_cast(context); dispatch_async(object->mQueue, ^{ diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index fe1f0eb8b61b22..61db4061896d10 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -27,7 +27,6 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS @class MTRCommissioningParameters; @protocol MTRDevicePairingDelegate; -@protocol MTROTAProviderDelegate; @interface MTRDeviceController : NSObject @@ -120,15 +119,6 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS */ - (void)setPairingDelegate:(id)delegate queue:(dispatch_queue_t)queue; -/** - * Set the Delegate for the OTA Provider as well as the Queue on which the Delegate callbacks will be triggered - * - * @param[in] delegate The delegate the OTA Provider should use - * - * @param[in] queue The queue on which the callbacks will be delivered - */ -- (void)setOTAProviderDelegate:(id)delegate queue:(dispatch_queue_t)queue; - /** * Shutdown the controller. Calls to shutdown after the first one are NO-OPs. */ diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 2bf0192e7aa8ec..586219008e55e6 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -25,7 +25,6 @@ #import "MTRError_Internal.h" #import "MTRKeypair.h" #import "MTRLogging.h" -#import "MTROTAProviderDelegateBridge.h" #import "MTROperationalCredentialsDelegate.h" #import "MTRP256KeypairBridge.h" #import "MTRPersistentStorageDelegateBridge.h" @@ -57,7 +56,6 @@ static NSString * const kErrorOperationalCredentialsInit = @"Init failure while creating operational credentials delegate"; static NSString * const kErrorOperationalKeypairInit = @"Init failure while creating operational keypair bridge"; static NSString * const kErrorPairingInit = @"Init failure while creating a pairing delegate"; -static NSString * const kErrorOtaProviderInit = @"Init failure while creating an OTA provider delegate"; static NSString * const kErrorPairDevice = @"Failure while pairing the device"; static NSString * const kErrorUnpairDevice = @"Failure while unpairing the device"; static NSString * const kErrorStopPairing = @"Failure while trying to stop the pairing process"; @@ -77,7 +75,6 @@ @interface MTRDeviceController () @property (readonly) chip::Controller::DeviceCommissioner * cppCommissioner; @property (readonly) MTRDevicePairingDelegateBridge * pairingDelegateBridge; -@property (readonly) MTROTAProviderDelegateBridge * otaProviderDelegateBridge; @property (readonly) MTROperationalCredentialsDelegate * operationalCredentialsDelegate; @property (readonly) MTRP256KeypairBridge signingKeypairBridge; @property (readonly) MTRP256KeypairBridge operationalKeypairBridge; @@ -98,11 +95,6 @@ - (instancetype)initWithFactory:(MTRControllerFactory *)factory queue:(dispatch_ return nil; } - _otaProviderDelegateBridge = new MTROTAProviderDelegateBridge(); - if ([self checkForInitError:(_otaProviderDelegateBridge != nullptr) logMsg:kErrorOtaProviderInit]) { - return nil; - } - _operationalCredentialsDelegate = new MTROperationalCredentialsDelegate(); if ([self checkForInitError:(_operationalCredentialsDelegate != nullptr) logMsg:kErrorOperationalCredentialsInit]) { return nil; @@ -156,11 +148,6 @@ - (void)cleanup _operationalCredentialsDelegate = nullptr; } - if (_otaProviderDelegateBridge) { - delete _otaProviderDelegateBridge; - _otaProviderDelegateBridge = nullptr; - } - if (_pairingDelegateBridge) { delete _pairingDelegateBridge; _pairingDelegateBridge = nullptr; @@ -350,7 +337,7 @@ - (BOOL)pairDevice:(uint64_t)deviceID std::string manualPairingCode; chip::SetupPayload payload; - payload.discriminator = discriminator; + payload.discriminator.SetLongValue(discriminator); payload.setUpPINCode = setupPINCode; auto errorCode = chip::ManualSetupPayloadGenerator(payload).payloadDecimalStringRepresentation(manualPairingCode); @@ -629,13 +616,6 @@ - (void)setPairingDelegate:(id)delegate queue:(dispatc }); } -- (void)setOTAProviderDelegate:(id)delegate queue:(dispatch_queue_t)queue; -{ - dispatch_async(_chipWorkQueue, ^{ - self->_otaProviderDelegateBridge->setDelegate(delegate, queue); - }); -} - - (BOOL)checkForInitError:(BOOL)condition logMsg:(NSString *)logMsg { if (condition) { diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h index 819ddd39974f16..2d3a6865f67bb2 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h @@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN * must be initialized using initWithOperationalKeypair (to provide the * operational credentials for the controller itself). */ -@property (strong, nonatomic, readonly, nullable) id nocSigner; +@property (nonatomic, copy, readonly, nullable) id nocSigner; /** * Fabric id for the controller. Must be set to a nonzero value. This is * scoped by the root public key, which is determined as follows: @@ -42,13 +42,13 @@ NS_ASSUME_NONNULL_BEGIN * key of the nocSigner keypair, since in this case we are not using an * intermediate certificate. */ -@property (nonatomic, readonly) uint64_t fabricId; +@property (nonatomic, assign, readonly) uint64_t fabricId; /** * IPK to use for the controller's fabric. Allowed to change from the last time * a controller was started on this fabric if a new IPK has been distributed to * all the devices the controller wants to interact with. */ -@property (strong, nonatomic, readonly) NSData * ipk; +@property (nonatomic, copy, readonly) NSData * ipk; /** * Vendor ID (allocated by the Connectivity Standards Alliance) for @@ -65,7 +65,7 @@ NS_ASSUME_NONNULL_BEGIN * * Will override existing value if not nil. Otherwise existing value will be * used. */ -@property (strong, nonatomic, nullable) NSNumber * vendorId; +@property (nonatomic, copy, nullable) NSNumber * vendorId; /** * Node id for this controller. @@ -95,7 +95,7 @@ NS_ASSUME_NONNULL_BEGIN * generated operational key. * */ -@property (strong, nonatomic, nullable) NSNumber * nodeId; +@property (nonatomic, copy, nullable) NSNumber * nodeId; // TODO: Add something here for CATs? @@ -130,7 +130,7 @@ NS_ASSUME_NONNULL_BEGIN * 2) The subject DN must match the subject DN of the existing root * certificate. */ -@property (strong, nonatomic, nullable) NSData * rootCertificate; +@property (nonatomic, copy, nullable) NSData * rootCertificate; /** * Intermediate certificate, in X.509 DER form, to use. @@ -162,7 +162,7 @@ NS_ASSUME_NONNULL_BEGIN * allows switching from using an intermediate CA to not using one. * */ -@property (strong, nonatomic, nullable) NSData * intermediateCertificate; +@property (nonatomic, copy, nullable) NSData * intermediateCertificate; /** * Operational certificate, in X.509 DER form, to use. @@ -173,7 +173,7 @@ NS_ASSUME_NONNULL_BEGIN * If nil, an operational certificate will be determined as described in the * documentation for nodeId. */ -@property (strong, nonatomic, nullable, readonly) NSData * operationalCertificate; +@property (nonatomic, copy, readonly, nullable) NSData * operationalCertificate; /** * Operational keypair to use. If operationalCertificate is not nil, the public @@ -184,7 +184,7 @@ NS_ASSUME_NONNULL_BEGIN * will for that certificated will be determined as described in the * documentation for nodeId. */ -@property (strong, nonatomic, nullable) id operationalKeypair; +@property (nonatomic, strong, nullable) id operationalKeypair; - (instancetype)init NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h index 22a5d895cde2a5..3be8c5d4f720b5 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h @@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceControllerStartupParams () // We want to be able to write to operationalCertificate in // MTRDeviceControllerStartupParamsInternal. -@property (strong, nonatomic, nullable) NSData * operationalCertificate; +@property (nonatomic, copy, nullable) NSData * operationalCertificate; // Init method that just copies the values of all our ivars. - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params; @@ -45,14 +45,14 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceControllerStartupParamsInternal : MTRDeviceControllerStartupParams // Fabric table we can use to do things like allocate operational keys. -@property (nonatomic, readonly) chip::FabricTable * fabricTable; +@property (nonatomic, assign, readonly) chip::FabricTable * fabricTable; // Fabric index we're starting on. Only has a value when starting on an // existing fabric. -@property (nonatomic, readonly) chip::Optional fabricIndex; +@property (nonatomic, assign, readonly) chip::Optional fabricIndex; // Key store we're using with our fabric table, for sanity checks. -@property (nonatomic, readonly) chip::Crypto::OperationalKeystore * keystore; +@property (nonatomic, assign, readonly) chip::Crypto::OperationalKeystore * keystore; /** * Helper method that checks that our keypairs match our certificates. diff --git a/src/darwin/Framework/CHIP/MTRError.h b/src/darwin/Framework/CHIP/MTRError.h index bb1623bf2c374f..7dc123f2792806 100644 --- a/src/darwin/Framework/CHIP/MTRError.h +++ b/src/darwin/Framework/CHIP/MTRError.h @@ -50,6 +50,7 @@ typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode){ MTRErrorCodeWrongAddressType = 7, MTRErrorCodeIntegrityCheckFailed = 8, MTRErrorCodeTimeout = 9, + MTRErrorCodeBufferTooSmall = 10, }; // clang-format on diff --git a/src/darwin/Framework/CHIP/MTRError.mm b/src/darwin/Framework/CHIP/MTRError.mm index e07928fa8659a5..153b034d54035b 100644 --- a/src/darwin/Framework/CHIP/MTRError.mm +++ b/src/darwin/Framework/CHIP/MTRError.mm @@ -77,6 +77,9 @@ + (NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode } else if (errorCode == CHIP_ERROR_TIMEOUT) { code = MTRErrorCodeTimeout; [userInfo addEntriesFromDictionary:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Transaction timed out.", nil) }]; + } else if (errorCode == CHIP_ERROR_BUFFER_TOO_SMALL) { + code = MTRErrorCodeBufferTooSmall; + [userInfo addEntriesFromDictionary:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"A buffer is too small.", nil) }]; } else { code = MTRErrorCodeGeneralError; [userInfo addEntriesFromDictionary:@{ @@ -259,6 +262,9 @@ + (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error case MTRErrorCodeTimeout: code = CHIP_ERROR_TIMEOUT.AsInteger(); break; + case MTRErrorCodeBufferTooSmall: + code = CHIP_ERROR_BUFFER_TOO_SMALL.AsInteger(); + break; case MTRErrorCodeGeneralError: { if (error.userInfo != nil && error.userInfo[@"errorCode"] != nil) { code = static_cast([error.userInfo[@"errorCode"] unsignedLongValue]); diff --git a/src/darwin/Framework/CHIP/MTROTAHeaderParser.h b/src/darwin/Framework/CHIP/MTROTAHeaderParser.h new file mode 100644 index 00000000000000..d578af8cae05b8 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTROTAHeaderParser.h @@ -0,0 +1,56 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, MTROTAImageDigestType) { + MTROTAImageDigestTypeSha256 = 1, + MTROTAImageDigestTypeSha256_128, + MTROTAImageDigestTypeSha256_120, + MTROTAImageDigestTypeSha256_96, + MTROTAImageDigestTypeSha256_64, + MTROTAImageDigestTypeSha256_32, + MTROTAImageDigestTypeSha384, + MTROTAImageDigestTypeSha512, + MTROTAImageDigestTypeSha3_224, + MTROTAImageDigestTypeSha3_256, + MTROTAImageDigestTypeSha3_384, + MTROTAImageDigestTypeSha3_512, +}; + +@interface MTROTAHeader : NSObject + +@property (nonatomic, strong) NSNumber * vendorID; +@property (nonatomic, strong) NSNumber * productID; +@property (nonatomic, strong) NSNumber * payloadSize; +@property (nonatomic, strong) NSNumber * softwareVersion; +@property (nonatomic, strong) NSString * softwareVersionString; +@property (nonatomic, strong) NSString * releaseNotesURL; +@property (nonatomic, strong) NSData * imageDigest; +@property (nonatomic, assign) MTROTAImageDigestType imageDigestType; +@property (nonatomic, strong) NSNumber * minApplicableVersion; +@property (nonatomic, strong) NSNumber * maxApplicableVersion; + +@end + +@interface MTROTAHeaderParser : NSObject ++ (nullable MTROTAHeader *)headerFromData:(NSData *)data error:(NSError * __autoreleasing *)error; +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAHeaderParser.mm b/src/darwin/Framework/CHIP/MTROTAHeaderParser.mm new file mode 100644 index 00000000000000..558d590e98e5c1 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTROTAHeaderParser.mm @@ -0,0 +1,72 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "MTROTAHeaderParser.h" + +#import "MTRError.h" +#import "MTRError_Internal.h" +#import "NSDataSpanConversion.h" +#import "NSStringSpanConversion.h" + +#include + +@implementation MTROTAHeader +@end + +@implementation MTROTAHeaderParser ++ (nullable MTROTAHeader *)headerFromData:(NSData *)data error:(NSError * __autoreleasing *)error +{ + chip::OTAImageHeaderParser parser; + + parser.Init(); + + if (!parser.IsInitialized()) { + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]; + return nil; + } + + chip::ByteSpan buffer = AsByteSpan(data); + chip::OTAImageHeader header; + CHIP_ERROR err = parser.AccumulateAndDecode(buffer, header); + if (err != CHIP_NO_ERROR) { + *error = [MTRError errorForCHIPErrorCode:err]; + parser.Clear(); + return nil; + } + + auto headerObj = [MTROTAHeader new]; + headerObj.vendorID = @(header.mVendorId); + headerObj.productID = @(header.mProductId); + headerObj.payloadSize = @(header.mPayloadSize); + headerObj.softwareVersion = @(header.mSoftwareVersion); + headerObj.softwareVersionString = AsString(header.mSoftwareVersionString); + headerObj.releaseNotesURL = AsString(header.mReleaseNotesURL); + headerObj.imageDigest = AsData(header.mImageDigest); + headerObj.imageDigestType = static_cast(chip::to_underlying(header.mImageDigestType)); + + if (header.mMinApplicableVersion.HasValue()) { + headerObj.minApplicableVersion = @(header.mMinApplicableVersion.Value()); + } + + if (header.mMaxApplicableVersion.HasValue()) { + headerObj.maxApplicableVersion = @(header.mMaxApplicableVersion.Value()); + } + + parser.Clear(); + return headerObj; +} +@end diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h b/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h index 81aef65dbf5005..9f431a3f8777b1 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h @@ -50,6 +50,28 @@ NS_ASSUME_NONNULL_BEGIN - (void)handleNotifyUpdateApplied:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params completionHandler:(StatusCompletion)completionHandler; +/** + * Notify the delegate when a BDX Session starts + * + */ +- (void)handleBDXTransferSessionBegin:(NSString * _Nonnull)fileDesignator + offset:(NSNumber * _Nonnull)offset + completionHandler:(void (^)(NSError * error))completionHandler; + +/** + * Notify the delegate when a BDX Session ends + * + */ +- (void)handleBDXTransferSessionEnd:(NSError * _Nullable)error; + +/** + * Notify the delegate when a BDX Query message has been received + * + */ +- (void)handleBDXQuery:(NSNumber * _Nonnull)blockSize + blockIndex:(NSNumber * _Nonnull)blockIndex + bytesToSkip:(NSNumber * _Nonnull)bytesToSkip + completionHandler:(void (^)(NSData * _Nullable data, BOOL isEOF))completionHandler; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h index 2bd56bf4c186c6..8240ae9e56cb63 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h @@ -24,10 +24,11 @@ NS_ASSUME_NONNULL_BEGIN class MTROTAProviderDelegateBridge : public chip::app::Clusters::OTAProviderDelegate { public: - MTROTAProviderDelegateBridge(); + MTROTAProviderDelegateBridge(id delegate); ~MTROTAProviderDelegateBridge(); - void setDelegate(id delegate, dispatch_queue_t queue); + void Init(chip::System::Layer * systemLayer, chip::Messaging::ExchangeManager * exchangeManager); + void Shutdown(); void HandleQueryImage( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, @@ -59,7 +60,7 @@ class MTROTAProviderDelegateBridge : public chip::app::Clusters::OTAProviderDele MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams * commandParams); _Nullable id mDelegate; - _Nullable dispatch_queue_t mQueue; + dispatch_queue_t mWorkQueue; }; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm index 17c990b4c53697..5ef05cb0adaff0 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm @@ -17,133 +17,434 @@ #import "MTROTAProviderDelegateBridge.h" #import "NSDataSpanConversion.h" +#import "NSStringSpanConversion.h" #include #include #include #include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters::OtaSoftwareUpdateProvider; +using namespace chip::bdx; + +// TODO Expose a method onto the delegate to make that configurable. +constexpr uint32_t kMaxBdxBlockSize = 1024; +constexpr uint32_t kMaxBDXURILen = 256; +constexpr System::Clock::Timeout kBdxTimeout = System::Clock::Seconds16(5 * 60); // OTA Spec mandates >= 5 minutes +constexpr System::Clock::Timeout kBdxPollIntervalMs = System::Clock::Milliseconds32(50); +constexpr bdx::TransferRole kBdxRole = bdx::TransferRole::kSender; + +class BdxOTASender : public bdx::Responder { +public: + BdxOTASender() {}; + + CHIP_ERROR PrepareForTransfer(FabricIndex fabricIndex, NodeId nodeId) + { + VerifyOrReturnError(mDelegate != nil, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mExchangeMgr != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mSystemLayer != nullptr, CHIP_ERROR_INCORRECT_STATE); + + ReturnErrorOnFailure(ConfigureState(fabricIndex, nodeId)); + + BitFlags flags(bdx::TransferControlFlags::kReceiverDrive); + return Responder::PrepareForTransfer(mSystemLayer, kBdxRole, flags, kMaxBdxBlockSize, kBdxTimeout, kBdxPollIntervalMs); + } + + CHIP_ERROR Init(System::Layer * systemLayer, Messaging::ExchangeManager * exchangeMgr) + { + VerifyOrReturnError(mSystemLayer == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mExchangeMgr == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(systemLayer != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(exchangeMgr != nullptr, CHIP_ERROR_INCORRECT_STATE); + + exchangeMgr->RegisterUnsolicitedMessageHandlerForProtocol(Protocols::BDX::Id, this); + + mSystemLayer = systemLayer; + mExchangeMgr = exchangeMgr; + mWorkQueue = DeviceLayer::PlatformMgrImpl().GetWorkQueue(); + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Shutdown() + { + VerifyOrReturnError(mSystemLayer != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mExchangeMgr != nullptr, CHIP_ERROR_INCORRECT_STATE); + + mExchangeMgr->UnregisterUnsolicitedMessageHandlerForProtocol(Protocols::BDX::Id); + + mExchangeMgr = nullptr; + mSystemLayer = nullptr; + mWorkQueue = nil; + + ResetState(); + + return CHIP_NO_ERROR; + } + + void SetDelegate(id delegate) + { + if (delegate) { + mDelegate = delegate; + } else { + ResetState(); + } + } + +private: + CHIP_ERROR OnMessageToSend(TransferSession::OutputEvent & event) + { + VerifyOrReturnError(mExchangeCtx != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mDelegate != nil, CHIP_ERROR_INCORRECT_STATE); + + Messaging::SendFlags sendFlags; + + // All messages sent from the Sender expect a response, except for a StatusReport which would indicate an error and + // the end of the transfer. + if (!event.msgTypeData.HasMessageType(Protocols::SecureChannel::MsgType::StatusReport)) { + sendFlags.Set(Messaging::SendMessageFlags::kExpectResponse); + } + + auto & msgTypeData = event.msgTypeData; + return mExchangeCtx->SendMessage(msgTypeData.ProtocolId, msgTypeData.MessageType, std::move(event.MsgData), sendFlags); + } + + CHIP_ERROR OnTransferSessionBegin(TransferSession::OutputEvent & event) + { + uint16_t fdl = 0; + auto fd = mTransfer.GetFileDesignator(fdl); + VerifyOrReturnError(fdl <= bdx::kMaxFileDesignatorLen, CHIP_ERROR_INVALID_ARGUMENT); + + auto fileDesignator = [[NSString alloc] initWithBytes:fd length:fdl encoding:NSUTF8StringEncoding]; + auto offset = @(mTransfer.GetStartOffset()); + auto completionHandler = ^(NSError * error) { + dispatch_async(mWorkQueue, ^{ + if (error != nil) { + LogErrorOnFailure([MTRError errorToCHIPErrorCode:error]); + LogErrorOnFailure(mTransfer.AbortTransfer(bdx::StatusCode::kUnknown)); + return; + } + + // bdx::TransferSession will automatically reject a transfer if there are no + // common supported control modes. It will also default to the smaller + // block size. + TransferSession::TransferAcceptData acceptData; + acceptData.ControlMode = bdx::TransferControlFlags::kReceiverDrive; + acceptData.MaxBlockSize = mTransfer.GetTransferBlockSize(); + acceptData.StartOffset = mTransfer.GetStartOffset(); + acceptData.Length = mTransfer.GetTransferLength(); + + LogErrorOnFailure(mTransfer.AcceptTransfer(acceptData)); + }); + }; + + auto strongDelegate = mDelegate; + dispatch_async(mWorkQueue, ^{ + [strongDelegate handleBDXTransferSessionBegin:fileDesignator offset:offset completionHandler:completionHandler]; + }); + + return CHIP_NO_ERROR; + } + + CHIP_ERROR OnTransferSessionEnd(TransferSession::OutputEvent & event) + { + CHIP_ERROR error = CHIP_NO_ERROR; + if (event.EventType == TransferSession::OutputEventType::kTransferTimeout) { + error = CHIP_ERROR_TIMEOUT; + } else if (event.EventType != TransferSession::OutputEventType::kAckEOFReceived) { + error = CHIP_ERROR_INTERNAL; + } + + auto strongDelegate = mDelegate; + dispatch_async(mWorkQueue, ^{ + [strongDelegate handleBDXTransferSessionEnd:[MTRError errorForCHIPErrorCode:error]]; + }); + + ResetState(); + return CHIP_NO_ERROR; + } + + CHIP_ERROR OnBlockQuery(TransferSession::OutputEvent & event) + { + auto blockSize = @(mTransfer.GetTransferBlockSize()); + auto blockIndex = @(mTransfer.GetNextBlockNum()); + + auto bytesToSkip = @(0); + if (event.EventType == TransferSession::OutputEventType::kQueryWithSkipReceived) { + bytesToSkip = @(event.bytesToSkip.BytesToSkip); + } + + auto completionHandler = ^(NSData * _Nullable data, BOOL isEOF) { + dispatch_async(mWorkQueue, ^{ + if (data == nil) { + LogErrorOnFailure(mTransfer.AbortTransfer(bdx::StatusCode::kUnknown)); + return; + } + + TransferSession::BlockData blockData; + blockData.Data = static_cast([data bytes]); + blockData.Length = static_cast([data length]); + blockData.IsEof = isEOF; + + CHIP_ERROR err = mTransfer.PrepareBlock(blockData); + if (CHIP_NO_ERROR != err) { + LogErrorOnFailure(err); + LogErrorOnFailure(mTransfer.AbortTransfer(bdx::StatusCode::kUnknown)); + } + }); + }; + + // TODO Handle MaxLength + + auto strongDelegate = mDelegate; + dispatch_async(mWorkQueue, ^{ + [strongDelegate handleBDXQuery:blockSize + blockIndex:blockIndex + bytesToSkip:bytesToSkip + completionHandler:completionHandler]; + }); + + return CHIP_NO_ERROR; + } + + void HandleTransferSessionOutput(TransferSession::OutputEvent & event) override + { + VerifyOrReturn(mDelegate != nil); + + CHIP_ERROR err = CHIP_NO_ERROR; + switch (event.EventType) { + case TransferSession::OutputEventType::kInitReceived: + err = OnTransferSessionBegin(event); + break; + case TransferSession::OutputEventType::kStatusReceived: + ChipLogError(BDX, "Got StatusReport %x", static_cast(event.statusData.statusCode)); + [[fallthrough]]; + case TransferSession::OutputEventType::kAckEOFReceived: + case TransferSession::OutputEventType::kInternalError: + case TransferSession::OutputEventType::kTransferTimeout: + err = OnTransferSessionEnd(event); + break; + case TransferSession::OutputEventType::kQueryWithSkipReceived: + case TransferSession::OutputEventType::kQueryReceived: + err = OnBlockQuery(event); + break; + case TransferSession::OutputEventType::kMsgToSend: + err = OnMessageToSend(event); + break; + case TransferSession::OutputEventType::kNone: + case TransferSession::OutputEventType::kAckReceived: + // Nothing to do. + break; + case TransferSession::OutputEventType::kAcceptReceived: + case TransferSession::OutputEventType::kBlockReceived: + default: + // Should never happens. + chipDie(); + break; + } + LogErrorOnFailure(err); + } + + CHIP_ERROR ConfigureState(chip::FabricIndex fabricIndex, chip::NodeId nodeId) + { + if (mInitialized) { + // Prevent a new node connection since another is active. + VerifyOrReturnError(mFabricIndex.Value() == fabricIndex && mNodeId.Value() == nodeId, CHIP_ERROR_BUSY); + + // Reset stale connection from the same Node if exists. + ResetState(); + } + + mFabricIndex.SetValue(fabricIndex); + mNodeId.SetValue(nodeId); + + mInitialized = true; + + return CHIP_NO_ERROR; + } + + void ResetState() + { + if (!mInitialized) { + return; + } + + mFabricIndex.ClearValue(); + mNodeId.ClearValue(); + mTransfer.Reset(); + + if (mExchangeCtx != nullptr) { + mExchangeCtx->Close(); + mExchangeCtx = nullptr; + } + + mInitialized = false; + } + + bool mInitialized = false; + Optional mFabricIndex; + Optional mNodeId; + id mDelegate = nil; + dispatch_queue_t mWorkQueue = nil; + Messaging::ExchangeManager * mExchangeMgr = nullptr; +}; + +BdxOTASender gOtaSender; + static NSInteger const kOtaProviderEndpoint = 0; -MTROTAProviderDelegateBridge::MTROTAProviderDelegateBridge(void) - : mDelegate(nil) +MTROTAProviderDelegateBridge::MTROTAProviderDelegateBridge(id delegate) + : mDelegate(delegate) + , mWorkQueue(DeviceLayer::PlatformMgrImpl().GetWorkQueue()) { + gOtaSender.SetDelegate(delegate); + Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, this); } -MTROTAProviderDelegateBridge::~MTROTAProviderDelegateBridge(void) {} - -void MTROTAProviderDelegateBridge::setDelegate(id delegate, dispatch_queue_t queue) +MTROTAProviderDelegateBridge::~MTROTAProviderDelegateBridge() { - mDelegate = delegate ?: nil; - mQueue = queue ?: nil; + gOtaSender.SetDelegate(nil); + Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, nullptr); +} - chip::app::Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, this); +void MTROTAProviderDelegateBridge::Init(System::Layer * systemLayer, Messaging::ExchangeManager * exchangeManager) +{ + gOtaSender.Init(systemLayer, exchangeManager); } -void MTROTAProviderDelegateBridge::HandleQueryImage(chip::app::CommandHandler * commandObj, - const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::DecodableType & commandData) +void MTROTAProviderDelegateBridge::Shutdown() { gOtaSender.Shutdown(); } + +void MTROTAProviderDelegateBridge::HandleQueryImage( + CommandHandler * commandObj, const ConcreteCommandPath & commandPath, const Commands::QueryImage::DecodableType & commandData) { - id strongDelegate = mDelegate; - if (strongDelegate && mQueue) { - auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterQueryImageParams alloc] init]; - CHIP_ERROR err = ConvertToQueryImageParams(commandData, commandParams); - if (err != CHIP_NO_ERROR) { - commandObj->AddStatus(commandPath, chip::Protocols::InteractionModel::Status::InvalidCommand); - return; - } + auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterQueryImageParams alloc] init]; + CHIP_ERROR err = ConvertToQueryImageParams(commandData, commandParams); + if (err != CHIP_NO_ERROR) { + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::InvalidCommand); + return; + } - // Make sure to hold on to the command handler and command path to be used in the completion block - __block chip::app::CommandHandler::Handle handle(commandObj); - __block chip::app::ConcreteCommandPath cachedCommandPath( - commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); - - dispatch_async(mQueue, ^{ - [strongDelegate handleQueryImage:commandParams - completionHandler:^(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error) { - dispatch_async(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Type response; - ConvertFromQueryImageResponseParms(data, response); - - chip::app::CommandHandler * handler = handle.Get(); - if (handler) { - handler->AddResponse(cachedCommandPath, response); - handle.Release(); - } - }); - }]; + // Make sure to hold on to the command handler and command path to be used in the completion block + __block CommandHandler::Handle handle(commandObj); + __block ConcreteCommandPath cachedCommandPath(commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); + + auto completionHandler = ^( + MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error) { + dispatch_async(mWorkQueue, ^{ + CommandHandler * handler = handle.Get(); + VerifyOrReturn(handler != nullptr); + + Commands::QueryImageResponse::Type response; + ConvertFromQueryImageResponseParms(data, response); + + auto hasUpdate = [data.status isEqual:@(MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable)]; + auto isBDXProtocolSupported = + [commandParams.protocolsSupported containsObject:@(MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXSynchronous)]; + + if (hasUpdate && isBDXProtocolSupported) { + auto fabricIndex = handler->GetSubjectDescriptor().fabricIndex; + auto nodeId = handler->GetSubjectDescriptor().subject; + CHIP_ERROR err = gOtaSender.PrepareForTransfer(fabricIndex, nodeId); + if (CHIP_NO_ERROR != err) { + LogErrorOnFailure(err); + handler->AddStatus(cachedCommandPath, Protocols::InteractionModel::Status::Failure); + handle.Release(); + return; + } + + auto targetNodeId = handler->GetExchangeContext()->GetSessionHandle()->AsSecureSession()->GetLocalScopedNodeId(); + + char uriBuffer[kMaxBDXURILen]; + MutableCharSpan uri(uriBuffer); + err = bdx::MakeURI(targetNodeId.GetNodeId(), AsCharSpan(data.imageURI), uri); + if (CHIP_NO_ERROR != err) { + LogErrorOnFailure(err); + handler->AddStatus(cachedCommandPath, Protocols::InteractionModel::Status::Failure); + handle.Release(); + return; + } + + response.imageURI.SetValue(uri); + handler->AddResponse(cachedCommandPath, response); + handle.Release(); + return; + } + + handler->AddResponse(cachedCommandPath, response); + handle.Release(); }); - } + }; + + auto strongDelegate = mDelegate; + dispatch_async(mWorkQueue, ^{ + [strongDelegate handleQueryImage:commandParams completionHandler:completionHandler]; + }); } -void MTROTAProviderDelegateBridge::HandleApplyUpdateRequest(chip::app::CommandHandler * commandObj, - const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::DecodableType & commandData) +void MTROTAProviderDelegateBridge::HandleApplyUpdateRequest(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + const Commands::ApplyUpdateRequest::DecodableType & commandData) { // Make sure to hold on to the command handler and command path to be used in the completion block - __block chip::app::CommandHandler::Handle handle(commandObj); - __block chip::app::ConcreteCommandPath cachedCommandPath( - commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); - - id strongDelegate = mDelegate; - if (strongDelegate && mQueue) { - auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; - ConvertToApplyUpdateRequestParams(commandData, commandParams); - - dispatch_async(mQueue, ^{ - [strongDelegate - handleApplyUpdateRequest:commandParams - completionHandler:^(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error) { - dispatch_async(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Type response; - ConvertFromApplyUpdateRequestResponseParms(data, response); - - chip::app::CommandHandler * handler = handle.Get(); - if (handler) { - handler->AddResponse(cachedCommandPath, response); - handle.Release(); - } - }); - }]; - }); - } + __block CommandHandler::Handle handle(commandObj); + __block ConcreteCommandPath cachedCommandPath(commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); + + auto completionHandler + = ^(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error) { + dispatch_async(mWorkQueue, ^{ + CommandHandler * handler = handle.Get(); + VerifyOrReturn(handler != nullptr); + + Commands::ApplyUpdateResponse::Type response; + ConvertFromApplyUpdateRequestResponseParms(data, response); + handler->AddResponse(cachedCommandPath, response); + handle.Release(); + }); + }; + + auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; + ConvertToApplyUpdateRequestParams(commandData, commandParams); + + auto strongDelegate = mDelegate; + dispatch_async(mWorkQueue, ^{ + [strongDelegate handleApplyUpdateRequest:commandParams completionHandler:completionHandler]; + }); } -void MTROTAProviderDelegateBridge::HandleNotifyUpdateApplied(chip::app::CommandHandler * commandObj, - const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::DecodableType & commandData) +void MTROTAProviderDelegateBridge::HandleNotifyUpdateApplied(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + const Commands::NotifyUpdateApplied::DecodableType & commandData) { // Make sure to hold on to the command handler and command path to be used in the completion block - __block chip::app::CommandHandler::Handle handle(commandObj); - __block chip::app::ConcreteCommandPath cachedCommandPath( - commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); - - id strongDelegate = mDelegate; - if (strongDelegate && mQueue) { - auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; - ConvertToNotifyUpdateAppliedParams(commandData, commandParams); - - dispatch_async(mQueue, ^{ - [strongDelegate - handleNotifyUpdateApplied:commandParams - completionHandler:^(NSError * _Nullable error) { - dispatch_async(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ - chip::app::CommandHandler * handler = handle.Get(); - if (handler) { - handler->AddStatus(cachedCommandPath, chip::Protocols::InteractionModel::Status::Success); - handle.Release(); - } - }); - }]; + __block CommandHandler::Handle handle(commandObj); + __block ConcreteCommandPath cachedCommandPath(commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); + + auto completionHandler = ^(NSError * _Nullable error) { + dispatch_async(mWorkQueue, ^{ + CommandHandler * handler = handle.Get(); + VerifyOrReturn(handler != nullptr); + + handler->AddStatus(cachedCommandPath, Protocols::InteractionModel::Status::Success); + handle.Release(); }); - } + }; + + auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; + ConvertToNotifyUpdateAppliedParams(commandData, commandParams); + + auto strongDelegate = mDelegate; + dispatch_async(mWorkQueue, ^{ + [strongDelegate handleNotifyUpdateApplied:commandParams completionHandler:completionHandler]; + }); } CHIP_ERROR MTROTAProviderDelegateBridge::ConvertToQueryImageParams( - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::DecodableType & commandData, - MTROtaSoftwareUpdateProviderClusterQueryImageParams * commandParams) + const Commands::QueryImage::DecodableType & commandData, MTROtaSoftwareUpdateProviderClusterQueryImageParams * commandParams) { commandParams.vendorId = [NSNumber numberWithUnsignedShort:commandData.vendorId]; commandParams.productId = [NSNumber numberWithUnsignedShort:commandData.productId]; @@ -151,8 +452,8 @@ auto iterator = commandData.protocolsSupported.begin(); NSMutableArray * protocolsSupported = [[NSMutableArray alloc] init]; while (iterator.Next()) { - chip::app::Clusters::OtaSoftwareUpdateProvider::OTADownloadProtocol protocol = iterator.GetValue(); - [protocolsSupported addObject:[NSNumber numberWithInt:chip::to_underlying(protocol)]]; + OTADownloadProtocol protocol = iterator.GetValue(); + [protocolsSupported addObject:[NSNumber numberWithInt:to_underlying(protocol)]]; } ReturnErrorOnFailure(iterator.GetStatus()); commandParams.protocolsSupported = protocolsSupported; @@ -162,9 +463,7 @@ } if (commandData.location.HasValue()) { - commandParams.location = [[NSString alloc] initWithBytes:commandData.location.Value().data() - length:commandData.location.Value().size() - encoding:NSUTF8StringEncoding]; + commandParams.location = AsString(commandData.location.Value()); } if (commandData.requestorCanConsent.HasValue()) { @@ -179,16 +478,16 @@ void MTROTAProviderDelegateBridge::ConvertFromQueryImageResponseParms( const MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * responseParams, - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Type & response) + Commands::QueryImageResponse::Type & response) { - response.status = static_cast([responseParams.status intValue]); + response.status = static_cast([responseParams.status intValue]); if (responseParams.delayedActionTime) { response.delayedActionTime.SetValue([responseParams.delayedActionTime unsignedIntValue]); } if (responseParams.imageURI) { - response.imageURI.SetValue(chip::CharSpan([responseParams.imageURI UTF8String], responseParams.imageURI.length)); + response.imageURI.SetValue(AsCharSpan(responseParams.imageURI)); } if (responseParams.softwareVersion) { @@ -196,8 +495,7 @@ } if (responseParams.softwareVersionString) { - response.softwareVersionString.SetValue( - chip::CharSpan([responseParams.softwareVersionString UTF8String], responseParams.softwareVersionString.length)); + response.softwareVersionString.SetValue(AsCharSpan(responseParams.softwareVersionString)); } if (responseParams.updateToken) { @@ -214,7 +512,7 @@ } void MTROTAProviderDelegateBridge::ConvertToApplyUpdateRequestParams( - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::DecodableType & commandData, + const Commands::ApplyUpdateRequest::DecodableType & commandData, MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams * commandParams) { commandParams.updateToken = AsData(commandData.updateToken); @@ -223,15 +521,14 @@ void MTROTAProviderDelegateBridge::ConvertFromApplyUpdateRequestResponseParms( const MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * responseParams, - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Type & response) + Commands::ApplyUpdateResponse::Type & response) { - response.action - = static_cast([responseParams.action intValue]); + response.action = static_cast([responseParams.action intValue]); response.delayedActionTime = [responseParams.delayedActionTime unsignedIntValue]; } void MTROTAProviderDelegateBridge::ConvertToNotifyUpdateAppliedParams( - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::DecodableType & commandData, + const Commands::NotifyUpdateApplied::DecodableType & commandData, MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams * commandParams) { commandParams.updateToken = AsData(commandData.updateToken); diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload.h b/src/darwin/Framework/CHIP/MTRSetupPayload.h index 61f98ca9c23920..4f0b02a7ed5ffb 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload.h +++ b/src/darwin/Framework/CHIP/MTRSetupPayload.h @@ -43,23 +43,24 @@ typedef NS_ENUM(NSUInteger, MTROptionalQRCodeInfoType) { }; @interface MTROptionalQRCodeInfo : NSObject -@property (nonatomic, strong) NSNumber * infoType; -@property (nonatomic, strong) NSNumber * tag; -@property (nonatomic, strong) NSNumber * integerValue; -@property (nonatomic, strong) NSString * stringValue; +@property (nonatomic, copy) NSNumber * infoType; +@property (nonatomic, copy) NSNumber * tag; +@property (nonatomic, copy) NSNumber * integerValue; +@property (nonatomic, copy) NSString * stringValue; @end @interface MTRSetupPayload : NSObject -@property (nonatomic, strong) NSNumber * version; -@property (nonatomic, strong) NSNumber * vendorID; -@property (nonatomic, strong) NSNumber * productID; +@property (nonatomic, copy) NSNumber * version; +@property (nonatomic, copy) NSNumber * vendorID; +@property (nonatomic, copy) NSNumber * productID; @property (nonatomic, assign) MTRCommissioningFlow commissioningFlow; @property (nonatomic, assign) MTRRendezvousInformationFlags rendezvousInformation; -@property (nonatomic, strong) NSNumber * discriminator; -@property (nonatomic, strong) NSNumber * setUpPINCode; +@property (nonatomic, copy) NSNumber * discriminator; +@property (nonatomic, assign) BOOL hasShortDiscriminator; +@property (nonatomic, copy) NSNumber * setUpPINCode; -@property (nonatomic, strong) NSString * serialNumber; +@property (nonatomic, copy) NSString * serialNumber; - (nullable NSArray *)getAllOptionalVendorData:(NSError * __autoreleasing *)error; /** diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload.mm b/src/darwin/Framework/CHIP/MTRSetupPayload.mm index 3c026cfb68e850..7b9638687615ff 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload.mm +++ b/src/darwin/Framework/CHIP/MTRSetupPayload.mm @@ -64,7 +64,12 @@ - (id)initWithSetupPayload:(chip::SetupPayload)setupPayload _productID = [NSNumber numberWithUnsignedShort:setupPayload.productID]; _commissioningFlow = [self convertCommissioningFlow:setupPayload.commissioningFlow]; _rendezvousInformation = [self convertRendezvousFlags:setupPayload.rendezvousInformation]; - _discriminator = [NSNumber numberWithUnsignedShort:setupPayload.discriminator]; + _hasShortDiscriminator = setupPayload.discriminator.IsShortDiscriminator(); + if (_hasShortDiscriminator) { + _discriminator = [NSNumber numberWithUnsignedShort:setupPayload.discriminator.GetShortValue()]; + } else { + _discriminator = [NSNumber numberWithUnsignedShort:setupPayload.discriminator.GetLongValue()]; + } _setUpPINCode = [NSNumber numberWithUnsignedInt:setupPayload.setUpPINCode]; [self getSerialNumber:setupPayload]; @@ -134,6 +139,7 @@ + (NSUInteger)generateRandomPIN static NSString * const MTRSetupPayloadCodingKeyProductID = @"MTRSP.ck.productID"; static NSString * const MTRSetupPayloadCodingKeyCommissioningFlow = @"MTRSP.ck.commissioningFlow"; static NSString * const MTRSetupPayloadCodingKeyRendezvousFlags = @"MTRSP.ck.rendezvousFlags"; +static NSString * const MTRSetupPayloadCodingKeyHasShortDiscriminator = @"MTRSP.ck.hasShortDiscriminator"; static NSString * const MTRSetupPayloadCodingKeyDiscriminator = @"MTRSP.ck.discriminator"; static NSString * const MTRSetupPayloadCodingKeySetupPINCode = @"MTRSP.ck.setupPINCode"; static NSString * const MTRSetupPayloadCodingKeySerialNumber = @"MTRSP.ck.serialNumber"; @@ -148,10 +154,11 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:self.version forKey:MTRSetupPayloadCodingKeyVersion]; [coder encodeObject:self.vendorID forKey:MTRSetupPayloadCodingKeyVendorID]; [coder encodeObject:self.productID forKey:MTRSetupPayloadCodingKeyProductID]; - // Casts are safe because commissioning flow and rendezvous information - // values are all pretty small and non-negative. + // Casts are safe because commissioning flow, rendezvous information, and + // hasShortDiscriminator values are all pretty small and non-negative. [coder encodeInteger:static_cast(self.commissioningFlow) forKey:MTRSetupPayloadCodingKeyCommissioningFlow]; [coder encodeInteger:static_cast(self.rendezvousInformation) forKey:MTRSetupPayloadCodingKeyRendezvousFlags]; + [coder encodeInteger:static_cast(self.hasShortDiscriminator) forKey:MTRSetupPayloadCodingKeyHasShortDiscriminator]; [coder encodeObject:self.discriminator forKey:MTRSetupPayloadCodingKeyDiscriminator]; [coder encodeObject:self.setUpPINCode forKey:MTRSetupPayloadCodingKeySetupPINCode]; [coder encodeObject:self.serialNumber forKey:MTRSetupPayloadCodingKeySerialNumber]; @@ -164,6 +171,7 @@ - (nullable instancetype)initWithCoder:(NSCoder *)decoder NSNumber * productID = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeyProductID]; NSInteger commissioningFlow = [decoder decodeIntegerForKey:MTRSetupPayloadCodingKeyCommissioningFlow]; NSInteger rendezvousInformation = [decoder decodeIntegerForKey:MTRSetupPayloadCodingKeyRendezvousFlags]; + NSInteger hasShortDiscriminator = [decoder decodeIntegerForKey:MTRSetupPayloadCodingKeyHasShortDiscriminator]; NSNumber * discriminator = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeyDiscriminator]; NSNumber * setUpPINCode = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeySetupPINCode]; NSString * serialNumber = [decoder decodeObjectOfClass:[NSString class] forKey:MTRSetupPayloadCodingKeySerialNumber]; @@ -174,6 +182,7 @@ - (nullable instancetype)initWithCoder:(NSCoder *)decoder payload.productID = productID; payload.commissioningFlow = static_cast(commissioningFlow); payload.rendezvousInformation = static_cast(rendezvousInformation); + payload.hasShortDiscriminator = static_cast(hasShortDiscriminator); payload.discriminator = discriminator; payload.setUpPINCode = setUpPINCode; payload.serialNumber = serialNumber; diff --git a/src/darwin/Framework/CHIP/Matter.h b/src/darwin/Framework/CHIP/Matter.h index 3f5856e892c8e6..cabba655deaa11 100644 --- a/src/darwin/Framework/CHIP/Matter.h +++ b/src/darwin/Framework/CHIP/Matter.h @@ -34,6 +34,7 @@ #import #import #import +#import #import #import #import diff --git a/src/darwin/Framework/CHIP/NSStringSpanConversion.h b/src/darwin/Framework/CHIP/NSStringSpanConversion.h new file mode 100644 index 00000000000000..a973e5bb56cab8 --- /dev/null +++ b/src/darwin/Framework/CHIP/NSStringSpanConversion.h @@ -0,0 +1,39 @@ +/** + * 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 + +#import "Foundation/Foundation.h" + +#include + +NS_ASSUME_NONNULL_BEGIN + +/** + * Utilities for converting between NSString and chip::CharSpan. + */ + +inline chip::CharSpan AsCharSpan(NSString * str) +{ + return chip::CharSpan([str UTF8String], [str lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); +} + +inline NSString * AsString(chip::CharSpan span) +{ + return [[NSString alloc] initWithBytes:span.data() length:span.size() encoding:NSUTF8StringEncoding]; +} + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt index f6a31156e84bc4..592f99ad40adba 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt @@ -19,6 +19,18 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params alloc] init]; + + {{#zcl_command_arguments}} + other.{{asStructPropertyName label}} = self.{{asStructPropertyName label}}; + {{/zcl_command_arguments}} + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString *descriptionString = [NSString stringWithFormat:@"<%@: {{#zcl_command_arguments}}{{asStructPropertyName label}}:%@; {{/zcl_command_arguments}}>", NSStringFromClass([self class]) {{#zcl_command_arguments}},{{#if isArray}}_{{asStructPropertyName label}}{{else if (isOctetString type)}}[_{{asStructPropertyName label}} base64EncodedStringWithOptions:0]{{else}}_{{asStructPropertyName label}}{{/if}}{{/zcl_command_arguments}}]; diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt index f96a55cd0f21f0..873cd5b739ef0b 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt @@ -7,16 +7,16 @@ NS_ASSUME_NONNULL_BEGIN {{#zcl_clusters}} {{#zcl_commands}} -@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params : NSObject +@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params : NSObject {{#zcl_command_arguments}} {{! Override the getter name because some of our properties start with things like "new" or "init" }} -@property (strong, nonatomic{{#unless (isStrEqual (asGetterName label) (asStructPropertyName label))}}, getter={{asGetterName label}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName label}}; +@property (nonatomic, copy{{#unless (isStrEqual (asGetterName label) (asStructPropertyName label))}}, getter={{asGetterName label}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName label}}; {{/zcl_command_arguments}} /** * Controls whether the command is a timed command (using Timed Invoke). - * + * * If nil (the default value), a regular invoke is done for commands that do * not require a timed invoke and a timed invoke with some default timed request * timeout is done for commands that require a timed invoke. @@ -26,12 +26,12 @@ NS_ASSUME_NONNULL_BEGIN * desired security properties but large enough that it will allow a round-trip * from the sever to the client (for the status response and actual invoke * request) within the timeout window. - * - */ - @property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - - (instancetype)init; - +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end {{/zcl_commands}} {{/zcl_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt index ffba4f7a66a17b..75821772c901f3 100644 --- a/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt @@ -17,6 +17,17 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} alloc] init]; + + {{#zcl_struct_items}} + other.{{asStructPropertyName label}} = self.{{asStructPropertyName label}}; + {{/zcl_struct_items}} + + return other; +} + - (NSString *)description { NSString *descriptionString = [NSString stringWithFormat:@"<%@: {{#zcl_struct_items}}{{asStructPropertyName label}}:%@; {{/zcl_struct_items}}>", NSStringFromClass([self class]){{#zcl_struct_items}},{{#if isArray}}_{{asStructPropertyName label}}{{else if (isOctetString type)}}[_{{asStructPropertyName label}} base64EncodedStringWithOptions:0]{{else}}_{{asStructPropertyName label}}{{/if}}{{/zcl_struct_items}}]; @@ -39,6 +50,17 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event alloc] init]; + + {{#zcl_event_fields}} + other.{{asStructPropertyName name}} = self.{{asStructPropertyName name}}; + {{/zcl_event_fields}} + + return other; +} + - (NSString *)description { NSString *descriptionString = [NSString stringWithFormat:@"<%@: {{#zcl_event_fields}}{{asStructPropertyName name}}:%@; {{/zcl_event_fields}}>", NSStringFromClass([self class]){{#zcl_event_fields}},{{#if isArray}}_{{asStructPropertyName name}}{{else if (isOctetString type)}}[_{{asStructPropertyName name}} base64EncodedStringWithOptions:0]{{else}}_{{asStructPropertyName name}}{{/if}}{{/zcl_event_fields}}]; diff --git a/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt index 2066c7ac89af69..eaa30217ba200c 100644 --- a/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt @@ -6,23 +6,27 @@ NS_ASSUME_NONNULL_BEGIN {{#zcl_clusters}} {{#zcl_structs}} -@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} : NSObject +@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} : NSObject {{! Override the getter name because some of our properties start with things like "new" or "init" }} {{#zcl_struct_items}} -@property (strong, nonatomic{{#unless (isStrEqual (asGetterName label) (asStructPropertyName label))}}, getter={{asGetterName label}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName label}}; +@property (nonatomic, copy{{#unless (isStrEqual (asGetterName label) (asStructPropertyName label))}}, getter={{asGetterName label}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName label}}; {{/zcl_struct_items}} -- (instancetype)init; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end {{/zcl_structs}} {{#zcl_events}} -@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event : NSObject +@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event : NSObject {{#zcl_event_fields}} -@property (strong, nonatomic{{#unless (isStrEqual (asGetterName name) (asStructPropertyName name))}}, getter={{asGetterName name}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName name}}; +@property (nonatomic, copy{{#unless (isStrEqual (asGetterName name) (asStructPropertyName name))}}, getter={{asGetterName name}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName name}}; {{/zcl_event_fields}} + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end {{/zcl_events}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 4b61ec50ed0351..1e7efee40675ef 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -14216,7 +14216,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; return value; } case Attributes::ApplicationName::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index e4dfadf90d0544..ed0d190d771cbc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -941,9 +941,8 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(StatusCompletion)completionHandler; - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams * _Nullable)params +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stopWithOnOffWithCompletionHandler:(StatusCompletion)completionHandler; - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params completionHandler:(StatusCompletion)completionHandler; @@ -22492,7 +22491,6 @@ typedef NS_ENUM(uint8_t, MTROperationalCredentialsOperationalCertStatus) { MTROperationalCredentialsOperationalCertStatusMissingCsr = 0x04, MTROperationalCredentialsOperationalCertStatusTableFull = 0x05, MTROperationalCredentialsOperationalCertStatusInvalidAdminSubject = 0x06, - MTROperationalCredentialsOperationalCertStatusInsufficientPrivilege = 0x08, MTROperationalCredentialsOperationalCertStatusFabricConflict = 0x09, MTROperationalCredentialsOperationalCertStatusLabelConflict = 0x0A, MTROperationalCredentialsOperationalCertStatusInvalidFabricIndex = 0x0B, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 0a987741f0fb1a..c34aa77a252490 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -3769,8 +3769,8 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params } request.level = params.level.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionMask = params.optionMask.unsignedCharValue; - request.optionOverride = params.optionOverride.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3797,8 +3797,8 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completionHand } request.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedCharValue; - request.optionMask = params.optionMask.unsignedCharValue; - request.optionOverride = params.optionOverride.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3826,8 +3826,8 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completionHand request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionMask = params.optionMask.unsignedCharValue; - request.optionOverride = params.optionOverride.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3852,8 +3852,8 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completionHand timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.optionMask = params.optionMask.unsignedCharValue; - request.optionOverride = params.optionOverride.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3881,6 +3881,8 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO } request.level = params.level.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3908,6 +3910,8 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par } request.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3936,6 +3940,8 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3950,11 +3956,7 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stopWithOnOffWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self stopWithOnOffWithParams:nil completionHandler:completionHandler]; -} -- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams * _Nullable)params +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; @@ -3965,6 +3967,8 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams * _Nu timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -65227,9 +65231,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable - (void)readAttributeVendorIDWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -65241,7 +65245,7 @@ - (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterv subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackSubscriptionBridge( + new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -65249,11 +65253,11 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -65265,7 +65269,7 @@ + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)at queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; @@ -65274,7 +65278,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index a006465905e527..bb4e315d325092 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -22,9 +22,9 @@ NS_ASSUME_NONNULL_BEGIN -@interface MTRIdentifyClusterIdentifyParams : NSObject +@interface MTRIdentifyClusterIdentifyParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull identifyTime; +@property (nonatomic, copy) NSNumber * _Nonnull identifyTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -39,16 +39,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRIdentifyClusterTriggerEffectParams : NSObject +@interface MTRIdentifyClusterTriggerEffectParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull effectIdentifier; +@property (nonatomic, copy) NSNumber * _Nonnull effectIdentifier; -@property (strong, nonatomic) NSNumber * _Nonnull effectVariant; +@property (nonatomic, copy) NSNumber * _Nonnull effectVariant; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -63,16 +63,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterAddGroupParams : NSObject +@interface MTRGroupsClusterAddGroupParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSString * _Nonnull groupName; +@property (nonatomic, copy) NSString * _Nonnull groupName; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -87,16 +87,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterAddGroupResponseParams : NSObject +@interface MTRGroupsClusterAddGroupResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -111,14 +111,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterViewGroupParams : NSObject +@interface MTRGroupsClusterViewGroupParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -133,18 +133,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterViewGroupResponseParams : NSObject +@interface MTRGroupsClusterViewGroupResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSString * _Nonnull groupName; +@property (nonatomic, copy) NSString * _Nonnull groupName; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -159,14 +159,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterGetGroupMembershipParams : NSObject +@interface MTRGroupsClusterGetGroupMembershipParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull groupList; +@property (nonatomic, copy) NSArray * _Nonnull groupList; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -181,16 +181,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterGetGroupMembershipResponseParams : NSObject +@interface MTRGroupsClusterGetGroupMembershipResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nullable capacity; +@property (nonatomic, copy) NSNumber * _Nullable capacity; -@property (strong, nonatomic) NSArray * _Nonnull groupList; +@property (nonatomic, copy) NSArray * _Nonnull groupList; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -205,14 +205,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterRemoveGroupParams : NSObject +@interface MTRGroupsClusterRemoveGroupParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -227,16 +227,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterRemoveGroupResponseParams : NSObject +@interface MTRGroupsClusterRemoveGroupResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -251,12 +251,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterRemoveAllGroupsParams : NSObject +@interface MTRGroupsClusterRemoveAllGroupsParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -271,16 +271,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterAddGroupIfIdentifyingParams : NSObject +@interface MTRGroupsClusterAddGroupIfIdentifyingParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSString * _Nonnull groupName; +@property (nonatomic, copy) NSString * _Nonnull groupName; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -295,22 +295,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterAddSceneParams : NSObject +@interface MTRScenesClusterAddSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSString * _Nonnull sceneName; +@property (nonatomic, copy) NSString * _Nonnull sceneName; -@property (strong, nonatomic) NSArray * _Nonnull extensionFieldSets; +@property (nonatomic, copy) NSArray * _Nonnull extensionFieldSets; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -325,18 +325,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterAddSceneResponseParams : NSObject +@interface MTRScenesClusterAddSceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -351,16 +351,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterViewSceneParams : NSObject +@interface MTRScenesClusterViewSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -375,24 +375,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterViewSceneResponseParams : NSObject +@interface MTRScenesClusterViewSceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; -@property (strong, nonatomic) NSNumber * _Nullable transitionTime; +@property (nonatomic, copy) NSNumber * _Nullable transitionTime; -@property (strong, nonatomic) NSString * _Nullable sceneName; +@property (nonatomic, copy) NSString * _Nullable sceneName; -@property (strong, nonatomic) NSArray * _Nullable extensionFieldSets; +@property (nonatomic, copy) NSArray * _Nullable extensionFieldSets; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -407,16 +407,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterRemoveSceneParams : NSObject +@interface MTRScenesClusterRemoveSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -431,18 +431,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterRemoveSceneResponseParams : NSObject +@interface MTRScenesClusterRemoveSceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -457,14 +457,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterRemoveAllScenesParams : NSObject +@interface MTRScenesClusterRemoveAllScenesParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -479,16 +479,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterRemoveAllScenesResponseParams : NSObject +@interface MTRScenesClusterRemoveAllScenesResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -503,16 +503,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterStoreSceneParams : NSObject +@interface MTRScenesClusterStoreSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -527,18 +527,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterStoreSceneResponseParams : NSObject +@interface MTRScenesClusterStoreSceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -553,18 +553,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterRecallSceneParams : NSObject +@interface MTRScenesClusterRecallSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; -@property (strong, nonatomic) NSNumber * _Nullable transitionTime; +@property (nonatomic, copy) NSNumber * _Nullable transitionTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -579,14 +579,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterGetSceneMembershipParams : NSObject +@interface MTRScenesClusterGetSceneMembershipParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -601,20 +601,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterGetSceneMembershipResponseParams : NSObject +@interface MTRScenesClusterGetSceneMembershipResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nullable capacity; +@property (nonatomic, copy) NSNumber * _Nullable capacity; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSArray * _Nullable sceneList; +@property (nonatomic, copy) NSArray * _Nullable sceneList; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -629,22 +629,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterEnhancedAddSceneParams : NSObject +@interface MTRScenesClusterEnhancedAddSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSString * _Nonnull sceneName; +@property (nonatomic, copy) NSString * _Nonnull sceneName; -@property (strong, nonatomic) NSArray * _Nonnull extensionFieldSets; +@property (nonatomic, copy) NSArray * _Nonnull extensionFieldSets; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -659,18 +659,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterEnhancedAddSceneResponseParams : NSObject +@interface MTRScenesClusterEnhancedAddSceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -685,16 +685,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterEnhancedViewSceneParams : NSObject +@interface MTRScenesClusterEnhancedViewSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -709,24 +709,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterEnhancedViewSceneResponseParams : NSObject +@interface MTRScenesClusterEnhancedViewSceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; -@property (strong, nonatomic) NSNumber * _Nullable transitionTime; +@property (nonatomic, copy) NSNumber * _Nullable transitionTime; -@property (strong, nonatomic) NSString * _Nullable sceneName; +@property (nonatomic, copy) NSString * _Nullable sceneName; -@property (strong, nonatomic) NSArray * _Nullable extensionFieldSets; +@property (nonatomic, copy) NSArray * _Nullable extensionFieldSets; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -741,22 +741,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterCopySceneParams : NSObject +@interface MTRScenesClusterCopySceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull mode; +@property (nonatomic, copy) NSNumber * _Nonnull mode; -@property (strong, nonatomic) NSNumber * _Nonnull groupIdFrom; +@property (nonatomic, copy) NSNumber * _Nonnull groupIdFrom; -@property (strong, nonatomic) NSNumber * _Nonnull sceneIdFrom; +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdFrom; -@property (strong, nonatomic) NSNumber * _Nonnull groupIdTo; +@property (nonatomic, copy) NSNumber * _Nonnull groupIdTo; -@property (strong, nonatomic) NSNumber * _Nonnull sceneIdTo; +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdTo; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -771,18 +771,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterCopySceneResponseParams : NSObject +@interface MTRScenesClusterCopySceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupIdFrom; +@property (nonatomic, copy) NSNumber * _Nonnull groupIdFrom; -@property (strong, nonatomic) NSNumber * _Nonnull sceneIdFrom; +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdFrom; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -797,12 +797,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROnOffClusterOffParams : NSObject +@interface MTROnOffClusterOffParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -817,12 +817,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROnOffClusterOnParams : NSObject +@interface MTROnOffClusterOnParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -837,12 +837,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROnOffClusterToggleParams : NSObject +@interface MTROnOffClusterToggleParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -857,16 +857,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROnOffClusterOffWithEffectParams : NSObject +@interface MTROnOffClusterOffWithEffectParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull effectId; +@property (nonatomic, copy) NSNumber * _Nonnull effectId; -@property (strong, nonatomic) NSNumber * _Nonnull effectVariant; +@property (nonatomic, copy) NSNumber * _Nonnull effectVariant; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -881,12 +881,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROnOffClusterOnWithRecallGlobalSceneParams : NSObject +@interface MTROnOffClusterOnWithRecallGlobalSceneParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -901,18 +901,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROnOffClusterOnWithTimedOffParams : NSObject +@interface MTROnOffClusterOnWithTimedOffParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull onOffControl; +@property (nonatomic, copy) NSNumber * _Nonnull onOffControl; -@property (strong, nonatomic) NSNumber * _Nonnull onTime; +@property (nonatomic, copy) NSNumber * _Nonnull onTime; -@property (strong, nonatomic) NSNumber * _Nonnull offWaitTime; +@property (nonatomic, copy) NSNumber * _Nonnull offWaitTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -927,20 +927,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterMoveToLevelParams : NSObject +@interface MTRLevelControlClusterMoveToLevelParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull level; +@property (nonatomic, copy) NSNumber * _Nonnull level; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -955,20 +955,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterMoveParams : NSObject +@interface MTRLevelControlClusterMoveParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull moveMode; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode; -@property (strong, nonatomic) NSNumber * _Nonnull rate; +@property (nonatomic, copy) NSNumber * _Nonnull rate; -@property (strong, nonatomic) NSNumber * _Nonnull optionMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -983,22 +983,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterStepParams : NSObject +@interface MTRLevelControlClusterStepParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stepMode; +@property (nonatomic, copy) NSNumber * _Nonnull stepMode; -@property (strong, nonatomic) NSNumber * _Nonnull stepSize; +@property (nonatomic, copy) NSNumber * _Nonnull stepSize; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1013,16 +1013,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterStopParams : NSObject +@interface MTRLevelControlClusterStopParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull optionMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1037,16 +1037,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterMoveToLevelWithOnOffParams : NSObject +@interface MTRLevelControlClusterMoveToLevelWithOnOffParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull level; -@property (strong, nonatomic) NSNumber * _Nonnull level; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1061,16 +1065,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterMoveWithOnOffParams : NSObject +@interface MTRLevelControlClusterMoveWithOnOffParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull moveMode; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode; -@property (strong, nonatomic) NSNumber * _Nonnull rate; +@property (nonatomic, copy) NSNumber * _Nonnull rate; + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1085,18 +1093,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterStepWithOnOffParams : NSObject +@interface MTRLevelControlClusterStepWithOnOffParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull stepMode; -@property (strong, nonatomic) NSNumber * _Nonnull stepMode; +@property (nonatomic, copy) NSNumber * _Nonnull stepSize; -@property (strong, nonatomic) NSNumber * _Nonnull stepSize; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1111,12 +1123,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterStopWithOnOffParams : NSObject +@interface MTRLevelControlClusterStopWithOnOffParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1131,14 +1147,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterMoveToClosestFrequencyParams : NSObject +@interface MTRLevelControlClusterMoveToClosestFrequencyParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull frequency; +@property (nonatomic, copy) NSNumber * _Nonnull frequency; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1153,16 +1169,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterInstantActionParams : NSObject +@interface MTRBridgedActionsClusterInstantActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1177,18 +1193,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterInstantActionWithTransitionParams : NSObject +@interface MTRBridgedActionsClusterInstantActionWithTransitionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1203,16 +1219,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterStartActionParams : NSObject +@interface MTRBridgedActionsClusterStartActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1227,18 +1243,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterStartActionWithDurationParams : NSObject +@interface MTRBridgedActionsClusterStartActionWithDurationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; -@property (strong, nonatomic) NSNumber * _Nonnull duration; +@property (nonatomic, copy) NSNumber * _Nonnull duration; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1253,16 +1269,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterStopActionParams : NSObject +@interface MTRBridgedActionsClusterStopActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1277,16 +1293,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterPauseActionParams : NSObject +@interface MTRBridgedActionsClusterPauseActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1301,18 +1317,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterPauseActionWithDurationParams : NSObject +@interface MTRBridgedActionsClusterPauseActionWithDurationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; -@property (strong, nonatomic) NSNumber * _Nonnull duration; +@property (nonatomic, copy) NSNumber * _Nonnull duration; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1327,16 +1343,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterResumeActionParams : NSObject +@interface MTRBridgedActionsClusterResumeActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1351,16 +1367,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterEnableActionParams : NSObject +@interface MTRBridgedActionsClusterEnableActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1375,18 +1391,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterEnableActionWithDurationParams : NSObject +@interface MTRBridgedActionsClusterEnableActionWithDurationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; -@property (strong, nonatomic) NSNumber * _Nonnull duration; +@property (nonatomic, copy) NSNumber * _Nonnull duration; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1401,16 +1417,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterDisableActionParams : NSObject +@interface MTRBridgedActionsClusterDisableActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1425,18 +1441,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterDisableActionWithDurationParams : NSObject +@interface MTRBridgedActionsClusterDisableActionWithDurationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; -@property (strong, nonatomic) NSNumber * _Nonnull duration; +@property (nonatomic, copy) NSNumber * _Nonnull duration; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1451,12 +1467,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBasicClusterMfgSpecificPingParams : NSObject +@interface MTRBasicClusterMfgSpecificPingParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1471,28 +1487,28 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateProviderClusterQueryImageParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterQueryImageParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull vendorId; +@property (nonatomic, copy) NSNumber * _Nonnull vendorId; -@property (strong, nonatomic) NSNumber * _Nonnull productId; +@property (nonatomic, copy) NSNumber * _Nonnull productId; -@property (strong, nonatomic) NSNumber * _Nonnull softwareVersion; +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; -@property (strong, nonatomic) NSArray * _Nonnull protocolsSupported; +@property (nonatomic, copy) NSArray * _Nonnull protocolsSupported; -@property (strong, nonatomic) NSNumber * _Nullable hardwareVersion; +@property (nonatomic, copy) NSNumber * _Nullable hardwareVersion; -@property (strong, nonatomic) NSString * _Nullable location; +@property (nonatomic, copy) NSString * _Nullable location; -@property (strong, nonatomic) NSNumber * _Nullable requestorCanConsent; +@property (nonatomic, copy) NSNumber * _Nullable requestorCanConsent; -@property (strong, nonatomic) NSData * _Nullable metadataForProvider; +@property (nonatomic, copy) NSData * _Nullable metadataForProvider; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1507,28 +1523,28 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nullable delayedActionTime; +@property (nonatomic, copy) NSNumber * _Nullable delayedActionTime; -@property (strong, nonatomic) NSString * _Nullable imageURI; +@property (nonatomic, copy) NSString * _Nullable imageURI; -@property (strong, nonatomic) NSNumber * _Nullable softwareVersion; +@property (nonatomic, copy) NSNumber * _Nullable softwareVersion; -@property (strong, nonatomic) NSString * _Nullable softwareVersionString; +@property (nonatomic, copy) NSString * _Nullable softwareVersionString; -@property (strong, nonatomic) NSData * _Nullable updateToken; +@property (nonatomic, copy) NSData * _Nullable updateToken; -@property (strong, nonatomic) NSNumber * _Nullable userConsentNeeded; +@property (nonatomic, copy) NSNumber * _Nullable userConsentNeeded; -@property (strong, nonatomic) NSData * _Nullable metadataForRequestor; +@property (nonatomic, copy) NSData * _Nullable metadataForRequestor; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1543,16 +1559,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull updateToken; +@property (nonatomic, copy) NSData * _Nonnull updateToken; -@property (strong, nonatomic, getter=getNewVersion) NSNumber * _Nonnull newVersion; +@property (nonatomic, copy, getter=getNewVersion) NSNumber * _Nonnull newVersion; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1567,16 +1583,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull action; +@property (nonatomic, copy) NSNumber * _Nonnull action; -@property (strong, nonatomic) NSNumber * _Nonnull delayedActionTime; +@property (nonatomic, copy) NSNumber * _Nonnull delayedActionTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1591,16 +1607,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull updateToken; +@property (nonatomic, copy) NSData * _Nonnull updateToken; -@property (strong, nonatomic) NSNumber * _Nonnull softwareVersion; +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1615,22 +1631,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams : NSObject +@interface MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull providerNodeId; +@property (nonatomic, copy) NSNumber * _Nonnull providerNodeId; -@property (strong, nonatomic) NSNumber * _Nonnull vendorId; +@property (nonatomic, copy) NSNumber * _Nonnull vendorId; -@property (strong, nonatomic) NSNumber * _Nonnull announcementReason; +@property (nonatomic, copy) NSNumber * _Nonnull announcementReason; -@property (strong, nonatomic) NSData * _Nullable metadataForNode; +@property (nonatomic, copy) NSData * _Nullable metadataForNode; -@property (strong, nonatomic) NSNumber * _Nonnull endpoint; +@property (nonatomic, copy) NSNumber * _Nonnull endpoint; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1645,16 +1661,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterArmFailSafeParams : NSObject +@interface MTRGeneralCommissioningClusterArmFailSafeParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull expiryLengthSeconds; +@property (nonatomic, copy) NSNumber * _Nonnull expiryLengthSeconds; -@property (strong, nonatomic) NSNumber * _Nonnull breadcrumb; +@property (nonatomic, copy) NSNumber * _Nonnull breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1669,16 +1685,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterArmFailSafeResponseParams : NSObject +@interface MTRGeneralCommissioningClusterArmFailSafeResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull errorCode; +@property (nonatomic, copy) NSNumber * _Nonnull errorCode; -@property (strong, nonatomic) NSString * _Nonnull debugText; +@property (nonatomic, copy) NSString * _Nonnull debugText; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1693,18 +1709,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterSetRegulatoryConfigParams : NSObject +@interface MTRGeneralCommissioningClusterSetRegulatoryConfigParams : NSObject -@property (strong, nonatomic, getter=getNewRegulatoryConfig) NSNumber * _Nonnull newRegulatoryConfig; +@property (nonatomic, copy, getter=getNewRegulatoryConfig) NSNumber * _Nonnull newRegulatoryConfig; -@property (strong, nonatomic) NSString * _Nonnull countryCode; +@property (nonatomic, copy) NSString * _Nonnull countryCode; -@property (strong, nonatomic) NSNumber * _Nonnull breadcrumb; +@property (nonatomic, copy) NSNumber * _Nonnull breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1719,16 +1735,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams : NSObject +@interface MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull errorCode; +@property (nonatomic, copy) NSNumber * _Nonnull errorCode; -@property (strong, nonatomic) NSString * _Nonnull debugText; +@property (nonatomic, copy) NSString * _Nonnull debugText; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1743,12 +1759,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterCommissioningCompleteParams : NSObject +@interface MTRGeneralCommissioningClusterCommissioningCompleteParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1763,16 +1779,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterCommissioningCompleteResponseParams : NSObject +@interface MTRGeneralCommissioningClusterCommissioningCompleteResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull errorCode; +@property (nonatomic, copy) NSNumber * _Nonnull errorCode; -@property (strong, nonatomic) NSString * _Nonnull debugText; +@property (nonatomic, copy) NSString * _Nonnull debugText; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1787,16 +1803,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterScanNetworksParams : NSObject +@interface MTRNetworkCommissioningClusterScanNetworksParams : NSObject -@property (strong, nonatomic) NSData * _Nullable ssid; +@property (nonatomic, copy) NSData * _Nullable ssid; -@property (strong, nonatomic) NSNumber * _Nullable breadcrumb; +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1811,20 +1827,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterScanNetworksResponseParams : NSObject +@interface MTRNetworkCommissioningClusterScanNetworksResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull networkingStatus; +@property (nonatomic, copy) NSNumber * _Nonnull networkingStatus; -@property (strong, nonatomic) NSString * _Nullable debugText; +@property (nonatomic, copy) NSString * _Nullable debugText; -@property (strong, nonatomic) NSArray * _Nullable wiFiScanResults; +@property (nonatomic, copy) NSArray * _Nullable wiFiScanResults; -@property (strong, nonatomic) NSArray * _Nullable threadScanResults; +@property (nonatomic, copy) NSArray * _Nullable threadScanResults; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1839,18 +1855,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams : NSObject +@interface MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull ssid; +@property (nonatomic, copy) NSData * _Nonnull ssid; -@property (strong, nonatomic) NSData * _Nonnull credentials; +@property (nonatomic, copy) NSData * _Nonnull credentials; -@property (strong, nonatomic) NSNumber * _Nullable breadcrumb; +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1865,16 +1881,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams : NSObject +@interface MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull operationalDataset; +@property (nonatomic, copy) NSData * _Nonnull operationalDataset; -@property (strong, nonatomic) NSNumber * _Nullable breadcrumb; +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1889,16 +1905,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterRemoveNetworkParams : NSObject +@interface MTRNetworkCommissioningClusterRemoveNetworkParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull networkID; +@property (nonatomic, copy) NSData * _Nonnull networkID; -@property (strong, nonatomic) NSNumber * _Nullable breadcrumb; +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1913,18 +1929,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterNetworkConfigResponseParams : NSObject +@interface MTRNetworkCommissioningClusterNetworkConfigResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull networkingStatus; +@property (nonatomic, copy) NSNumber * _Nonnull networkingStatus; -@property (strong, nonatomic) NSString * _Nullable debugText; +@property (nonatomic, copy) NSString * _Nullable debugText; -@property (strong, nonatomic) NSNumber * _Nullable networkIndex; +@property (nonatomic, copy) NSNumber * _Nullable networkIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1939,16 +1955,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterConnectNetworkParams : NSObject +@interface MTRNetworkCommissioningClusterConnectNetworkParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull networkID; +@property (nonatomic, copy) NSData * _Nonnull networkID; -@property (strong, nonatomic) NSNumber * _Nullable breadcrumb; +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1963,18 +1979,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterConnectNetworkResponseParams : NSObject +@interface MTRNetworkCommissioningClusterConnectNetworkResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull networkingStatus; +@property (nonatomic, copy) NSNumber * _Nonnull networkingStatus; -@property (strong, nonatomic) NSString * _Nullable debugText; +@property (nonatomic, copy) NSString * _Nullable debugText; -@property (strong, nonatomic) NSNumber * _Nullable errorValue; +@property (nonatomic, copy) NSNumber * _Nullable errorValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1989,18 +2005,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterReorderNetworkParams : NSObject +@interface MTRNetworkCommissioningClusterReorderNetworkParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull networkID; +@property (nonatomic, copy) NSData * _Nonnull networkID; -@property (strong, nonatomic) NSNumber * _Nonnull networkIndex; +@property (nonatomic, copy) NSNumber * _Nonnull networkIndex; -@property (strong, nonatomic) NSNumber * _Nullable breadcrumb; +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2015,18 +2031,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDiagnosticLogsClusterRetrieveLogsRequestParams : NSObject +@interface MTRDiagnosticLogsClusterRetrieveLogsRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull intent; +@property (nonatomic, copy) NSNumber * _Nonnull intent; -@property (strong, nonatomic) NSNumber * _Nonnull requestedProtocol; +@property (nonatomic, copy) NSNumber * _Nonnull requestedProtocol; -@property (strong, nonatomic) NSData * _Nonnull transferFileDesignator; +@property (nonatomic, copy) NSData * _Nonnull transferFileDesignator; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2041,20 +2057,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDiagnosticLogsClusterRetrieveLogsResponseParams : NSObject +@interface MTRDiagnosticLogsClusterRetrieveLogsResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSData * _Nonnull content; +@property (nonatomic, copy) NSData * _Nonnull content; -@property (strong, nonatomic) NSNumber * _Nonnull timeStamp; +@property (nonatomic, copy) NSNumber * _Nonnull timeStamp; -@property (strong, nonatomic) NSNumber * _Nonnull timeSinceBoot; +@property (nonatomic, copy) NSNumber * _Nonnull timeSinceBoot; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2069,16 +2085,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralDiagnosticsClusterTestEventTriggerParams : NSObject +@interface MTRGeneralDiagnosticsClusterTestEventTriggerParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull enableKey; +@property (nonatomic, copy) NSData * _Nonnull enableKey; -@property (strong, nonatomic) NSNumber * _Nonnull eventTrigger; +@property (nonatomic, copy) NSNumber * _Nonnull eventTrigger; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2093,12 +2109,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSoftwareDiagnosticsClusterResetWatermarksParams : NSObject +@interface MTRSoftwareDiagnosticsClusterResetWatermarksParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2113,12 +2129,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThreadNetworkDiagnosticsClusterResetCountsParams : NSObject +@interface MTRThreadNetworkDiagnosticsClusterResetCountsParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2133,12 +2149,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWiFiNetworkDiagnosticsClusterResetCountsParams : NSObject +@interface MTRWiFiNetworkDiagnosticsClusterResetCountsParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2153,12 +2169,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTREthernetNetworkDiagnosticsClusterResetCountsParams : NSObject +@interface MTREthernetNetworkDiagnosticsClusterResetCountsParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2173,22 +2189,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams : NSObject +@interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull commissioningTimeout; +@property (nonatomic, copy) NSNumber * _Nonnull commissioningTimeout; -@property (strong, nonatomic) NSData * _Nonnull pakeVerifier; +@property (nonatomic, copy) NSData * _Nonnull pakeVerifier; -@property (strong, nonatomic) NSNumber * _Nonnull discriminator; +@property (nonatomic, copy) NSNumber * _Nonnull discriminator; -@property (strong, nonatomic) NSNumber * _Nonnull iterations; +@property (nonatomic, copy) NSNumber * _Nonnull iterations; -@property (strong, nonatomic) NSData * _Nonnull salt; +@property (nonatomic, copy) NSData * _Nonnull salt; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2203,14 +2219,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams : NSObject +@interface MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull commissioningTimeout; +@property (nonatomic, copy) NSNumber * _Nonnull commissioningTimeout; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2225,12 +2241,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAdministratorCommissioningClusterRevokeCommissioningParams : NSObject +@interface MTRAdministratorCommissioningClusterRevokeCommissioningParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2245,14 +2261,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterAttestationRequestParams : NSObject +@interface MTROperationalCredentialsClusterAttestationRequestParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull attestationNonce; +@property (nonatomic, copy) NSData * _Nonnull attestationNonce; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2267,16 +2283,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterAttestationResponseParams : NSObject +@interface MTROperationalCredentialsClusterAttestationResponseParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull attestationElements; +@property (nonatomic, copy) NSData * _Nonnull attestationElements; -@property (strong, nonatomic) NSData * _Nonnull signature; +@property (nonatomic, copy) NSData * _Nonnull signature; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2291,14 +2307,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterCertificateChainRequestParams : NSObject +@interface MTROperationalCredentialsClusterCertificateChainRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull certificateType; +@property (nonatomic, copy) NSNumber * _Nonnull certificateType; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2313,14 +2329,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterCertificateChainResponseParams : NSObject +@interface MTROperationalCredentialsClusterCertificateChainResponseParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull certificate; +@property (nonatomic, copy) NSData * _Nonnull certificate; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2335,16 +2351,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterCSRRequestParams : NSObject +@interface MTROperationalCredentialsClusterCSRRequestParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull csrNonce; +@property (nonatomic, copy) NSData * _Nonnull csrNonce; -@property (strong, nonatomic) NSNumber * _Nullable isForUpdateNOC; +@property (nonatomic, copy) NSNumber * _Nullable isForUpdateNOC; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2359,16 +2375,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterCSRResponseParams : NSObject +@interface MTROperationalCredentialsClusterCSRResponseParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull nocsrElements; +@property (nonatomic, copy) NSData * _Nonnull nocsrElements; -@property (strong, nonatomic) NSData * _Nonnull attestationSignature; +@property (nonatomic, copy) NSData * _Nonnull attestationSignature; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2383,22 +2399,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterAddNOCParams : NSObject +@interface MTROperationalCredentialsClusterAddNOCParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull nocValue; +@property (nonatomic, copy) NSData * _Nonnull nocValue; -@property (strong, nonatomic) NSData * _Nullable icacValue; +@property (nonatomic, copy) NSData * _Nullable icacValue; -@property (strong, nonatomic) NSData * _Nonnull ipkValue; +@property (nonatomic, copy) NSData * _Nonnull ipkValue; -@property (strong, nonatomic) NSNumber * _Nonnull caseAdminSubject; +@property (nonatomic, copy) NSNumber * _Nonnull caseAdminSubject; -@property (strong, nonatomic) NSNumber * _Nonnull adminVendorId; +@property (nonatomic, copy) NSNumber * _Nonnull adminVendorId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2413,16 +2429,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterUpdateNOCParams : NSObject +@interface MTROperationalCredentialsClusterUpdateNOCParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull nocValue; +@property (nonatomic, copy) NSData * _Nonnull nocValue; -@property (strong, nonatomic) NSData * _Nullable icacValue; +@property (nonatomic, copy) NSData * _Nullable icacValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2437,18 +2453,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterNOCResponseParams : NSObject +@interface MTROperationalCredentialsClusterNOCResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull statusCode; +@property (nonatomic, copy) NSNumber * _Nonnull statusCode; -@property (strong, nonatomic) NSNumber * _Nullable fabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable fabricIndex; -@property (strong, nonatomic) NSString * _Nullable debugText; +@property (nonatomic, copy) NSString * _Nullable debugText; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2463,14 +2479,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterUpdateFabricLabelParams : NSObject +@interface MTROperationalCredentialsClusterUpdateFabricLabelParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull label; +@property (nonatomic, copy) NSString * _Nonnull label; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2485,14 +2501,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterRemoveFabricParams : NSObject +@interface MTROperationalCredentialsClusterRemoveFabricParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2507,14 +2523,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams : NSObject +@interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull rootCertificate; +@property (nonatomic, copy) NSData * _Nonnull rootCertificate; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2529,14 +2545,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterKeySetWriteParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetWriteParams : NSObject -@property (strong, nonatomic) MTRGroupKeyManagementClusterGroupKeySetStruct * _Nonnull groupKeySet; +@property (nonatomic, copy) MTRGroupKeyManagementClusterGroupKeySetStruct * _Nonnull groupKeySet; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2551,14 +2567,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterKeySetReadParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetReadParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupKeySetID; +@property (nonatomic, copy) NSNumber * _Nonnull groupKeySetID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2573,14 +2589,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterKeySetReadResponseParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetReadResponseParams : NSObject -@property (strong, nonatomic) MTRGroupKeyManagementClusterGroupKeySetStruct * _Nonnull groupKeySet; +@property (nonatomic, copy) MTRGroupKeyManagementClusterGroupKeySetStruct * _Nonnull groupKeySet; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2595,14 +2611,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterKeySetRemoveParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetRemoveParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupKeySetID; +@property (nonatomic, copy) NSNumber * _Nonnull groupKeySetID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2617,14 +2633,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull groupKeySetIDs; +@property (nonatomic, copy) NSArray * _Nonnull groupKeySetIDs; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2639,14 +2655,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull groupKeySetIDs; +@property (nonatomic, copy) NSArray * _Nonnull groupKeySetIDs; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2661,14 +2677,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRModeSelectClusterChangeToModeParams : NSObject +@interface MTRModeSelectClusterChangeToModeParams : NSObject -@property (strong, nonatomic, getter=getNewMode) NSNumber * _Nonnull newMode; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2683,14 +2699,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterLockDoorParams : NSObject +@interface MTRDoorLockClusterLockDoorParams : NSObject -@property (strong, nonatomic) NSData * _Nullable pinCode; +@property (nonatomic, copy) NSData * _Nullable pinCode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2705,14 +2721,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterUnlockDoorParams : NSObject +@interface MTRDoorLockClusterUnlockDoorParams : NSObject -@property (strong, nonatomic) NSData * _Nullable pinCode; +@property (nonatomic, copy) NSData * _Nullable pinCode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2727,16 +2743,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterUnlockWithTimeoutParams : NSObject +@interface MTRDoorLockClusterUnlockWithTimeoutParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull timeout; +@property (nonatomic, copy) NSNumber * _Nonnull timeout; -@property (strong, nonatomic) NSData * _Nullable pinCode; +@property (nonatomic, copy) NSData * _Nullable pinCode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2751,26 +2767,26 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterSetWeekDayScheduleParams : NSObject +@interface MTRDoorLockClusterSetWeekDayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull weekDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; -@property (strong, nonatomic) NSNumber * _Nonnull daysMask; +@property (nonatomic, copy) NSNumber * _Nonnull daysMask; -@property (strong, nonatomic) NSNumber * _Nonnull startHour; +@property (nonatomic, copy) NSNumber * _Nonnull startHour; -@property (strong, nonatomic) NSNumber * _Nonnull startMinute; +@property (nonatomic, copy) NSNumber * _Nonnull startMinute; -@property (strong, nonatomic) NSNumber * _Nonnull endHour; +@property (nonatomic, copy) NSNumber * _Nonnull endHour; -@property (strong, nonatomic) NSNumber * _Nonnull endMinute; +@property (nonatomic, copy) NSNumber * _Nonnull endMinute; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2785,16 +2801,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetWeekDayScheduleParams : NSObject +@interface MTRDoorLockClusterGetWeekDayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull weekDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2809,28 +2825,28 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetWeekDayScheduleResponseParams : NSObject +@interface MTRDoorLockClusterGetWeekDayScheduleResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull weekDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nullable daysMask; +@property (nonatomic, copy) NSNumber * _Nullable daysMask; -@property (strong, nonatomic) NSNumber * _Nullable startHour; +@property (nonatomic, copy) NSNumber * _Nullable startHour; -@property (strong, nonatomic) NSNumber * _Nullable startMinute; +@property (nonatomic, copy) NSNumber * _Nullable startMinute; -@property (strong, nonatomic) NSNumber * _Nullable endHour; +@property (nonatomic, copy) NSNumber * _Nullable endHour; -@property (strong, nonatomic) NSNumber * _Nullable endMinute; +@property (nonatomic, copy) NSNumber * _Nullable endMinute; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2845,16 +2861,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterClearWeekDayScheduleParams : NSObject +@interface MTRDoorLockClusterClearWeekDayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull weekDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2869,20 +2885,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterSetYearDayScheduleParams : NSObject +@interface MTRDoorLockClusterSetYearDayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull yearDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; -@property (strong, nonatomic) NSNumber * _Nonnull localStartTime; +@property (nonatomic, copy) NSNumber * _Nonnull localStartTime; -@property (strong, nonatomic) NSNumber * _Nonnull localEndTime; +@property (nonatomic, copy) NSNumber * _Nonnull localEndTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2897,16 +2913,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetYearDayScheduleParams : NSObject +@interface MTRDoorLockClusterGetYearDayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull yearDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2921,22 +2937,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetYearDayScheduleResponseParams : NSObject +@interface MTRDoorLockClusterGetYearDayScheduleResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull yearDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nullable localStartTime; +@property (nonatomic, copy) NSNumber * _Nullable localStartTime; -@property (strong, nonatomic) NSNumber * _Nullable localEndTime; +@property (nonatomic, copy) NSNumber * _Nullable localEndTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2951,16 +2967,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterClearYearDayScheduleParams : NSObject +@interface MTRDoorLockClusterClearYearDayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull yearDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2975,20 +2991,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterSetHolidayScheduleParams : NSObject +@interface MTRDoorLockClusterSetHolidayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull holidayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull localStartTime; +@property (nonatomic, copy) NSNumber * _Nonnull localStartTime; -@property (strong, nonatomic) NSNumber * _Nonnull localEndTime; +@property (nonatomic, copy) NSNumber * _Nonnull localEndTime; -@property (strong, nonatomic) NSNumber * _Nonnull operatingMode; +@property (nonatomic, copy) NSNumber * _Nonnull operatingMode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3003,14 +3019,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetHolidayScheduleParams : NSObject +@interface MTRDoorLockClusterGetHolidayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull holidayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3025,22 +3041,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetHolidayScheduleResponseParams : NSObject +@interface MTRDoorLockClusterGetHolidayScheduleResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull holidayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nullable localStartTime; +@property (nonatomic, copy) NSNumber * _Nullable localStartTime; -@property (strong, nonatomic) NSNumber * _Nullable localEndTime; +@property (nonatomic, copy) NSNumber * _Nullable localEndTime; -@property (strong, nonatomic) NSNumber * _Nullable operatingMode; +@property (nonatomic, copy) NSNumber * _Nullable operatingMode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3055,14 +3071,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterClearHolidayScheduleParams : NSObject +@interface MTRDoorLockClusterClearHolidayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull holidayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3077,26 +3093,26 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterSetUserParams : NSObject +@interface MTRDoorLockClusterSetUserParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull operationType; +@property (nonatomic, copy) NSNumber * _Nonnull operationType; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; -@property (strong, nonatomic) NSString * _Nullable userName; +@property (nonatomic, copy) NSString * _Nullable userName; -@property (strong, nonatomic) NSNumber * _Nullable userUniqueId; +@property (nonatomic, copy) NSNumber * _Nullable userUniqueId; -@property (strong, nonatomic) NSNumber * _Nullable userStatus; +@property (nonatomic, copy) NSNumber * _Nullable userStatus; -@property (strong, nonatomic) NSNumber * _Nullable userType; +@property (nonatomic, copy) NSNumber * _Nullable userType; -@property (strong, nonatomic) NSNumber * _Nullable credentialRule; +@property (nonatomic, copy) NSNumber * _Nullable credentialRule; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3111,14 +3127,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetUserParams : NSObject +@interface MTRDoorLockClusterGetUserParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3133,32 +3149,32 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetUserResponseParams : NSObject +@interface MTRDoorLockClusterGetUserResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; -@property (strong, nonatomic) NSString * _Nullable userName; +@property (nonatomic, copy) NSString * _Nullable userName; -@property (strong, nonatomic) NSNumber * _Nullable userUniqueId; +@property (nonatomic, copy) NSNumber * _Nullable userUniqueId; -@property (strong, nonatomic) NSNumber * _Nullable userStatus; +@property (nonatomic, copy) NSNumber * _Nullable userStatus; -@property (strong, nonatomic) NSNumber * _Nullable userType; +@property (nonatomic, copy) NSNumber * _Nullable userType; -@property (strong, nonatomic) NSNumber * _Nullable credentialRule; +@property (nonatomic, copy) NSNumber * _Nullable credentialRule; -@property (strong, nonatomic) NSArray * _Nullable credentials; +@property (nonatomic, copy) NSArray * _Nullable credentials; -@property (strong, nonatomic) NSNumber * _Nullable creatorFabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable creatorFabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable lastModifiedFabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable lastModifiedFabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable nextUserIndex; +@property (nonatomic, copy) NSNumber * _Nullable nextUserIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3173,14 +3189,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterClearUserParams : NSObject +@interface MTRDoorLockClusterClearUserParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3195,24 +3211,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterSetCredentialParams : NSObject +@interface MTRDoorLockClusterSetCredentialParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull operationType; +@property (nonatomic, copy) NSNumber * _Nonnull operationType; -@property (strong, nonatomic) MTRDoorLockClusterDlCredential * _Nonnull credential; +@property (nonatomic, copy) MTRDoorLockClusterDlCredential * _Nonnull credential; -@property (strong, nonatomic) NSData * _Nonnull credentialData; +@property (nonatomic, copy) NSData * _Nonnull credentialData; -@property (strong, nonatomic) NSNumber * _Nullable userIndex; +@property (nonatomic, copy) NSNumber * _Nullable userIndex; -@property (strong, nonatomic) NSNumber * _Nullable userStatus; +@property (nonatomic, copy) NSNumber * _Nullable userStatus; -@property (strong, nonatomic) NSNumber * _Nullable userType; +@property (nonatomic, copy) NSNumber * _Nullable userType; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3227,18 +3243,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterSetCredentialResponseParams : NSObject +@interface MTRDoorLockClusterSetCredentialResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nullable userIndex; +@property (nonatomic, copy) NSNumber * _Nullable userIndex; -@property (strong, nonatomic) NSNumber * _Nullable nextCredentialIndex; +@property (nonatomic, copy) NSNumber * _Nullable nextCredentialIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3253,14 +3269,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetCredentialStatusParams : NSObject +@interface MTRDoorLockClusterGetCredentialStatusParams : NSObject -@property (strong, nonatomic) MTRDoorLockClusterDlCredential * _Nonnull credential; +@property (nonatomic, copy) MTRDoorLockClusterDlCredential * _Nonnull credential; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3275,22 +3291,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetCredentialStatusResponseParams : NSObject +@interface MTRDoorLockClusterGetCredentialStatusResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull credentialExists; +@property (nonatomic, copy) NSNumber * _Nonnull credentialExists; -@property (strong, nonatomic) NSNumber * _Nullable userIndex; +@property (nonatomic, copy) NSNumber * _Nullable userIndex; -@property (strong, nonatomic) NSNumber * _Nullable creatorFabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable creatorFabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable lastModifiedFabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable lastModifiedFabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable nextCredentialIndex; +@property (nonatomic, copy) NSNumber * _Nullable nextCredentialIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3305,14 +3321,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterClearCredentialParams : NSObject +@interface MTRDoorLockClusterClearCredentialParams : NSObject -@property (strong, nonatomic) MTRDoorLockClusterDlCredential * _Nullable credential; +@property (nonatomic, copy) MTRDoorLockClusterDlCredential * _Nullable credential; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3327,12 +3343,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterUpOrOpenParams : NSObject +@interface MTRWindowCoveringClusterUpOrOpenParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3347,12 +3363,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterDownOrCloseParams : NSObject +@interface MTRWindowCoveringClusterDownOrCloseParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3367,12 +3383,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterStopMotionParams : NSObject +@interface MTRWindowCoveringClusterStopMotionParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3387,14 +3403,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterGoToLiftValueParams : NSObject +@interface MTRWindowCoveringClusterGoToLiftValueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull liftValue; +@property (nonatomic, copy) NSNumber * _Nonnull liftValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3409,14 +3425,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterGoToLiftPercentageParams : NSObject +@interface MTRWindowCoveringClusterGoToLiftPercentageParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull liftPercent100thsValue; +@property (nonatomic, copy) NSNumber * _Nonnull liftPercent100thsValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3431,14 +3447,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterGoToTiltValueParams : NSObject +@interface MTRWindowCoveringClusterGoToTiltValueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull tiltValue; +@property (nonatomic, copy) NSNumber * _Nonnull tiltValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3453,14 +3469,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterGoToTiltPercentageParams : NSObject +@interface MTRWindowCoveringClusterGoToTiltPercentageParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull tiltPercent100thsValue; +@property (nonatomic, copy) NSNumber * _Nonnull tiltPercent100thsValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3475,14 +3491,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBarrierControlClusterBarrierControlGoToPercentParams : NSObject +@interface MTRBarrierControlClusterBarrierControlGoToPercentParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull percentOpen; +@property (nonatomic, copy) NSNumber * _Nonnull percentOpen; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3497,12 +3513,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBarrierControlClusterBarrierControlStopParams : NSObject +@interface MTRBarrierControlClusterBarrierControlStopParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3517,16 +3533,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThermostatClusterSetpointRaiseLowerParams : NSObject +@interface MTRThermostatClusterSetpointRaiseLowerParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull mode; +@property (nonatomic, copy) NSNumber * _Nonnull mode; -@property (strong, nonatomic) NSNumber * _Nonnull amount; +@property (nonatomic, copy) NSNumber * _Nonnull amount; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3541,20 +3557,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThermostatClusterGetWeeklyScheduleResponseParams : NSObject +@interface MTRThermostatClusterGetWeeklyScheduleResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull numberOfTransitionsForSequence; +@property (nonatomic, copy) NSNumber * _Nonnull numberOfTransitionsForSequence; -@property (strong, nonatomic) NSNumber * _Nonnull dayOfWeekForSequence; +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence; -@property (strong, nonatomic) NSNumber * _Nonnull modeForSequence; +@property (nonatomic, copy) NSNumber * _Nonnull modeForSequence; -@property (strong, nonatomic) NSArray * _Nonnull transitions; +@property (nonatomic, copy) NSArray * _Nonnull transitions; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3569,20 +3585,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThermostatClusterSetWeeklyScheduleParams : NSObject +@interface MTRThermostatClusterSetWeeklyScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull numberOfTransitionsForSequence; +@property (nonatomic, copy) NSNumber * _Nonnull numberOfTransitionsForSequence; -@property (strong, nonatomic) NSNumber * _Nonnull dayOfWeekForSequence; +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence; -@property (strong, nonatomic) NSNumber * _Nonnull modeForSequence; +@property (nonatomic, copy) NSNumber * _Nonnull modeForSequence; -@property (strong, nonatomic) NSArray * _Nonnull transitions; +@property (nonatomic, copy) NSArray * _Nonnull transitions; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3597,16 +3613,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThermostatClusterGetWeeklyScheduleParams : NSObject +@interface MTRThermostatClusterGetWeeklyScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull daysToReturn; +@property (nonatomic, copy) NSNumber * _Nonnull daysToReturn; -@property (strong, nonatomic) NSNumber * _Nonnull modeToReturn; +@property (nonatomic, copy) NSNumber * _Nonnull modeToReturn; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3621,12 +3637,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThermostatClusterClearWeeklyScheduleParams : NSObject +@interface MTRThermostatClusterClearWeeklyScheduleParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3641,22 +3657,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveToHueParams : NSObject +@interface MTRColorControlClusterMoveToHueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull hue; +@property (nonatomic, copy) NSNumber * _Nonnull hue; -@property (strong, nonatomic) NSNumber * _Nonnull direction; +@property (nonatomic, copy) NSNumber * _Nonnull direction; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3671,20 +3687,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveHueParams : NSObject +@interface MTRColorControlClusterMoveHueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull moveMode; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode; -@property (strong, nonatomic) NSNumber * _Nonnull rate; +@property (nonatomic, copy) NSNumber * _Nonnull rate; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3699,22 +3715,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterStepHueParams : NSObject +@interface MTRColorControlClusterStepHueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stepMode; +@property (nonatomic, copy) NSNumber * _Nonnull stepMode; -@property (strong, nonatomic) NSNumber * _Nonnull stepSize; +@property (nonatomic, copy) NSNumber * _Nonnull stepSize; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3729,20 +3745,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveToSaturationParams : NSObject +@interface MTRColorControlClusterMoveToSaturationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull saturation; +@property (nonatomic, copy) NSNumber * _Nonnull saturation; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3757,20 +3773,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveSaturationParams : NSObject +@interface MTRColorControlClusterMoveSaturationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull moveMode; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode; -@property (strong, nonatomic) NSNumber * _Nonnull rate; +@property (nonatomic, copy) NSNumber * _Nonnull rate; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3785,22 +3801,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterStepSaturationParams : NSObject +@interface MTRColorControlClusterStepSaturationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stepMode; +@property (nonatomic, copy) NSNumber * _Nonnull stepMode; -@property (strong, nonatomic) NSNumber * _Nonnull stepSize; +@property (nonatomic, copy) NSNumber * _Nonnull stepSize; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3815,22 +3831,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveToHueAndSaturationParams : NSObject +@interface MTRColorControlClusterMoveToHueAndSaturationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull hue; +@property (nonatomic, copy) NSNumber * _Nonnull hue; -@property (strong, nonatomic) NSNumber * _Nonnull saturation; +@property (nonatomic, copy) NSNumber * _Nonnull saturation; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3845,22 +3861,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveToColorParams : NSObject +@interface MTRColorControlClusterMoveToColorParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull colorX; +@property (nonatomic, copy) NSNumber * _Nonnull colorX; -@property (strong, nonatomic) NSNumber * _Nonnull colorY; +@property (nonatomic, copy) NSNumber * _Nonnull colorY; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3875,20 +3891,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveColorParams : NSObject +@interface MTRColorControlClusterMoveColorParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull rateX; +@property (nonatomic, copy) NSNumber * _Nonnull rateX; -@property (strong, nonatomic) NSNumber * _Nonnull rateY; +@property (nonatomic, copy) NSNumber * _Nonnull rateY; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3903,22 +3919,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterStepColorParams : NSObject +@interface MTRColorControlClusterStepColorParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stepX; +@property (nonatomic, copy) NSNumber * _Nonnull stepX; -@property (strong, nonatomic) NSNumber * _Nonnull stepY; +@property (nonatomic, copy) NSNumber * _Nonnull stepY; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3933,20 +3949,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveToColorTemperatureParams : NSObject +@interface MTRColorControlClusterMoveToColorTemperatureParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull colorTemperature; +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperature; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3961,22 +3977,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterEnhancedMoveToHueParams : NSObject +@interface MTRColorControlClusterEnhancedMoveToHueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull enhancedHue; +@property (nonatomic, copy) NSNumber * _Nonnull enhancedHue; -@property (strong, nonatomic) NSNumber * _Nonnull direction; +@property (nonatomic, copy) NSNumber * _Nonnull direction; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3991,20 +4007,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterEnhancedMoveHueParams : NSObject +@interface MTRColorControlClusterEnhancedMoveHueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull moveMode; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode; -@property (strong, nonatomic) NSNumber * _Nonnull rate; +@property (nonatomic, copy) NSNumber * _Nonnull rate; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4019,22 +4035,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterEnhancedStepHueParams : NSObject +@interface MTRColorControlClusterEnhancedStepHueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stepMode; +@property (nonatomic, copy) NSNumber * _Nonnull stepMode; -@property (strong, nonatomic) NSNumber * _Nonnull stepSize; +@property (nonatomic, copy) NSNumber * _Nonnull stepSize; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4049,22 +4065,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterEnhancedMoveToHueAndSaturationParams : NSObject +@interface MTRColorControlClusterEnhancedMoveToHueAndSaturationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull enhancedHue; +@property (nonatomic, copy) NSNumber * _Nonnull enhancedHue; -@property (strong, nonatomic) NSNumber * _Nonnull saturation; +@property (nonatomic, copy) NSNumber * _Nonnull saturation; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4079,26 +4095,26 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterColorLoopSetParams : NSObject +@interface MTRColorControlClusterColorLoopSetParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull updateFlags; +@property (nonatomic, copy) NSNumber * _Nonnull updateFlags; -@property (strong, nonatomic) NSNumber * _Nonnull action; +@property (nonatomic, copy) NSNumber * _Nonnull action; -@property (strong, nonatomic) NSNumber * _Nonnull direction; +@property (nonatomic, copy) NSNumber * _Nonnull direction; -@property (strong, nonatomic) NSNumber * _Nonnull time; +@property (nonatomic, copy) NSNumber * _Nonnull time; -@property (strong, nonatomic) NSNumber * _Nonnull startHue; +@property (nonatomic, copy) NSNumber * _Nonnull startHue; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4113,16 +4129,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterStopMoveStepParams : NSObject +@interface MTRColorControlClusterStopMoveStepParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4137,24 +4153,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveColorTemperatureParams : NSObject +@interface MTRColorControlClusterMoveColorTemperatureParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull moveMode; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode; -@property (strong, nonatomic) NSNumber * _Nonnull rate; +@property (nonatomic, copy) NSNumber * _Nonnull rate; -@property (strong, nonatomic) NSNumber * _Nonnull colorTemperatureMinimumMireds; +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMinimumMireds; -@property (strong, nonatomic) NSNumber * _Nonnull colorTemperatureMaximumMireds; +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMaximumMireds; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4169,26 +4185,26 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterStepColorTemperatureParams : NSObject +@interface MTRColorControlClusterStepColorTemperatureParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stepMode; +@property (nonatomic, copy) NSNumber * _Nonnull stepMode; -@property (strong, nonatomic) NSNumber * _Nonnull stepSize; +@property (nonatomic, copy) NSNumber * _Nonnull stepSize; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull colorTemperatureMinimumMireds; +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMinimumMireds; -@property (strong, nonatomic) NSNumber * _Nonnull colorTemperatureMaximumMireds; +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMaximumMireds; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4203,14 +4219,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRChannelClusterChangeChannelParams : NSObject +@interface MTRChannelClusterChangeChannelParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull match; +@property (nonatomic, copy) NSString * _Nonnull match; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4225,16 +4241,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRChannelClusterChangeChannelResponseParams : NSObject +@interface MTRChannelClusterChangeChannelResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSString * _Nullable data; +@property (nonatomic, copy) NSString * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4249,16 +4265,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRChannelClusterChangeChannelByNumberParams : NSObject +@interface MTRChannelClusterChangeChannelByNumberParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull majorNumber; +@property (nonatomic, copy) NSNumber * _Nonnull majorNumber; -@property (strong, nonatomic) NSNumber * _Nonnull minorNumber; +@property (nonatomic, copy) NSNumber * _Nonnull minorNumber; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4273,14 +4289,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRChannelClusterSkipChannelParams : NSObject +@interface MTRChannelClusterSkipChannelParams : NSObject -@property (strong, nonatomic, getter=getCount) NSNumber * _Nonnull count; +@property (nonatomic, copy, getter=getCount) NSNumber * _Nonnull count; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4295,16 +4311,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTargetNavigatorClusterNavigateTargetParams : NSObject +@interface MTRTargetNavigatorClusterNavigateTargetParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull target; +@property (nonatomic, copy) NSNumber * _Nonnull target; -@property (strong, nonatomic) NSString * _Nullable data; +@property (nonatomic, copy) NSString * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4319,16 +4335,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTargetNavigatorClusterNavigateTargetResponseParams : NSObject +@interface MTRTargetNavigatorClusterNavigateTargetResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSString * _Nullable data; +@property (nonatomic, copy) NSString * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4343,12 +4359,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterPlayParams : NSObject +@interface MTRMediaPlaybackClusterPlayParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4363,12 +4379,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterPauseParams : NSObject +@interface MTRMediaPlaybackClusterPauseParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4383,12 +4399,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterStopPlaybackParams : NSObject +@interface MTRMediaPlaybackClusterStopPlaybackParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4403,12 +4419,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterStartOverParams : NSObject +@interface MTRMediaPlaybackClusterStartOverParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4423,12 +4439,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterPreviousParams : NSObject +@interface MTRMediaPlaybackClusterPreviousParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4443,12 +4459,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterNextParams : NSObject +@interface MTRMediaPlaybackClusterNextParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4463,12 +4479,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterRewindParams : NSObject +@interface MTRMediaPlaybackClusterRewindParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4483,12 +4499,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterFastForwardParams : NSObject +@interface MTRMediaPlaybackClusterFastForwardParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4503,14 +4519,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterSkipForwardParams : NSObject +@interface MTRMediaPlaybackClusterSkipForwardParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull deltaPositionMilliseconds; +@property (nonatomic, copy) NSNumber * _Nonnull deltaPositionMilliseconds; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4525,14 +4541,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterSkipBackwardParams : NSObject +@interface MTRMediaPlaybackClusterSkipBackwardParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull deltaPositionMilliseconds; +@property (nonatomic, copy) NSNumber * _Nonnull deltaPositionMilliseconds; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4547,16 +4563,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterPlaybackResponseParams : NSObject +@interface MTRMediaPlaybackClusterPlaybackResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSString * _Nullable data; +@property (nonatomic, copy) NSString * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4571,14 +4587,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterSeekParams : NSObject +@interface MTRMediaPlaybackClusterSeekParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull position; +@property (nonatomic, copy) NSNumber * _Nonnull position; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4593,14 +4609,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaInputClusterSelectInputParams : NSObject +@interface MTRMediaInputClusterSelectInputParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull index; +@property (nonatomic, copy) NSNumber * _Nonnull index; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4615,12 +4631,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaInputClusterShowInputStatusParams : NSObject +@interface MTRMediaInputClusterShowInputStatusParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4635,12 +4651,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaInputClusterHideInputStatusParams : NSObject +@interface MTRMediaInputClusterHideInputStatusParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4655,16 +4671,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaInputClusterRenameInputParams : NSObject +@interface MTRMediaInputClusterRenameInputParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull index; +@property (nonatomic, copy) NSNumber * _Nonnull index; -@property (strong, nonatomic) NSString * _Nonnull name; +@property (nonatomic, copy) NSString * _Nonnull name; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4679,12 +4695,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLowPowerClusterSleepParams : NSObject +@interface MTRLowPowerClusterSleepParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4699,14 +4715,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRKeypadInputClusterSendKeyParams : NSObject +@interface MTRKeypadInputClusterSendKeyParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull keyCode; +@property (nonatomic, copy) NSNumber * _Nonnull keyCode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4721,14 +4737,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRKeypadInputClusterSendKeyResponseParams : NSObject +@interface MTRKeypadInputClusterSendKeyResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4743,18 +4759,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterLaunchContentParams : NSObject +@interface MTRContentLauncherClusterLaunchContentParams : NSObject -@property (strong, nonatomic) MTRContentLauncherClusterContentSearch * _Nonnull search; +@property (nonatomic, copy) MTRContentLauncherClusterContentSearch * _Nonnull search; -@property (strong, nonatomic) NSNumber * _Nonnull autoPlay; +@property (nonatomic, copy) NSNumber * _Nonnull autoPlay; -@property (strong, nonatomic) NSString * _Nullable data; +@property (nonatomic, copy) NSString * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4769,18 +4785,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterLaunchURLParams : NSObject +@interface MTRContentLauncherClusterLaunchURLParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull contentURL; +@property (nonatomic, copy) NSString * _Nonnull contentURL; -@property (strong, nonatomic) NSString * _Nullable displayString; +@property (nonatomic, copy) NSString * _Nullable displayString; -@property (strong, nonatomic) MTRContentLauncherClusterBrandingInformation * _Nullable brandingInformation; +@property (nonatomic, copy) MTRContentLauncherClusterBrandingInformation * _Nullable brandingInformation; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4795,16 +4811,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterLaunchResponseParams : NSObject +@interface MTRContentLauncherClusterLaunchResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSString * _Nullable data; +@property (nonatomic, copy) NSString * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4819,14 +4835,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAudioOutputClusterSelectOutputParams : NSObject +@interface MTRAudioOutputClusterSelectOutputParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull index; +@property (nonatomic, copy) NSNumber * _Nonnull index; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4841,16 +4857,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAudioOutputClusterRenameOutputParams : NSObject +@interface MTRAudioOutputClusterRenameOutputParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull index; +@property (nonatomic, copy) NSNumber * _Nonnull index; -@property (strong, nonatomic) NSString * _Nonnull name; +@property (nonatomic, copy) NSString * _Nonnull name; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4865,16 +4881,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationLauncherClusterLaunchAppParams : NSObject +@interface MTRApplicationLauncherClusterLaunchAppParams : NSObject -@property (strong, nonatomic) MTRApplicationLauncherClusterApplication * _Nonnull application; +@property (nonatomic, copy) MTRApplicationLauncherClusterApplication * _Nonnull application; -@property (strong, nonatomic) NSData * _Nullable data; +@property (nonatomic, copy) NSData * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4889,14 +4905,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationLauncherClusterStopAppParams : NSObject +@interface MTRApplicationLauncherClusterStopAppParams : NSObject -@property (strong, nonatomic) MTRApplicationLauncherClusterApplication * _Nonnull application; +@property (nonatomic, copy) MTRApplicationLauncherClusterApplication * _Nonnull application; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4911,14 +4927,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationLauncherClusterHideAppParams : NSObject +@interface MTRApplicationLauncherClusterHideAppParams : NSObject -@property (strong, nonatomic) MTRApplicationLauncherClusterApplication * _Nonnull application; +@property (nonatomic, copy) MTRApplicationLauncherClusterApplication * _Nonnull application; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4933,16 +4949,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationLauncherClusterLauncherResponseParams : NSObject +@interface MTRApplicationLauncherClusterLauncherResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSData * _Nonnull data; +@property (nonatomic, copy) NSData * _Nonnull data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4957,14 +4973,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccountLoginClusterGetSetupPINParams : NSObject +@interface MTRAccountLoginClusterGetSetupPINParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull tempAccountIdentifier; +@property (nonatomic, copy) NSString * _Nonnull tempAccountIdentifier; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4979,14 +4995,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccountLoginClusterGetSetupPINResponseParams : NSObject +@interface MTRAccountLoginClusterGetSetupPINResponseParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull setupPIN; +@property (nonatomic, copy) NSString * _Nonnull setupPIN; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5001,16 +5017,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccountLoginClusterLoginParams : NSObject +@interface MTRAccountLoginClusterLoginParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull tempAccountIdentifier; +@property (nonatomic, copy) NSString * _Nonnull tempAccountIdentifier; -@property (strong, nonatomic) NSString * _Nonnull setupPIN; +@property (nonatomic, copy) NSString * _Nonnull setupPIN; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5025,12 +5041,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccountLoginClusterLogoutParams : NSObject +@interface MTRAccountLoginClusterLogoutParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5045,20 +5061,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams : NSObject +@interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull profileCount; +@property (nonatomic, copy) NSNumber * _Nonnull profileCount; -@property (strong, nonatomic) NSNumber * _Nonnull profileIntervalPeriod; +@property (nonatomic, copy) NSNumber * _Nonnull profileIntervalPeriod; -@property (strong, nonatomic) NSNumber * _Nonnull maxNumberOfIntervals; +@property (nonatomic, copy) NSNumber * _Nonnull maxNumberOfIntervals; -@property (strong, nonatomic) NSArray * _Nonnull listOfAttributes; +@property (nonatomic, copy) NSArray * _Nonnull listOfAttributes; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5073,12 +5089,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRElectricalMeasurementClusterGetProfileInfoCommandParams : NSObject +@interface MTRElectricalMeasurementClusterGetProfileInfoCommandParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5093,24 +5109,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams : NSObject +@interface MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull startTime; +@property (nonatomic, copy) NSNumber * _Nonnull startTime; -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull profileIntervalPeriod; +@property (nonatomic, copy) NSNumber * _Nonnull profileIntervalPeriod; -@property (strong, nonatomic) NSNumber * _Nonnull numberOfIntervalsDelivered; +@property (nonatomic, copy) NSNumber * _Nonnull numberOfIntervalsDelivered; -@property (strong, nonatomic) NSNumber * _Nonnull attributeId; +@property (nonatomic, copy) NSNumber * _Nonnull attributeId; -@property (strong, nonatomic) NSArray * _Nonnull intervals; +@property (nonatomic, copy) NSArray * _Nonnull intervals; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5125,18 +5141,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams : NSObject +@interface MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull attributeId; +@property (nonatomic, copy) NSNumber * _Nonnull attributeId; -@property (strong, nonatomic) NSNumber * _Nonnull startTime; +@property (nonatomic, copy) NSNumber * _Nonnull startTime; -@property (strong, nonatomic) NSNumber * _Nonnull numberOfIntervals; +@property (nonatomic, copy) NSNumber * _Nonnull numberOfIntervals; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5151,12 +5167,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestParams : NSObject +@interface MTRTestClusterClusterTestParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5171,14 +5187,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestSpecificResponseParams : NSObject +@interface MTRTestClusterClusterTestSpecificResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull returnValue; +@property (nonatomic, copy) NSNumber * _Nonnull returnValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5193,12 +5209,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestNotHandledParams : NSObject +@interface MTRTestClusterClusterTestNotHandledParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5213,14 +5229,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestAddArgumentsResponseParams : NSObject +@interface MTRTestClusterClusterTestAddArgumentsResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull returnValue; +@property (nonatomic, copy) NSNumber * _Nonnull returnValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5235,12 +5251,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestSpecificParams : NSObject +@interface MTRTestClusterClusterTestSpecificParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5255,14 +5271,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestSimpleArgumentResponseParams : NSObject +@interface MTRTestClusterClusterTestSimpleArgumentResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull returnValue; +@property (nonatomic, copy) NSNumber * _Nonnull returnValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5277,12 +5293,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestUnknownCommandParams : NSObject +@interface MTRTestClusterClusterTestUnknownCommandParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5297,24 +5313,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestStructArrayArgumentResponseParams : NSObject +@interface MTRTestClusterClusterTestStructArrayArgumentResponseParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; -@property (strong, nonatomic) NSArray * _Nonnull arg2; +@property (nonatomic, copy) NSArray * _Nonnull arg2; -@property (strong, nonatomic) NSArray * _Nonnull arg3; +@property (nonatomic, copy) NSArray * _Nonnull arg3; -@property (strong, nonatomic) NSArray * _Nonnull arg4; +@property (nonatomic, copy) NSArray * _Nonnull arg4; -@property (strong, nonatomic) NSNumber * _Nonnull arg5; +@property (nonatomic, copy) NSNumber * _Nonnull arg5; -@property (strong, nonatomic) NSNumber * _Nonnull arg6; +@property (nonatomic, copy) NSNumber * _Nonnull arg6; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5329,16 +5345,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestAddArgumentsParams : NSObject +@interface MTRTestClusterClusterTestAddArgumentsParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg1; -@property (strong, nonatomic) NSNumber * _Nonnull arg2; +@property (nonatomic, copy) NSNumber * _Nonnull arg2; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5353,14 +5369,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestListInt8UReverseResponseParams : NSObject +@interface MTRTestClusterClusterTestListInt8UReverseResponseParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5375,14 +5391,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestSimpleArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestSimpleArgumentRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5397,16 +5413,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEnumsResponseParams : NSObject +@interface MTRTestClusterClusterTestEnumsResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg1; -@property (strong, nonatomic) NSNumber * _Nonnull arg2; +@property (nonatomic, copy) NSNumber * _Nonnull arg2; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5421,24 +5437,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestStructArrayArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestStructArrayArgumentRequestParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; -@property (strong, nonatomic) NSArray * _Nonnull arg2; +@property (nonatomic, copy) NSArray * _Nonnull arg2; -@property (strong, nonatomic) NSArray * _Nonnull arg3; +@property (nonatomic, copy) NSArray * _Nonnull arg3; -@property (strong, nonatomic) NSArray * _Nonnull arg4; +@property (nonatomic, copy) NSArray * _Nonnull arg4; -@property (strong, nonatomic) NSNumber * _Nonnull arg5; +@property (nonatomic, copy) NSNumber * _Nonnull arg5; -@property (strong, nonatomic) NSNumber * _Nonnull arg6; +@property (nonatomic, copy) NSNumber * _Nonnull arg6; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5453,20 +5469,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestNullableOptionalResponseParams : NSObject +@interface MTRTestClusterClusterTestNullableOptionalResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull wasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull wasPresent; -@property (strong, nonatomic) NSNumber * _Nullable wasNull; +@property (nonatomic, copy) NSNumber * _Nullable wasNull; -@property (strong, nonatomic) NSNumber * _Nullable value; +@property (nonatomic, copy) NSNumber * _Nullable value; -@property (strong, nonatomic) NSNumber * _Nullable originalValue; +@property (nonatomic, copy) NSNumber * _Nullable originalValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5481,14 +5497,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestStructArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestStructArgumentRequestParams : NSObject -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull arg1; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5503,68 +5519,68 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestComplexNullableOptionalResponseParams : NSObject +@interface MTRTestClusterClusterTestComplexNullableOptionalResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull nullableIntWasNull; +@property (nonatomic, copy) NSNumber * _Nonnull nullableIntWasNull; -@property (strong, nonatomic) NSNumber * _Nullable nullableIntValue; +@property (nonatomic, copy) NSNumber * _Nullable nullableIntValue; -@property (strong, nonatomic) NSNumber * _Nonnull optionalIntWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull optionalIntWasPresent; -@property (strong, nonatomic) NSNumber * _Nullable optionalIntValue; +@property (nonatomic, copy) NSNumber * _Nullable optionalIntValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableOptionalIntWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull nullableOptionalIntWasPresent; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalIntWasNull; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalIntWasNull; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalIntValue; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalIntValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableStringWasNull; +@property (nonatomic, copy) NSNumber * _Nonnull nullableStringWasNull; -@property (strong, nonatomic) NSString * _Nullable nullableStringValue; +@property (nonatomic, copy) NSString * _Nullable nullableStringValue; -@property (strong, nonatomic) NSNumber * _Nonnull optionalStringWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull optionalStringWasPresent; -@property (strong, nonatomic) NSString * _Nullable optionalStringValue; +@property (nonatomic, copy) NSString * _Nullable optionalStringValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableOptionalStringWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull nullableOptionalStringWasPresent; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalStringWasNull; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalStringWasNull; -@property (strong, nonatomic) NSString * _Nullable nullableOptionalStringValue; +@property (nonatomic, copy) NSString * _Nullable nullableOptionalStringValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableStructWasNull; +@property (nonatomic, copy) NSNumber * _Nonnull nullableStructWasNull; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable nullableStructValue; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableStructValue; -@property (strong, nonatomic) NSNumber * _Nonnull optionalStructWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull optionalStructWasPresent; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable optionalStructValue; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable optionalStructValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableOptionalStructWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull nullableOptionalStructWasPresent; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalStructWasNull; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalStructWasNull; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStructValue; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStructValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableListWasNull; +@property (nonatomic, copy) NSNumber * _Nonnull nullableListWasNull; -@property (strong, nonatomic) NSArray * _Nullable nullableListValue; +@property (nonatomic, copy) NSArray * _Nullable nullableListValue; -@property (strong, nonatomic) NSNumber * _Nonnull optionalListWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull optionalListWasPresent; -@property (strong, nonatomic) NSArray * _Nullable optionalListValue; +@property (nonatomic, copy) NSArray * _Nullable optionalListValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableOptionalListWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull nullableOptionalListWasPresent; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalListWasNull; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalListWasNull; -@property (strong, nonatomic) NSArray * _Nullable nullableOptionalListValue; +@property (nonatomic, copy) NSArray * _Nullable nullableOptionalListValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5579,14 +5595,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestNestedStructArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestNestedStructArgumentRequestParams : NSObject -@property (strong, nonatomic) MTRTestClusterClusterNestedStruct * _Nonnull arg1; +@property (nonatomic, copy) MTRTestClusterClusterNestedStruct * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5601,14 +5617,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterBooleanResponseParams : NSObject +@interface MTRTestClusterClusterBooleanResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull value; +@property (nonatomic, copy) NSNumber * _Nonnull value; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5623,14 +5639,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestListStructArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestListStructArgumentRequestParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5645,14 +5661,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterSimpleStructResponseParams : NSObject +@interface MTRTestClusterClusterSimpleStructResponseParams : NSObject -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull arg1; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5667,14 +5683,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestListInt8UArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestListInt8UArgumentRequestParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5689,14 +5705,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEmitTestEventResponseParams : NSObject +@interface MTRTestClusterClusterTestEmitTestEventResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull value; +@property (nonatomic, copy) NSNumber * _Nonnull value; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5711,14 +5727,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestNestedStructListArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestNestedStructListArgumentRequestParams : NSObject -@property (strong, nonatomic) MTRTestClusterClusterNestedStructList * _Nonnull arg1; +@property (nonatomic, copy) MTRTestClusterClusterNestedStructList * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5733,14 +5749,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams : NSObject +@interface MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull value; +@property (nonatomic, copy) NSNumber * _Nonnull value; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5755,14 +5771,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestListNestedStructListArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestListNestedStructListArgumentRequestParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5777,14 +5793,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestListInt8UReverseRequestParams : NSObject +@interface MTRTestClusterClusterTestListInt8UReverseRequestParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5799,16 +5815,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEnumsRequestParams : NSObject +@interface MTRTestClusterClusterTestEnumsRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg1; -@property (strong, nonatomic) NSNumber * _Nonnull arg2; +@property (nonatomic, copy) NSNumber * _Nonnull arg2; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5823,14 +5839,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestNullableOptionalRequestParams : NSObject +@interface MTRTestClusterClusterTestNullableOptionalRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nullable arg1; +@property (nonatomic, copy) NSNumber * _Nullable arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5845,36 +5861,36 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestComplexNullableOptionalRequestParams : NSObject +@interface MTRTestClusterClusterTestComplexNullableOptionalRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nullable nullableInt; +@property (nonatomic, copy) NSNumber * _Nullable nullableInt; -@property (strong, nonatomic) NSNumber * _Nullable optionalInt; +@property (nonatomic, copy) NSNumber * _Nullable optionalInt; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalInt; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalInt; -@property (strong, nonatomic) NSString * _Nullable nullableString; +@property (nonatomic, copy) NSString * _Nullable nullableString; -@property (strong, nonatomic) NSString * _Nullable optionalString; +@property (nonatomic, copy) NSString * _Nullable optionalString; -@property (strong, nonatomic) NSString * _Nullable nullableOptionalString; +@property (nonatomic, copy) NSString * _Nullable nullableOptionalString; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable nullableStruct; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableStruct; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable optionalStruct; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable optionalStruct; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStruct; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStruct; -@property (strong, nonatomic) NSArray * _Nullable nullableList; +@property (nonatomic, copy) NSArray * _Nullable nullableList; -@property (strong, nonatomic) NSArray * _Nullable optionalList; +@property (nonatomic, copy) NSArray * _Nullable optionalList; -@property (strong, nonatomic) NSArray * _Nullable nullableOptionalList; +@property (nonatomic, copy) NSArray * _Nullable nullableOptionalList; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5889,14 +5905,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterSimpleStructEchoRequestParams : NSObject +@interface MTRTestClusterClusterSimpleStructEchoRequestParams : NSObject -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull arg1; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5911,12 +5927,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTimedInvokeRequestParams : NSObject +@interface MTRTestClusterClusterTimedInvokeRequestParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5931,14 +5947,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nullable arg1; +@property (nonatomic, copy) NSNumber * _Nullable arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5953,18 +5969,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEmitTestEventRequestParams : NSObject +@interface MTRTestClusterClusterTestEmitTestEventRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg1; -@property (strong, nonatomic) NSNumber * _Nonnull arg2; +@property (nonatomic, copy) NSNumber * _Nonnull arg2; -@property (strong, nonatomic) NSNumber * _Nonnull arg3; +@property (nonatomic, copy) NSNumber * _Nonnull arg3; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5979,14 +5995,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams : NSObject +@interface MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6001,10 +6017,10 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index cdd9a5d7cb8325..28844016eebe06 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -32,6 +32,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRIdentifyClusterIdentifyParams alloc] init]; + + other.identifyTime = self.identifyTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -53,6 +63,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; + + other.effectIdentifier = self.effectIdentifier; + other.effectVariant = self.effectVariant; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: effectIdentifier:%@; effectVariant:%@; >", @@ -74,6 +95,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterAddGroupParams alloc] init]; + + other.groupId = self.groupId; + other.groupName = self.groupName; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -95,6 +127,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterAddGroupResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -114,6 +157,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterViewGroupParams alloc] init]; + + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; >", NSStringFromClass([self class]), _groupId]; @@ -136,6 +189,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterViewGroupResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.groupName = self.groupName; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; groupName:%@; >", @@ -155,6 +220,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterGetGroupMembershipParams alloc] init]; + + other.groupList = self.groupList; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupList:%@; >", NSStringFromClass([self class]), _groupList]; @@ -175,6 +250,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterGetGroupMembershipResponseParams alloc] init]; + + other.capacity = self.capacity; + other.groupList = self.groupList; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -194,6 +280,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterRemoveGroupParams alloc] init]; + + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; >", NSStringFromClass([self class]), _groupId]; @@ -214,6 +310,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterRemoveGroupResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -231,6 +338,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterRemoveAllGroupsParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -251,6 +367,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterAddGroupIfIdentifyingParams alloc] init]; + + other.groupId = self.groupId; + other.groupName = self.groupName; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -278,6 +405,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterAddSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.transitionTime = self.transitionTime; + other.sceneName = self.sceneName; + other.extensionFieldSets = self.extensionFieldSets; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -302,6 +443,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterAddSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; >", @@ -323,6 +476,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterViewSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -352,6 +516,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterViewSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.transitionTime = self.transitionTime; + other.sceneName = self.sceneName; + other.extensionFieldSets = self.extensionFieldSets; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -374,6 +553,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterRemoveSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -397,6 +587,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterRemoveSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; >", @@ -416,6 +618,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterRemoveAllScenesParams alloc] init]; + + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; >", NSStringFromClass([self class]), _groupId]; @@ -436,6 +648,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterRemoveAllScenesResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -457,6 +680,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterStoreSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -480,6 +714,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterStoreSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; >", @@ -503,6 +749,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterRecallSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.transitionTime = self.transitionTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; sceneId:%@; transitionTime:%@; >", @@ -522,6 +780,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; >", NSStringFromClass([self class]), _groupId]; @@ -546,6 +814,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterGetSceneMembershipResponseParams alloc] init]; + + other.status = self.status; + other.capacity = self.capacity; + other.groupId = self.groupId; + other.sceneList = self.sceneList; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; capacity:%@; groupId:%@; sceneList:%@; >", @@ -573,6 +854,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterEnhancedAddSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.transitionTime = self.transitionTime; + other.sceneName = self.sceneName; + other.extensionFieldSets = self.extensionFieldSets; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -597,6 +892,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterEnhancedAddSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; >", @@ -618,6 +925,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterEnhancedViewSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -647,6 +965,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterEnhancedViewSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.transitionTime = self.transitionTime; + other.sceneName = self.sceneName; + other.extensionFieldSets = self.extensionFieldSets; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -675,6 +1008,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterCopySceneParams alloc] init]; + + other.mode = self.mode; + other.groupIdFrom = self.groupIdFrom; + other.sceneIdFrom = self.sceneIdFrom; + other.groupIdTo = self.groupIdTo; + other.sceneIdTo = self.sceneIdTo; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -699,6 +1046,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterCopySceneResponseParams alloc] init]; + + other.status = self.status; + other.groupIdFrom = self.groupIdFrom; + other.sceneIdFrom = self.sceneIdFrom; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupIdFrom:%@; sceneIdFrom:%@; >", @@ -716,6 +1075,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROnOffClusterOffParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -732,6 +1100,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROnOffClusterOnParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -748,6 +1125,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROnOffClusterToggleParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -768,6 +1154,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROnOffClusterOffWithEffectParams alloc] init]; + + other.effectId = self.effectId; + other.effectVariant = self.effectVariant; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -785,6 +1182,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -807,6 +1213,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROnOffClusterOnWithTimedOffParams alloc] init]; + + other.onOffControl = self.onOffControl; + other.onTime = self.onTime; + other.offWaitTime = self.offWaitTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: onOffControl:%@; onTime:%@; offWaitTime:%@; >", @@ -824,19 +1242,32 @@ - (instancetype)init _transitionTime = @(0); - _optionMask = @(0); + _optionsMask = @(0); - _optionOverride = @(0); + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + + other.level = self.level; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: level:%@; transitionTime:%@; optionMask:%@; optionOverride:%@; >", - NSStringFromClass([self class]), _level, _transitionTime, _optionMask, _optionOverride]; + [NSString stringWithFormat:@"<%@: level:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _level, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } @@ -850,18 +1281,31 @@ - (instancetype)init _rate = @(0); - _optionMask = @(0); + _optionsMask = @(0); - _optionOverride = @(0); + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterMoveParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionMask:%@; optionOverride:%@; >", - NSStringFromClass([self class]), _moveMode, _rate, _optionMask, _optionOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; return descriptionString; } @@ -877,19 +1321,33 @@ - (instancetype)init _transitionTime = @(0); - _optionMask = @(0); + _optionsMask = @(0); - _optionOverride = @(0); + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterStepParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionMask:%@; optionOverride:%@; >", - NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionMask, _optionOverride]; + [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } @@ -899,18 +1357,29 @@ - (instancetype)init { if (self = [super init]) { - _optionMask = @(0); + _optionsMask = @(0); - _optionOverride = @(0); + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterStopParams alloc] init]; + + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionMask:%@; optionOverride:%@; >", - NSStringFromClass([self class]), _optionMask, _optionOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _optionsMask, _optionsOverride]; return descriptionString; } @@ -923,15 +1392,33 @@ - (instancetype)init _level = @(0); _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; + + other.level = self.level; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString - stringWithFormat:@"<%@: level:%@; transitionTime:%@; >", NSStringFromClass([self class]), _level, _transitionTime]; + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: level:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _level, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } @@ -944,15 +1431,32 @@ - (instancetype)init _moveMode = @(0); _rate = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; >", NSStringFromClass([self class]), _moveMode, _rate]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; return descriptionString; } @@ -967,15 +1471,34 @@ - (instancetype)init _stepSize = @(0); _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; >", - NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime]; + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } @@ -984,14 +1507,30 @@ @implementation MTRLevelControlClusterStopWithOnOffParams - (instancetype)init { if (self = [super init]) { + + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; + + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _optionsMask, _optionsOverride]; return descriptionString; } @@ -1007,6 +1546,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; + + other.frequency = self.frequency; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: frequency:%@; >", NSStringFromClass([self class]), _frequency]; @@ -1027,6 +1576,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterInstantActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1050,6 +1610,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterInstantActionWithTransitionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.transitionTime = self.transitionTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; transitionTime:%@; >", @@ -1071,6 +1643,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterStartActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1094,6 +1677,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterStartActionWithDurationParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", @@ -1115,6 +1710,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterStopActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1136,6 +1742,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterPauseActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1159,6 +1776,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterPauseActionWithDurationParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", @@ -1180,6 +1809,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterResumeActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1201,6 +1841,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterEnableActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1224,6 +1875,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterEnableActionWithDurationParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", @@ -1245,6 +1908,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterDisableActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1268,6 +1942,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterDisableActionWithDurationParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", @@ -1285,6 +1971,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBasicClusterMfgSpecificPingParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1317,6 +2012,23 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROtaSoftwareUpdateProviderClusterQueryImageParams alloc] init]; + + other.vendorId = self.vendorId; + other.productId = self.productId; + other.softwareVersion = self.softwareVersion; + other.protocolsSupported = self.protocolsSupported; + other.hardwareVersion = self.hardwareVersion; + other.location = self.location; + other.requestorCanConsent = self.requestorCanConsent; + other.metadataForProvider = self.metadataForProvider; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1353,6 +2065,23 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams alloc] init]; + + other.status = self.status; + other.delayedActionTime = self.delayedActionTime; + other.imageURI = self.imageURI; + other.softwareVersion = self.softwareVersion; + other.softwareVersionString = self.softwareVersionString; + other.updateToken = self.updateToken; + other.userConsentNeeded = self.userConsentNeeded; + other.metadataForRequestor = self.metadataForRequestor; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1378,6 +2107,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; + + other.updateToken = self.updateToken; + other.newVersion = self.newVersion; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1400,6 +2140,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams alloc] init]; + + other.action = self.action; + other.delayedActionTime = self.delayedActionTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -1421,6 +2172,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; + + other.updateToken = self.updateToken; + other.softwareVersion = self.softwareVersion; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1449,6 +2211,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; + + other.providerNodeId = self.providerNodeId; + other.vendorId = self.vendorId; + other.announcementReason = self.announcementReason; + other.metadataForNode = self.metadataForNode; + other.endpoint = self.endpoint; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -1472,6 +2248,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + + other.expiryLengthSeconds = self.expiryLengthSeconds; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: expiryLengthSeconds:%@; breadcrumb:%@; >", @@ -1493,6 +2280,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralCommissioningClusterArmFailSafeResponseParams alloc] init]; + + other.errorCode = self.errorCode; + other.debugText = self.debugText; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1516,6 +2314,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; + + other.newRegulatoryConfig = self.newRegulatoryConfig; + other.countryCode = self.countryCode; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: newRegulatoryConfig:%@; countryCode:%@; breadcrumb:%@; >", @@ -1537,6 +2347,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams alloc] init]; + + other.errorCode = self.errorCode; + other.debugText = self.debugText; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1554,6 +2375,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1574,6 +2404,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteResponseParams alloc] init]; + + other.errorCode = self.errorCode; + other.debugText = self.debugText; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1595,6 +2436,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; + + other.ssid = self.ssid; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: ssid:%@; breadcrumb:%@; >", NSStringFromClass([self class]), @@ -1620,6 +2472,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterScanNetworksResponseParams alloc] init]; + + other.networkingStatus = self.networkingStatus; + other.debugText = self.debugText; + other.wiFiScanResults = self.wiFiScanResults; + other.threadScanResults = self.threadScanResults; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1644,6 +2509,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; + + other.ssid = self.ssid; + other.credentials = self.credentials; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1666,6 +2543,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; + + other.operationalDataset = self.operationalDataset; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1688,6 +2576,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; + + other.networkID = self.networkID; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1712,6 +2611,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterNetworkConfigResponseParams alloc] init]; + + other.networkingStatus = self.networkingStatus; + other.debugText = self.debugText; + other.networkIndex = self.networkIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; networkIndex:%@; >", @@ -1733,6 +2644,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; + + other.networkID = self.networkID; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1757,6 +2679,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterConnectNetworkResponseParams alloc] init]; + + other.networkingStatus = self.networkingStatus; + other.debugText = self.debugText; + other.errorValue = self.errorValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; errorValue:%@; >", @@ -1780,6 +2714,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; + + other.networkID = self.networkID; + other.networkIndex = self.networkIndex; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1804,6 +2750,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; + + other.intent = self.intent; + other.requestedProtocol = self.requestedProtocol; + other.transferFileDesignator = self.transferFileDesignator; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: intent:%@; requestedProtocol:%@; transferFileDesignator:%@; >", @@ -1830,6 +2788,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDiagnosticLogsClusterRetrieveLogsResponseParams alloc] init]; + + other.status = self.status; + other.content = self.content; + other.timeStamp = self.timeStamp; + other.timeSinceBoot = self.timeSinceBoot; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; content:%@; timeStamp:%@; timeSinceBoot:%@; >", @@ -1852,6 +2823,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + + other.enableKey = self.enableKey; + other.eventTrigger = self.eventTrigger; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1870,6 +2852,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1886,6 +2877,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1902,6 +2902,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1918,6 +2927,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1944,6 +2962,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + + other.commissioningTimeout = self.commissioningTimeout; + other.pakeVerifier = self.pakeVerifier; + other.discriminator = self.discriminator; + other.iterations = self.iterations; + other.salt = self.salt; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1965,6 +2997,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + + other.commissioningTimeout = self.commissioningTimeout; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1982,6 +3024,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -2000,6 +3051,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; + + other.attestationNonce = self.attestationNonce; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: attestationNonce:%@; >", NSStringFromClass([self class]), @@ -2021,6 +3082,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterAttestationResponseParams alloc] init]; + + other.attestationElements = self.attestationElements; + other.signature = self.signature; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2041,6 +3113,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; + + other.certificateType = self.certificateType; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2060,6 +3142,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterCertificateChainResponseParams alloc] init]; + + other.certificate = self.certificate; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: certificate:%@; >", NSStringFromClass([self class]), @@ -2081,6 +3173,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; + + other.csrNonce = self.csrNonce; + other.isForUpdateNOC = self.isForUpdateNOC; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2103,6 +3206,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterCSRResponseParams alloc] init]; + + other.nocsrElements = self.nocsrElements; + other.attestationSignature = self.attestationSignature; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2131,6 +3245,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; + + other.nocValue = self.nocValue; + other.icacValue = self.icacValue; + other.ipkValue = self.ipkValue; + other.caseAdminSubject = self.caseAdminSubject; + other.adminVendorId = self.adminVendorId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2155,6 +3283,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; + + other.nocValue = self.nocValue; + other.icacValue = self.icacValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2179,6 +3318,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterNOCResponseParams alloc] init]; + + other.statusCode = self.statusCode; + other.fabricIndex = self.fabricIndex; + other.debugText = self.debugText; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: statusCode:%@; fabricIndex:%@; debugText:%@; >", @@ -2198,6 +3349,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; + + other.label = self.label; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; >", NSStringFromClass([self class]), _label]; @@ -2216,6 +3377,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + + other.fabricIndex = self.fabricIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2235,6 +3406,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; + + other.rootCertificate = self.rootCertificate; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: rootCertificate:%@; >", NSStringFromClass([self class]), @@ -2254,6 +3435,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + + other.groupKeySet = self.groupKeySet; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2273,6 +3464,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + + other.groupKeySetID = self.groupKeySetID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2292,6 +3493,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupKeyManagementClusterKeySetReadResponseParams alloc] init]; + + other.groupKeySet = self.groupKeySet; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2311,6 +3522,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + + other.groupKeySetID = self.groupKeySetID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2330,6 +3551,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; + + other.groupKeySetIDs = self.groupKeySetIDs; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2349,6 +3580,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams alloc] init]; + + other.groupKeySetIDs = self.groupKeySetIDs; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2368,6 +3609,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRModeSelectClusterChangeToModeParams alloc] init]; + + other.newMode = self.newMode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; @@ -2386,6 +3637,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterLockDoorParams alloc] init]; + + other.pinCode = self.pinCode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2405,6 +3666,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; + + other.pinCode = self.pinCode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2426,6 +3697,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; + + other.timeout = self.timeout; + other.pinCode = self.pinCode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeout:%@; pinCode:%@; >", NSStringFromClass([self class]), @@ -2457,6 +3739,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; + + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; + other.daysMask = self.daysMask; + other.startHour = self.startHour; + other.startMinute = self.startMinute; + other.endHour = self.endHour; + other.endMinute = self.endMinute; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2480,6 +3778,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2513,6 +3822,23 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetWeekDayScheduleResponseParams alloc] init]; + + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; + other.status = self.status; + other.daysMask = self.daysMask; + other.startHour = self.startHour; + other.startMinute = self.startMinute; + other.endHour = self.endHour; + other.endMinute = self.endMinute; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; status:%@; daysMask:%@; " @@ -2536,6 +3862,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; + + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2561,6 +3898,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + + other.yearDayIndex = self.yearDayIndex; + other.userIndex = self.userIndex; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2583,6 +3933,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + + other.yearDayIndex = self.yearDayIndex; + other.userIndex = self.userIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2610,6 +3971,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetYearDayScheduleResponseParams alloc] init]; + + other.yearDayIndex = self.yearDayIndex; + other.userIndex = self.userIndex; + other.status = self.status; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2632,6 +4007,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + + other.yearDayIndex = self.yearDayIndex; + other.userIndex = self.userIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2657,6 +4043,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; + + other.holidayIndex = self.holidayIndex; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; + other.operatingMode = self.operatingMode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2677,6 +4076,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; + + other.holidayIndex = self.holidayIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2704,6 +4113,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetHolidayScheduleResponseParams alloc] init]; + + other.holidayIndex = self.holidayIndex; + other.status = self.status; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; + other.operatingMode = self.operatingMode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2724,6 +4147,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; + + other.holidayIndex = self.holidayIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2755,6 +4188,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterSetUserParams alloc] init]; + + other.operationType = self.operationType; + other.userIndex = self.userIndex; + other.userName = self.userName; + other.userUniqueId = self.userUniqueId; + other.userStatus = self.userStatus; + other.userType = self.userType; + other.credentialRule = self.credentialRule; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2777,6 +4226,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetUserParams alloc] init]; + + other.userIndex = self.userIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; >", NSStringFromClass([self class]), _userIndex]; @@ -2813,6 +4272,25 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetUserResponseParams alloc] init]; + + other.userIndex = self.userIndex; + other.userName = self.userName; + other.userUniqueId = self.userUniqueId; + other.userStatus = self.userStatus; + other.userType = self.userType; + other.credentialRule = self.credentialRule; + other.credentials = self.credentials; + other.creatorFabricIndex = self.creatorFabricIndex; + other.lastModifiedFabricIndex = self.lastModifiedFabricIndex; + other.nextUserIndex = self.nextUserIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2835,6 +4313,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterClearUserParams alloc] init]; + + other.userIndex = self.userIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; >", NSStringFromClass([self class]), _userIndex]; @@ -2863,6 +4351,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + + other.operationType = self.operationType; + other.credential = self.credential; + other.credentialData = self.credentialData; + other.userIndex = self.userIndex; + other.userStatus = self.userStatus; + other.userType = self.userType; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2888,6 +4391,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterSetCredentialResponseParams alloc] init]; + + other.status = self.status; + other.userIndex = self.userIndex; + other.nextCredentialIndex = self.nextCredentialIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; userIndex:%@; nextCredentialIndex:%@; >", @@ -2907,6 +4422,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + + other.credential = self.credential; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2934,6 +4459,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetCredentialStatusResponseParams alloc] init]; + + other.credentialExists = self.credentialExists; + other.userIndex = self.userIndex; + other.creatorFabricIndex = self.creatorFabricIndex; + other.lastModifiedFabricIndex = self.lastModifiedFabricIndex; + other.nextCredentialIndex = self.nextCredentialIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2956,6 +4495,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + + other.credential = self.credential; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2973,6 +4522,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -2989,6 +4547,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3005,6 +4572,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3023,6 +4599,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; + + other.liftValue = self.liftValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: liftValue:%@; >", NSStringFromClass([self class]), _liftValue]; @@ -3041,6 +4627,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + + other.liftPercent100thsValue = self.liftPercent100thsValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3060,6 +4656,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; + + other.tiltValue = self.tiltValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: tiltValue:%@; >", NSStringFromClass([self class]), _tiltValue]; @@ -3078,6 +4684,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + + other.tiltPercent100thsValue = self.tiltPercent100thsValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3097,6 +4713,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; + + other.percentOpen = self.percentOpen; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3114,6 +4740,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3134,6 +4769,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; + + other.mode = self.mode; + other.amount = self.amount; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3159,6 +4805,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRThermostatClusterGetWeeklyScheduleResponseParams alloc] init]; + + other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; + other.dayOfWeekForSequence = self.dayOfWeekForSequence; + other.modeForSequence = self.modeForSequence; + other.transitions = self.transitions; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -3185,6 +4844,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; + + other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; + other.dayOfWeekForSequence = self.dayOfWeekForSequence; + other.modeForSequence = self.modeForSequence; + other.transitions = self.transitions; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -3207,6 +4879,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; + + other.daysToReturn = self.daysToReturn; + other.modeToReturn = self.modeToReturn; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: daysToReturn:%@; modeToReturn:%@; >", @@ -3224,6 +4907,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3250,6 +4942,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveToHueParams alloc] init]; + + other.hue = self.hue; + other.direction = self.direction; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3276,6 +4982,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveHueParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", @@ -3303,6 +5022,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterStepHueParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3329,6 +5062,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + + other.saturation = self.saturation; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3355,6 +5101,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", @@ -3382,6 +5141,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterStepSaturationParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3410,6 +5183,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; + + other.hue = self.hue; + other.saturation = self.saturation; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3438,6 +5225,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveToColorParams alloc] init]; + + other.colorX = self.colorX; + other.colorY = self.colorY; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3464,6 +5265,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveColorParams alloc] init]; + + other.rateX = self.rateX; + other.rateY = self.rateY; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: rateX:%@; rateY:%@; optionsMask:%@; optionsOverride:%@; >", @@ -3491,6 +5305,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterStepColorParams alloc] init]; + + other.stepX = self.stepX; + other.stepY = self.stepY; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3517,6 +5345,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; + + other.colorTemperature = self.colorTemperature; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3545,6 +5386,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; + + other.enhancedHue = self.enhancedHue; + other.direction = self.direction; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3571,6 +5426,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", @@ -3598,6 +5466,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3626,6 +5508,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; + + other.enhancedHue = self.enhancedHue; + other.saturation = self.saturation; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3658,6 +5554,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterColorLoopSetParams alloc] init]; + + other.updateFlags = self.updateFlags; + other.action = self.action; + other.direction = self.direction; + other.time = self.time; + other.startHue = self.startHue; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -3681,6 +5593,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", @@ -3710,6 +5633,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.colorTemperatureMinimumMireds = self.colorTemperatureMinimumMireds; + other.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3744,6 +5682,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.colorTemperatureMinimumMireds = self.colorTemperatureMinimumMireds; + other.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3766,6 +5720,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRChannelClusterChangeChannelParams alloc] init]; + + other.match = self.match; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: match:%@; >", NSStringFromClass([self class]), _match]; @@ -3786,6 +5750,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRChannelClusterChangeChannelResponseParams alloc] init]; + + other.status = self.status; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3807,6 +5782,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; + + other.majorNumber = self.majorNumber; + other.minorNumber = self.minorNumber; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -3826,6 +5812,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRChannelClusterSkipChannelParams alloc] init]; + + other.count = self.count; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: count:%@; >", NSStringFromClass([self class]), _count]; @@ -3846,6 +5842,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; + + other.target = self.target; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3867,6 +5874,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTargetNavigatorClusterNavigateTargetResponseParams alloc] init]; + + other.status = self.status; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3884,6 +5902,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterPlayParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3900,6 +5927,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterPauseParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3916,6 +5952,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterStopPlaybackParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3932,6 +5977,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3948,6 +6002,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3964,6 +6027,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterNextParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3980,6 +6052,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterRewindParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3996,6 +6077,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4014,6 +6104,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; + + other.deltaPositionMilliseconds = self.deltaPositionMilliseconds; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -4033,6 +6133,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; + + other.deltaPositionMilliseconds = self.deltaPositionMilliseconds; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -4054,6 +6164,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterPlaybackResponseParams alloc] init]; + + other.status = self.status; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4073,6 +6194,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterSeekParams alloc] init]; + + other.position = self.position; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: position:%@; >", NSStringFromClass([self class]), _position]; @@ -4091,6 +6222,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaInputClusterSelectInputParams alloc] init]; + + other.index = self.index; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; >", NSStringFromClass([self class]), _index]; @@ -4107,6 +6248,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4123,6 +6273,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4143,6 +6302,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaInputClusterRenameInputParams alloc] init]; + + other.index = self.index; + other.name = self.name; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4160,6 +6330,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLowPowerClusterSleepParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4178,6 +6357,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + + other.keyCode = self.keyCode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: keyCode:%@; >", NSStringFromClass([self class]), _keyCode]; @@ -4196,6 +6385,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRKeypadInputClusterSendKeyResponseParams alloc] init]; + + other.status = self.status; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; >", NSStringFromClass([self class]), _status]; @@ -4218,6 +6417,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; + + other.search = self.search; + other.autoPlay = self.autoPlay; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -4241,6 +6452,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; + + other.contentURL = self.contentURL; + other.displayString = self.displayString; + other.brandingInformation = self.brandingInformation; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: contentURL:%@; displayString:%@; brandingInformation:%@; >", @@ -4262,6 +6485,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRContentLauncherClusterLaunchResponseParams alloc] init]; + + other.status = self.status; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4281,6 +6515,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; + + other.index = self.index; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; >", NSStringFromClass([self class]), _index]; @@ -4301,6 +6545,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; + + other.index = self.index; + other.name = self.name; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4322,6 +6577,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; + + other.application = self.application; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: application:%@; data:%@; >", NSStringFromClass([self class]), @@ -4341,6 +6607,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; + + other.application = self.application; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4360,6 +6636,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; + + other.application = self.application; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4381,6 +6667,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRApplicationLauncherClusterLauncherResponseParams alloc] init]; + + other.status = self.status; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; data:%@; >", NSStringFromClass([self class]), @@ -4400,6 +6697,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; + + other.tempAccountIdentifier = self.tempAccountIdentifier; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4419,6 +6726,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAccountLoginClusterGetSetupPINResponseParams alloc] init]; + + other.setupPIN = self.setupPIN; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: setupPIN:%@; >", NSStringFromClass([self class]), _setupPIN]; @@ -4439,6 +6756,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAccountLoginClusterLoginParams alloc] init]; + + other.tempAccountIdentifier = self.tempAccountIdentifier; + other.setupPIN = self.setupPIN; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: tempAccountIdentifier:%@; setupPIN:%@; >", @@ -4456,6 +6784,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAccountLoginClusterLogoutParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4480,6 +6817,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams alloc] init]; + + other.profileCount = self.profileCount; + other.profileIntervalPeriod = self.profileIntervalPeriod; + other.maxNumberOfIntervals = self.maxNumberOfIntervals; + other.listOfAttributes = self.listOfAttributes; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -4498,6 +6848,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4526,6 +6885,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams alloc] init]; + + other.startTime = self.startTime; + other.status = self.status; + other.profileIntervalPeriod = self.profileIntervalPeriod; + other.numberOfIntervalsDelivered = self.numberOfIntervalsDelivered; + other.attributeId = self.attributeId; + other.intervals = self.intervals; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: startTime:%@; status:%@; profileIntervalPeriod:%@; " @@ -4551,6 +6925,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams alloc] init]; + + other.attributeId = self.attributeId; + other.startTime = self.startTime; + other.numberOfIntervals = self.numberOfIntervals; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: attributeId:%@; startTime:%@; numberOfIntervals:%@; >", @@ -4568,6 +6954,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4586,6 +6981,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestSpecificResponseParams alloc] init]; + + other.returnValue = self.returnValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4603,6 +7008,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestNotHandledParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4621,6 +7035,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestAddArgumentsResponseParams alloc] init]; + + other.returnValue = self.returnValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4638,6 +7062,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestSpecificParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4656,6 +7089,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestSimpleArgumentResponseParams alloc] init]; + + other.returnValue = self.returnValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4673,6 +7116,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestUnknownCommandParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4701,6 +7153,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestStructArrayArgumentResponseParams alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.arg3 = self.arg3; + other.arg4 = self.arg4; + other.arg5 = self.arg5; + other.arg6 = self.arg6; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; arg2:%@; arg3:%@; arg4:%@; arg5:%@; arg6:%@; >", @@ -4722,6 +7189,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4741,6 +7219,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestListInt8UReverseResponseParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -4759,6 +7247,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestSimpleArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -4779,6 +7277,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestEnumsResponseParams alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4808,6 +7317,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestStructArrayArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.arg3 = self.arg3; + other.arg4 = self.arg4; + other.arg5 = self.arg5; + other.arg6 = self.arg6; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; arg2:%@; arg3:%@; arg4:%@; arg5:%@; arg6:%@; >", @@ -4833,6 +7357,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestNullableOptionalResponseParams alloc] init]; + + other.wasPresent = self.wasPresent; + other.wasNull = self.wasNull; + other.value = self.value; + other.originalValue = self.originalValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: wasPresent:%@; wasNull:%@; value:%@; originalValue:%@; >", @@ -4852,6 +7389,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestStructArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -4924,6 +7471,43 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestComplexNullableOptionalResponseParams alloc] init]; + + other.nullableIntWasNull = self.nullableIntWasNull; + other.nullableIntValue = self.nullableIntValue; + other.optionalIntWasPresent = self.optionalIntWasPresent; + other.optionalIntValue = self.optionalIntValue; + other.nullableOptionalIntWasPresent = self.nullableOptionalIntWasPresent; + other.nullableOptionalIntWasNull = self.nullableOptionalIntWasNull; + other.nullableOptionalIntValue = self.nullableOptionalIntValue; + other.nullableStringWasNull = self.nullableStringWasNull; + other.nullableStringValue = self.nullableStringValue; + other.optionalStringWasPresent = self.optionalStringWasPresent; + other.optionalStringValue = self.optionalStringValue; + other.nullableOptionalStringWasPresent = self.nullableOptionalStringWasPresent; + other.nullableOptionalStringWasNull = self.nullableOptionalStringWasNull; + other.nullableOptionalStringValue = self.nullableOptionalStringValue; + other.nullableStructWasNull = self.nullableStructWasNull; + other.nullableStructValue = self.nullableStructValue; + other.optionalStructWasPresent = self.optionalStructWasPresent; + other.optionalStructValue = self.optionalStructValue; + other.nullableOptionalStructWasPresent = self.nullableOptionalStructWasPresent; + other.nullableOptionalStructWasNull = self.nullableOptionalStructWasNull; + other.nullableOptionalStructValue = self.nullableOptionalStructValue; + other.nullableListWasNull = self.nullableListWasNull; + other.nullableListValue = self.nullableListValue; + other.optionalListWasPresent = self.optionalListWasPresent; + other.optionalListValue = self.optionalListValue; + other.nullableOptionalListWasPresent = self.nullableOptionalListWasPresent; + other.nullableOptionalListWasNull = self.nullableOptionalListWasNull; + other.nullableOptionalListValue = self.nullableOptionalListValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -4957,6 +7541,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestNestedStructArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -4975,6 +7569,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterBooleanResponseParams alloc] init]; + + other.value = self.value; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: value:%@; >", NSStringFromClass([self class]), _value]; @@ -4993,6 +7597,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestListStructArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5011,6 +7625,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterSimpleStructResponseParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5029,6 +7653,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestListInt8UArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5047,6 +7681,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestEmitTestEventResponseParams alloc] init]; + + other.value = self.value; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: value:%@; >", NSStringFromClass([self class]), _value]; @@ -5065,6 +7709,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5083,6 +7737,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams alloc] init]; + + other.value = self.value; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: value:%@; >", NSStringFromClass([self class]), _value]; @@ -5101,6 +7765,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5119,6 +7793,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestListInt8UReverseRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5139,6 +7823,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestEnumsRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -5158,6 +7853,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5198,6 +7903,27 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestComplexNullableOptionalRequestParams alloc] init]; + + other.nullableInt = self.nullableInt; + other.optionalInt = self.optionalInt; + other.nullableOptionalInt = self.nullableOptionalInt; + other.nullableString = self.nullableString; + other.optionalString = self.optionalString; + other.nullableOptionalString = self.nullableOptionalString; + other.nullableStruct = self.nullableStruct; + other.optionalStruct = self.optionalStruct; + other.nullableOptionalStruct = self.nullableOptionalStruct; + other.nullableList = self.nullableList; + other.optionalList = self.optionalList; + other.nullableOptionalList = self.nullableOptionalList; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -5222,6 +7948,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterSimpleStructEchoRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5238,6 +7974,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTimedInvokeRequestParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -5256,6 +8001,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5278,6 +8033,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestEmitTestEventRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.arg3 = self.arg3; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -5297,6 +8064,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 4fd720ab45c0d1..98dfb99f3a189f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -235,8 +235,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } while (0); do { NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedChar:cppValue.adminFabricIndex]; - value.adminFabricIndex = memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.fabricIndex]; + value.fabricIndex = memberValue; } while (0); return value; @@ -289,8 +289,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } while (0); do { NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedChar:cppValue.adminFabricIndex]; - value.adminFabricIndex = memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.fabricIndex]; + value.fabricIndex = memberValue; } while (0); return value; @@ -416,6 +416,12 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead MTRBasicClusterLeaveEvent * value = [MTRBasicClusterLeaveEvent new]; + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.fabricIndex]; + value.fabricIndex = memberValue; + } while (0); + return value; } @@ -2173,8 +2179,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead do { NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedChar:cppValue.arg1]; - value.arg1 = memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.fabricIndex]; + value.fabricIndex = memberValue; } while (0); return value; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index a5d12d54ddb15b..695ef2f46b6a6e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -21,776 +21,1002 @@ NS_ASSUME_NONNULL_BEGIN -@interface MTRScenesClusterAttributeValuePair : NSObject -@property (strong, nonatomic) NSNumber * _Nullable attributeId; -@property (strong, nonatomic) NSArray * _Nonnull attributeValue; -- (instancetype)init; +@interface MTRScenesClusterAttributeValuePair : NSObject +@property (nonatomic, copy) NSNumber * _Nullable attributeId; +@property (nonatomic, copy) NSArray * _Nonnull attributeValue; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterExtensionFieldSet : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull clusterId; -@property (strong, nonatomic) NSArray * _Nonnull attributeValueList; -- (instancetype)init; +@interface MTRScenesClusterExtensionFieldSet : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull clusterId; +@property (nonatomic, copy) NSArray * _Nonnull attributeValueList; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDescriptorClusterDeviceType : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull type; -@property (strong, nonatomic) NSNumber * _Nonnull revision; -- (instancetype)init; +@interface MTRDescriptorClusterDeviceType : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull type; +@property (nonatomic, copy) NSNumber * _Nonnull revision; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBindingClusterTargetStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nullable node; -@property (strong, nonatomic) NSNumber * _Nullable group; -@property (strong, nonatomic) NSNumber * _Nullable endpoint; -@property (strong, nonatomic) NSNumber * _Nullable cluster; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRBindingClusterTargetStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nullable node; +@property (nonatomic, copy) NSNumber * _Nullable group; +@property (nonatomic, copy) NSNumber * _Nullable endpoint; +@property (nonatomic, copy) NSNumber * _Nullable cluster; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccessControlClusterTarget : NSObject -@property (strong, nonatomic) NSNumber * _Nullable cluster; -@property (strong, nonatomic) NSNumber * _Nullable endpoint; -@property (strong, nonatomic) NSNumber * _Nullable deviceType; -- (instancetype)init; +@interface MTRAccessControlClusterTarget : NSObject +@property (nonatomic, copy) NSNumber * _Nullable cluster; +@property (nonatomic, copy) NSNumber * _Nullable endpoint; +@property (nonatomic, copy) NSNumber * _Nullable deviceType; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccessControlClusterAccessControlEntry : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull privilege; -@property (strong, nonatomic) NSNumber * _Nonnull authMode; -@property (strong, nonatomic) NSArray * _Nullable subjects; -@property (strong, nonatomic) NSArray * _Nullable targets; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRAccessControlClusterAccessControlEntry : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull privilege; +@property (nonatomic, copy) NSNumber * _Nonnull authMode; +@property (nonatomic, copy) NSArray * _Nullable subjects; +@property (nonatomic, copy) NSArray * _Nullable targets; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccessControlClusterExtensionEntry : NSObject -@property (strong, nonatomic) NSData * _Nonnull data; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRAccessControlClusterExtensionEntry : NSObject +@property (nonatomic, copy) NSData * _Nonnull data; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccessControlClusterAccessControlEntryChangedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nullable adminNodeID; -@property (strong, nonatomic) NSNumber * _Nullable adminPasscodeID; -@property (strong, nonatomic) NSNumber * _Nonnull changeType; -@property (strong, nonatomic) MTRAccessControlClusterAccessControlEntry * _Nullable latestValue; -@property (strong, nonatomic) NSNumber * _Nonnull adminFabricIndex; -@end +@interface MTRAccessControlClusterAccessControlEntryChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nullable adminNodeID; +@property (nonatomic, copy) NSNumber * _Nullable adminPasscodeID; +@property (nonatomic, copy) NSNumber * _Nonnull changeType; +@property (nonatomic, copy) MTRAccessControlClusterAccessControlEntry * _Nullable latestValue; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; -@interface MTRAccessControlClusterAccessControlExtensionChangedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nullable adminNodeID; -@property (strong, nonatomic) NSNumber * _Nullable adminPasscodeID; -@property (strong, nonatomic) NSNumber * _Nonnull changeType; -@property (strong, nonatomic) MTRAccessControlClusterExtensionEntry * _Nullable latestValue; -@property (strong, nonatomic) NSNumber * _Nonnull adminFabricIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterActionStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSString * _Nonnull name; -@property (strong, nonatomic) NSNumber * _Nonnull type; -@property (strong, nonatomic) NSNumber * _Nonnull endpointListID; -@property (strong, nonatomic) NSNumber * _Nonnull supportedCommands; -@property (strong, nonatomic) NSNumber * _Nonnull status; -- (instancetype)init; +@interface MTRAccessControlClusterAccessControlExtensionChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nullable adminNodeID; +@property (nonatomic, copy) NSNumber * _Nullable adminPasscodeID; +@property (nonatomic, copy) NSNumber * _Nonnull changeType; +@property (nonatomic, copy) MTRAccessControlClusterExtensionEntry * _Nullable latestValue; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterEndpointListStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull endpointListID; -@property (strong, nonatomic) NSString * _Nonnull name; -@property (strong, nonatomic) NSNumber * _Nonnull type; -@property (strong, nonatomic) NSArray * _Nonnull endpoints; -- (instancetype)init; +@interface MTRBridgedActionsClusterActionStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSString * _Nonnull name; +@property (nonatomic, copy) NSNumber * _Nonnull type; +@property (nonatomic, copy) NSNumber * _Nonnull endpointListID; +@property (nonatomic, copy) NSNumber * _Nonnull supportedCommands; +@property (nonatomic, copy) NSNumber * _Nonnull status; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterStateChangedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nonnull invokeID; -@property (strong, nonatomic, getter=getNewState) NSNumber * _Nonnull newState; -@end +@interface MTRBridgedActionsClusterEndpointListStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull endpointListID; +@property (nonatomic, copy) NSString * _Nonnull name; +@property (nonatomic, copy) NSNumber * _Nonnull type; +@property (nonatomic, copy) NSArray * _Nonnull endpoints; -@interface MTRBridgedActionsClusterActionFailedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nonnull invokeID; -@property (strong, nonatomic, getter=getNewState) NSNumber * _Nonnull newState; -@property (strong, nonatomic) NSNumber * _Nonnull error; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBasicClusterCapabilityMinimaStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull caseSessionsPerFabric; -@property (strong, nonatomic) NSNumber * _Nonnull subscriptionsPerFabric; -- (instancetype)init; +@interface MTRBridgedActionsClusterStateChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull invokeID; +@property (nonatomic, copy, getter=getNewState) NSNumber * _Nonnull newState; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBasicClusterStartUpEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull softwareVersion; -@end +@interface MTRBridgedActionsClusterActionFailedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull invokeID; +@property (nonatomic, copy, getter=getNewState) NSNumber * _Nonnull newState; +@property (nonatomic, copy) NSNumber * _Nonnull error; -@interface MTRBasicClusterShutDownEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBasicClusterLeaveEvent : NSObject -@end +@interface MTRBasicClusterCapabilityMinimaStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull caseSessionsPerFabric; +@property (nonatomic, copy) NSNumber * _Nonnull subscriptionsPerFabric; -@interface MTRBasicClusterReachableChangedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull reachableNewValue; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateRequestorClusterProviderLocation : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull providerNodeID; -@property (strong, nonatomic) NSNumber * _Nonnull endpoint; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRBasicClusterStartUpEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull previousState; -@property (strong, nonatomic, getter=getNewState) NSNumber * _Nonnull newState; -@property (strong, nonatomic) NSNumber * _Nonnull reason; -@property (strong, nonatomic) NSNumber * _Nullable targetSoftwareVersion; -@end +@interface MTRBasicClusterShutDownEvent : NSObject -@interface MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull softwareVersion; -@property (strong, nonatomic) NSNumber * _Nonnull productID; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull softwareVersion; -@property (strong, nonatomic) NSNumber * _Nonnull bytesDownloaded; -@property (strong, nonatomic) NSNumber * _Nullable progressPercent; -@property (strong, nonatomic) NSNumber * _Nullable platformCode; -@end +@interface MTRBasicClusterLeaveEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; -@interface MTRPowerSourceClusterBatChargeFaultChangeType : NSObject -@property (strong, nonatomic) NSArray * _Nonnull current; -@property (strong, nonatomic) NSArray * _Nonnull previous; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPowerSourceClusterBatFaultChangeType : NSObject -@property (strong, nonatomic) NSArray * _Nonnull current; -@property (strong, nonatomic) NSArray * _Nonnull previous; -- (instancetype)init; +@interface MTRBasicClusterReachableChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull reachableNewValue; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPowerSourceClusterWiredFaultChangeType : NSObject -@property (strong, nonatomic) NSArray * _Nonnull current; -@property (strong, nonatomic) NSArray * _Nonnull previous; -- (instancetype)init; +@interface MTROtaSoftwareUpdateRequestorClusterProviderLocation : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull providerNodeID; +@property (nonatomic, copy) NSNumber * _Nonnull endpoint; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterBasicCommissioningInfo : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull failSafeExpiryLengthSeconds; -@property (strong, nonatomic) NSNumber * _Nonnull maxCumulativeFailsafeSeconds; -- (instancetype)init; +@interface MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull previousState; +@property (nonatomic, copy, getter=getNewState) NSNumber * _Nonnull newState; +@property (nonatomic, copy) NSNumber * _Nonnull reason; +@property (nonatomic, copy) NSNumber * _Nullable targetSoftwareVersion; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterNetworkInfo : NSObject -@property (strong, nonatomic) NSData * _Nonnull networkID; -@property (strong, nonatomic) NSNumber * _Nonnull connected; -- (instancetype)init; +@interface MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; +@property (nonatomic, copy) NSNumber * _Nonnull productID; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterThreadInterfaceScanResult : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull panId; -@property (strong, nonatomic) NSNumber * _Nonnull extendedPanId; -@property (strong, nonatomic) NSString * _Nonnull networkName; -@property (strong, nonatomic) NSNumber * _Nonnull channel; -@property (strong, nonatomic) NSNumber * _Nonnull version; -@property (strong, nonatomic) NSData * _Nonnull extendedAddress; -@property (strong, nonatomic) NSNumber * _Nonnull rssi; -@property (strong, nonatomic) NSNumber * _Nonnull lqi; -- (instancetype)init; +@interface MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; +@property (nonatomic, copy) NSNumber * _Nonnull bytesDownloaded; +@property (nonatomic, copy) NSNumber * _Nullable progressPercent; +@property (nonatomic, copy) NSNumber * _Nullable platformCode; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterWiFiInterfaceScanResult : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull security; -@property (strong, nonatomic) NSData * _Nonnull ssid; -@property (strong, nonatomic) NSData * _Nonnull bssid; -@property (strong, nonatomic) NSNumber * _Nonnull channel; -@property (strong, nonatomic) NSNumber * _Nonnull wiFiBand; -@property (strong, nonatomic) NSNumber * _Nonnull rssi; -- (instancetype)init; +@interface MTRPowerSourceClusterBatChargeFaultChangeType : NSObject +@property (nonatomic, copy) NSArray * _Nonnull current; +@property (nonatomic, copy) NSArray * _Nonnull previous; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralDiagnosticsClusterNetworkInterfaceType : NSObject -@property (strong, nonatomic) NSString * _Nonnull name; -@property (strong, nonatomic) NSNumber * _Nonnull isOperational; -@property (strong, nonatomic) NSNumber * _Nullable offPremiseServicesReachableIPv4; -@property (strong, nonatomic) NSNumber * _Nullable offPremiseServicesReachableIPv6; -@property (strong, nonatomic) NSData * _Nonnull hardwareAddress; -@property (strong, nonatomic) NSArray * _Nonnull iPv4Addresses; -@property (strong, nonatomic) NSArray * _Nonnull iPv6Addresses; -@property (strong, nonatomic) NSNumber * _Nonnull type; -- (instancetype)init; +@interface MTRPowerSourceClusterBatFaultChangeType : NSObject +@property (nonatomic, copy) NSArray * _Nonnull current; +@property (nonatomic, copy) NSArray * _Nonnull previous; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent : NSObject -@property (strong, nonatomic) NSArray * _Nonnull current; -@property (strong, nonatomic) NSArray * _Nonnull previous; -@end +@interface MTRPowerSourceClusterWiredFaultChangeType : NSObject +@property (nonatomic, copy) NSArray * _Nonnull current; +@property (nonatomic, copy) NSArray * _Nonnull previous; -@interface MTRGeneralDiagnosticsClusterRadioFaultChangeEvent : NSObject -@property (strong, nonatomic) NSArray * _Nonnull current; -@property (strong, nonatomic) NSArray * _Nonnull previous; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent : NSObject -@property (strong, nonatomic) NSArray * _Nonnull current; -@property (strong, nonatomic) NSArray * _Nonnull previous; -@end +@interface MTRGeneralCommissioningClusterBasicCommissioningInfo : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull failSafeExpiryLengthSeconds; +@property (nonatomic, copy) NSNumber * _Nonnull maxCumulativeFailsafeSeconds; -@interface MTRGeneralDiagnosticsClusterBootReasonEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull bootReason; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSoftwareDiagnosticsClusterThreadMetrics : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull id; -@property (strong, nonatomic) NSString * _Nullable name; -@property (strong, nonatomic) NSNumber * _Nullable stackFreeCurrent; -@property (strong, nonatomic) NSNumber * _Nullable stackFreeMinimum; -@property (strong, nonatomic) NSNumber * _Nullable stackSize; -- (instancetype)init; +@interface MTRNetworkCommissioningClusterNetworkInfo : NSObject +@property (nonatomic, copy) NSData * _Nonnull networkID; +@property (nonatomic, copy) NSNumber * _Nonnull connected; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSoftwareDiagnosticsClusterSoftwareFaultEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull id; -@property (strong, nonatomic) NSString * _Nullable name; -@property (strong, nonatomic) NSData * _Nullable faultRecording; -@end +@interface MTRNetworkCommissioningClusterThreadInterfaceScanResult : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull panId; +@property (nonatomic, copy) NSNumber * _Nonnull extendedPanId; +@property (nonatomic, copy) NSString * _Nonnull networkName; +@property (nonatomic, copy) NSNumber * _Nonnull channel; +@property (nonatomic, copy) NSNumber * _Nonnull version; +@property (nonatomic, copy) NSData * _Nonnull extendedAddress; +@property (nonatomic, copy) NSNumber * _Nonnull rssi; +@property (nonatomic, copy) NSNumber * _Nonnull lqi; -@interface MTRThreadNetworkDiagnosticsClusterNeighborTable : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull extAddress; -@property (strong, nonatomic) NSNumber * _Nonnull age; -@property (strong, nonatomic) NSNumber * _Nonnull rloc16; -@property (strong, nonatomic) NSNumber * _Nonnull linkFrameCounter; -@property (strong, nonatomic) NSNumber * _Nonnull mleFrameCounter; -@property (strong, nonatomic) NSNumber * _Nonnull lqi; -@property (strong, nonatomic) NSNumber * _Nullable averageRssi; -@property (strong, nonatomic) NSNumber * _Nullable lastRssi; -@property (strong, nonatomic) NSNumber * _Nonnull frameErrorRate; -@property (strong, nonatomic) NSNumber * _Nonnull messageErrorRate; -@property (strong, nonatomic) NSNumber * _Nonnull rxOnWhenIdle; -@property (strong, nonatomic) NSNumber * _Nonnull fullThreadDevice; -@property (strong, nonatomic) NSNumber * _Nonnull fullNetworkData; -@property (strong, nonatomic) NSNumber * _Nonnull isChild; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull activeTimestampPresent; -@property (strong, nonatomic) NSNumber * _Nonnull pendingTimestampPresent; -@property (strong, nonatomic) NSNumber * _Nonnull masterKeyPresent; -@property (strong, nonatomic) NSNumber * _Nonnull networkNamePresent; -@property (strong, nonatomic) NSNumber * _Nonnull extendedPanIdPresent; -@property (strong, nonatomic) NSNumber * _Nonnull meshLocalPrefixPresent; -@property (strong, nonatomic) NSNumber * _Nonnull delayPresent; -@property (strong, nonatomic) NSNumber * _Nonnull panIdPresent; -@property (strong, nonatomic) NSNumber * _Nonnull channelPresent; -@property (strong, nonatomic) NSNumber * _Nonnull pskcPresent; -@property (strong, nonatomic) NSNumber * _Nonnull securityPolicyPresent; -@property (strong, nonatomic) NSNumber * _Nonnull channelMaskPresent; -- (instancetype)init; +@interface MTRNetworkCommissioningClusterWiFiInterfaceScanResult : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull security; +@property (nonatomic, copy) NSData * _Nonnull ssid; +@property (nonatomic, copy) NSData * _Nonnull bssid; +@property (nonatomic, copy) NSNumber * _Nonnull channel; +@property (nonatomic, copy) NSNumber * _Nonnull wiFiBand; +@property (nonatomic, copy) NSNumber * _Nonnull rssi; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThreadNetworkDiagnosticsClusterRouteTable : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull extAddress; -@property (strong, nonatomic) NSNumber * _Nonnull rloc16; -@property (strong, nonatomic) NSNumber * _Nonnull routerId; -@property (strong, nonatomic) NSNumber * _Nonnull nextHop; -@property (strong, nonatomic) NSNumber * _Nonnull pathCost; -@property (strong, nonatomic) NSNumber * _Nonnull lqiIn; -@property (strong, nonatomic) NSNumber * _Nonnull lqiOut; -@property (strong, nonatomic) NSNumber * _Nonnull age; -@property (strong, nonatomic) NSNumber * _Nonnull allocated; -@property (strong, nonatomic) NSNumber * _Nonnull linkEstablished; -- (instancetype)init; +@interface MTRGeneralDiagnosticsClusterNetworkInterfaceType : NSObject +@property (nonatomic, copy) NSString * _Nonnull name; +@property (nonatomic, copy) NSNumber * _Nonnull isOperational; +@property (nonatomic, copy) NSNumber * _Nullable offPremiseServicesReachableIPv4; +@property (nonatomic, copy) NSNumber * _Nullable offPremiseServicesReachableIPv6; +@property (nonatomic, copy) NSData * _Nonnull hardwareAddress; +@property (nonatomic, copy) NSArray * _Nonnull iPv4Addresses; +@property (nonatomic, copy) NSArray * _Nonnull iPv6Addresses; +@property (nonatomic, copy) NSNumber * _Nonnull type; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThreadNetworkDiagnosticsClusterSecurityPolicy : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull rotationTime; -@property (strong, nonatomic) NSNumber * _Nonnull flags; -- (instancetype)init; +@interface MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent : NSObject +@property (nonatomic, copy) NSArray * _Nonnull current; +@property (nonatomic, copy) NSArray * _Nonnull previous; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull connectionStatus; -@end +@interface MTRGeneralDiagnosticsClusterRadioFaultChangeEvent : NSObject +@property (nonatomic, copy) NSArray * _Nonnull current; +@property (nonatomic, copy) NSArray * _Nonnull previous; -@interface MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull reasonCode; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull associationFailure; -@property (strong, nonatomic) NSNumber * _Nonnull status; -@end +@interface MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent : NSObject +@property (nonatomic, copy) NSArray * _Nonnull current; +@property (nonatomic, copy) NSArray * _Nonnull previous; -@interface MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull connectionStatus; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedDeviceBasicClusterStartUpEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull softwareVersion; -@end +@interface MTRGeneralDiagnosticsClusterBootReasonEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull bootReason; -@interface MTRBridgedDeviceBasicClusterShutDownEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedDeviceBasicClusterLeaveEvent : NSObject -@end +@interface MTRSoftwareDiagnosticsClusterThreadMetrics : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull id; +@property (nonatomic, copy) NSString * _Nullable name; +@property (nonatomic, copy) NSNumber * _Nullable stackFreeCurrent; +@property (nonatomic, copy) NSNumber * _Nullable stackFreeMinimum; +@property (nonatomic, copy) NSNumber * _Nullable stackSize; -@interface MTRBridgedDeviceBasicClusterReachableChangedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull reachableNewValue; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSwitchClusterSwitchLatchedEvent : NSObject -@property (strong, nonatomic, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@end +@interface MTRSoftwareDiagnosticsClusterSoftwareFaultEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull id; +@property (nonatomic, copy) NSString * _Nullable name; +@property (nonatomic, copy) NSData * _Nullable faultRecording; -@interface MTRSwitchClusterInitialPressEvent : NSObject -@property (strong, nonatomic, getter=getNewPosition) NSNumber * _Nonnull newPosition; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSwitchClusterLongPressEvent : NSObject -@property (strong, nonatomic, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@end +@interface MTRThreadNetworkDiagnosticsClusterNeighborTable : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull extAddress; +@property (nonatomic, copy) NSNumber * _Nonnull age; +@property (nonatomic, copy) NSNumber * _Nonnull rloc16; +@property (nonatomic, copy) NSNumber * _Nonnull linkFrameCounter; +@property (nonatomic, copy) NSNumber * _Nonnull mleFrameCounter; +@property (nonatomic, copy) NSNumber * _Nonnull lqi; +@property (nonatomic, copy) NSNumber * _Nullable averageRssi; +@property (nonatomic, copy) NSNumber * _Nullable lastRssi; +@property (nonatomic, copy) NSNumber * _Nonnull frameErrorRate; +@property (nonatomic, copy) NSNumber * _Nonnull messageErrorRate; +@property (nonatomic, copy) NSNumber * _Nonnull rxOnWhenIdle; +@property (nonatomic, copy) NSNumber * _Nonnull fullThreadDevice; +@property (nonatomic, copy) NSNumber * _Nonnull fullNetworkData; +@property (nonatomic, copy) NSNumber * _Nonnull isChild; -@interface MTRSwitchClusterShortReleaseEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull previousPosition; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSwitchClusterLongReleaseEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull previousPosition; -@end +@interface MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull activeTimestampPresent; +@property (nonatomic, copy) NSNumber * _Nonnull pendingTimestampPresent; +@property (nonatomic, copy) NSNumber * _Nonnull masterKeyPresent; +@property (nonatomic, copy) NSNumber * _Nonnull networkNamePresent; +@property (nonatomic, copy) NSNumber * _Nonnull extendedPanIdPresent; +@property (nonatomic, copy) NSNumber * _Nonnull meshLocalPrefixPresent; +@property (nonatomic, copy) NSNumber * _Nonnull delayPresent; +@property (nonatomic, copy) NSNumber * _Nonnull panIdPresent; +@property (nonatomic, copy) NSNumber * _Nonnull channelPresent; +@property (nonatomic, copy) NSNumber * _Nonnull pskcPresent; +@property (nonatomic, copy) NSNumber * _Nonnull securityPolicyPresent; +@property (nonatomic, copy) NSNumber * _Nonnull channelMaskPresent; -@interface MTRSwitchClusterMultiPressOngoingEvent : NSObject -@property (strong, nonatomic, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@property (strong, nonatomic) NSNumber * _Nonnull currentNumberOfPressesCounted; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSwitchClusterMultiPressCompleteEvent : NSObject -@property (strong, nonatomic, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@property (strong, nonatomic) NSNumber * _Nonnull totalNumberOfPressesCounted; -@end +@interface MTRThreadNetworkDiagnosticsClusterRouteTable : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull extAddress; +@property (nonatomic, copy) NSNumber * _Nonnull rloc16; +@property (nonatomic, copy) NSNumber * _Nonnull routerId; +@property (nonatomic, copy) NSNumber * _Nonnull nextHop; +@property (nonatomic, copy) NSNumber * _Nonnull pathCost; +@property (nonatomic, copy) NSNumber * _Nonnull lqiIn; +@property (nonatomic, copy) NSNumber * _Nonnull lqiOut; +@property (nonatomic, copy) NSNumber * _Nonnull age; +@property (nonatomic, copy) NSNumber * _Nonnull allocated; +@property (nonatomic, copy) NSNumber * _Nonnull linkEstablished; -@interface MTROperationalCredentialsClusterFabricDescriptor : NSObject -@property (strong, nonatomic) NSData * _Nonnull rootPublicKey; -@property (strong, nonatomic) NSNumber * _Nonnull vendorId; -@property (strong, nonatomic) NSNumber * _Nonnull fabricId; -@property (strong, nonatomic) NSNumber * _Nonnull nodeId; -@property (strong, nonatomic) NSString * _Nonnull label; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterNOCStruct : NSObject -@property (strong, nonatomic) NSData * _Nonnull noc; -@property (strong, nonatomic) NSData * _Nullable icac; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRThreadNetworkDiagnosticsClusterSecurityPolicy : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull rotationTime; +@property (nonatomic, copy) NSNumber * _Nonnull flags; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterGroupInfoMapStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSArray * _Nonnull endpoints; -@property (strong, nonatomic) NSString * _Nullable groupName; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull connectionStatus; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterGroupKeyMapStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull groupKeySetID; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull reasonCode; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterGroupKeySetStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupKeySetID; -@property (strong, nonatomic) NSNumber * _Nonnull groupKeySecurityPolicy; -@property (strong, nonatomic) NSData * _Nullable epochKey0; -@property (strong, nonatomic) NSNumber * _Nullable epochStartTime0; -@property (strong, nonatomic) NSData * _Nullable epochKey1; -@property (strong, nonatomic) NSNumber * _Nullable epochStartTime1; -@property (strong, nonatomic) NSData * _Nullable epochKey2; -@property (strong, nonatomic) NSNumber * _Nullable epochStartTime2; -- (instancetype)init; +@interface MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull associationFailure; +@property (nonatomic, copy) NSNumber * _Nonnull status; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRFixedLabelClusterLabelStruct : NSObject -@property (strong, nonatomic) NSString * _Nonnull label; -@property (strong, nonatomic) NSString * _Nonnull value; -- (instancetype)init; +@interface MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull connectionStatus; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRUserLabelClusterLabelStruct : NSObject -@property (strong, nonatomic) NSString * _Nonnull label; -@property (strong, nonatomic) NSString * _Nonnull value; -- (instancetype)init; +@interface MTRBridgedDeviceBasicClusterStartUpEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBooleanStateClusterStateChangeEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stateValue; -@end +@interface MTRBridgedDeviceBasicClusterShutDownEvent : NSObject -@interface MTRModeSelectClusterSemanticTag : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull mfgCode; -@property (strong, nonatomic) NSNumber * _Nonnull value; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRModeSelectClusterModeOptionStruct : NSObject -@property (strong, nonatomic) NSString * _Nonnull label; -@property (strong, nonatomic) NSNumber * _Nonnull mode; -@property (strong, nonatomic) NSArray * _Nonnull semanticTags; -- (instancetype)init; +@interface MTRBridgedDeviceBasicClusterLeaveEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterDlCredential : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull credentialType; -@property (strong, nonatomic) NSNumber * _Nonnull credentialIndex; -- (instancetype)init; +@interface MTRBridgedDeviceBasicClusterReachableChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull reachableNewValue; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterDoorLockAlarmEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull alarmCode; -@end +@interface MTRSwitchClusterSwitchLatchedEvent : NSObject +@property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@interface MTRDoorLockClusterDoorStateChangeEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull doorState; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterLockOperationEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull lockOperationType; -@property (strong, nonatomic) NSNumber * _Nonnull operationSource; -@property (strong, nonatomic) NSNumber * _Nullable userIndex; -@property (strong, nonatomic) NSNumber * _Nullable fabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable sourceNode; -@property (strong, nonatomic) NSArray * _Nullable credentials; -@end +@interface MTRSwitchClusterInitialPressEvent : NSObject +@property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@interface MTRDoorLockClusterLockOperationErrorEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull lockOperationType; -@property (strong, nonatomic) NSNumber * _Nonnull operationSource; -@property (strong, nonatomic) NSNumber * _Nonnull operationError; -@property (strong, nonatomic) NSNumber * _Nullable userIndex; -@property (strong, nonatomic) NSNumber * _Nullable fabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable sourceNode; -@property (strong, nonatomic) NSArray * _Nullable credentials; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterLockUserChangeEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull lockDataType; -@property (strong, nonatomic) NSNumber * _Nonnull dataOperationType; -@property (strong, nonatomic) NSNumber * _Nonnull operationSource; -@property (strong, nonatomic) NSNumber * _Nullable userIndex; -@property (strong, nonatomic) NSNumber * _Nullable fabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable sourceNode; -@property (strong, nonatomic) NSNumber * _Nullable dataIndex; -@end +@interface MTRSwitchClusterLongPressEvent : NSObject +@property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@interface MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent : NSObject -@end +@interface MTRSwitchClusterShortReleaseEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull previousPosition; -@interface MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterSystemPressureLowEvent : NSObject -@end +@interface MTRSwitchClusterLongReleaseEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull previousPosition; -@interface MTRPumpConfigurationAndControlClusterSystemPressureHighEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterDryRunningEvent : NSObject +@interface MTRSwitchClusterMultiPressOngoingEvent : NSObject +@property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; +@property (nonatomic, copy) NSNumber * _Nonnull currentNumberOfPressesCounted; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent : NSObject +@interface MTRSwitchClusterMultiPressCompleteEvent : NSObject +@property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; +@property (nonatomic, copy) NSNumber * _Nonnull totalNumberOfPressesCounted; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent : NSObject +@interface MTROperationalCredentialsClusterFabricDescriptor : NSObject +@property (nonatomic, copy) NSData * _Nonnull rootPublicKey; +@property (nonatomic, copy) NSNumber * _Nonnull vendorId; +@property (nonatomic, copy) NSNumber * _Nonnull fabricId; +@property (nonatomic, copy) NSNumber * _Nonnull nodeId; +@property (nonatomic, copy) NSString * _Nonnull label; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent : NSObject +@interface MTROperationalCredentialsClusterNOCStruct : NSObject +@property (nonatomic, copy) NSData * _Nonnull noc; +@property (nonatomic, copy) NSData * _Nullable icac; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterPumpBlockedEvent : NSObject +@interface MTRGroupKeyManagementClusterGroupInfoMapStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSArray * _Nonnull endpoints; +@property (nonatomic, copy) NSString * _Nullable groupName; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterSensorFailureEvent : NSObject +@interface MTRGroupKeyManagementClusterGroupKeyMapStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupKeySetID; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent : NSObject +@interface MTRGroupKeyManagementClusterGroupKeySetStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull groupKeySetID; +@property (nonatomic, copy) NSNumber * _Nonnull groupKeySecurityPolicy; +@property (nonatomic, copy) NSData * _Nullable epochKey0; +@property (nonatomic, copy) NSNumber * _Nullable epochStartTime0; +@property (nonatomic, copy) NSData * _Nullable epochKey1; +@property (nonatomic, copy) NSNumber * _Nullable epochStartTime1; +@property (nonatomic, copy) NSData * _Nullable epochKey2; +@property (nonatomic, copy) NSNumber * _Nullable epochStartTime2; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent : NSObject +@interface MTRFixedLabelClusterLabelStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull label; +@property (nonatomic, copy) NSString * _Nonnull value; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterGeneralFaultEvent : NSObject +@interface MTRUserLabelClusterLabelStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull label; +@property (nonatomic, copy) NSString * _Nonnull value; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterLeakageEvent : NSObject +@interface MTRBooleanStateClusterStateChangeEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull stateValue; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterAirDetectionEvent : NSObject +@interface MTRModeSelectClusterSemanticTag : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull mfgCode; +@property (nonatomic, copy) NSNumber * _Nonnull value; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterTurbineOperationEvent : NSObject +@interface MTRModeSelectClusterModeOptionStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull label; +@property (nonatomic, copy) NSNumber * _Nonnull mode; +@property (nonatomic, copy) NSArray * _Nonnull semanticTags; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThermostatClusterThermostatScheduleTransition : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nullable heatSetpoint; -@property (strong, nonatomic) NSNumber * _Nullable coolSetpoint; +@interface MTRDoorLockClusterDlCredential : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull credentialType; +@property (nonatomic, copy) NSNumber * _Nonnull credentialIndex; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRDoorLockClusterDoorLockAlarmEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull alarmCode; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRChannelClusterChannelInfo : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull majorNumber; -@property (strong, nonatomic) NSNumber * _Nonnull minorNumber; -@property (strong, nonatomic) NSString * _Nullable name; -@property (strong, nonatomic) NSString * _Nullable callSign; -@property (strong, nonatomic) NSString * _Nullable affiliateCallSign; +@interface MTRDoorLockClusterDoorStateChangeEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull doorState; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRDoorLockClusterLockOperationEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull lockOperationType; +@property (nonatomic, copy) NSNumber * _Nonnull operationSource; +@property (nonatomic, copy) NSNumber * _Nullable userIndex; +@property (nonatomic, copy) NSNumber * _Nullable fabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable sourceNode; +@property (nonatomic, copy) NSArray * _Nullable credentials; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRChannelClusterLineupInfo : NSObject -@property (strong, nonatomic) NSString * _Nonnull operatorName; -@property (strong, nonatomic) NSString * _Nullable lineupName; -@property (strong, nonatomic) NSString * _Nullable postalCode; -@property (strong, nonatomic) NSNumber * _Nonnull lineupInfoType; +@interface MTRDoorLockClusterLockOperationErrorEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull lockOperationType; +@property (nonatomic, copy) NSNumber * _Nonnull operationSource; +@property (nonatomic, copy) NSNumber * _Nonnull operationError; +@property (nonatomic, copy) NSNumber * _Nullable userIndex; +@property (nonatomic, copy) NSNumber * _Nullable fabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable sourceNode; +@property (nonatomic, copy) NSArray * _Nullable credentials; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRDoorLockClusterLockUserChangeEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull lockDataType; +@property (nonatomic, copy) NSNumber * _Nonnull dataOperationType; +@property (nonatomic, copy) NSNumber * _Nonnull operationSource; +@property (nonatomic, copy) NSNumber * _Nullable userIndex; +@property (nonatomic, copy) NSNumber * _Nullable fabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable sourceNode; +@property (nonatomic, copy) NSNumber * _Nullable dataIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTargetNavigatorClusterTargetInfo : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull identifier; -@property (strong, nonatomic) NSString * _Nonnull name; +@interface MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent : NSObject + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterPlaybackPosition : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull updatedAt; -@property (strong, nonatomic) NSNumber * _Nullable position; +@interface MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRPumpConfigurationAndControlClusterSystemPressureLowEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaInputClusterInputInfo : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull index; -@property (strong, nonatomic) NSNumber * _Nonnull inputType; -@property (strong, nonatomic) NSString * _Nonnull name; -@property (strong, nonatomic) NSString * _Nonnull descriptionString; +@interface MTRPumpConfigurationAndControlClusterSystemPressureHighEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRPumpConfigurationAndControlClusterDryRunningEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterDimension : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull width; -@property (strong, nonatomic) NSNumber * _Nonnull height; -@property (strong, nonatomic) NSNumber * _Nonnull metric; +@interface MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent : NSObject + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterAdditionalInfo : NSObject -@property (strong, nonatomic) NSString * _Nonnull name; -@property (strong, nonatomic) NSString * _Nonnull value; +@interface MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRPumpConfigurationAndControlClusterPumpBlockedEvent : NSObject + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterParameter : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull type; -@property (strong, nonatomic) NSString * _Nonnull value; -@property (strong, nonatomic) NSArray * _Nullable externalIDList; +@interface MTRPumpConfigurationAndControlClusterSensorFailureEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterContentSearch : NSObject -@property (strong, nonatomic) NSArray * _Nonnull parameterList; +@interface MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRPumpConfigurationAndControlClusterGeneralFaultEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterStyleInformation : NSObject -@property (strong, nonatomic) NSString * _Nullable imageUrl; -@property (strong, nonatomic) NSString * _Nullable color; -@property (strong, nonatomic) MTRContentLauncherClusterDimension * _Nullable size; +@interface MTRPumpConfigurationAndControlClusterLeakageEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRPumpConfigurationAndControlClusterAirDetectionEvent : NSObject + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterBrandingInformation : NSObject -@property (strong, nonatomic) NSString * _Nonnull providerName; -@property (strong, nonatomic) MTRContentLauncherClusterStyleInformation * _Nullable background; -@property (strong, nonatomic) MTRContentLauncherClusterStyleInformation * _Nullable logo; -@property (strong, nonatomic) MTRContentLauncherClusterStyleInformation * _Nullable progressBar; -@property (strong, nonatomic) MTRContentLauncherClusterStyleInformation * _Nullable splash; -@property (strong, nonatomic) MTRContentLauncherClusterStyleInformation * _Nullable waterMark; +@interface MTRPumpConfigurationAndControlClusterTurbineOperationEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRThermostatClusterThermostatScheduleTransition : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nullable heatSetpoint; +@property (nonatomic, copy) NSNumber * _Nullable coolSetpoint; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAudioOutputClusterOutputInfo : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull index; -@property (strong, nonatomic) NSNumber * _Nonnull outputType; -@property (strong, nonatomic) NSString * _Nonnull name; +@interface MTRChannelClusterChannelInfo : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull majorNumber; +@property (nonatomic, copy) NSNumber * _Nonnull minorNumber; +@property (nonatomic, copy) NSString * _Nullable name; +@property (nonatomic, copy) NSString * _Nullable callSign; +@property (nonatomic, copy) NSString * _Nullable affiliateCallSign; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRChannelClusterLineupInfo : NSObject +@property (nonatomic, copy) NSString * _Nonnull operatorName; +@property (nonatomic, copy) NSString * _Nullable lineupName; +@property (nonatomic, copy) NSString * _Nullable postalCode; +@property (nonatomic, copy) NSNumber * _Nonnull lineupInfoType; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationLauncherClusterApplication : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull catalogVendorId; -@property (strong, nonatomic) NSString * _Nonnull applicationId; +@interface MTRTargetNavigatorClusterTargetInfo : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull identifier; +@property (nonatomic, copy) NSString * _Nonnull name; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRMediaPlaybackClusterPlaybackPosition : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull updatedAt; +@property (nonatomic, copy) NSNumber * _Nullable position; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationLauncherClusterApplicationEP : NSObject -@property (strong, nonatomic) MTRApplicationLauncherClusterApplication * _Nonnull application; -@property (strong, nonatomic) NSNumber * _Nullable endpoint; +@interface MTRMediaInputClusterInputInfo : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull index; +@property (nonatomic, copy) NSNumber * _Nonnull inputType; +@property (nonatomic, copy) NSString * _Nonnull name; +@property (nonatomic, copy) NSString * _Nonnull descriptionString; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRContentLauncherClusterDimension : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull width; +@property (nonatomic, copy) NSNumber * _Nonnull height; +@property (nonatomic, copy) NSNumber * _Nonnull metric; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationBasicClusterApplicationBasicApplication : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull catalogVendorId; -@property (strong, nonatomic) NSString * _Nonnull applicationId; +@interface MTRContentLauncherClusterAdditionalInfo : NSObject +@property (nonatomic, copy) NSString * _Nonnull name; +@property (nonatomic, copy) NSString * _Nonnull value; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRContentLauncherClusterParameter : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull type; +@property (nonatomic, copy) NSString * _Nonnull value; +@property (nonatomic, copy) NSArray * _Nullable externalIDList; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterSimpleStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull a; -@property (strong, nonatomic) NSNumber * _Nonnull b; -@property (strong, nonatomic) NSNumber * _Nonnull c; -@property (strong, nonatomic) NSData * _Nonnull d; -@property (strong, nonatomic) NSString * _Nonnull e; -@property (strong, nonatomic) NSNumber * _Nonnull f; -@property (strong, nonatomic) NSNumber * _Nonnull g; -@property (strong, nonatomic) NSNumber * _Nonnull h; +@interface MTRContentLauncherClusterContentSearch : NSObject +@property (nonatomic, copy) NSArray * _Nonnull parameterList; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRContentLauncherClusterStyleInformation : NSObject +@property (nonatomic, copy) NSString * _Nullable imageUrl; +@property (nonatomic, copy) NSString * _Nullable color; +@property (nonatomic, copy) MTRContentLauncherClusterDimension * _Nullable size; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestFabricScoped : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull fabricSensitiveInt8u; -@property (strong, nonatomic) NSNumber * _Nullable optionalFabricSensitiveInt8u; -@property (strong, nonatomic) NSNumber * _Nullable nullableFabricSensitiveInt8u; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalFabricSensitiveInt8u; -@property (strong, nonatomic) NSString * _Nonnull fabricSensitiveCharString; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull fabricSensitiveStruct; -@property (strong, nonatomic) NSArray * _Nonnull fabricSensitiveInt8uList; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; +@interface MTRContentLauncherClusterBrandingInformation : NSObject +@property (nonatomic, copy) NSString * _Nonnull providerName; +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformation * _Nullable background; +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformation * _Nullable logo; +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformation * _Nullable progressBar; +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformation * _Nullable splash; +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformation * _Nullable waterMark; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRAudioOutputClusterOutputInfo : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull index; +@property (nonatomic, copy) NSNumber * _Nonnull outputType; +@property (nonatomic, copy) NSString * _Nonnull name; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterNullablesAndOptionalsStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nullable nullableInt; -@property (strong, nonatomic) NSNumber * _Nullable optionalInt; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalInt; -@property (strong, nonatomic) NSString * _Nullable nullableString; -@property (strong, nonatomic) NSString * _Nullable optionalString; -@property (strong, nonatomic) NSString * _Nullable nullableOptionalString; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable nullableStruct; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable optionalStruct; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStruct; -@property (strong, nonatomic) NSArray * _Nullable nullableList; -@property (strong, nonatomic) NSArray * _Nullable optionalList; -@property (strong, nonatomic) NSArray * _Nullable nullableOptionalList; +@interface MTRApplicationLauncherClusterApplication : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull catalogVendorId; +@property (nonatomic, copy) NSString * _Nonnull applicationId; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRApplicationLauncherClusterApplicationEP : NSObject +@property (nonatomic, copy) MTRApplicationLauncherClusterApplication * _Nonnull application; +@property (nonatomic, copy) NSNumber * _Nullable endpoint; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterNestedStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull a; -@property (strong, nonatomic) NSNumber * _Nonnull b; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull c; +@interface MTRApplicationBasicClusterApplicationBasicApplication : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull catalogVendorId; +@property (nonatomic, copy) NSString * _Nonnull applicationId; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRTestClusterClusterSimpleStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull a; +@property (nonatomic, copy) NSNumber * _Nonnull b; +@property (nonatomic, copy) NSNumber * _Nonnull c; +@property (nonatomic, copy) NSData * _Nonnull d; +@property (nonatomic, copy) NSString * _Nonnull e; +@property (nonatomic, copy) NSNumber * _Nonnull f; +@property (nonatomic, copy) NSNumber * _Nonnull g; +@property (nonatomic, copy) NSNumber * _Nonnull h; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterNestedStructList : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull a; -@property (strong, nonatomic) NSNumber * _Nonnull b; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull c; -@property (strong, nonatomic) NSArray * _Nonnull d; -@property (strong, nonatomic) NSArray * _Nonnull e; -@property (strong, nonatomic) NSArray * _Nonnull f; -@property (strong, nonatomic) NSArray * _Nonnull g; +@interface MTRTestClusterClusterTestFabricScoped : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull fabricSensitiveInt8u; +@property (nonatomic, copy) NSNumber * _Nullable optionalFabricSensitiveInt8u; +@property (nonatomic, copy) NSNumber * _Nullable nullableFabricSensitiveInt8u; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalFabricSensitiveInt8u; +@property (nonatomic, copy) NSString * _Nonnull fabricSensitiveCharString; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull fabricSensitiveStruct; +@property (nonatomic, copy) NSArray * _Nonnull fabricSensitiveInt8uList; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRTestClusterClusterNullablesAndOptionalsStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nullable nullableInt; +@property (nonatomic, copy) NSNumber * _Nullable optionalInt; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalInt; +@property (nonatomic, copy) NSString * _Nullable nullableString; +@property (nonatomic, copy) NSString * _Nullable optionalString; +@property (nonatomic, copy) NSString * _Nullable nullableOptionalString; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableStruct; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable optionalStruct; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStruct; +@property (nonatomic, copy) NSArray * _Nullable nullableList; +@property (nonatomic, copy) NSArray * _Nullable optionalList; +@property (nonatomic, copy) NSArray * _Nullable nullableOptionalList; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterDoubleNestedStructList : NSObject -@property (strong, nonatomic) NSArray * _Nonnull a; +@interface MTRTestClusterClusterNestedStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull a; +@property (nonatomic, copy) NSNumber * _Nonnull b; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull c; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRTestClusterClusterNestedStructList : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull a; +@property (nonatomic, copy) NSNumber * _Nonnull b; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull c; +@property (nonatomic, copy) NSArray * _Nonnull d; +@property (nonatomic, copy) NSArray * _Nonnull e; +@property (nonatomic, copy) NSArray * _Nonnull f; +@property (nonatomic, copy) NSArray * _Nonnull g; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestListStructOctet : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull member1; -@property (strong, nonatomic) NSData * _Nonnull member2; +@interface MTRTestClusterClusterDoubleNestedStructList : NSObject +@property (nonatomic, copy) NSArray * _Nonnull a; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRTestClusterClusterTestListStructOctet : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull member1; +@property (nonatomic, copy) NSData * _Nonnull member2; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEventEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; -@property (strong, nonatomic) NSNumber * _Nonnull arg2; -@property (strong, nonatomic) NSNumber * _Nonnull arg3; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull arg4; -@property (strong, nonatomic) NSArray * _Nonnull arg5; -@property (strong, nonatomic) NSArray * _Nonnull arg6; +@interface MTRTestClusterClusterTestEventEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg2; +@property (nonatomic, copy) NSNumber * _Nonnull arg3; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg4; +@property (nonatomic, copy) NSArray * _Nonnull arg5; +@property (nonatomic, copy) NSArray * _Nonnull arg6; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestFabricScopedEventEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@interface MTRTestClusterClusterTestFabricScopedEventEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index ca7bfb733f967a..740c4d61bbbc51 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -33,6 +33,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRScenesClusterAttributeValuePair alloc] init]; + + other.attributeId = self.attributeId; + other.attributeValue = self.attributeValue; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: attributeId:%@; attributeValue:%@; >", @@ -54,6 +64,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRScenesClusterExtensionFieldSet alloc] init]; + + other.clusterId = self.clusterId; + other.attributeValueList = self.attributeValueList; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: clusterId:%@; attributeValueList:%@; >", @@ -75,6 +95,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDescriptorClusterDeviceType alloc] init]; + + other.type = self.type; + other.revision = self.revision; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -102,6 +132,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBindingClusterTargetStruct alloc] init]; + + other.node = self.node; + other.group = self.group; + other.endpoint = self.endpoint; + other.cluster = self.cluster; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: node:%@; group:%@; endpoint:%@; cluster:%@; fabricIndex:%@; >", @@ -125,6 +168,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRAccessControlClusterTarget alloc] init]; + + other.cluster = self.cluster; + other.endpoint = self.endpoint; + other.deviceType = self.deviceType; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: cluster:%@; endpoint:%@; deviceType:%@; >", @@ -152,6 +206,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + + other.privilege = self.privilege; + other.authMode = self.authMode; + other.subjects = self.subjects; + other.targets = self.targets; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -174,6 +241,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRAccessControlClusterExtensionEntry alloc] init]; + + other.data = self.data; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: data:%@; fabricIndex:%@; >", NSStringFromClass([self class]), @@ -196,16 +273,29 @@ - (instancetype)init _latestValue = nil; - _adminFabricIndex = @(0); + _fabricIndex = @(0); } return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRAccessControlClusterAccessControlEntryChangedEvent alloc] init]; + + other.adminNodeID = self.adminNodeID; + other.adminPasscodeID = self.adminPasscodeID; + other.changeType = self.changeType; + other.latestValue = self.latestValue; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString - stringWithFormat:@"<%@: adminNodeID:%@; adminPasscodeID:%@; changeType:%@; latestValue:%@; adminFabricIndex:%@; >", - NSStringFromClass([self class]), _adminNodeID, _adminPasscodeID, _changeType, _latestValue, _adminFabricIndex]; + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: adminNodeID:%@; adminPasscodeID:%@; changeType:%@; latestValue:%@; fabricIndex:%@; >", + NSStringFromClass([self class]), _adminNodeID, _adminPasscodeID, _changeType, _latestValue, _fabricIndex]; return descriptionString; } @@ -224,16 +314,29 @@ - (instancetype)init _latestValue = nil; - _adminFabricIndex = @(0); + _fabricIndex = @(0); } return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRAccessControlClusterAccessControlExtensionChangedEvent alloc] init]; + + other.adminNodeID = self.adminNodeID; + other.adminPasscodeID = self.adminPasscodeID; + other.changeType = self.changeType; + other.latestValue = self.latestValue; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString - stringWithFormat:@"<%@: adminNodeID:%@; adminPasscodeID:%@; changeType:%@; latestValue:%@; adminFabricIndex:%@; >", - NSStringFromClass([self class]), _adminNodeID, _adminPasscodeID, _changeType, _latestValue, _adminFabricIndex]; + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: adminNodeID:%@; adminPasscodeID:%@; changeType:%@; latestValue:%@; fabricIndex:%@; >", + NSStringFromClass([self class]), _adminNodeID, _adminPasscodeID, _changeType, _latestValue, _fabricIndex]; return descriptionString; } @@ -259,6 +362,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedActionsClusterActionStruct alloc] init]; + + other.actionID = self.actionID; + other.name = self.name; + other.type = self.type; + other.endpointListID = self.endpointListID; + other.supportedCommands = self.supportedCommands; + other.status = self.status; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -285,6 +402,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedActionsClusterEndpointListStruct alloc] init]; + + other.endpointListID = self.endpointListID; + other.name = self.name; + other.type = self.type; + other.endpoints = self.endpoints; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: endpointListID:%@; name:%@; type:%@; endpoints:%@; >", @@ -308,6 +437,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedActionsClusterStateChangedEvent alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.newState = self.newState; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; newState:%@; >", @@ -333,6 +473,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedActionsClusterActionFailedEvent alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.newState = self.newState; + other.error = self.error; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; newState:%@; error:%@; >", @@ -354,6 +506,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBasicClusterCapabilityMinimaStruct alloc] init]; + + other.caseSessionsPerFabric = self.caseSessionsPerFabric; + other.subscriptionsPerFabric = self.subscriptionsPerFabric; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: caseSessionsPerFabric:%@; subscriptionsPerFabric:%@; >", @@ -373,6 +535,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBasicClusterStartUpEvent alloc] init]; + + other.softwareVersion = self.softwareVersion; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -390,6 +561,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBasicClusterShutDownEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -402,13 +580,25 @@ @implementation MTRBasicClusterLeaveEvent - (instancetype)init { if (self = [super init]) { + + _fabricIndex = @(0); } return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBasicClusterLeaveEvent alloc] init]; + + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: fabricIndex:%@; >", NSStringFromClass([self class]), _fabricIndex]; return descriptionString; } @@ -424,6 +614,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBasicClusterReachableChangedEvent alloc] init]; + + other.reachableNewValue = self.reachableNewValue; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -447,6 +646,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTROtaSoftwareUpdateRequestorClusterProviderLocation alloc] init]; + + other.providerNodeID = self.providerNodeID; + other.endpoint = self.endpoint; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: providerNodeID:%@; endpoint:%@; fabricIndex:%@; >", @@ -472,6 +682,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent alloc] init]; + + other.previousState = self.previousState; + other.newState = self.newState; + other.reason = self.reason; + other.targetSoftwareVersion = self.targetSoftwareVersion; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -494,6 +716,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent alloc] init]; + + other.softwareVersion = self.softwareVersion; + other.productID = self.productID; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: softwareVersion:%@; productID:%@; >", @@ -519,6 +751,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent alloc] init]; + + other.softwareVersion = self.softwareVersion; + other.bytesDownloaded = self.bytesDownloaded; + other.progressPercent = self.progressPercent; + other.platformCode = self.platformCode; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -541,6 +785,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPowerSourceClusterBatChargeFaultChangeType alloc] init]; + + other.current = self.current; + other.previous = self.previous; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -562,6 +816,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPowerSourceClusterBatFaultChangeType alloc] init]; + + other.current = self.current; + other.previous = self.previous; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -583,6 +847,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPowerSourceClusterWiredFaultChangeType alloc] init]; + + other.current = self.current; + other.previous = self.previous; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -604,6 +878,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGeneralCommissioningClusterBasicCommissioningInfo alloc] init]; + + other.failSafeExpiryLengthSeconds = self.failSafeExpiryLengthSeconds; + other.maxCumulativeFailsafeSeconds = self.maxCumulativeFailsafeSeconds; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -626,6 +910,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRNetworkCommissioningClusterNetworkInfo alloc] init]; + + other.networkID = self.networkID; + other.connected = self.connected; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -660,6 +954,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRNetworkCommissioningClusterThreadInterfaceScanResult alloc] init]; + + other.panId = self.panId; + other.extendedPanId = self.extendedPanId; + other.networkName = self.networkName; + other.channel = self.channel; + other.version = self.version; + other.extendedAddress = self.extendedAddress; + other.rssi = self.rssi; + other.lqi = self.lqi; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -692,6 +1002,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRNetworkCommissioningClusterWiFiInterfaceScanResult alloc] init]; + + other.security = self.security; + other.ssid = self.ssid; + other.bssid = self.bssid; + other.channel = self.channel; + other.wiFiBand = self.wiFiBand; + other.rssi = self.rssi; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -727,6 +1051,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGeneralDiagnosticsClusterNetworkInterfaceType alloc] init]; + + other.name = self.name; + other.isOperational = self.isOperational; + other.offPremiseServicesReachableIPv4 = self.offPremiseServicesReachableIPv4; + other.offPremiseServicesReachableIPv6 = self.offPremiseServicesReachableIPv6; + other.hardwareAddress = self.hardwareAddress; + other.iPv4Addresses = self.iPv4Addresses; + other.iPv6Addresses = self.iPv6Addresses; + other.type = self.type; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -751,6 +1091,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent alloc] init]; + + other.current = self.current; + other.previous = self.previous; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -772,6 +1122,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGeneralDiagnosticsClusterRadioFaultChangeEvent alloc] init]; + + other.current = self.current; + other.previous = self.previous; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -793,6 +1153,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent alloc] init]; + + other.current = self.current; + other.previous = self.previous; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -812,6 +1182,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGeneralDiagnosticsClusterBootReasonEvent alloc] init]; + + other.bootReason = self.bootReason; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -839,6 +1218,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSoftwareDiagnosticsClusterThreadMetrics alloc] init]; + + other.id = self.id; + other.name = self.name; + other.stackFreeCurrent = self.stackFreeCurrent; + other.stackFreeMinimum = self.stackFreeMinimum; + other.stackSize = self.stackSize; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -863,6 +1255,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSoftwareDiagnosticsClusterSoftwareFaultEvent alloc] init]; + + other.id = self.id; + other.name = self.name; + other.faultRecording = self.faultRecording; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -909,6 +1312,28 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRThreadNetworkDiagnosticsClusterNeighborTable alloc] init]; + + other.extAddress = self.extAddress; + other.age = self.age; + other.rloc16 = self.rloc16; + other.linkFrameCounter = self.linkFrameCounter; + other.mleFrameCounter = self.mleFrameCounter; + other.lqi = self.lqi; + other.averageRssi = self.averageRssi; + other.lastRssi = self.lastRssi; + other.frameErrorRate = self.frameErrorRate; + other.messageErrorRate = self.messageErrorRate; + other.rxOnWhenIdle = self.rxOnWhenIdle; + other.fullThreadDevice = self.fullThreadDevice; + other.fullNetworkData = self.fullNetworkData; + other.isChild = self.isChild; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -954,6 +1379,26 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents alloc] init]; + + other.activeTimestampPresent = self.activeTimestampPresent; + other.pendingTimestampPresent = self.pendingTimestampPresent; + other.masterKeyPresent = self.masterKeyPresent; + other.networkNamePresent = self.networkNamePresent; + other.extendedPanIdPresent = self.extendedPanIdPresent; + other.meshLocalPrefixPresent = self.meshLocalPrefixPresent; + other.delayPresent = self.delayPresent; + other.panIdPresent = self.panIdPresent; + other.channelPresent = self.channelPresent; + other.pskcPresent = self.pskcPresent; + other.securityPolicyPresent = self.securityPolicyPresent; + other.channelMaskPresent = self.channelMaskPresent; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -996,6 +1441,24 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRThreadNetworkDiagnosticsClusterRouteTable alloc] init]; + + other.extAddress = self.extAddress; + other.rloc16 = self.rloc16; + other.routerId = self.routerId; + other.nextHop = self.nextHop; + other.pathCost = self.pathCost; + other.lqiIn = self.lqiIn; + other.lqiOut = self.lqiOut; + other.age = self.age; + other.allocated = self.allocated; + other.linkEstablished = self.linkEstablished; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1020,6 +1483,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRThreadNetworkDiagnosticsClusterSecurityPolicy alloc] init]; + + other.rotationTime = self.rotationTime; + other.flags = self.flags; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1039,6 +1512,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent alloc] init]; + + other.connectionStatus = self.connectionStatus; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1058,6 +1540,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent alloc] init]; + + other.reasonCode = self.reasonCode; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1079,6 +1570,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent alloc] init]; + + other.associationFailure = self.associationFailure; + other.status = self.status; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: associationFailure:%@; status:%@; >", @@ -1098,6 +1599,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent alloc] init]; + + other.connectionStatus = self.connectionStatus; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1117,6 +1627,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedDeviceBasicClusterStartUpEvent alloc] init]; + + other.softwareVersion = self.softwareVersion; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1134,6 +1653,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedDeviceBasicClusterShutDownEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1150,6 +1676,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedDeviceBasicClusterLeaveEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1168,6 +1701,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedDeviceBasicClusterReachableChangedEvent alloc] init]; + + other.reachableNewValue = self.reachableNewValue; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1187,6 +1729,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterSwitchLatchedEvent alloc] init]; + + other.newPosition = self.newPosition; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1206,6 +1757,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterInitialPressEvent alloc] init]; + + other.newPosition = self.newPosition; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1225,6 +1785,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterLongPressEvent alloc] init]; + + other.newPosition = self.newPosition; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1244,6 +1813,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterShortReleaseEvent alloc] init]; + + other.previousPosition = self.previousPosition; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1263,6 +1841,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterLongReleaseEvent alloc] init]; + + other.previousPosition = self.previousPosition; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1284,6 +1871,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterMultiPressOngoingEvent alloc] init]; + + other.newPosition = self.newPosition; + other.currentNumberOfPressesCounted = self.currentNumberOfPressesCounted; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: newPosition:%@; currentNumberOfPressesCounted:%@; >", @@ -1305,6 +1902,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterMultiPressCompleteEvent alloc] init]; + + other.newPosition = self.newPosition; + other.totalNumberOfPressesCounted = self.totalNumberOfPressesCounted; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: newPosition:%@; totalNumberOfPressesCounted:%@; >", @@ -1334,6 +1941,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTROperationalCredentialsClusterFabricDescriptor alloc] init]; + + other.rootPublicKey = self.rootPublicKey; + other.vendorId = self.vendorId; + other.fabricId = self.fabricId; + other.nodeId = self.nodeId; + other.label = self.label; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1359,6 +1980,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTROperationalCredentialsClusterNOCStruct alloc] init]; + + other.noc = self.noc; + other.icac = self.icac; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1385,6 +2017,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGroupKeyManagementClusterGroupInfoMapStruct alloc] init]; + + other.groupId = self.groupId; + other.endpoints = self.endpoints; + other.groupName = self.groupName; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; endpoints:%@; groupName:%@; fabricIndex:%@; >", @@ -1408,6 +2052,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + + other.groupId = self.groupId; + other.groupKeySetID = self.groupKeySetID; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; groupKeySetID:%@; fabricIndex:%@; >", @@ -1441,6 +2096,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + + other.groupKeySetID = self.groupKeySetID; + other.groupKeySecurityPolicy = self.groupKeySecurityPolicy; + other.epochKey0 = self.epochKey0; + other.epochStartTime0 = self.epochStartTime0; + other.epochKey1 = self.epochKey1; + other.epochStartTime1 = self.epochStartTime1; + other.epochKey2 = self.epochKey2; + other.epochStartTime2 = self.epochStartTime2; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1466,6 +2137,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRFixedLabelClusterLabelStruct alloc] init]; + + other.label = self.label; + other.value = self.value; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1487,6 +2168,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRUserLabelClusterLabelStruct alloc] init]; + + other.label = self.label; + other.value = self.value; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1506,6 +2197,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBooleanStateClusterStateChangeEvent alloc] init]; + + other.stateValue = self.stateValue; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1527,6 +2227,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRModeSelectClusterSemanticTag alloc] init]; + + other.mfgCode = self.mfgCode; + other.value = self.value; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1550,6 +2260,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRModeSelectClusterModeOptionStruct alloc] init]; + + other.label = self.label; + other.mode = self.mode; + other.semanticTags = self.semanticTags; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; mode:%@; semanticTags:%@; >", @@ -1571,6 +2292,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDoorLockClusterDlCredential alloc] init]; + + other.credentialType = self.credentialType; + other.credentialIndex = self.credentialIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: credentialType:%@; credentialIndex:%@; >", @@ -1590,6 +2321,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDoorLockClusterDoorLockAlarmEvent alloc] init]; + + other.alarmCode = self.alarmCode; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmCode:%@; >", NSStringFromClass([self class]), _alarmCode]; @@ -1608,6 +2348,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDoorLockClusterDoorStateChangeEvent alloc] init]; + + other.doorState = self.doorState; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: doorState:%@; >", NSStringFromClass([self class]), _doorState]; @@ -1636,6 +2385,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDoorLockClusterLockOperationEvent alloc] init]; + + other.lockOperationType = self.lockOperationType; + other.operationSource = self.operationSource; + other.userIndex = self.userIndex; + other.fabricIndex = self.fabricIndex; + other.sourceNode = self.sourceNode; + other.credentials = self.credentials; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -1669,6 +2432,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDoorLockClusterLockOperationErrorEvent alloc] init]; + + other.lockOperationType = self.lockOperationType; + other.operationSource = self.operationSource; + other.operationError = self.operationError; + other.userIndex = self.userIndex; + other.fabricIndex = self.fabricIndex; + other.sourceNode = self.sourceNode; + other.credentials = self.credentials; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: lockOperationType:%@; operationSource:%@; operationError:%@; " @@ -1702,6 +2480,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDoorLockClusterLockUserChangeEvent alloc] init]; + + other.lockDataType = self.lockDataType; + other.dataOperationType = self.dataOperationType; + other.operationSource = self.operationSource; + other.userIndex = self.userIndex; + other.fabricIndex = self.fabricIndex; + other.sourceNode = self.sourceNode; + other.dataIndex = self.dataIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: lockDataType:%@; dataOperationType:%@; operationSource:%@; " @@ -1721,6 +2514,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1737,6 +2537,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1753,6 +2560,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1769,6 +2583,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSystemPressureLowEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1785,6 +2606,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSystemPressureHighEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1801,6 +2629,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterDryRunningEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1817,6 +2652,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1833,6 +2675,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1849,6 +2698,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1865,6 +2721,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterPumpBlockedEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1881,6 +2744,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSensorFailureEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1897,6 +2767,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1913,6 +2790,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1929,6 +2813,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterGeneralFaultEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1945,6 +2836,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterLeakageEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1961,6 +2859,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterAirDetectionEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1977,6 +2882,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterTurbineOperationEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1999,6 +2911,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRThermostatClusterThermostatScheduleTransition alloc] init]; + + other.transitionTime = self.transitionTime; + other.heatSetpoint = self.heatSetpoint; + other.coolSetpoint = self.coolSetpoint; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: transitionTime:%@; heatSetpoint:%@; coolSetpoint:%@; >", @@ -2026,6 +2949,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRChannelClusterChannelInfo alloc] init]; + + other.majorNumber = self.majorNumber; + other.minorNumber = self.minorNumber; + other.name = self.name; + other.callSign = self.callSign; + other.affiliateCallSign = self.affiliateCallSign; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2052,6 +2988,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRChannelClusterLineupInfo alloc] init]; + + other.operatorName = self.operatorName; + other.lineupName = self.lineupName; + other.postalCode = self.postalCode; + other.lineupInfoType = self.lineupInfoType; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2074,6 +3022,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTargetNavigatorClusterTargetInfo alloc] init]; + + other.identifier = self.identifier; + other.name = self.name; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2095,6 +3053,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRMediaPlaybackClusterPlaybackPosition alloc] init]; + + other.updatedAt = self.updatedAt; + other.position = self.position; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2120,6 +3088,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRMediaInputClusterInputInfo alloc] init]; + + other.index = self.index; + other.inputType = self.inputType; + other.name = self.name; + other.descriptionString = self.descriptionString; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; inputType:%@; name:%@; descriptionString:%@; >", @@ -2143,6 +3123,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRContentLauncherClusterDimension alloc] init]; + + other.width = self.width; + other.height = self.height; + other.metric = self.metric; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2164,6 +3155,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRContentLauncherClusterAdditionalInfo alloc] init]; + + other.name = self.name; + other.value = self.value; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2187,6 +3188,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRContentLauncherClusterParameter alloc] init]; + + other.type = self.type; + other.value = self.value; + other.externalIDList = self.externalIDList; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: type:%@; value:%@; externalIDList:%@; >", @@ -2206,6 +3218,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRContentLauncherClusterContentSearch alloc] init]; + + other.parameterList = self.parameterList; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2229,6 +3250,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRContentLauncherClusterStyleInformation alloc] init]; + + other.imageUrl = self.imageUrl; + other.color = self.color; + other.size = self.size; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2258,6 +3290,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRContentLauncherClusterBrandingInformation alloc] init]; + + other.providerName = self.providerName; + other.background = self.background; + other.logo = self.logo; + other.progressBar = self.progressBar; + other.splash = self.splash; + other.waterMark = self.waterMark; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2282,6 +3328,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRAudioOutputClusterOutputInfo alloc] init]; + + other.index = self.index; + other.outputType = self.outputType; + other.name = self.name; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2303,6 +3360,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRApplicationLauncherClusterApplication alloc] init]; + + other.catalogVendorId = self.catalogVendorId; + other.applicationId = self.applicationId; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: catalogVendorId:%@; applicationId:%@; >", @@ -2324,6 +3391,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRApplicationLauncherClusterApplicationEP alloc] init]; + + other.application = self.application; + other.endpoint = self.endpoint; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2345,6 +3422,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRApplicationBasicClusterApplicationBasicApplication alloc] init]; + + other.catalogVendorId = self.catalogVendorId; + other.applicationId = self.applicationId; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: catalogVendorId:%@; applicationId:%@; >", @@ -2378,6 +3465,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterSimpleStruct alloc] init]; + + other.a = self.a; + other.b = self.b; + other.c = self.c; + other.d = self.d; + other.e = self.e; + other.f = self.f; + other.g = self.g; + other.h = self.h; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2412,6 +3515,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterTestFabricScoped alloc] init]; + + other.fabricSensitiveInt8u = self.fabricSensitiveInt8u; + other.optionalFabricSensitiveInt8u = self.optionalFabricSensitiveInt8u; + other.nullableFabricSensitiveInt8u = self.nullableFabricSensitiveInt8u; + other.nullableOptionalFabricSensitiveInt8u = self.nullableOptionalFabricSensitiveInt8u; + other.fabricSensitiveCharString = self.fabricSensitiveCharString; + other.fabricSensitiveStruct = self.fabricSensitiveStruct; + other.fabricSensitiveInt8uList = self.fabricSensitiveInt8uList; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2458,6 +3577,26 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterNullablesAndOptionalsStruct alloc] init]; + + other.nullableInt = self.nullableInt; + other.optionalInt = self.optionalInt; + other.nullableOptionalInt = self.nullableOptionalInt; + other.nullableString = self.nullableString; + other.optionalString = self.optionalString; + other.nullableOptionalString = self.nullableOptionalString; + other.nullableStruct = self.nullableStruct; + other.optionalStruct = self.optionalStruct; + other.nullableOptionalStruct = self.nullableOptionalStruct; + other.nullableList = self.nullableList; + other.optionalList = self.optionalList; + other.nullableOptionalList = self.nullableOptionalList; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2486,6 +3625,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterNestedStruct alloc] init]; + + other.a = self.a; + other.b = self.b; + other.c = self.c; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2517,6 +3667,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterNestedStructList alloc] init]; + + other.a = self.a; + other.b = self.b; + other.c = self.c; + other.d = self.d; + other.e = self.e; + other.f = self.f; + other.g = self.g; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: a:%@; b:%@; c:%@; d:%@; e:%@; f:%@; g:%@; >", @@ -2536,6 +3701,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterDoubleNestedStructList alloc] init]; + + other.a = self.a; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: a:%@; >", NSStringFromClass([self class]), _a]; @@ -2556,6 +3730,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterTestListStructOctet alloc] init]; + + other.member1 = self.member1; + other.member2 = self.member2; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: member1:%@; member2:%@; >", NSStringFromClass([self class]), @@ -2585,6 +3769,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterTestEventEvent alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.arg3 = self.arg3; + other.arg4 = self.arg4; + other.arg5 = self.arg5; + other.arg6 = self.arg6; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; arg2:%@; arg3:%@; arg4:%@; arg5:%@; arg6:%@; >", @@ -2599,14 +3797,24 @@ - (instancetype)init { if (self = [super init]) { - _arg1 = @(0); + _fabricIndex = @(0); } return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterTestFabricScopedEventEvent alloc] init]; + + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: fabricIndex:%@; >", NSStringFromClass([self class]), _fabricIndex]; return descriptionString; } diff --git a/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m b/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m index 6605e43e30f5de..4c043b7814246f 100644 --- a/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m @@ -45,7 +45,8 @@ - (void)testOnboardingPayloadParser_Manual_NoError XCTAssertNotNil(payload); XCTAssertNil(error); - XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 2560); + XCTAssertTrue(payload.hasShortDiscriminator); + XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 10); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 123456780); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 1); XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); @@ -75,7 +76,8 @@ - (void)testOnboardingPayloadParser_Admin_NoError XCTAssertNotNil(payload); XCTAssertNil(error); - XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 2560); + XCTAssertTrue(payload.hasShortDiscriminator); + XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 10); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 123456780); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 1); XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); @@ -105,6 +107,7 @@ - (void)testOnboardingPayloadParser_QRCode_NoError XCTAssertNotNil(payload); XCTAssertNil(error); + XCTAssertFalse(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 2048); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); @@ -136,6 +139,7 @@ - (void)testOnboardingPayloadParser_NFC_NoError XCTAssertNotNil(payload); XCTAssertNil(error); + XCTAssertFalse(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 2048); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); @@ -167,7 +171,8 @@ - (void)testManualParser XCTAssertNotNil(payload); XCTAssertNil(error); - XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 2560); + XCTAssertTrue(payload.hasShortDiscriminator); + XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 10); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 123456780); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 1); XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); @@ -207,6 +212,7 @@ - (void)testQRCodeParser XCTAssertNotNil(payload); XCTAssertNil(error); + XCTAssertFalse(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 2048); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); @@ -227,6 +233,7 @@ - (void)testQRCodeParserWithOptionalData XCTAssertNil(error); XCTAssertEqual(payload.version.unsignedIntegerValue, 5); + XCTAssertFalse(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 2048); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index d0464d268fc426..7e19b0328b55a0 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -15,6 +15,8 @@ 1ED276E026C57CF000547A89 /* MTRCallbackBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ED276DF26C57CF000547A89 /* MTRCallbackBridge.mm */; }; 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ED276E126C5812A00547A89 /* MTRCluster.mm */; }; 1ED276E426C5832500547A89 /* MTRCluster.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED276E326C5832500547A89 /* MTRCluster.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1EDCE545289049A100E41EC9 /* MTROTAHeaderParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDCE543289049A100E41EC9 /* MTROTAHeaderParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1EDCE546289049A100E41EC9 /* MTROTAHeaderParser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1EDCE544289049A100E41EC9 /* MTROTAHeaderParser.mm */; }; 27A53C1727FBC6920053F131 /* MTRAttestationTrustStoreBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */; }; 27A53C1827FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */; }; 2C1B027A2641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2C1B02782641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm */; }; @@ -133,6 +135,8 @@ 1ED276DF26C57CF000547A89 /* MTRCallbackBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MTRCallbackBridge.mm; path = "zap-generated/MTRCallbackBridge.mm"; sourceTree = ""; }; 1ED276E126C5812A00547A89 /* MTRCluster.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCluster.mm; sourceTree = ""; }; 1ED276E326C5832500547A89 /* MTRCluster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRCluster.h; sourceTree = ""; }; + 1EDCE543289049A100E41EC9 /* MTROTAHeaderParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTROTAHeaderParser.h; sourceTree = ""; }; + 1EDCE544289049A100E41EC9 /* MTROTAHeaderParser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROTAHeaderParser.mm; sourceTree = ""; }; 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRAttestationTrustStoreBridge.h; sourceTree = ""; }; 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRAttestationTrustStoreBridge.mm; sourceTree = ""; }; 2C1B02782641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROperationalCredentialsDelegate.mm; sourceTree = ""; }; @@ -313,6 +317,8 @@ B202528F2459E34F00F97062 /* CHIP */ = { isa = PBXGroup; children = ( + 1EDCE543289049A100E41EC9 /* MTROTAHeaderParser.h */, + 1EDCE544289049A100E41EC9 /* MTROTAHeaderParser.mm */, 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */, 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */, 88EBF8CB27FABDD500686BC1 /* MTRDeviceAttestationDelegate.h */, @@ -484,6 +490,7 @@ 991DC08B247704DC00C13860 /* MTRLogging.h in Headers */, 5A7947E527C0129F00434CF2 /* MTRDeviceController+XPC.h in Headers */, B2E0D7B4245B0B5C003C5B48 /* MTRError_Internal.h in Headers */, + 1EDCE545289049A100E41EC9 /* MTROTAHeaderParser.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -623,6 +630,7 @@ 1EC3238D271999E2002A8BF0 /* cluster-objects.cpp in Sources */, 991DC0892475F47D00C13860 /* MTRDeviceController.mm in Sources */, B2E0D7B7245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.mm in Sources */, + 1EDCE546289049A100E41EC9 /* MTROTAHeaderParser.mm in Sources */, 1EC4CE5D25CC26E900D7304F /* MTRBaseClusters.mm in Sources */, 51E0310127EA20D20083DC9C /* MTRControllerAccessControl.mm in Sources */, 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */, diff --git a/src/include/platform/ConfigurationManager.h b/src/include/platform/ConfigurationManager.h index fae1475030eb11..607f9776980e29 100644 --- a/src/include/platform/ConfigurationManager.h +++ b/src/include/platform/ConfigurationManager.h @@ -26,12 +26,15 @@ #include +#if CHIP_HAVE_CONFIG_H +#include +#include +#endif + #include #include -#include #include #include -#include namespace chip { namespace Ble { @@ -178,9 +181,18 @@ class ConfigurationManager /** * Returns a reference to a ConfigurationManager object. * - * Applications should use this to access the features of the ConfigurationManager. + * Applications should use this to access features of the ConfigurationManager object + * that are common to all platforms. + */ +ConfigurationManager & ConfigurationMgr(); + +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. */ -extern ConfigurationManager & ConfigurationMgr(); +extern ConfigurationManager & ConfigurationMgrImpl(); /** * Sets a reference to a ConfigurationManager object. @@ -188,7 +200,7 @@ extern ConfigurationManager & ConfigurationMgr(); * This must be called before any calls to ConfigurationMgr. If a nullptr is passed in, * no changes will be made. */ -extern void SetConfigurationMgr(ConfigurationManager * configurationManager); +void SetConfigurationMgr(ConfigurationManager * configurationManager); inline CHIP_ERROR ConfigurationManager::GetLocationCapability(uint8_t & location) { diff --git a/src/include/platform/NetworkCommissioning.h b/src/include/platform/NetworkCommissioning.h index 589f1d17a61dfb..5880ec56658fca 100644 --- a/src/include/platform/NetworkCommissioning.h +++ b/src/include/platform/NetworkCommissioning.h @@ -135,7 +135,7 @@ class BaseDriver public: /** * @brief Callback for the network driver pushing the event of network status change to the network commissioning cluster. - * The platforms is explected to push the status from operations such as autonomous connection after loss of connectivity or + * The platforms is expected to push the status from operations such as autonomous connection after loss of connectivity or * during initial establishment. * * This function must be called in a thread-safe manner with CHIP stack. diff --git a/src/inet/InetInterface.cpp b/src/inet/InetInterface.cpp index f0a6310877d8cb..a13ff4e01e5ddb 100644 --- a/src/inet/InetInterface.cpp +++ b/src/inet/InetInterface.cpp @@ -868,6 +868,8 @@ CHIP_ERROR InterfaceId::GetLinkLocalAddr(IPAddress * llAddr) const struct ifaddrs * ifaddr; const int rv = getifaddrs(&ifaddr); + bool found = false; + if (rv == -1) { return INET_ERROR_ADDRESS_NOT_FOUND; @@ -881,9 +883,10 @@ CHIP_ERROR InterfaceId::GetLinkLocalAddr(IPAddress * llAddr) const ((mPlatformInterface == 0) || (mPlatformInterface == if_nametoindex(ifaddr_iter->ifa_name)))) { struct in6_addr * sin6_addr = &(reinterpret_cast(ifaddr_iter->ifa_addr))->sin6_addr; - if (sin6_addr->s6_addr[0] == 0xfe && (sin6_addr->s6_addr[1] & 0xc0) == 0x80) // Link Local Address + if ((sin6_addr->s6_addr[0] == 0xfe) && ((sin6_addr->s6_addr[1] & 0xc0) == 0x80)) // Link Local Address { (*llAddr) = IPAddress((reinterpret_cast(ifaddr_iter->ifa_addr))->sin6_addr); + found = true; break; } } @@ -891,7 +894,7 @@ CHIP_ERROR InterfaceId::GetLinkLocalAddr(IPAddress * llAddr) const } freeifaddrs(ifaddr); - return CHIP_NO_ERROR; + return (found) ? CHIP_NO_ERROR : INET_ERROR_ADDRESS_NOT_FOUND; } #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS diff --git a/src/inet/InetInterface.h b/src/inet/InetInterface.h index d87c1080b89e6c..f2e89fe4697919 100644 --- a/src/inet/InetInterface.h +++ b/src/inet/InetInterface.h @@ -185,7 +185,9 @@ class InterfaceId * @retval #CHIP_ERROR_INVALID_ARGUMENT If the link local address * is nullptr. * @retval #INET_ERROR_ADDRESS_NOT_FOUND If the link does not have - * any address configured. + * any address configured + * or if no link local (fe80::) + * address is present. * @retval #CHIP_NO_ERROR On success. */ CHIP_ERROR GetLinkLocalAddr(IPAddress * llAddr) const; diff --git a/src/inet/TCPEndPointImplSockets.cpp b/src/inet/TCPEndPointImplSockets.cpp index c34603e2099a46..2efdaba6c3222d 100644 --- a/src/inet/TCPEndPointImplSockets.cpp +++ b/src/inet/TCPEndPointImplSockets.cpp @@ -132,30 +132,6 @@ CHIP_ERROR TCPEndPointImplSockets::BindImpl(IPAddressType addrType, const IPAddr } } -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH - dispatch_queue_t dispatchQueue = static_cast(GetSystemLayer()).GetDispatchQueue(); - if (dispatchQueue != nullptr) - { - unsigned long fd = static_cast(mSocket); - - mReadableSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, fd, 0, dispatchQueue); - ReturnErrorCodeIf(mReadableSource == nullptr, CHIP_ERROR_NO_MEMORY); - - mWriteableSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_WRITE, fd, 0, dispatchQueue); - ReturnErrorCodeIf(mWriteableSource == nullptr, CHIP_ERROR_NO_MEMORY); - - dispatch_source_set_event_handler(mReadableSource, ^{ - this->HandlePendingIO(System::SocketEventFlags::kRead); - }); - - dispatch_source_set_event_handler(mWriteableSource, ^{ - this->HandlePendingIO(System::SocketEventFlags::kWrite); - }); - - dispatch_resume(mReadableSource); - dispatch_resume(mWriteableSource); - } -#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH return res; } @@ -648,19 +624,6 @@ void TCPEndPointImplSockets::DoCloseImpl(CHIP_ERROR err, State oldState) mSocket = kInvalidSocketFd; } } - -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH - if (mReadableSource) - { - dispatch_source_cancel(mReadableSource); - dispatch_release(mReadableSource); - } - if (mWriteableSource) - { - dispatch_source_cancel(mWriteableSource); - dispatch_release(mWriteableSource); - } -#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH } #if INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT diff --git a/src/inet/TCPEndPointImplSockets.h b/src/inet/TCPEndPointImplSockets.h index 036939e826323a..40e81eeb6a0d06 100644 --- a/src/inet/TCPEndPointImplSockets.h +++ b/src/inet/TCPEndPointImplSockets.h @@ -25,10 +25,6 @@ #include #include -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH -#include -#endif - namespace chip { namespace Inet { @@ -74,11 +70,6 @@ class TCPEndPointImplSockets : public TCPEndPoint, public EndPointStateSockets CHIP_ERROR BindSrcAddrFromIntf(IPAddressType addrType, InterfaceId intfId); static void HandlePendingIO(System::SocketEvents events, intptr_t data); -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH - dispatch_source_t mReadableSource = nullptr; - dispatch_source_t mWriteableSource = nullptr; -#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH - #if INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT /// This counts the number of bytes written on the TCP socket since thelast probe into the TCP outqueue was made. uint32_t mBytesWrittenSinceLastProbe; diff --git a/src/inet/UDPEndPointImplSockets.cpp b/src/inet/UDPEndPointImplSockets.cpp index 93b0828f5a1e21..a9e078cc5f48fd 100644 --- a/src/inet/UDPEndPointImplSockets.cpp +++ b/src/inet/UDPEndPointImplSockets.cpp @@ -205,22 +205,6 @@ CHIP_ERROR UDPEndPointImplSockets::BindImpl(IPAddressType addressType, const IPA } } -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH - dispatch_queue_t dispatchQueue = static_cast(&GetSystemLayer())->GetDispatchQueue(); - if (dispatchQueue != nullptr) - { - unsigned long fd = static_cast(mSocket); - - mReadableSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, fd, 0, dispatchQueue); - ReturnErrorCodeIf(mReadableSource == nullptr, CHIP_ERROR_NO_MEMORY); - - dispatch_source_set_event_handler(mReadableSource, ^{ - this->HandlePendingIO(System::SocketEventFlags::kRead); - }); - dispatch_resume(mReadableSource); - } -#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH - return CHIP_NO_ERROR; } @@ -431,14 +415,6 @@ void UDPEndPointImplSockets::CloseImpl() close(mSocket); mSocket = kInvalidSocketFd; } - -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH - if (mReadableSource) - { - dispatch_source_cancel(mReadableSource); - dispatch_release(mReadableSource); - } -#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH } void UDPEndPointImplSockets::Free() diff --git a/src/inet/UDPEndPointImplSockets.h b/src/inet/UDPEndPointImplSockets.h index 490360da5e9ec1..c078722fbb4bdd 100644 --- a/src/inet/UDPEndPointImplSockets.h +++ b/src/inet/UDPEndPointImplSockets.h @@ -26,10 +26,6 @@ #include #include -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH -#include -#endif - namespace chip { namespace Inet { @@ -65,10 +61,6 @@ class UDPEndPointImplSockets : public UDPEndPoint, public EndPointStateSockets InterfaceId mBoundIntfId; uint16_t mBoundPort; -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH - dispatch_source_t mReadableSource = nullptr; -#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH - #if CHIP_SYSTEM_CONFIG_USE_PLATFORM_MULTICAST_API public: using MulticastGroupHandler = CHIP_ERROR (*)(InterfaceId, const IPAddress &); diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index 0626daf57ca137..5cf4821b7bf1a4 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -78,6 +78,7 @@ static void HandleNodeResolve(void * context, DnssdService * result, const Span< FillNodeDataFromTxt(key, val, nodeData.commissionData); } + nodeData.LogDetail(); proxy->OnNodeDiscovered(nodeData); proxy->Release(); } diff --git a/src/lib/dnssd/Resolver.h b/src/lib/dnssd/Resolver.h index 356fdf92f360e8..140a71617645b5 100644 --- a/src/lib/dnssd/Resolver.h +++ b/src/lib/dnssd/Resolver.h @@ -125,6 +125,7 @@ struct CommonResolutionData { ChipLogDetail(Discovery, "\tMrp Interval active: not present"); } + ChipLogDetail(Discovery, "\tTCP Supported: %d", supportsTcp); } }; @@ -243,6 +244,7 @@ struct DiscoveredNodeData void LogDetail() const { + ChipLogDetail(Discovery, "Discovered node:"); resolutionData.LogDetail(); commissionData.LogDetail(); } diff --git a/src/lib/dnssd/minimal_mdns/ResponseBuilder.h b/src/lib/dnssd/minimal_mdns/ResponseBuilder.h index b2ce31ed60110f..6391d185f8f9e9 100644 --- a/src/lib/dnssd/minimal_mdns/ResponseBuilder.h +++ b/src/lib/dnssd/minimal_mdns/ResponseBuilder.h @@ -52,7 +52,7 @@ class ResponseBuilder mBuildOk = false; } - mHeader.SetFlags(mHeader.GetFlags().SetResponse()); + mHeader.SetFlags(mHeader.GetFlags().SetResponse().SetAuthoritative()); mEndianOutput = chip::Encoding::BigEndian::BufferWriter(mPacket->Start(), mPacket->DataLength() + mPacket->AvailableDataLength()); diff --git a/src/lib/dnssd/minimal_mdns/core/DnsHeader.h b/src/lib/dnssd/minimal_mdns/core/DnsHeader.h index 2bfe88a56eaa6d..5ab14837cc2702 100644 --- a/src/lib/dnssd/minimal_mdns/core/DnsHeader.h +++ b/src/lib/dnssd/minimal_mdns/core/DnsHeader.h @@ -53,6 +53,9 @@ class BitPackedFlags bool IsResponse() const { return (mValue & kIsResponseMask) == kIsResponseMask; } BitPackedFlags & SetResponse() { return SetMask(kIsResponseMask); } + bool IsAuthoritative() const { return (mValue & kAuthoritativeMask) == kAuthoritativeMask; } + BitPackedFlags & SetAuthoritative() { return SetMask(kAuthoritativeMask); } + bool IsTruncated() const { return (mValue & kTruncationMask) != 0; } BitPackedFlags & SetTruncated(bool value) { return value ? SetMask(kTruncationMask) : ClearMask(kTruncationMask); } @@ -79,11 +82,11 @@ class BitPackedFlags // 1111 1110 0000 0000 = FE0F // TODO(cecille): need to better document this value. Why is the comment different than the value? static constexpr uint16_t kMdnsNonIgnoredMask = 0x8E08; - - static constexpr uint16_t kIsResponseMask = 0x8000; - static constexpr uint16_t kOpcodeMask = 0x7000; - static constexpr uint16_t kTruncationMask = 0x0400; - static constexpr uint16_t kReturnCodeMask = 0x000F; + static constexpr uint16_t kAuthoritativeMask = 0x0400; + static constexpr uint16_t kIsResponseMask = 0x8000; + static constexpr uint16_t kOpcodeMask = 0x7000; + static constexpr uint16_t kTruncationMask = 0x0200; + static constexpr uint16_t kReturnCodeMask = 0x000F; }; /** diff --git a/src/lib/shell/BUILD.gn b/src/lib/shell/BUILD.gn index de7925a142adfc..9c003607b03116 100644 --- a/src/lib/shell/BUILD.gn +++ b/src/lib/shell/BUILD.gn @@ -89,6 +89,11 @@ static_library("shell") { "MainLoopMW320.cpp", "streamer_mw320.cpp", ] + } else if (chip_device_platform == "ameba") { + sources += [ + "MainLoopDefault.cpp", + "streamer_ameba.cpp", + ] } else { sources += [ "MainLoopDefault.cpp" ] } diff --git a/src/lib/shell/streamer_ameba.cpp b/src/lib/shell/streamer_ameba.cpp new file mode 100644 index 00000000000000..7f497d647cc3ac --- /dev/null +++ b/src/lib/shell/streamer_ameba.cpp @@ -0,0 +1,93 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Source implementation of an input / output stream for zehpyr targets. + */ + +#include +#include + +#include +#include + +#include "serial_api.h" + +// UART pin location: +// KM4 UART0: +// PA_18 (TX) +// PA_19 (RX) + +#define UART_TX PA_18 // UART0 TX +#define UART_RX PA_19 // UART0 RX + +namespace chip { +namespace Shell { +namespace { + +serial_t sobj; + +int streamer_ameba_init(streamer_t * streamer) +{ + (void) streamer; + serial_init(&sobj, UART_TX, UART_RX); + serial_baud(&sobj, 115200); + serial_format(&sobj, 8, ParityNone, 1); + return 0; +} + +ssize_t streamer_ameba_read(streamer_t * streamer, char * buffer, size_t length) +{ + (void) streamer; + uint16_t len_read = 0; + + while (len_read < length) + { + *(buffer + len_read) = (char) serial_getc(&sobj); + len_read++; + } + return len_read; +} + +ssize_t streamer_ameba_write(streamer_t * streamer, const char * buffer, size_t length) +{ + (void) streamer; + uint16_t len_written = 0; + + while (len_written < length) + { + serial_putc(&sobj, *(buffer + len_written)); + len_written++; + } + return len_written; +} + +static streamer_t streamer_ameba = { + .init_cb = streamer_ameba_init, + .read_cb = streamer_ameba_read, + .write_cb = streamer_ameba_write, +}; +} // namespace + +streamer_t * streamer_get(void) +{ + return &streamer_ameba; +} + +} // namespace Shell +} // namespace chip diff --git a/src/lib/shell/streamer_k32w.cpp b/src/lib/shell/streamer_k32w.cpp index ee0887766a8fb2..68523e7a2c44ff 100644 --- a/src/lib/shell/streamer_k32w.cpp +++ b/src/lib/shell/streamer_k32w.cpp @@ -28,7 +28,7 @@ #include #include "SerialManager.h" -extern uint8_t mOtSerMgrIfLog; +extern uint8_t gShellSerMgrIf; namespace chip { namespace Shell { @@ -48,7 +48,7 @@ ssize_t streamer_k32w_read(streamer_t * streamer, char * buffer, size_t length) uint16_t bytesRead = 0; (void) streamer; - Serial_Read(mOtSerMgrIfLog, (uint8_t *) buffer, length, &bytesRead); + Serial_Read(gShellSerMgrIf, (uint8_t *) buffer, length, &bytesRead); return bytesRead; } diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index 103555cde30b27..d5e18e69f702f0 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -124,6 +124,7 @@ static_library("support") { "SafeInt.h", "SerializableIntegerSet.cpp", "SerializableIntegerSet.h", + "SetupDiscriminator.h", "SortUtils.h", "StateMachine.h", "ThreadOperationalDataset.cpp", diff --git a/src/lib/support/SafeInt.h b/src/lib/support/SafeInt.h index efbaa23b376bea..ecf6d8721dcb1d 100644 --- a/src/lib/support/SafeInt.h +++ b/src/lib/support/SafeInt.h @@ -34,14 +34,13 @@ namespace chip { * of type U to the given type T. It does this by verifying that the value is * in the range of valid values for T. */ -template +template ::value, int> = 0> bool CanCastTo(U arg) { using namespace std; // U might be a reference to an integer type, if we're assigning from // something passed by reference. typedef typename remove_reference::type V; // V for "value" - static_assert(is_integral::value, "Must be assigning to an integral type"); static_assert(is_integral::value, "Must be assigning from an integral type"); // We want to check that "arg" can fit inside T but without doing any tests @@ -105,6 +104,12 @@ bool CanCastTo(U arg) return 0 <= arg && static_cast(arg) <= static_cast(numeric_limits::max()); } +template ::value, int> = 0> +bool CanCastTo(U arg) +{ + return CanCastTo>(arg); +} + /** * A function to reverse the effects of a signed-to-unsigned integer cast. * diff --git a/src/lib/support/SetupDiscriminator.h b/src/lib/support/SetupDiscriminator.h new file mode 100644 index 00000000000000..5c1fabae71ba1e --- /dev/null +++ b/src/lib/support/SetupDiscriminator.h @@ -0,0 +1,111 @@ +/* + * + * 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. + */ + +/** + * @file + * This file defines the SetupDiscriminator type, which is used by + * low-level code (e.g. BLE) in addition to setup payload code. + */ + +#pragma once + +#include + +#include + +namespace chip { + +class SetupDiscriminator +{ +public: + constexpr SetupDiscriminator() : mDiscriminator(0), mIsShortDiscriminator(0) {} + + // See section 5.1.2. QR Code in the Matter specification + static constexpr int kLongBits = 12; + + // See section 5.1.3. Manual Pairing Code in the Matter specification + static constexpr int kShortBits = 4; + + void SetShortValue(uint8_t discriminator) + { + VerifyOrDie(discriminator == (discriminator & kShortMask)); + mDiscriminator = (discriminator & kShortMask); + mIsShortDiscriminator = true; + } + + void SetLongValue(uint16_t discriminator) + { + VerifyOrDie(discriminator == (discriminator & kLongMask)); + mDiscriminator = (discriminator & kLongMask); + mIsShortDiscriminator = false; + } + + bool IsShortDiscriminator() const { return mIsShortDiscriminator; } + + uint8_t GetShortValue() const + { + if (IsShortDiscriminator()) + { + return static_cast(mDiscriminator); + } + + return LongToShortValue(mDiscriminator); + } + + uint16_t GetLongValue() const + { + VerifyOrDie(!IsShortDiscriminator()); + return mDiscriminator; + } + + bool MatchesLongDiscriminator(uint16_t discriminator) const + { + if (!IsShortDiscriminator()) + { + return mDiscriminator == discriminator; + } + + return mDiscriminator == LongToShortValue(discriminator); + } + + bool operator==(const SetupDiscriminator & other) const + { + return mIsShortDiscriminator == other.mIsShortDiscriminator && mDiscriminator == other.mDiscriminator; + } + +private: + static constexpr uint16_t kLongMask = (1 << kLongBits) - 1; + static constexpr uint8_t kShortMask = (1 << kShortBits) - 1; + + static uint8_t LongToShortValue(uint16_t longValue) + { + // Short value consists of the high bits of the long value. + constexpr int kLongToShortShift = kLongBits - kShortBits; + return static_cast(longValue >> kLongToShortShift); + } + + // If long discriminator, all 12 bits are used. If short discriminator, + // only the low kShortBits bits are used, to store the value of the short + // discriminator (which contains only the high bits of the complete 12-bit + // discriminator). + static_assert(kLongBits == 12, "Unexpected field length"); + static_assert(kShortBits <= kLongBits, "Unexpected field length"); + uint16_t mDiscriminator : 12; + uint16_t mIsShortDiscriminator : 1; +}; + +} // namespace chip diff --git a/src/lwip/efr32/lwipopts-rs911x.h b/src/lwip/efr32/lwipopts-rs911x.h index 5f84181387a69f..355ab90dd1e462 100644 --- a/src/lwip/efr32/lwipopts-rs911x.h +++ b/src/lwip/efr32/lwipopts-rs911x.h @@ -124,7 +124,7 @@ #define MEMP_SEPARATE_POOLS (1) #define LWIP_PBUF_FROM_CUSTOM_POOLS (0) #define MEMP_USE_CUSTOM_POOLS (0) -#define PBUF_POOL_SIZE (16) +#define PBUF_POOL_SIZE (32) #define PBUF_POOL_BUFSIZE (1280) // IPv6 path MTU #define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) #define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) diff --git a/src/messaging/ApplicationExchangeDispatch.cpp b/src/messaging/ApplicationExchangeDispatch.cpp index 170e6bb702864d..183e8540e075fb 100644 --- a/src/messaging/ApplicationExchangeDispatch.cpp +++ b/src/messaging/ApplicationExchangeDispatch.cpp @@ -38,7 +38,6 @@ bool ApplicationExchangeDispatch::MessagePermitted(Protocols::Id protocol, uint8 case static_cast(Protocols::SecureChannel::MsgType::PASE_Pake1): case static_cast(Protocols::SecureChannel::MsgType::PASE_Pake2): case static_cast(Protocols::SecureChannel::MsgType::PASE_Pake3): - case static_cast(Protocols::SecureChannel::MsgType::PASE_PakeError): case static_cast(Protocols::SecureChannel::MsgType::CASE_Sigma1): case static_cast(Protocols::SecureChannel::MsgType::CASE_Sigma2): case static_cast(Protocols::SecureChannel::MsgType::CASE_Sigma3): diff --git a/src/messaging/BUILD.gn b/src/messaging/BUILD.gn index ecb009d02e9441..f01b749d3f6d17 100644 --- a/src/messaging/BUILD.gn +++ b/src/messaging/BUILD.gn @@ -43,6 +43,7 @@ static_library("messaging") { "ExchangeContext.cpp", "ExchangeContext.h", "ExchangeDelegate.h", + "ExchangeHolder.h", "ExchangeMessageDispatch.cpp", "ExchangeMessageDispatch.h", "ExchangeMgr.cpp", diff --git a/src/messaging/ExchangeContext.cpp b/src/messaging/ExchangeContext.cpp index bfc967f6ebcaf3..7bd0aaffa79025 100644 --- a/src/messaging/ExchangeContext.cpp +++ b/src/messaging/ExchangeContext.cpp @@ -309,6 +309,19 @@ ExchangeContext::ExchangeContext(ExchangeManager * em, uint16_t ExchangeId, cons mFlags.Set(Flags::kFlagEphemeralExchange, isEphemeralExchange); mDelegate = delegate; + // + // If we're an initiator and we just created this exchange, we obviously did so to send a message. Let's go ahead and + // set the flag on this to correctly mark it as so. + // + // This only applies to non-ephemeral exchanges. Ephemeral exchanges do not have an intention of sending out a message + // since they're created expressly for the purposes of sending out a standalone ACK when the message could not be handled + // through normal means. + // + if (Initiator && !isEphemeralExchange) + { + WillSendMessage(); + } + SetAckPending(false); // Do not request Ack for multicast diff --git a/src/messaging/ExchangeContext.h b/src/messaging/ExchangeContext.h index 8e3946ef2c348a..3e7e56121c6d26 100644 --- a/src/messaging/ExchangeContext.h +++ b/src/messaging/ExchangeContext.h @@ -54,6 +54,7 @@ class ExchangeContextDeletor * This class represents an ongoing conversation (ExchangeContext) between two or more nodes. * It defines methods for encoding and communicating CHIP messages within an ExchangeContext * over various transport mechanisms, for example, TCP, UDP, or CHIP Reliable Messaging. + * */ class DLL_EXPORT ExchangeContext : public ReliableMessageContext, public ReferenceCounted, @@ -204,6 +205,13 @@ class DLL_EXPORT ExchangeContext : public ReliableMessageContext, */ bool IsResponseExpected() const; + /** + * Determine whether we are expecting our consumer to send a message on + * this exchange (i.e. WillSendMessage was called and the message has not + * yet been sent). + */ + bool IsSendExpected() const { return mFlags.Has(Flags::kFlagWillSendMessage); } + private: class ExchangeSessionHolder : public SessionHolderWithDelegate { @@ -221,13 +229,6 @@ class DLL_EXPORT ExchangeContext : public ReliableMessageContext, ExchangeSessionHolder mSession; // The connection state uint16_t mExchangeId; // Assigned exchange ID. - /** - * Determine whether we are expecting our consumer to send a message on - * this exchange (i.e. WillSendMessage was called and the message has not - * yet been sent). - */ - bool IsSendExpected() const { return mFlags.Has(Flags::kFlagWillSendMessage); } - /** * Track whether we are now expecting a response to a message sent via this exchange (because that * message had the kExpectResponse flag set in its sendFlags). diff --git a/src/messaging/ExchangeDelegate.h b/src/messaging/ExchangeDelegate.h index fe870b6c3094a9..363f0508d34515 100644 --- a/src/messaging/ExchangeDelegate.h +++ b/src/messaging/ExchangeDelegate.h @@ -41,6 +41,34 @@ class ExchangeContext; * called by ExchangeContext object on specific events. If the user of ExchangeContext * is interested in receiving these callbacks, they can specialize this class and handle * each trigger in their implementation of this class. + * + * For consumers who use an ExchangeContext to send/receive protocol messages, there are specific + * expectations around who manages the exchange w.r.t clean-up and destruction: + * 1. When you allocate an exchange, you own the exchange. Until you send a message successfully, it's on you + * to release that ownership by calling Close or Abort on the exchange. + * + * 2. If you send a message successfully that doesn't require a response, the ownership transfers to + * the ExchangeMgr, and it will close the exchange for you automatically. + * + * 3. If you send a message successfully that does require a response and desire to close it before + * you get any notifications on that exchange from the ExchangeMgr, you should call Close or Abort on that exchange. + * + * 4. On reception of a message on an exchange, the ownership transfers to the OnMessageReceived callee. + * If you return from OnMessageReceived and no messages were sent on that exchange, the exchange will transfer back + * to the ExchangeMgr and it will automatically close it. + * + * 5. If you call WillSendMessage on the exchange in OnMessageReceived indicating a desire to send a message later + * on the exchange, then the exchange remains with you, and it's your responsibility to either send a message on it, + * or Close/Abort if you no longer wish to have the exchange around. + * + * 6. If you get a call to OnExchangeClosing, you should give up your reference to the exchange + * by 'nulling' out your reference to the exchange. The exchange will be automatically closed by the ExchangeMgr. + * + * 6. If you get a call to OnResponseTimeout, you should give up your reference to the exchange + * by 'nulling' out your reference to the exchange UNLESS you intend to do further work on the exchange. If so, + * rules 2, 3 and 5 apply. Otherwise, the exchange will be automatically closed by the ExchangeMgr. Note that + * if the cause of the call is the release of the underlying session, attempts to send a message will result in failure. + * */ class DLL_EXPORT ExchangeDelegate { diff --git a/src/messaging/ExchangeHolder.h b/src/messaging/ExchangeHolder.h new file mode 100644 index 00000000000000..fb7e2cd39c55bd --- /dev/null +++ b/src/messaging/ExchangeHolder.h @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +namespace chip { +namespace Messaging { + +/** + * @brief + * This provides a RAII'fied wrapper for an ExchangeContext that automatically manages + * cleaning up the EC when the holder ceases to exist, or acquires a new exchange. This is + * meant to be used by application and protocol logic code that would otherwise need to closely + * manage their internal pointers to an ExchangeContext and correctly + * null-it out/abort it depending on the circumstances. This relies on clear rules + * established by ExchangeContext and the transfer of ownership at various points + * in its lifetime. + * + * It does this by intercepting OnExchangeClosing and looking at the various + * states the exchange might be in to decide how best to correctly shutdown the exchange. + * (see AbortIfNeeded()). + * + * This is a delegate forwarder - consumers can still register to be an ExchangeDelegate + * and get notified of all relevant happenings on that delegate interface. + * + */ +class ExchangeHolder : public ExchangeDelegate +{ +public: + /** + * @brief + * Constructor that takes an ExchangeDelegate that is forwarded all relevant + * calls from the underlying exchange. + */ + ExchangeHolder(ExchangeDelegate & delegate) : mpExchangeDelegate(delegate) {} + + virtual ~ExchangeHolder() { Release(); } + + bool Contains(const ExchangeContext * exchange) const { return mpExchangeCtx == exchange; } + + /** + * @brief + * Replaces the held exchange and associated delegate to instead track the given ExchangeContext, aborting + * and dereferencing any previously held exchange as necessary. This method should be called whenever protocol logic + * that is managing this holder is transitioning from an outdated Exchange to a new one, often during + * the start of a new transaction. + */ + void Grab(ExchangeContext * exchange) + { + VerifyOrDie(exchange != nullptr); + + Release(); + + mpExchangeCtx = exchange; + mpExchangeCtx->SetDelegate(this); + } + + /* + * @brief + * This shuts down the exchange (if a valid one is being tracked) and releases our reference to it. + */ + void Release() + { + if (mpExchangeCtx) + { + mpExchangeCtx->SetDelegate(nullptr); + + /** + * Shutting down the exchange requires calling Abort() on the exchange selectively in the following scenarios: + * 1. The exchange is currently awaiting a response. This would have happened if our consumer just sent a message + * on the exchange and is awaiting a response. Since we no longer care to wait for the response, we don't care about + * doing MRP retries for the send we just did, so abort the exchange. + * + * 2. Our consumer has signaled an interest in sending a message. This could have been signaled right at exchange + * creation time as the initiator, or when handling a message and the consumer intends to send a response, albeit, + * asynchronously. In both cases, the stack expects the exchange consumer to close/abort the EC if it no longer has + * interest in it. Since we don't have a pending message at this point, calling Abort is OK here as well. + * + */ + if (mpExchangeCtx->IsResponseExpected() || mpExchangeCtx->IsSendExpected()) + { + mpExchangeCtx->Abort(); + } + } + + mpExchangeCtx = nullptr; + } + + explicit operator bool() const { return mpExchangeCtx != nullptr; } + ExchangeContext * Get() const { return mpExchangeCtx; } + + ExchangeContext * operator->() const + { + VerifyOrDie(mpExchangeCtx != nullptr); + return mpExchangeCtx; + } + +private: + CHIP_ERROR OnMessageReceived(ExchangeContext * ec, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && payload) override + { + return mpExchangeDelegate.OnMessageReceived(ec, payloadHeader, std::move(payload)); + } + + void OnResponseTimeout(ExchangeContext * ec) override { return mpExchangeDelegate.OnResponseTimeout(ec); } + + void OnExchangeClosing(ExchangeContext * ec) override + { + if (mpExchangeCtx) + { + mpExchangeCtx->SetDelegate(nullptr); + mpExchangeCtx = nullptr; + } + + mpExchangeDelegate.OnExchangeClosing(ec); + } + + ExchangeMessageDispatch & GetMessageDispatch() override { return mpExchangeDelegate.GetMessageDispatch(); } + + ExchangeDelegate & mpExchangeDelegate; + ExchangeContext * mpExchangeCtx = nullptr; +}; + +} // namespace Messaging +} // namespace chip diff --git a/src/messaging/tests/BUILD.gn b/src/messaging/tests/BUILD.gn index 0e834aa99f1f0a..1cb910b415b1e9 100644 --- a/src/messaging/tests/BUILD.gn +++ b/src/messaging/tests/BUILD.gn @@ -50,6 +50,7 @@ chip_test_suite("tests") { # And TestAbortExchangesForFabric does not link on EFR32 for some reason. test_sources += [ "TestAbortExchangesForFabric.cpp", + "TestExchangeHolder.cpp", "TestExchangeMgr.cpp", "TestReliableMessageProtocol.cpp", ] diff --git a/src/messaging/tests/TestExchangeHolder.cpp b/src/messaging/tests/TestExchangeHolder.cpp new file mode 100644 index 00000000000000..ac7c826ad9d0f5 --- /dev/null +++ b/src/messaging/tests/TestExchangeHolder.cpp @@ -0,0 +1,441 @@ +/* + * 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. + */ + +/** + * @file + * This file implements unit tests for aborting existing exchanges (except + * one) for a fabric. + */ + +#include "messaging/ExchangeDelegate.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace Protocols { + +// +// Let's create a mock protocol that encapsulates a 3 message exchange to test out the ExchangeHolder +// and the various states the underlying exchange might be set to, altering the clean-up behavior +// the holder will execute depending on those states. +// +namespace MockProtocol { +static constexpr Id Id(VendorId::TestVendor1, 1); + +enum class MessageType : uint8_t +{ + kMsg1 = 0x01, + kMsg2 = 0x02, + kMsg3 = 0x03 +}; +} // namespace MockProtocol + +template <> +struct MessageTypeTraits +{ + static constexpr const Protocols::Id & ProtocolId() { return MockProtocol::Id; } +}; + +} // namespace Protocols +} // namespace chip + +namespace { + +using namespace chip; +using namespace chip::Messaging; +using namespace chip::System; +using namespace chip::Protocols; + +using TestContext = Test::LoopbackMessagingContext; + +TestContext * gCtx = nullptr; + +class MockProtocolResponder : public ExchangeDelegate, public Messaging::UnsolicitedMessageHandler +{ +public: + enum class BehaviorModifier + { + kNone, + kHoldMsg1, + }; + + MockProtocolResponder(BehaviorModifier modifier = BehaviorModifier::kNone) : mExchangeCtx(*this) + { + VerifyOrDie(gCtx != nullptr); + mBehaviorModifier = modifier; + gCtx->GetExchangeManager().RegisterUnsolicitedMessageHandlerForProtocol(chip::Protocols::MockProtocol::Id, this); + } + + ~MockProtocolResponder() + { + gCtx->GetExchangeManager().UnregisterUnsolicitedMessageHandlerForProtocol(chip::Protocols::MockProtocol::Id); + } + + bool DidInteractionSucceed() { return mInteractionSucceeded; } + +private: + CHIP_ERROR OnMessageReceived(ExchangeContext * ec, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && buffer) override; + + CHIP_ERROR OnUnsolicitedMessageReceived(const PayloadHeader & payloadHeader, ExchangeDelegate *& newDelegate) override + { + newDelegate = this; + return CHIP_NO_ERROR; + } + + void OnResponseTimeout(ExchangeContext * ec) override {} + + ExchangeHolder mExchangeCtx; + BehaviorModifier mBehaviorModifier = BehaviorModifier::kNone; + bool mInteractionSucceeded = false; +}; + +class MockProtocolInitiator : public ExchangeDelegate +{ +public: + enum class BehaviorModifier + { + kNone, + kHoldMsg2, + }; + + MockProtocolInitiator(BehaviorModifier modifier = BehaviorModifier::kNone) : mExchangeCtx(*this) + { + mBehaviorModifier = modifier; + } + + CHIP_ERROR StartInteraction(SessionHandle & sessionHandle); + + bool DidInteractionSucceed() { return mInteractionSucceeded; } + +private: + CHIP_ERROR OnMessageReceived(ExchangeContext * ec, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && buffer) override; + + void OnResponseTimeout(ExchangeContext * ec) override {} + + ExchangeHolder mExchangeCtx; + BehaviorModifier mBehaviorModifier = BehaviorModifier::kNone; + bool mInteractionSucceeded = false; +}; + +CHIP_ERROR MockProtocolResponder::OnMessageReceived(ExchangeContext * ec, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && buffer) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + if (payloadHeader.HasMessageType(chip::Protocols::MockProtocol::MessageType::kMsg1)) + { + // + // This is the first message in the exchange - let's have our holder start managing the exchange by grabbing it. + // + mExchangeCtx.Grab(ec); + + if (mBehaviorModifier != BehaviorModifier::kHoldMsg1) + { + PacketBufferHandle respBuffer = MessagePacketBuffer::New(0); + VerifyOrReturnError(!buffer.IsNull(), CHIP_ERROR_NO_MEMORY); + ReturnErrorOnFailure(mExchangeCtx->SendMessage(chip::Protocols::MockProtocol::MessageType::kMsg2, std::move(respBuffer), + SendMessageFlags::kExpectResponse)); + } + else + { + mExchangeCtx->WillSendMessage(); + } + } + else if (payloadHeader.HasMessageType(chip::Protocols::MockProtocol::MessageType::kMsg3)) + { + mInteractionSucceeded = true; + } + else + { + err = CHIP_ERROR_INVALID_MESSAGE_TYPE; + } + + return err; +} + +CHIP_ERROR MockProtocolInitiator::StartInteraction(SessionHandle & sessionHandle) +{ + PacketBufferHandle buffer = MessagePacketBuffer::New(0); + VerifyOrReturnError(!buffer.IsNull(), CHIP_ERROR_NO_MEMORY); + + auto exchange = gCtx->GetExchangeManager().NewContext(sessionHandle, this); + VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_NO_MEMORY); + + // + // This is the first exchange in this interaction - let's have our holder start managing the exchange by grabbing it. + // + mExchangeCtx.Grab(exchange); + + ReturnErrorOnFailure(mExchangeCtx->SendMessage(chip::Protocols::MockProtocol::MessageType::kMsg1, std::move(buffer), + SendMessageFlags::kExpectResponse)); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR MockProtocolInitiator::OnMessageReceived(ExchangeContext * ec, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && buffer) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + if (payloadHeader.HasMessageType(chip::Protocols::MockProtocol::MessageType::kMsg2)) + { + if (mBehaviorModifier != BehaviorModifier::kHoldMsg2) + { + PacketBufferHandle respBuffer = MessagePacketBuffer::New(0); + VerifyOrReturnError(!buffer.IsNull(), CHIP_ERROR_NO_MEMORY); + ReturnErrorOnFailure(mExchangeCtx->SendMessage(chip::Protocols::MockProtocol::MessageType::kMsg3, std::move(respBuffer), + SendMessageFlags::kNone)); + + mInteractionSucceeded = true; + } + else + { + mExchangeCtx->WillSendMessage(); + } + } + else + { + err = CHIP_ERROR_INVALID_MESSAGE_TYPE; + } + + return err; +} + +void TestExchangeHolder(nlTestSuite * inSuite, void * inContext) +{ + TestContext & ctx = *reinterpret_cast(inContext); + + gCtx = &ctx; + + auto sessionHandle = ctx.GetSessionAliceToBob(); + + // + // #1: Initiator >--- Msg1 --X Responder. + // + // Initiator sends Msg1 to Responder, but we set it up such that Responder doesn't actually + // receive the message. + // + // Then, destroy both objects. Initiator's holder should correctly abort the exchange since it's waiting for + // a response. + // + { + ChipLogProgress(ExchangeManager, "-------- #1: Initiator >-- Msg1 --X Responder ---------"); + + { + MockProtocolInitiator initiator; + MockProtocolResponder responder; + + auto err = initiator.StartInteraction(sessionHandle); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + } + + // + // Service IO AFTER the objects above cease to exist to prevent Msg1 from getting to Responder. This also + // flush any pending messages in the queue. + // + ctx.DrainAndServiceIO(); + NL_TEST_ASSERT(inSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); + } + + // + // #2: Initiator --- Msg1 --> Responder (WillSend) + // + // Initiator sends Msg1 to Responder, which is received successfully. However, Responder + // doesn't send a response right away (calls WillSendMessage() on the EC). + // + // Then, destroy both objects. Initiator's holder should correctly abort the exchange since it's waiting for + // a response, and so should the Responder's holder since it has yet to send a message. + // + { + { + ChipLogProgress(ExchangeManager, "-------- #2: Initiator >-- Msg1 --> Responder (WillSend) ---------"); + + MockProtocolInitiator initiator; + MockProtocolResponder responder(MockProtocolResponder::BehaviorModifier::kHoldMsg1); + + auto err = initiator.StartInteraction(sessionHandle); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + } + + NL_TEST_ASSERT(inSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); + } + + // + // #3: Initiator --- Msg1 --> Responder + // (WillSend) Initiator <-- Msg2 <-- Responder + // + // Initiator receives Msg2 back from Responder, but calls WillSend on that EC. + // + // Then, destroy both objects. Initiator's holder should correctly abort the exchange since it's waiting + // to send a response, and Responder's holder should abort as well since it's waiting for a response. + // + { + { + ChipLogProgress(ExchangeManager, "-------- #3: (WillSend) Initiator <-- Msg2 <-- Responder ---------"); + + MockProtocolInitiator initiator(MockProtocolInitiator::BehaviorModifier::kHoldMsg2); + MockProtocolResponder responder; + + auto err = initiator.StartInteraction(sessionHandle); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + } + + NL_TEST_ASSERT(inSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); + } + + // + // #4: Initiator --- Msg1 --> Responder + // Initiator <-- Msg2 <-- Responder + // Initiator >-- Msg3 --> Responder + // + // Initiator sends final message in exchange to Responder, which is received successfully. + // + // Then, destroy both objects. Initiator's holder should NOT abort the underlying exchange since + // it has sent the final message in the exchange, while responder's holder should NOT abor the underlying + // exchange either since it is not going to send any further messages on the exchange. + // + { + { + ChipLogProgress(ExchangeManager, "-------- #4: Initiator >-- Msg3 --> Responder ---------"); + + MockProtocolInitiator initiator; + MockProtocolResponder responder; + + auto err = initiator.StartInteraction(sessionHandle); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + } + + NL_TEST_ASSERT(inSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); + } + + // + // #5: Initiator --- Msg1 --> Responder (WillSend) + // Initiator --- Msg1 --> Responder (WillSend) + // + // Similar to #2, except we have Initiator start the interaction again. This validates + // ExchangeHolder::Grab in correctly aborting a previous exchange and acquiring a new one. + // + // Then, destroy both objects. Both holders should abort the exchange (see #2). + // + { + { + ChipLogProgress(ExchangeManager, "-------- #5: Initiator >-- Msg1 --> Responder (WillSend) X2 ---------"); + + MockProtocolInitiator initiator; + MockProtocolResponder responder(MockProtocolResponder::BehaviorModifier::kHoldMsg1); + + auto err = initiator.StartInteraction(sessionHandle); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + + err = initiator.StartInteraction(sessionHandle); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + } + + ctx.DrainAndServiceIO(); + NL_TEST_ASSERT(inSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); + } + + // + // #6: Initiator --- Msg1 --> Responder + // Initiator <-- Msg2 <-- Responder + // Initiator >-- Msg3 --> Responder + // + // X2 + // + // Similar to #4, except we do the entire interaction twice. This validates + // ExchangeHolder::Grab in correctly releasing a reference to a previous exchange (but not aborting it) + // and acquiring a new one. + // + // Then, destroy both objects. Both holders should release their reference without aborting. + // + { + { + ChipLogProgress(ExchangeManager, "-------- #6: Initiator >-- Msg3 --> Responder X2 ---------"); + + MockProtocolInitiator initiator; + MockProtocolResponder responder; + + auto err = initiator.StartInteraction(sessionHandle); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + + err = initiator.StartInteraction(sessionHandle); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + } + + NL_TEST_ASSERT(inSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); + } +} + +// Test Suite + +/** + * Test Suite that lists all the test functions. + */ +// clang-format off +const nlTest sTests[] = +{ + NL_TEST_DEF("TestExchangeHolder", TestExchangeHolder), + + NL_TEST_SENTINEL() +}; +// clang-format on + +// clang-format off +nlTestSuite sSuite = +{ + "Test-TestExchangeHolder", + &sTests[0], + TestContext::Initialize, + TestContext::Finalize +}; +// clang-format on + +} // anonymous namespace + +/** + * Main + */ +int TestExchangeHolder() +{ + return chip::ExecuteTestsWithContext(&sSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestExchangeHolder); diff --git a/src/platform/Ameba/ConfigurationManagerImpl.cpp b/src/platform/Ameba/ConfigurationManagerImpl.cpp index a1f4f00eac306b..e64b097b86c253 100644 --- a/src/platform/Ameba/ConfigurationManagerImpl.cpp +++ b/src/platform/Ameba/ConfigurationManagerImpl.cpp @@ -284,5 +284,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) // sys_reset(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Ameba/ConfigurationManagerImpl.h b/src/platform/Ameba/ConfigurationManagerImpl.h index def780ea343817..7587f5366d7ddf 100644 --- a/src/platform/Ameba/ConfigurationManagerImpl.h +++ b/src/platform/Ameba/ConfigurationManagerImpl.h @@ -76,5 +76,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Ameba/ConnectivityManagerImpl.cpp b/src/platform/Ameba/ConnectivityManagerImpl.cpp index d9dfa8bc9a38e8..8e8af6049e3c38 100644 --- a/src/platform/Ameba/ConnectivityManagerImpl.cpp +++ b/src/platform/Ameba/ConnectivityManagerImpl.cpp @@ -163,6 +163,7 @@ void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) { ChangeWiFiStationState(kWiFiStationState_Connecting_Failed); } + DriveStationState(); } if (event->Type == DeviceEventType::kRtkWiFiScanCompletedEvent) { diff --git a/src/platform/Ameba/NetworkCommissioningDriver.h b/src/platform/Ameba/NetworkCommissioningDriver.h index 70708df983da45..0303642d3c6396 100644 --- a/src/platform/Ameba/NetworkCommissioningDriver.h +++ b/src/platform/Ameba/NetworkCommissioningDriver.h @@ -127,7 +127,6 @@ class AmebaWiFiDriver final : public WiFiDriver bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); CHIP_ERROR StartScanWiFiNetworks(ByteSpan ssid); - WiFiNetworkIterator mWiFiIterator = WiFiNetworkIterator(this); WiFiNetwork mSavedNetwork; WiFiNetwork mStagingNetwork; ScanCallback * mpScanCallback; diff --git a/src/platform/Ameba/PlatformManagerImpl.cpp b/src/platform/Ameba/PlatformManagerImpl.cpp index 1d5a8d8aa2e9c8..0b89c4a8c24971 100644 --- a/src/platform/Ameba/PlatformManagerImpl.cpp +++ b/src/platform/Ameba/PlatformManagerImpl.cpp @@ -59,8 +59,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) CHIP_ERROR err; - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - // Make sure the LwIP core lock has been initialized err = Internal::InitLwIPCoreLock(); diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 1ca7fee1a8fdd9..b8b20ee5739379 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -381,7 +381,7 @@ if (chip_device_platform != "none") { public_deps = [ ":platform_base", - "${chip_root}/src/app:app_buildconfig", + "${chip_root}/src/app:app_config", "${chip_root}/src/app/common:cluster-objects", "${chip_root}/src/crypto", "${chip_root}/src/lib/support", diff --git a/src/platform/CYW30739/CHIPDevicePlatformConfig.h b/src/platform/CYW30739/CHIPDevicePlatformConfig.h index 3b48f0d956b4e3..06365fb76356f9 100644 --- a/src/platform/CYW30739/CHIPDevicePlatformConfig.h +++ b/src/platform/CYW30739/CHIPDevicePlatformConfig.h @@ -56,7 +56,6 @@ #ifndef CHIP_DEVICE_CONFIG_ENABLE_THREAD #define CHIP_DEVICE_CONFIG_ENABLE_THREAD 1 #define CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE 0x00001000 -#define CHIP_DEVICE_CONFIG_THREAD_SRP_MAX_SERVICES 5 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_DNS_CLIENT 1 #endif diff --git a/src/platform/CYW30739/ConfigurationManagerImpl.cpp b/src/platform/CYW30739/ConfigurationManagerImpl.cpp index 71d32970f10881..a706ceec55e492 100644 --- a/src/platform/CYW30739/ConfigurationManagerImpl.cpp +++ b/src/platform/CYW30739/ConfigurationManagerImpl.cpp @@ -212,5 +212,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) wiced_hal_wdog_reset_system(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/CYW30739/ConfigurationManagerImpl.h b/src/platform/CYW30739/ConfigurationManagerImpl.h index 284f4d37e94551..40538888170245 100644 --- a/src/platform/CYW30739/ConfigurationManagerImpl.h +++ b/src/platform/CYW30739/ConfigurationManagerImpl.h @@ -74,5 +74,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/CYW30739/PlatformManagerImpl.cpp b/src/platform/CYW30739/PlatformManagerImpl.cpp index c8b547d199fba8..41e91ea0a205a6 100644 --- a/src/platform/CYW30739/PlatformManagerImpl.cpp +++ b/src/platform/CYW30739/PlatformManagerImpl.cpp @@ -45,8 +45,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) err = PersistedStorage::KeyValueStoreMgrImpl().Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - /* Create the thread object. */ mThread = wiced_rtos_create_thread(); VerifyOrExit(mThread != nullptr, err = CHIP_ERROR_NO_MEMORY); diff --git a/src/platform/Darwin/BUILD.gn b/src/platform/Darwin/BUILD.gn index c0c4416643ad3f..dc58f04faa75e9 100644 --- a/src/platform/Darwin/BUILD.gn +++ b/src/platform/Darwin/BUILD.gn @@ -94,7 +94,7 @@ static_library("Darwin") { ] public_deps = [ - "${chip_root}/src/app:app_buildconfig", + "${chip_root}/src/app:app_config", "${chip_root}/src/platform:platform_base", ] diff --git a/src/platform/Darwin/BleConnectionDelegate.h b/src/platform/Darwin/BleConnectionDelegate.h index a86171b823cce1..1a7057ee43c48a 100644 --- a/src/platform/Darwin/BleConnectionDelegate.h +++ b/src/platform/Darwin/BleConnectionDelegate.h @@ -26,7 +26,7 @@ namespace Internal { class BleConnectionDelegateImpl : public Ble::BleConnectionDelegate { public: - virtual void NewConnection(Ble::BleLayer * bleLayer, void * appState, const uint16_t connDiscriminator); + virtual void NewConnection(Ble::BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator); virtual CHIP_ERROR CancelConnection(); }; diff --git a/src/platform/Darwin/BleConnectionDelegateImpl.mm b/src/platform/Darwin/BleConnectionDelegateImpl.mm index 22f97cef79c54f..e5cfd39778b9f8 100644 --- a/src/platform/Darwin/BleConnectionDelegateImpl.mm +++ b/src/platform/Darwin/BleConnectionDelegateImpl.mm @@ -49,13 +49,13 @@ @interface BleConnection : NSObject +#include #include #include #include @@ -68,6 +69,17 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetTotalOperationalHours(uint32_t & total return CHIP_ERROR_INVALID_TIME; } +CHIP_ERROR DiagnosticDataProviderImpl::GetBootReason(BootReasonType & bootReason) +{ + uint32_t reason = 0; + ReturnErrorOnFailure(ConfigurationMgr().GetBootReason(reason)); + + VerifyOrReturnError(CanCastTo(reason), CHIP_ERROR_INVALID_INTEGER_VALUE); + bootReason = static_cast(reason); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks() { // If implemented, the server SHALL set the value of the CurrentHeapHighWatermark attribute to the diff --git a/src/platform/Darwin/DiagnosticDataProviderImpl.h b/src/platform/Darwin/DiagnosticDataProviderImpl.h index 6554c03041346b..3cfc31bc1f9678 100644 --- a/src/platform/Darwin/DiagnosticDataProviderImpl.h +++ b/src/platform/Darwin/DiagnosticDataProviderImpl.h @@ -38,6 +38,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider // ===== Methods that implement the PlatformManager abstract interface. CHIP_ERROR GetUpTime(uint64_t & upTime) override; CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) override; + CHIP_ERROR GetBootReason(BootReasonType & bootReason) override; // ===== Methods that implement the DiagnosticDataProvider abstract interface. bool SupportsWatermarks() override { return true; } diff --git a/src/platform/Darwin/DnssdContexts.cpp b/src/platform/Darwin/DnssdContexts.cpp index 2699bec216983b..a047eced226687 100644 --- a/src/platform/Darwin/DnssdContexts.cpp +++ b/src/platform/Darwin/DnssdContexts.cpp @@ -262,7 +262,7 @@ RegisterContext::RegisterContext(const char * sType, DnssdPublishCallback cb, vo void RegisterContext::DispatchFailure(DNSServiceErrorType err) { - ChipLogError(DeviceLayer, "Register (%s)", Error::ToString(err)); + ChipLogError(Discovery, "Mdns: Register failure (%s)", Error::ToString(err)); callback(context, nullptr, CHIP_ERROR_INTERNAL); MdnsContexts::GetInstance().Remove(this); } @@ -283,7 +283,7 @@ BrowseContext::BrowseContext(void * cbContext, DnssdBrowseCallback cb, DnssdServ void BrowseContext::DispatchFailure(DNSServiceErrorType err) { - ChipLogError(DeviceLayer, "Browse (%s)", Error::ToString(err)); + ChipLogError(Discovery, "Mdns: Browse failure (%s)", Error::ToString(err)); callback(context, nullptr, 0, CHIP_ERROR_INTERNAL); MdnsContexts::GetInstance().Remove(this); } @@ -302,14 +302,11 @@ ResolveContext::ResolveContext(void * cbContext, DnssdResolveCallback cb, chip:: protocol = GetProtocol(cbAddressType); } -ResolveContext::~ResolveContext() -{ - RemoveInterfaces(); -} +ResolveContext::~ResolveContext() {} void ResolveContext::DispatchFailure(DNSServiceErrorType err) { - ChipLogError(DeviceLayer, "Resolve (%s)", Error::ToString(err)); + ChipLogError(Discovery, "Mdns: Resolve failure (%s)", Error::ToString(err)); callback(context, nullptr, Span(), CHIP_ERROR_INTERNAL); MdnsContexts::GetInstance().Remove(this); } @@ -326,6 +323,7 @@ void ResolveContext::DispatchSuccess() continue; } + ChipLogDetail(Discovery, "Mdns: Resolve success on interface %" PRIu32, interface.first); callback(context, &interface.second.service, Span(ips.data(), ips.size()), CHIP_NO_ERROR); break; } @@ -342,7 +340,7 @@ CHIP_ERROR ResolveContext::OnNewAddress(uint32_t interfaceId, const struct socka #ifdef CHIP_DETAIL_LOGGING char addrStr[INET6_ADDRSTRLEN]; ip.ToString(addrStr, sizeof(addrStr)); - ChipLogDetail(DeviceLayer, "Mdns: %s interface: %" PRIu32 " ip:%s", __func__, interfaceId, addrStr); + ChipLogDetail(Discovery, "Mdns: %s interface: %" PRIu32 " ip:%s", __func__, interfaceId, addrStr); #endif // CHIP_DETAIL_LOGGING return CHIP_NO_ERROR; @@ -376,8 +374,8 @@ bool ResolveContext::HasAddress() void ResolveContext::OnNewInterface(uint32_t interfaceId, const char * fullname, const char * hostnameWithDomain, uint16_t port, uint16_t txtLen, const unsigned char * txtRecord) { - ChipLogDetail(DeviceLayer, "Mdns : %s hostname:%s fullname:%s interface: %" PRIu32, __func__, hostnameWithDomain, fullname, - interfaceId); + ChipLogDetail(Discovery, "Mdns : %s hostname:%s fullname:%s interface: %" PRIu32 " port: %u TXT:\"%.*s\"", __func__, + hostnameWithDomain, fullname, interfaceId, port, static_cast(txtLen), txtRecord); InterfaceInfo interface; interface.service.mPort = ntohs(port); @@ -405,7 +403,7 @@ void ResolveContext::OnNewInterface(uint32_t interfaceId, const char * fullname, // resolving. interface.fullyQualifiedDomainName = hostnameWithDomain; - interfaces.insert(std::pair(interfaceId, interface)); + interfaces.insert(std::make_pair(interfaceId, std::move(interface))); } bool ResolveContext::HasInterface() @@ -413,21 +411,37 @@ bool ResolveContext::HasInterface() return interfaces.size(); } -void ResolveContext::RemoveInterfaces() +InterfaceInfo::InterfaceInfo() { - for (auto & interface : interfaces) + service.mTextEntrySize = 0; + service.mTextEntries = nullptr; +} + +InterfaceInfo::InterfaceInfo(InterfaceInfo && other) : + service(std::move(other.service)), addresses(std::move(other.addresses)), + fullyQualifiedDomainName(std::move(other.fullyQualifiedDomainName)) +{ + // Make sure we're not trying to free any state from the other DnssdService, + // since we took over ownership of its allocated bits. + other.service.mTextEntrySize = 0; + other.service.mTextEntries = nullptr; +} + +InterfaceInfo::~InterfaceInfo() +{ + if (service.mTextEntries == nullptr) { - size_t count = interface.second.service.mTextEntrySize; - for (size_t i = 0; i < count; i++) - { - const auto & textEntry = interface.second.service.mTextEntries[i]; - free(const_cast(textEntry.mKey)); - free(const_cast(textEntry.mData)); - } - Platform::MemoryFree(const_cast(interface.second.service.mTextEntries)); + return; } - interfaces.clear(); + const size_t count = service.mTextEntrySize; + for (size_t i = 0; i < count; i++) + { + const auto & textEntry = service.mTextEntries[i]; + free(const_cast(textEntry.mKey)); + free(const_cast(textEntry.mData)); + } + Platform::MemoryFree(const_cast(service.mTextEntries)); } } // namespace Dnssd diff --git a/src/platform/Darwin/DnssdImpl.cpp b/src/platform/Darwin/DnssdImpl.cpp index 488998c8398d40..98fdd0e19d3b74 100644 --- a/src/platform/Darwin/DnssdImpl.cpp +++ b/src/platform/Darwin/DnssdImpl.cpp @@ -100,7 +100,7 @@ void LogOnFailure(const char * name, DNSServiceErrorType err) { if (kDNSServiceErr_NoError != err) { - ChipLogError(DeviceLayer, "%s (%s)", name, Error::ToString(err)); + ChipLogError(Discovery, "%s (%s)", name, Error::ToString(err)); } } @@ -165,7 +165,7 @@ namespace { static void OnRegister(DNSServiceRef sdRef, DNSServiceFlags flags, DNSServiceErrorType err, const char * name, const char * type, const char * domain, void * context) { - ChipLogDetail(DeviceLayer, "Mdns: %s name: %s, type: %s, domain: %s, flags: %d", __func__, name, type, domain, flags); + ChipLogDetail(Discovery, "Mdns: %s name: %s, type: %s, domain: %s, flags: %d", __func__, name, type, domain, flags); auto sdCtx = reinterpret_cast(context); sdCtx->Finalize(err); @@ -174,7 +174,7 @@ static void OnRegister(DNSServiceRef sdRef, DNSServiceFlags flags, DNSServiceErr CHIP_ERROR Register(void * context, DnssdPublishCallback callback, uint32_t interfaceId, const char * type, const char * name, uint16_t port, ScopedTXTRecord & record) { - ChipLogProgress(DeviceLayer, "Publishing service %s on port %u with type: %s on interface id: %" PRIu32, name, port, type, + ChipLogProgress(Discovery, "Publishing service %s on port %u with type: %s on interface id: %" PRIu32, name, port, type, interfaceId); RegisterContext * sdCtx = nullptr; @@ -198,7 +198,7 @@ CHIP_ERROR Register(void * context, DnssdPublishCallback callback, uint32_t inte void OnBrowseAdd(BrowseContext * context, const char * name, const char * type, const char * domain, uint32_t interfaceId) { - ChipLogDetail(DeviceLayer, "Mdns: %s name: %s, type: %s, domain: %s, interface: %" PRIu32, __func__, name, type, domain, + ChipLogDetail(Discovery, "Mdns: %s name: %s, type: %s, domain: %s, interface: %" PRIu32, __func__, name, type, domain, interfaceId); VerifyOrReturn(strcmp(kLocalDot, domain) == 0); @@ -225,7 +225,7 @@ void OnBrowseAdd(BrowseContext * context, const char * name, const char * type, void OnBrowseRemove(BrowseContext * context, const char * name, const char * type, const char * domain, uint32_t interfaceId) { - ChipLogDetail(DeviceLayer, "Mdns: %s name: %s, type: %s, domain: %s, interface: %" PRIu32, __func__, name, type, domain, + ChipLogDetail(Discovery, "Mdns: %s name: %s, type: %s, domain: %s, interface: %" PRIu32, __func__, name, type, domain, interfaceId); VerifyOrReturn(strcmp(kLocalDot, domain) == 0); @@ -259,7 +259,7 @@ CHIP_ERROR Browse(void * context, DnssdBrowseCallback callback, uint32_t interfa auto sdCtx = chip::Platform::New(context, callback, protocol); VerifyOrReturnError(nullptr != sdCtx, CHIP_ERROR_NO_MEMORY); - ChipLogProgress(DeviceLayer, "Browsing for: %s", type); + ChipLogProgress(Discovery, "Browsing for: %s", type); DNSServiceRef sdRef; auto err = DNSServiceBrowse(&sdRef, kBrowseFlags, interfaceId, type, kLocalDot, OnBrowse, sdCtx); VerifyOrReturnError(kDNSServiceErr_NoError == err, sdCtx->Finalize(err)); @@ -329,7 +329,7 @@ static void OnResolve(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t inter static CHIP_ERROR Resolve(void * context, DnssdResolveCallback callback, uint32_t interfaceId, chip::Inet::IPAddressType addressType, const char * type, const char * name) { - ChipLogDetail(DeviceLayer, "Resolve type=%s name=%s interface=%" PRIu32, type, name, interfaceId); + ChipLogDetail(Discovery, "Resolve type=%s name=%s interface=%" PRIu32, type, name, interfaceId); auto sdCtx = chip::Platform::New(context, callback, addressType); VerifyOrReturnError(nullptr != sdCtx, CHIP_ERROR_NO_MEMORY); diff --git a/src/platform/Darwin/DnssdImpl.h b/src/platform/Darwin/DnssdImpl.h index e41b61421028a7..3c9c5f141cc1f8 100644 --- a/src/platform/Darwin/DnssdImpl.h +++ b/src/platform/Darwin/DnssdImpl.h @@ -117,6 +117,13 @@ struct BrowseContext : public GenericContext struct InterfaceInfo { + InterfaceInfo(); + InterfaceInfo(InterfaceInfo && other); + // Copying is not safe, because DnssdService bits need to be + // copied/deallocated properly. + InterfaceInfo(const InterfaceInfo & other) = delete; + ~InterfaceInfo(); + DnssdService service; std::vector addresses; std::string fullyQualifiedDomainName; @@ -141,7 +148,6 @@ struct ResolveContext : public GenericContext void OnNewInterface(uint32_t interfaceId, const char * fullname, const char * hostname, uint16_t port, uint16_t txtLen, const unsigned char * txtRecord); bool HasInterface(); - void RemoveInterfaces(); }; } // namespace Dnssd diff --git a/src/platform/Darwin/PlatformManagerImpl.cpp b/src/platform/Darwin/PlatformManagerImpl.cpp index d47d8830c215e5..e883f319305971 100644 --- a/src/platform/Darwin/PlatformManagerImpl.cpp +++ b/src/platform/Darwin/PlatformManagerImpl.cpp @@ -50,9 +50,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() #if !CHIP_DISABLE_PLATFORM_KVS err = Internal::PosixConfig::Init(); SuccessOrExit(err); - SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); #endif // CHIP_DISABLE_PLATFORM_KVS - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); mRunLoopSem = dispatch_semaphore_create(0); @@ -64,6 +62,12 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() err = Internal::GenericPlatformManagerImpl::_InitChipStack(); SuccessOrExit(err); +#if !CHIP_DISABLE_PLATFORM_KVS + // Now set up our device instance info provider. We couldn't do that + // earlier, because the generic implementation sets a generic one. + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); +#endif // CHIP_DISABLE_PLATFORM_KVS + mStartTime = System::SystemClock().GetMonotonicTimestamp(); static_cast(DeviceLayer::SystemLayer()).SetDispatchQueue(GetWorkQueue()); diff --git a/src/platform/EFR32/BLEManagerImpl.cpp b/src/platform/EFR32/BLEManagerImpl.cpp index 72d55817042c16..344d6c58a7d362 100644 --- a/src/platform/EFR32/BLEManagerImpl.cpp +++ b/src/platform/EFR32/BLEManagerImpl.cpp @@ -423,12 +423,6 @@ void BLEManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) } break; - case DeviceEventType::kCHIPoBLENotifyConfirm: { - ChipLogProgress(DeviceLayer, "_OnPlatformEvent kCHIPoBLENotifyConfirm"); - HandleTxConfirmationEvent(event->CHIPoBLENotifyConfirm.ConId); - } - break; - default: ChipLogProgress(DeviceLayer, "_OnPlatformEvent default: event->Type = %d", event->Type); break; @@ -479,24 +473,16 @@ bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUU sl_status_t ret; uint16_t cId = (UUIDsMatch(&ChipUUID_CHIPoBLEChar_RX, charId) ? gattdb_CHIPoBLEChar_Rx : gattdb_CHIPoBLEChar_Tx); uint8_t timerHandle = GetTimerHandle(conId, true); - ChipDeviceEvent event; VerifyOrExit(((conState != NULL) && (conState->subscribed != 0)), err = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(timerHandle != kMaxConnections, err = CHIP_ERROR_NO_MEMORY); - // start timer for light notification confirmation. Long delay for spake2 indication + // start timer for light indication confirmation. Long delay for spake2 indication sl_bt_system_set_lazy_soft_timer(TIMER_S_2_TIMERTICK(6), 0, timerHandle, true); - ret = sl_bt_gatt_server_send_notification(conId, cId, (data->DataLength()), data->Start()); + ret = sl_bt_gatt_server_send_indication(conId, cId, (data->DataLength()), data->Start()); err = MapBLEError(ret); - if (err == CHIP_NO_ERROR) - { - event.Type = DeviceEventType::kCHIPoBLENotifyConfirm; - event.CHIPoBLENotifyConfirm.ConId = conId; - err = PlatformMgr().PostEvent(&event); - } - exit: if (err != CHIP_NO_ERROR) { @@ -873,20 +859,20 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(volatile sl_bt_msg_t * evt) { CHIP_ERROR err = CHIP_NO_ERROR; CHIPoBLEConState * bleConnState; - bool isDisabled; + bool isIndicationEnabled = false; ChipDeviceEvent event; bleConnState = GetConnectionState(evt->data.evt_gatt_server_user_write_request.connection); VerifyOrExit(bleConnState != NULL, err = CHIP_ERROR_NO_MEMORY); // Determine if the client is enabling or disabling notification/indication. - isDisabled = (evt->data.evt_gatt_server_characteristic_status.client_config_flags == sl_bt_gatt_disable); + isIndicationEnabled = (evt->data.evt_gatt_server_characteristic_status.client_config_flags == sl_bt_gatt_indication); ChipLogProgress(DeviceLayer, "HandleTXcharCCCDWrite - Config Flags value : %d", evt->data.evt_gatt_server_characteristic_status.client_config_flags); - ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", isDisabled ? "unsubscribe" : "subscribe"); + ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", isIndicationEnabled ? "subscribe" : "unsubscribe"); - if (!isDisabled) + if (isIndicationEnabled) { // If indications are not already enabled for the connection... if (!bleConnState->subscribed) diff --git a/src/platform/EFR32/ConfigurationManagerImpl.cpp b/src/platform/EFR32/ConfigurationManagerImpl.cpp index 9c370bf3b52e6d..64a66be824f61a 100644 --- a/src/platform/EFR32/ConfigurationManagerImpl.cpp +++ b/src/platform/EFR32/ConfigurationManagerImpl.cpp @@ -307,5 +307,10 @@ CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) } #endif +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/EFR32/ConfigurationManagerImpl.h b/src/platform/EFR32/ConfigurationManagerImpl.h index baa3e5849afaec..aaebd3ea65ac91 100644 --- a/src/platform/EFR32/ConfigurationManagerImpl.h +++ b/src/platform/EFR32/ConfigurationManagerImpl.h @@ -82,7 +82,15 @@ inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * b { return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } - #endif /* SL_WIFI */ + +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/EFR32/DiagnosticDataProviderImpl.cpp b/src/platform/EFR32/DiagnosticDataProviderImpl.cpp index ffdeff5b8e29a9..a6d4833b65fe4b 100644 --- a/src/platform/EFR32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/EFR32/DiagnosticDataProviderImpl.cpp @@ -477,7 +477,12 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiOverrunCount(uint64_t & overrunCou CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts() { - return CHIP_NO_ERROR; + int32_t err = wfx_reset_counts(); + if (err == 0) + { + return CHIP_NO_ERROR; + } + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } #endif // SL_WIFI diff --git a/src/platform/EFR32/NetworkCommissioningWiFiDriver.cpp b/src/platform/EFR32/NetworkCommissioningWiFiDriver.cpp index 7bc9883799e28e..54e38020c7949d 100644 --- a/src/platform/EFR32/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/EFR32/NetworkCommissioningWiFiDriver.cpp @@ -130,7 +130,7 @@ CHIP_ERROR SlWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, wfx_wifi_provision_t wifiConfig = {}; memcpy(wifiConfig.ssid, ssid, ssidLen); memcpy(wifiConfig.passkey, key, keyLen); - wifiConfig.security = WFX_SEC_WPA2; + wifiConfig.security = WFX_SEC_WPA_WPA2_MIXED; ChipLogProgress(NetworkProvisioning, "Setting up connection for WiFi SSID: %.*s", static_cast(ssidLen), ssid); // Configure the WFX WiFi interface. diff --git a/src/platform/EFR32/NetworkCommissioningWiFiDriver.h b/src/platform/EFR32/NetworkCommissioningWiFiDriver.h index 411de01e3d1637..d311b11dda43a7 100644 --- a/src/platform/EFR32/NetworkCommissioningWiFiDriver.h +++ b/src/platform/EFR32/NetworkCommissioningWiFiDriver.h @@ -134,9 +134,8 @@ class SlWiFiDriver final : public WiFiDriver bool StartScanWiFiNetworks(ByteSpan ssid); static void OnScanWiFiNetworkDone(wfx_wifi_scan_result_t * aScanResult); - WiFiNetworkIterator mWiFiIterator = WiFiNetworkIterator(this); - WiFiNetwork mSavedNetwork = {}; - WiFiNetwork mStagingNetwork = {}; + WiFiNetwork mSavedNetwork = {}; + WiFiNetwork mStagingNetwork = {}; ScanCallback * mpScanCallback; ConnectCallback * mpConnectCallback; }; diff --git a/src/platform/EFR32/PlatformManagerImpl.cpp b/src/platform/EFR32/PlatformManagerImpl.cpp index 29dc7bbe1e17e7..8d5acfba621c95 100644 --- a/src/platform/EFR32/PlatformManagerImpl.cpp +++ b/src/platform/EFR32/PlatformManagerImpl.cpp @@ -50,8 +50,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) err = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - #if CHIP_SYSTEM_CONFIG_USE_LWIP // Initialize LwIP. tcpip_init(NULL, NULL); diff --git a/src/platform/EFR32/gatt_configuration.btconf b/src/platform/EFR32/btconf/gatt_configuration.btconf similarity index 98% rename from src/platform/EFR32/gatt_configuration.btconf rename to src/platform/EFR32/btconf/gatt_configuration.btconf index b6e4af590a8ae3..060af956d3893b 100644 --- a/src/platform/EFR32/gatt_configuration.btconf +++ b/src/platform/EFR32/btconf/gatt_configuration.btconf @@ -81,7 +81,6 @@ - diff --git a/src/platform/EFR32/btconf/in_place_ota_dfu.xml b/src/platform/EFR32/btconf/in_place_ota_dfu.xml new file mode 100644 index 00000000000000..28ca5930597228 --- /dev/null +++ b/src/platform/EFR32/btconf/in_place_ota_dfu.xml @@ -0,0 +1,12 @@ + + + Abstract: The Silicon Labs OTA Service enables in-place over-the-air firmware update of the device. + + Abstract: Silicon Labs OTA Control. + + + + + + + \ No newline at end of file diff --git a/src/platform/EFR32/gatt_db.c b/src/platform/EFR32/gatt_db.c index aa10ec56fa920d..110b069e2c23d7 100644 --- a/src/platform/EFR32/gatt_db.c +++ b/src/platform/EFR32/gatt_db.c @@ -55,7 +55,7 @@ GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_28) = { .len = 16, 0x1d, } }; GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t - gattdb_attribute_field_24) = { .properties = 0x3e, + gattdb_attribute_field_24) = { .properties = 0x2e, .max_len = 247, .len = 1, .data = { @@ -353,7 +353,7 @@ GATT_DATA(const sli_bt_gattdb_attribute_t gattdb_attributes_map[]) = { .caps = 0xffff, .state = 0x00, .datatype = 0x05, - .characteristic = { .properties = 0x3e, .char_uuid = 0x8001 } }, + .characteristic = { .properties = 0x2e, .char_uuid = 0x8001 } }, { .handle = 0x19, .uuid = 0x8001, .permissions = 0x807, @@ -367,7 +367,7 @@ GATT_DATA(const sli_bt_gattdb_attribute_t gattdb_attributes_map[]) = { .caps = 0xffff, .state = 0x00, .datatype = 0x03, - .configdata = { .flags = 0x03, .clientconfig_index = 0x01 } }, + .configdata = { .flags = 0x02, .clientconfig_index = 0x01 } }, { .handle = 0x1b, .uuid = 0x0002, .permissions = 0x801, diff --git a/src/platform/ESP32/BUILD.gn b/src/platform/ESP32/BUILD.gn index 822ffa58efcd5c..9f38280a1dfae9 100644 --- a/src/platform/ESP32/BUILD.gn +++ b/src/platform/ESP32/BUILD.gn @@ -34,8 +34,6 @@ static_library("ESP32") { "ConfigurationManagerImpl.h", "ConnectivityManagerImpl.cpp", "ConnectivityManagerImpl.h", - "DeviceInfoProviderImpl.cpp", - "DeviceInfoProviderImpl.h", "DeviceNetworkProvisioningDelegateImpl.cpp", "DeviceNetworkProvisioningDelegateImpl.h", "DiagnosticDataProviderImpl.cpp", diff --git a/src/platform/ESP32/ConfigurationManagerImpl.cpp b/src/platform/ESP32/ConfigurationManagerImpl.cpp index ba2bdddef6b7d8..f11576f621a7fc 100644 --- a/src/platform/ESP32/ConfigurationManagerImpl.cpp +++ b/src/platform/ESP32/ConfigurationManagerImpl.cpp @@ -337,5 +337,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) esp_restart(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/ESP32/ConfigurationManagerImpl.h b/src/platform/ESP32/ConfigurationManagerImpl.h index 01e31473a31ada..56c5e5ad7679a0 100644 --- a/src/platform/ESP32/ConfigurationManagerImpl.h +++ b/src/platform/ESP32/ConfigurationManagerImpl.h @@ -87,5 +87,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/ESP32/DeviceInfoProviderImpl.cpp b/src/platform/ESP32/DeviceInfoProviderImpl.cpp deleted file mode 100644 index ff28ee8c585002..00000000000000 --- a/src/platform/ESP32/DeviceInfoProviderImpl.cpp +++ /dev/null @@ -1,376 +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 -#include -#include - -#include -#include - -namespace chip { -namespace DeviceLayer { - -namespace { -constexpr TLV::Tag kLabelNameTag = TLV::ContextTag(0); -constexpr TLV::Tag kLabelValueTag = TLV::ContextTag(1); -} // anonymous namespace - -DeviceInfoProviderImpl & DeviceInfoProviderImpl::GetDefaultInstance() -{ - static DeviceInfoProviderImpl sInstance; - return sInstance; -} - -DeviceInfoProvider::FixedLabelIterator * DeviceInfoProviderImpl::IterateFixedLabel(EndpointId endpoint) -{ - return new FixedLabelIteratorImpl(endpoint); -} - -DeviceInfoProviderImpl::FixedLabelIteratorImpl::FixedLabelIteratorImpl(EndpointId endpoint) : mEndpoint(endpoint) -{ - mIndex = 0; -} - -size_t DeviceInfoProviderImpl::FixedLabelIteratorImpl::Count() -{ - // TODO: Need to provide a script which can generate a binary file which contains device information and - // update the DeviceInfoProvider which can read the information from it. - // Now we use the hardcoded labellist. - return 4; -} - -bool DeviceInfoProviderImpl::FixedLabelIteratorImpl::Next(FixedLabelType & output) -{ - bool retval = true; - - // TODO: Need to provide a script which can generate a binary file which contains device information and - // update the DeviceInfoProvider which can read the information from it. - // Now we use the hardcoded labellist. - CHIP_ERROR err = CHIP_NO_ERROR; - - const char * labelPtr = nullptr; - const char * valuePtr = nullptr; - - VerifyOrReturnError(mIndex < 4, false); - - ChipLogProgress(DeviceLayer, "Get the fixed label with index:%d at endpoint:%d", mIndex, mEndpoint); - - switch (mIndex) - { - case 0: - labelPtr = "room"; - valuePtr = "bedroom 2"; - break; - case 1: - labelPtr = "orientation"; - valuePtr = "North"; - break; - case 2: - labelPtr = "floor"; - valuePtr = "2"; - break; - case 3: - labelPtr = "direction"; - valuePtr = "up"; - break; - default: - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - break; - } - - if (err == CHIP_NO_ERROR) - { - VerifyOrReturnError(strlen(labelPtr) <= kMaxLabelNameLength, false); - VerifyOrReturnError(strlen(valuePtr) <= kMaxLabelValueLength, false); - - Platform::CopyString(mFixedLabelNameBuf, kMaxLabelNameLength + 1, labelPtr); - Platform::CopyString(mFixedLabelValueBuf, kMaxLabelValueLength + 1, valuePtr); - - output.label = CharSpan::fromCharString(mFixedLabelNameBuf); - output.value = CharSpan::fromCharString(mFixedLabelValueBuf); - - mIndex++; - - retval = true; - } - else - { - retval = false; - } - - return retval; -} - -CHIP_ERROR DeviceInfoProviderImpl::SetUserLabelLength(EndpointId endpoint, size_t val) -{ - DefaultStorageKeyAllocator keyAlloc; - - return mStorage->SyncSetKeyValue(keyAlloc.UserLabelLengthKey(endpoint), &val, static_cast(sizeof(val))); -} - -CHIP_ERROR DeviceInfoProviderImpl::GetUserLabelLength(EndpointId endpoint, size_t & val) -{ - DefaultStorageKeyAllocator keyAlloc; - uint16_t len = static_cast(sizeof(val)); - - return mStorage->SyncGetKeyValue(keyAlloc.UserLabelLengthKey(endpoint), &val, len); -} - -CHIP_ERROR DeviceInfoProviderImpl::SetUserLabelAt(EndpointId endpoint, size_t index, const UserLabelType & userLabel) -{ - DefaultStorageKeyAllocator keyAlloc; - uint8_t buf[UserLabelTLVMaxSize()]; - TLV::TLVWriter writer; - writer.Init(buf); - - TLV::TLVType outerType; - ReturnErrorOnFailure(writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outerType)); - ReturnErrorOnFailure(writer.PutString(kLabelNameTag, userLabel.label)); - ReturnErrorOnFailure(writer.PutString(kLabelValueTag, userLabel.value)); - ReturnErrorOnFailure(writer.EndContainer(outerType)); - - return mStorage->SyncSetKeyValue(keyAlloc.UserLabelIndexKey(endpoint, index), buf, - static_cast(writer.GetLengthWritten())); -} - -DeviceInfoProvider::UserLabelIterator * DeviceInfoProviderImpl::IterateUserLabel(EndpointId endpoint) -{ - return new UserLabelIteratorImpl(*this, endpoint); -} - -DeviceInfoProviderImpl::UserLabelIteratorImpl::UserLabelIteratorImpl(DeviceInfoProviderImpl & provider, EndpointId endpoint) : - mProvider(provider), mEndpoint(endpoint) -{ - size_t total = 0; - - ReturnOnFailure(mProvider.GetUserLabelLength(mEndpoint, total)); - mTotal = total; - mIndex = 0; -} - -bool DeviceInfoProviderImpl::UserLabelIteratorImpl::Next(UserLabelType & output) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrReturnError(mIndex < mTotal, false); - - DefaultStorageKeyAllocator keyAlloc; - uint8_t buf[UserLabelTLVMaxSize()]; - uint16_t len = static_cast(sizeof(buf)); - - err = mProvider.mStorage->SyncGetKeyValue(keyAlloc.UserLabelIndexKey(mEndpoint, mIndex), buf, len); - VerifyOrReturnError(err == CHIP_NO_ERROR, false); - - TLV::ContiguousBufferTLVReader reader; - reader.Init(buf); - err = reader.Next(TLV::kTLVType_Structure, TLV::AnonymousTag()); - VerifyOrReturnError(err == CHIP_NO_ERROR, false); - - TLV::TLVType containerType; - VerifyOrReturnError(reader.EnterContainer(containerType) == CHIP_NO_ERROR, false); - - chip::CharSpan label; - chip::CharSpan value; - - VerifyOrReturnError(reader.Next(kLabelNameTag) == CHIP_NO_ERROR, false); - VerifyOrReturnError(reader.Get(label) == CHIP_NO_ERROR, false); - - VerifyOrReturnError(reader.Next(kLabelValueTag) == CHIP_NO_ERROR, false); - VerifyOrReturnError(reader.Get(value) == CHIP_NO_ERROR, false); - - VerifyOrReturnError(reader.VerifyEndOfContainer() == CHIP_NO_ERROR, false); - VerifyOrReturnError(reader.ExitContainer(containerType) == CHIP_NO_ERROR, false); - - Platform::CopyString(mUserLabelNameBuf, label); - Platform::CopyString(mUserLabelValueBuf, value); - - output.label = CharSpan::fromCharString(mUserLabelNameBuf); - output.value = CharSpan::fromCharString(mUserLabelValueBuf); - - mIndex++; - - return true; -} - -DeviceInfoProvider::SupportedLocalesIterator * DeviceInfoProviderImpl::IterateSupportedLocales() -{ - return new SupportedLocalesIteratorImpl(); -} - -size_t DeviceInfoProviderImpl::SupportedLocalesIteratorImpl::Count() -{ - // TODO: Need to provide a script which can generate a binary file which contains device information and - // update the DeviceInfoProvider which can read the information from it. - // Now we use the hardcoded SupportedLocales. - // {("en-US"), ("de-DE"), ("fr-FR"), ("en-GB"), ("es-ES"), ("zh-CN"), ("it-IT"), ("ja-JP")} - - return 8; -} - -bool DeviceInfoProviderImpl::SupportedLocalesIteratorImpl::Next(CharSpan & output) -{ - bool retval = true; - - // TODO: Need to provide a script which can generate a binary file which contains device information and - // update the DeviceInfoProvider which can read the information from it. - // Now we use the hardcoded SupportedLocales. - CHIP_ERROR err = CHIP_NO_ERROR; - - const char * activeLocalePtr = nullptr; - - VerifyOrReturnError(mIndex < 8, false); - - switch (mIndex) - { - case 0: - activeLocalePtr = "en-US"; - break; - case 1: - activeLocalePtr = "de-DE"; - break; - case 2: - activeLocalePtr = "fr-FR"; - break; - case 3: - activeLocalePtr = "en-GB"; - break; - case 4: - activeLocalePtr = "es-ES"; - break; - case 5: - activeLocalePtr = "zh-CN"; - break; - case 6: - activeLocalePtr = "it-IT"; - break; - case 7: - activeLocalePtr = "ja-JP"; - break; - default: - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - break; - } - - if (err == CHIP_NO_ERROR) - { - VerifyOrReturnError(strlen(activeLocalePtr) <= kMaxActiveLocaleLength, false); - - Platform::CopyString(mActiveLocaleBuf, kMaxActiveLocaleLength + 1, activeLocalePtr); - - output = CharSpan::fromCharString(mActiveLocaleBuf); - - mIndex++; - - retval = true; - } - else - { - retval = false; - } - - return retval; -} - -DeviceInfoProvider::SupportedCalendarTypesIterator * DeviceInfoProviderImpl::IterateSupportedCalendarTypes() -{ - return new SupportedCalendarTypesIteratorImpl(); -} - -size_t DeviceInfoProviderImpl::SupportedCalendarTypesIteratorImpl::Count() -{ - // TODO: Need to provide a script which can generate a binary file which contains device information and - // update the DeviceInfoProvider which can read the information from it. - // Now we use the hardcoded SupportedCalendarTypes. - // {("kBuddhist"), ("kChinese"), ("kCoptic"), ("kEthiopian"), ("kGregorian"), ("kHebrew"), ("kIndian"), ("kJapanese"), - // ("kKorean"), ("kPersian"), ("kTaiwanese"), ("kIslamic")} - - return 12; -} - -bool DeviceInfoProviderImpl::SupportedCalendarTypesIteratorImpl::Next(CalendarType & output) -{ - bool retval = true; - - // TODO: Need to provide a script which can generate a binary file which contains device information and - // update the DeviceInfoProvider which can read the information from it. - // Now we use the hardcoded SupportedCalendarTypes. - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrReturnError(mIndex < 12, false); - - switch (mIndex) - { - case 0: - output = app::Clusters::TimeFormatLocalization::CalendarType::kBuddhist; - break; - case 1: - output = app::Clusters::TimeFormatLocalization::CalendarType::kChinese; - break; - case 2: - output = app::Clusters::TimeFormatLocalization::CalendarType::kCoptic; - break; - case 3: - output = app::Clusters::TimeFormatLocalization::CalendarType::kEthiopian; - break; - case 4: - output = app::Clusters::TimeFormatLocalization::CalendarType::kGregorian; - break; - case 5: - output = app::Clusters::TimeFormatLocalization::CalendarType::kHebrew; - break; - case 6: - output = app::Clusters::TimeFormatLocalization::CalendarType::kIndian; - break; - case 7: - output = app::Clusters::TimeFormatLocalization::CalendarType::kJapanese; - break; - case 8: - output = app::Clusters::TimeFormatLocalization::CalendarType::kKorean; - break; - case 9: - output = app::Clusters::TimeFormatLocalization::CalendarType::kPersian; - break; - case 10: - output = app::Clusters::TimeFormatLocalization::CalendarType::kTaiwanese; - break; - case 11: - output = app::Clusters::TimeFormatLocalization::CalendarType::kIslamic; - break; - default: - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - break; - } - - if (err == CHIP_NO_ERROR) - { - mIndex++; - retval = true; - } - else - { - retval = false; - } - - return retval; -} - -} // namespace DeviceLayer -} // namespace chip diff --git a/src/platform/ESP32/DeviceInfoProviderImpl.h b/src/platform/ESP32/DeviceInfoProviderImpl.h deleted file mode 100644 index 856e15498ab46f..00000000000000 --- a/src/platform/ESP32/DeviceInfoProviderImpl.h +++ /dev/null @@ -1,107 +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 - -#include -#include -#include - -namespace chip { -namespace DeviceLayer { - -class DeviceInfoProviderImpl : public DeviceInfoProvider -{ -public: - DeviceInfoProviderImpl() = default; - ~DeviceInfoProviderImpl() override {} - - // Iterators - FixedLabelIterator * IterateFixedLabel(EndpointId endpoint) override; - UserLabelIterator * IterateUserLabel(EndpointId endpoint) override; - SupportedLocalesIterator * IterateSupportedLocales() override; - SupportedCalendarTypesIterator * IterateSupportedCalendarTypes() override; - - static DeviceInfoProviderImpl & GetDefaultInstance(); - -protected: - class FixedLabelIteratorImpl : public FixedLabelIterator - { - public: - FixedLabelIteratorImpl(EndpointId endpoint); - size_t Count() override; - bool Next(FixedLabelType & output) override; - void Release() override { delete this; } - - private: - EndpointId mEndpoint = 0; - size_t mIndex = 0; - char mFixedLabelNameBuf[kMaxLabelNameLength + 1]; - char mFixedLabelValueBuf[kMaxLabelValueLength + 1]; - }; - - class UserLabelIteratorImpl : public UserLabelIterator - { - public: - UserLabelIteratorImpl(DeviceInfoProviderImpl & provider, EndpointId endpoint); - size_t Count() override { return mTotal; } - bool Next(UserLabelType & output) override; - void Release() override { delete this; } - - private: - DeviceInfoProviderImpl & mProvider; - EndpointId mEndpoint = 0; - size_t mIndex = 0; - size_t mTotal = 0; - char mUserLabelNameBuf[kMaxLabelNameLength + 1]; - char mUserLabelValueBuf[kMaxLabelValueLength + 1]; - }; - - class SupportedLocalesIteratorImpl : public SupportedLocalesIterator - { - public: - SupportedLocalesIteratorImpl() = default; - size_t Count() override; - bool Next(CharSpan & output) override; - void Release() override { delete this; } - - private: - size_t mIndex = 0; - char mActiveLocaleBuf[kMaxActiveLocaleLength + 1]; - }; - - class SupportedCalendarTypesIteratorImpl : public SupportedCalendarTypesIterator - { - public: - SupportedCalendarTypesIteratorImpl() = default; - size_t Count() override; - bool Next(CalendarType & output) override; - void Release() override { delete this; } - - private: - size_t mIndex = 0; - }; - - CHIP_ERROR SetUserLabelLength(EndpointId endpoint, size_t val) override; - CHIP_ERROR GetUserLabelLength(EndpointId endpoint, size_t & val) override; - CHIP_ERROR SetUserLabelAt(EndpointId endpoint, size_t index, const UserLabelType & userLabel) override; - -private: - static constexpr size_t UserLabelTLVMaxSize() { return TLV::EstimateStructOverhead(kMaxLabelNameLength, kMaxLabelValueLength); } -}; - -} // namespace DeviceLayer -} // namespace chip diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp index 78855b9095ebeb..fde6aacd96be6a 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp @@ -198,6 +198,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** { esp_netif_t * netif = esp_netif_next(NULL); NetworkInterface * head = NULL; + uint8_t ipv6_addr_count = 0; + esp_ip6_addr_t ip6_addr[kMaxIPv6AddrCount]; if (netif == NULL) { ChipLogError(DeviceLayer, "Failed to get network interfaces"); @@ -207,6 +209,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** for (esp_netif_t * ifa = netif; ifa != NULL; ifa = esp_netif_next(ifa)) { NetworkInterface * ifp = new NetworkInterface(); + esp_netif_ip_info_t ipv4_info; strncpy(ifp->Name, esp_netif_get_ifkey(ifa), Inet::InterfaceId::kMaxIfNameLength); ifp->Name[Inet::InterfaceId::kMaxIfNameLength - 1] = '\0'; ifp->name = CharSpan::fromCharString(ifp->Name); @@ -222,6 +225,20 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** { ifp->hardwareAddress = ByteSpan(ifp->MacAddress, 6); } + if (esp_netif_get_ip_info(ifa, &ipv4_info) == ESP_OK) + { + memcpy(ifp->Ipv4AddressesBuffer[0], &(ipv4_info.ip.addr), kMaxIPv4AddrSize); + ifp->Ipv4AddressSpans[0] = ByteSpan(ifp->Ipv4AddressesBuffer[0], kMaxIPv4AddrSize); + ifp->IPv4Addresses = chip::app::DataModel::List(ifp->Ipv4AddressSpans, 1); + } + ipv6_addr_count = esp_netif_get_all_ip6(ifa, ip6_addr); + for (uint8_t idx = 0; idx < ipv6_addr_count; ++idx) + { + memcpy(ifp->Ipv6AddressesBuffer[idx], ip6_addr[idx].addr, kMaxIPv6AddrSize); + ifp->Ipv6AddressSpans[idx] = ByteSpan(ifp->Ipv6AddressesBuffer[idx], kMaxIPv6AddrSize); + } + ifp->IPv6Addresses = chip::app::DataModel::List(ifp->Ipv6AddressSpans, ipv6_addr_count); + ifp->Next = head; head = ifp; } diff --git a/src/platform/ESP32/NetworkCommissioningDriver.h b/src/platform/ESP32/NetworkCommissioningDriver.h index d8d9288508e06c..d2c6bb160e745d 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.h +++ b/src/platform/ESP32/NetworkCommissioningDriver.h @@ -127,7 +127,6 @@ class ESPWiFiDriver final : public WiFiDriver bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); CHIP_ERROR StartScanWiFiNetworks(ByteSpan ssid); - WiFiNetworkIterator mWiFiIterator = WiFiNetworkIterator(this); WiFiNetwork mSavedNetwork; WiFiNetwork mStagingNetwork; ScanCallback * mpScanCallback; diff --git a/src/platform/ESP32/PlatformManagerImpl.cpp b/src/platform/ESP32/PlatformManagerImpl.cpp index 535674b8c2782a..c96caeb03934ef 100644 --- a/src/platform/ESP32/PlatformManagerImpl.cpp +++ b/src/platform/ESP32/PlatformManagerImpl.cpp @@ -27,7 +27,6 @@ #include #include -#include #include #include #include @@ -60,9 +59,6 @@ static int app_entropy_source(void * data, unsigned char * output, size_t len, s CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) { - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - SetDeviceInfoProvider(&DeviceInfoProviderImpl::GetDefaultInstance()); - esp_err_t err; // Arrange for CHIP-encapsulated ESP32 errors to be translated to text Internal::ESP32Utils::RegisterESP32ErrorFormatter(); diff --git a/src/platform/ESP32/nimble/BLEManagerImpl.cpp b/src/platform/ESP32/nimble/BLEManagerImpl.cpp index b3ec3b80ce8291..29dd2e7bd7d3de 100644 --- a/src/platform/ESP32/nimble/BLEManagerImpl.cpp +++ b/src/platform/ESP32/nimble/BLEManagerImpl.cpp @@ -115,7 +115,7 @@ const struct ble_gatt_svc_def BLEManagerImpl::CHIPoBLEGATTAttrs[] = { { .uuid = (ble_uuid_t *) (&UUID_CHIPoBLEChar_TX), .access_cb = gatt_svr_chr_access, - .flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_NOTIFY | BLE_GATT_CHR_F_INDICATE, + .flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_INDICATE, .val_handle = &sInstance.mTXCharCCCDAttrHandle, }, #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING @@ -364,10 +364,10 @@ bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUU ExitNow(); } - err = MapBLEError(ble_gattc_notify_custom(conId, mTXCharCCCDAttrHandle, om)); + err = MapBLEError(ble_gattc_indicate_custom(conId, mTXCharCCCDAttrHandle, om)); if (err != CHIP_NO_ERROR) { - ChipLogError(DeviceLayer, "ble_gattc_notify_custom() failed: %s", ErrorStr(err)); + ChipLogError(DeviceLayer, "ble_gattc_indicate_custom() failed: %s", ErrorStr(err)); ExitNow(); } @@ -795,19 +795,17 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(struct ble_gap_event * gapEvent) { CHIP_ERROR err = CHIP_NO_ERROR; bool indicationsEnabled; - bool notificationsEnabled; ChipLogProgress(DeviceLayer, "Write request/command received for CHIPoBLE TX CCCD characteristic (con %u" - " ) indicate = %d notify = %d", - gapEvent->subscribe.conn_handle, gapEvent->subscribe.cur_indicate, gapEvent->subscribe.cur_notify); + " ) indicate = %d", + gapEvent->subscribe.conn_handle, gapEvent->subscribe.cur_indicate); - // Determine if the client is enabling or disabling indications/notification. - indicationsEnabled = gapEvent->subscribe.cur_indicate; - notificationsEnabled = gapEvent->subscribe.cur_notify; + // Determine if the client is enabling or disabling indications. + indicationsEnabled = gapEvent->subscribe.cur_indicate; - // If the client has requested to enabled indications/notifications - if (indicationsEnabled || notificationsEnabled) + // If the client has requested to enabled indications + if (indicationsEnabled) { // If indications are not already enabled for the connection... if (!IsSubscribed(gapEvent->subscribe.conn_handle)) @@ -830,14 +828,12 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(struct ble_gap_event * gapEvent) // whether the client is enabling or disabling indications. { ChipDeviceEvent event; - event.Type = (indicationsEnabled || notificationsEnabled) ? DeviceEventType::kCHIPoBLESubscribe - : DeviceEventType::kCHIPoBLEUnsubscribe; + event.Type = (indicationsEnabled) ? DeviceEventType::kCHIPoBLESubscribe : DeviceEventType::kCHIPoBLEUnsubscribe; event.CHIPoBLESubscribe.ConId = gapEvent->subscribe.conn_handle; err = PlatformMgr().PostEvent(&event); } - ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", - (indicationsEnabled || notificationsEnabled) ? "subscribe" : "unsubscribe"); + ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", (indicationsEnabled) ? "subscribe" : "unsubscribe"); exit: if (err != CHIP_NO_ERROR) diff --git a/src/platform/Linux/BLEManagerImpl.cpp b/src/platform/Linux/BLEManagerImpl.cpp index 7de6ac8dba6e1d..cec9dabefebcba 100644 --- a/src/platform/Linux/BLEManagerImpl.cpp +++ b/src/platform/Linux/BLEManagerImpl.cpp @@ -712,7 +712,7 @@ void BLEManagerImpl::InitiateScan(intptr_t arg) sInstance.InitiateScan(static_cast(arg)); } -void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const uint16_t connDiscriminator) +void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) { mBLEScanConfig.mDiscriminator = connDiscriminator; mBLEScanConfig.mAppState = appState; @@ -768,7 +768,7 @@ void BLEManagerImpl::OnDeviceScanned(BluezDevice1 * device, const chip::Ble::Chi if (mBLEScanConfig.mBleScanState == BleScanState::kScanForDiscriminator) { - if (info.GetDeviceDiscriminator() != mBLEScanConfig.mDiscriminator) + if (!mBLEScanConfig.mDiscriminator.MatchesLongDiscriminator(info.GetDeviceDiscriminator())) { return; } diff --git a/src/platform/Linux/BLEManagerImpl.h b/src/platform/Linux/BLEManagerImpl.h index eed743e6c53b7c..8c0d06b066cbd8 100644 --- a/src/platform/Linux/BLEManagerImpl.h +++ b/src/platform/Linux/BLEManagerImpl.h @@ -66,7 +66,7 @@ struct BLEScanConfig BleScanState mBleScanState = BleScanState::kNotScanning; // If scanning by discriminator, what are we scanning for - uint16_t mDiscriminator = 0; + SetupDiscriminator mDiscriminator; // If scanning by address, what address are we searching for std::string mAddress; @@ -148,7 +148,7 @@ class BLEManagerImpl final : public BLEManager, // ===== Members that implement virtual methods on BleConnectionDelegate. - void NewConnection(BleLayer * bleLayer, void * appState, uint16_t connDiscriminator) override; + void NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) override; CHIP_ERROR CancelConnection() override; // ===== Members that implement virtual methods on ChipDeviceScannerDelegate diff --git a/src/platform/Linux/ConfigurationManagerImpl.cpp b/src/platform/Linux/ConfigurationManagerImpl.cpp index 68a624ae3ce066..2f603f1f3ba31e 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.cpp +++ b/src/platform/Linux/ConfigurationManagerImpl.cpp @@ -397,5 +397,10 @@ CHIP_ERROR ConfigurationManagerImpl::GetLocationCapability(uint8_t & location) return err; } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Linux/ConfigurationManagerImpl.h b/src/platform/Linux/ConfigurationManagerImpl.h index 866710fc8faac9..ecf5aea77830b3 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.h +++ b/src/platform/Linux/ConfigurationManagerImpl.h @@ -88,5 +88,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Linux/NetworkCommissioningDriver.h b/src/platform/Linux/NetworkCommissioningDriver.h index e0e522a29eff3e..d54470e70cb7fe 100644 --- a/src/platform/Linux/NetworkCommissioningDriver.h +++ b/src/platform/Linux/NetworkCommissioningDriver.h @@ -47,7 +47,7 @@ class LinuxScanResponseIterator : public Iterator private: size_t currentIterating = 0; - // Note: We cannot post a event in ScheduleLambda since std::vector is not trivial copiable. + // Note: We cannot post a event in ScheduleLambda since std::vector is not trivial copyable. std::vector * mpScanResponse; }; @@ -102,10 +102,8 @@ class LinuxWiFiDriver final : public WiFiDriver private: bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); - WiFiNetworkIterator mWiFiIterator = WiFiNetworkIterator(this); WiFiNetwork mSavedNetwork; WiFiNetwork mStagingNetwork; - Optional mScanStatus; }; #endif // CHIP_DEVICE_CONFIG_ENABLE_WPA diff --git a/src/platform/Linux/NetworkCommissioningWiFiDriver.cpp b/src/platform/Linux/NetworkCommissioningWiFiDriver.cpp index 68ffb9d56afcb4..2e51be5fef2b1d 100644 --- a/src/platform/Linux/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Linux/NetworkCommissioningWiFiDriver.cpp @@ -179,14 +179,8 @@ void LinuxWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * cal CHIP_ERROR err = DeviceLayer::ConnectivityMgrImpl().StartWiFiScan(ssid, callback); if (err != CHIP_NO_ERROR) { - mScanStatus.SetValue(Status::kUnknownError); callback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); } - else - { - // On linux platform, once "scan" is started, we can say the result will always be success. - mScanStatus.SetValue(Status::kSuccess); - } } size_t LinuxWiFiDriver::WiFiNetworkIterator::Count() diff --git a/src/platform/Linux/PlatformManagerImpl.cpp b/src/platform/Linux/PlatformManagerImpl.cpp index 23ca6af8d07903..d92203a0dfacd6 100644 --- a/src/platform/Linux/PlatformManagerImpl.cpp +++ b/src/platform/Linux/PlatformManagerImpl.cpp @@ -175,13 +175,15 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() // Initialize the configuration system. ReturnErrorOnFailure(Internal::PosixConfig::Init()); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. ReturnErrorOnFailure(Internal::GenericPlatformManagerImpl_POSIX::_InitChipStack()); + // Now set up our device instance info provider. We couldn't do that + // earlier, because the generic implementation sets a generic one. + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); + mStartTime = System::SystemClock().GetMonotonicTimestamp(); return CHIP_NO_ERROR; diff --git a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp index 05e34149a29da5..92a390625410c2 100644 --- a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp +++ b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp @@ -177,17 +177,10 @@ void GenericThreadDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * c void GenericThreadDriver::ScanNetworks(ThreadDriver::ScanCallback * callback) { - CHIP_ERROR err = DeviceLayer::ThreadStackMgrImpl().StartThreadScan(callback); - if (err != CHIP_NO_ERROR) + if (DeviceLayer::ThreadStackMgrImpl().StartThreadScan(callback) != CHIP_NO_ERROR) { - mScanStatus.SetValue(Status::kUnknownError); callback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); } - else - { - // OpenThread's "scan" will always success once started, so we can set the value of scan result here. - mScanStatus.SetValue(Status::kSuccess); - } } Status GenericThreadDriver::MatchesNetworkId(const Thread::OperationalDataset & dataset, const ByteSpan & networkId) const diff --git a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h index 05050b9d818892..8a445e8d6c08e8 100644 --- a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h +++ b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h @@ -27,7 +27,6 @@ template class otScanResponseIterator : public Iterator { public: - otScanResponseIterator(T * apScanResponse) : mpScanResponse(apScanResponse) {} size_t Count() override { return itemCount; } bool Next(T & item) override { @@ -62,7 +61,7 @@ class otScanResponseIterator : public Iterator size_t currentIterating = 0; size_t itemCount = 0; static constexpr size_t kItemSize = sizeof(T); - T * mpScanResponse; + T * mpScanResponse = nullptr; }; class GenericThreadDriver final : public ThreadDriver @@ -109,7 +108,6 @@ class GenericThreadDriver final : public ThreadDriver ThreadNetworkIterator mThreadIterator = ThreadNetworkIterator(this); Thread::OperationalDataset mStagingNetwork = {}; - Optional mScanStatus; }; } // namespace NetworkCommissioning diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp index 43c412ca6f2118..1acfd00b30b3fd 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp @@ -92,8 +92,7 @@ void initNetworkCommissioningThreadDriver(void) #endif } -NetworkCommissioning::ThreadScanResponse * sScanResult; -NetworkCommissioning::otScanResponseIterator mScanResponseIter(sScanResult); +NetworkCommissioning::otScanResponseIterator mScanResponseIter; } // namespace /** @@ -386,6 +385,9 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_StartThreadScan(NetworkCommissioning::ThreadDriver::ScanCallback * callback) { CHIP_ERROR error = CHIP_NO_ERROR; +#if CHIP_DEVICE_CONFIG_ENABLE_SED + otLinkModeConfig linkMode; +#endif // If there is another ongoing scan request, reject the new one. VerifyOrReturnError(mpScanCallback == nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -400,6 +402,18 @@ GenericThreadStackManagerImpl_OpenThread::_StartThreadScan(NetworkCom SuccessOrExit(error = MapOpenThreadError(otIp6SetEnabled(mOTInst, true))); } +#if CHIP_DEVICE_CONFIG_ENABLE_SED + // Thread network discovery makes Sleepy End Devices detach from a network, so temporarily disable the SED mode. + linkMode = otThreadGetLinkMode(mOTInst); + + if (!linkMode.mRxOnWhenIdle) + { + mTemporaryRxOnWhenIdle = true; + linkMode.mRxOnWhenIdle = true; + otThreadSetLinkMode(mOTInst, linkMode); + } +#endif + error = MapOpenThreadError(otThreadDiscover(mOTInst, 0, /* all channels */ OT_PANID_BROADCAST, false, false, /* disable PAN ID, EUI64 and Joiner filtering */ _OnNetworkScanFinished, this)); @@ -426,6 +440,16 @@ void GenericThreadStackManagerImpl_OpenThread::_OnNetworkScanFinished { if (aResult == nullptr) // scan completed { +#if CHIP_DEVICE_CONFIG_ENABLE_SED + if (mTemporaryRxOnWhenIdle) + { + otLinkModeConfig linkMode = otThreadGetLinkMode(mOTInst); + linkMode.mRxOnWhenIdle = false; + mTemporaryRxOnWhenIdle = false; + otThreadSetLinkMode(mOTInst, linkMode); + } +#endif + // If Thread scanning was done before commissioning, turn off the IPv6 interface. if (otThreadGetDeviceRole(mOTInst) == OT_DEVICE_ROLE_DISABLED && !otDatasetIsCommissioned(mOTInst)) { diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h index 9e0d9c0acac32f..38c9938c8ee694 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h @@ -150,8 +150,9 @@ class GenericThreadStackManagerImpl_OpenThread // ===== Private members for use by this class only. otInstance * mOTInst; - uint64_t mOverrunCount = 0; - bool mIsAttached = false; + uint64_t mOverrunCount = 0; + bool mIsAttached = false; + bool mTemporaryRxOnWhenIdle = false; NetworkCommissioning::ThreadDriver::ScanCallback * mpScanCallback; NetworkCommissioning::Internal::WirelessDriver::ConnectCallback * mpConnectCallback; diff --git a/src/platform/P6/ConfigurationManagerImpl.cpp b/src/platform/P6/ConfigurationManagerImpl.cpp index b8c2c0ad3eb618..afa771d5acb837 100644 --- a/src/platform/P6/ConfigurationManagerImpl.cpp +++ b/src/platform/P6/ConfigurationManagerImpl.cpp @@ -238,5 +238,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) NVIC_SystemReset(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/P6/ConfigurationManagerImpl.h b/src/platform/P6/ConfigurationManagerImpl.h index a9fd74facf9220..1327b3bc546214 100644 --- a/src/platform/P6/ConfigurationManagerImpl.h +++ b/src/platform/P6/ConfigurationManagerImpl.h @@ -78,5 +78,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/P6/NetworkCommissioningDriver.h b/src/platform/P6/NetworkCommissioningDriver.h index e56967fff761b1..76a232213e92c2 100644 --- a/src/platform/P6/NetworkCommissioningDriver.h +++ b/src/platform/P6/NetworkCommissioningDriver.h @@ -133,7 +133,6 @@ class P6WiFiDriver final : public WiFiDriver bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); CHIP_ERROR StartScanWiFiNetworks(ByteSpan ssid); - WiFiNetworkIterator mWiFiIterator = WiFiNetworkIterator(this); WiFiNetwork mSavedNetwork; WiFiNetwork mStagingNetwork; ScanCallback * mpScanCallback; diff --git a/src/platform/P6/OTAImageProcessorImpl.cpp b/src/platform/P6/OTAImageProcessorImpl.cpp index b6e3bc175fab4a..5ca1fa089e98ea 100644 --- a/src/platform/P6/OTAImageProcessorImpl.cpp +++ b/src/platform/P6/OTAImageProcessorImpl.cpp @@ -16,11 +16,16 @@ * limitations under the License. */ +#include "OTAImageProcessorImpl.h" #include +#include +#include +#include -#include "OTAImageProcessorImpl.h" +using namespace ::chip::DeviceLayer::Internal; namespace chip { +namespace DeviceLayer { #ifdef P6_OTA CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() @@ -99,6 +104,39 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessBlock(ByteSpan & block) return CHIP_NO_ERROR; } +bool OTAImageProcessorImpl::IsFirstImageRun() +{ + OTARequestorInterface * requestor = GetRequestorInstance(); + ReturnErrorCodeIf(requestor == nullptr, false); + + uint32_t currentVersion; + ReturnErrorCodeIf(ConfigurationMgr().GetSoftwareVersion(currentVersion) != CHIP_NO_ERROR, false); + + ChipLogProgress(SoftwareUpdate, "%ld", currentVersion); + ChipLogProgress(SoftwareUpdate, "%ld", requestor->GetTargetVersion()); + + return ((requestor->GetCurrentUpdateState() == OTARequestorInterface::OTAUpdateStateEnum::kApplying) && + (requestor->GetTargetVersion() == currentVersion)); +} + +CHIP_ERROR OTAImageProcessorImpl::ConfirmCurrentImage() +{ + OTARequestorInterface * requestor = chip::GetRequestorInstance(); + if (requestor == nullptr) + { + return CHIP_ERROR_INTERNAL; + } + + uint32_t currentVersion; + ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().GetSoftwareVersion(currentVersion)); + if (currentVersion != requestor->GetTargetVersion()) + { + return CHIP_ERROR_INCORRECT_STATE; + } + + return CHIP_NO_ERROR; +} + void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) { auto * imageProcessor = reinterpret_cast(context); @@ -264,4 +302,5 @@ CHIP_ERROR OTAImageProcessorImpl::ReleaseBlock() } #endif // P6_OTA +} // namespace DeviceLayer } // namespace chip diff --git a/src/platform/P6/OTAImageProcessorImpl.h b/src/platform/P6/OTAImageProcessorImpl.h index 0f6a53fc7bd52a..4150565f8867ec 100644 --- a/src/platform/P6/OTAImageProcessorImpl.h +++ b/src/platform/P6/OTAImageProcessorImpl.h @@ -33,6 +33,7 @@ extern "C" { } namespace chip { +namespace DeviceLayer { class OTAImageProcessorImpl : public OTAImageProcessorInterface { @@ -43,8 +44,8 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface CHIP_ERROR Apply() override; CHIP_ERROR Abort() override; CHIP_ERROR ProcessBlock(ByteSpan & block) override; - bool IsFirstImageRun() override { return false; } - CHIP_ERROR ConfirmCurrentImage() override { return CHIP_NO_ERROR; } + bool IsFirstImageRun() override; + CHIP_ERROR ConfirmCurrentImage() override; void SetOTADownloader(OTADownloader * downloader) { mDownloader = downloader; } @@ -80,5 +81,6 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface OTAImageHeaderParser mHeaderParser; }; +} // namespace DeviceLayer } // namespace chip #endif diff --git a/src/platform/P6/P6Config.cpp b/src/platform/P6/P6Config.cpp index ecaa219979e65f..e15d56c5583b6e 100644 --- a/src/platform/P6/P6Config.cpp +++ b/src/platform/P6/P6Config.cpp @@ -76,6 +76,17 @@ const P6Config::Key P6Config::kConfigKey_WiFiPassword = { kConfigNamespace const P6Config::Key P6Config::kConfigKey_WiFiSecurity = { kConfigNamespace_ChipConfig, "wifi-security" }; const P6Config::Key P6Config::kConfigKey_WiFiMode = { kConfigNamespace_ChipConfig, "wifimode" }; const P6Config::Key P6Config::kConfigKey_UniqueId = { kConfigNamespace_ChipConfig, "unique-id" }; +const P6Config::Key P6Config::kConfigKey_LockUser = { kConfigNamespace_ChipConfig, "lock-user" }; +const P6Config::Key P6Config::kConfigKey_Credential = { kConfigNamespace_ChipConfig, "credential" }; +const P6Config::Key P6Config::kConfigKey_LockUserName = { kConfigNamespace_ChipConfig, "lock-user-name" }; +const P6Config::Key P6Config::kConfigKey_CredentialData = { kConfigNamespace_ChipConfig, "credential-data" }; +const P6Config::Key P6Config::kConfigKey_UserCredentials = { kConfigNamespace_ChipConfig, "user-credentials" }; +const P6Config::Key P6Config::kConfigKey_WeekDaySchedules = { kConfigNamespace_ChipConfig, "weekday-schedules" }; +; +const P6Config::Key P6Config::kConfigKey_YearDaySchedules = { kConfigNamespace_ChipConfig, "yearday-schedules" }; +; +const P6Config::Key P6Config::kConfigKey_HolidaySchedules = { kConfigNamespace_ChipConfig, "holiday-schedules" }; +; // Keys stored in the Chip-counters namespace const P6Config::Key P6Config::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/P6/P6Config.h b/src/platform/P6/P6Config.h index 0be7aa5abb7696..7e62fd6e66b772 100644 --- a/src/platform/P6/P6Config.h +++ b/src/platform/P6/P6Config.h @@ -80,6 +80,14 @@ class P6Config static const Key kConfigKey_Spake2pIterationCount; static const Key kConfigKey_Spake2pSalt; static const Key kConfigKey_Spake2pVerifier; + static const Key kConfigKey_LockUser; + static const Key kConfigKey_Credential; + static const Key kConfigKey_LockUserName; + static const Key kConfigKey_CredentialData; + static const Key kConfigKey_UserCredentials; + static const Key kConfigKey_WeekDaySchedules; + static const Key kConfigKey_YearDaySchedules; + static const Key kConfigKey_HolidaySchedules; // CHIP Counter keys static const Key kCounterKey_RebootCount; diff --git a/src/platform/P6/PlatformManagerImpl.cpp b/src/platform/P6/PlatformManagerImpl.cpp index 112c9c779745aa..ac22597407dc98 100644 --- a/src/platform/P6/PlatformManagerImpl.cpp +++ b/src/platform/P6/PlatformManagerImpl.cpp @@ -43,8 +43,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) { CHIP_ERROR err; - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - // Make sure the LwIP core lock has been initialized err = Internal::InitLwIPCoreLock(); SuccessOrExit(err); diff --git a/src/platform/SingletonConfigurationManager.cpp b/src/platform/SingletonConfigurationManager.cpp index 0658ebfbc776bc..01122c3ae0a030 100644 --- a/src/platform/SingletonConfigurationManager.cpp +++ b/src/platform/SingletonConfigurationManager.cpp @@ -21,6 +21,7 @@ */ #include +#include namespace chip { namespace DeviceLayer { @@ -37,8 +38,12 @@ ConfigurationManager * gInstance = nullptr; ConfigurationManager & ConfigurationMgr() { - VerifyOrDie(gInstance != nullptr); - return *gInstance; + if (gInstance != nullptr) + { + return *gInstance; + } + + return ConfigurationMgrImpl(); } void SetConfigurationMgr(ConfigurationManager * configurationManager) diff --git a/src/platform/Tizen/BLEManagerImpl.cpp b/src/platform/Tizen/BLEManagerImpl.cpp index 4fa9d66c1deab1..693ffb5665e053 100644 --- a/src/platform/Tizen/BLEManagerImpl.cpp +++ b/src/platform/Tizen/BLEManagerImpl.cpp @@ -455,7 +455,7 @@ void BLEManagerImpl::OnChipDeviceScanned(void * device, const chip::Ble::ChipBLE if (mBLEScanConfig.mBleScanState == BleScanState::kScanForDiscriminator) { - if (info.GetDeviceDiscriminator() != mBLEScanConfig.mDiscriminator) + if (!mBLEScanConfig.mDiscriminator.MatchesLongDiscriminator(info.GetDeviceDiscriminator())) { return; } @@ -1287,11 +1287,18 @@ bool BLEManagerImpl::SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQU void BLEManagerImpl::NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) {} -void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const uint16_t connDiscriminator) +void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) { mBLEScanConfig.mDiscriminator = connDiscriminator; mBLEScanConfig.mAppState = appState; - ChipLogProgress(DeviceLayer, "NewConnection: discriminator value [%u]", connDiscriminator); + if (connDiscriminator.IsShortDiscriminator()) + { + ChipLogProgress(DeviceLayer, "NewConnection: short discriminator value [%u]", connDiscriminator.GetShortValue()); + } + else + { + ChipLogProgress(DeviceLayer, "NewConnection: long discriminator value [%u]", connDiscriminator.GetLongValue()); + } // Initiate Scan. PlatformMgr().ScheduleWork(InitiateScan, static_cast(BleScanState::kScanForDiscriminator)); diff --git a/src/platform/Tizen/BLEManagerImpl.h b/src/platform/Tizen/BLEManagerImpl.h index a54d6ec9d7e792..8866263fafbc7e 100644 --- a/src/platform/Tizen/BLEManagerImpl.h +++ b/src/platform/Tizen/BLEManagerImpl.h @@ -57,7 +57,7 @@ struct BLEScanConfig BleScanState mBleScanState = BleScanState::kNotScanning; // If scanning by discriminator, what are we scanning for - uint16_t mDiscriminator = 0; + SetupDiscriminator mDiscriminator; // If scanning by address, what address are we searching for std::string mAddress; @@ -122,7 +122,7 @@ class BLEManagerImpl final : public BLEManager, // ===== Members that implement virtual methods on BleConnectionDelegate. - void NewConnection(BleLayer * bleLayer, void * appState, uint16_t connDiscriminator) override; + void NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) override; CHIP_ERROR CancelConnection() override; // ===== Members that implement virtual methods on ChipDeviceScannerDelegate diff --git a/src/platform/Tizen/BUILD.gn b/src/platform/Tizen/BUILD.gn index 825224b90e1417..37ce8507c7f6cc 100644 --- a/src/platform/Tizen/BUILD.gn +++ b/src/platform/Tizen/BUILD.gn @@ -20,6 +20,11 @@ import("${build_root}/config/linux/pkg_config.gni") import("${chip_root}/src/platform/device.gni") +if (chip_enable_openthread) { + import("//build_overrides/openthread.gni") + import("//build_overrides/ot_br_posix.gni") +} + assert(chip_device_platform == "tizen") static_library("Tizen") { @@ -29,9 +34,6 @@ static_library("Tizen") { "../SingletonConfigurationManager.cpp", "AppPreference.cpp", "AppPreference.h", - "BLEManagerImpl.cpp", - "BLEManagerImpl.h", - "BlePlatformConfig.h", "CHIPDevicePlatformConfig.h", "CHIPDevicePlatformEvent.h", "CHIPPlatformConfig.h", @@ -41,6 +43,8 @@ static_library("Tizen") { "ConfigurationManagerImpl.h", "ConnectivityManagerImpl.cpp", "ConnectivityManagerImpl.h", + "ConnectivityUtils.cpp", + "ConnectivityUtils.h", "DeviceInstanceInfoProviderImpl.cpp", "DeviceInstanceInfoProviderImpl.h", "DeviceNetworkProvisioningDelegateImpl.cpp", @@ -54,16 +58,13 @@ static_library("Tizen") { "MainLoop.cpp", "MainLoop.h", "NetworkCommissioningDriver.h", - "NetworkCommissioningThreadDriver.cpp", - "NetworkCommissioningWiFiDriver.cpp", + "NetworkCommissioningEthernetDriver.cpp", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", "PosixConfig.cpp", "PosixConfig.h", "SystemPlatformConfig.h", "SystemTimeSupport.cpp", - "WiFiManager.cpp", - "WiFiManager.h", ] deps = [ "${chip_root}/src/setup_payload" ] @@ -76,15 +77,35 @@ static_library("Tizen") { public_configs = [] if (chip_mdns == "platform") { - sources += [ "DnssdImpl.cpp" ] + sources += [ + "DnssdImpl.cpp", + "DnssdImpl.h", + ] deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] } + if (chip_enable_ble) { + sources += [ + "BLEManagerImpl.cpp", + "BLEManagerImpl.h", + "BlePlatformConfig.h", + ] + } + if (chip_enable_openthread) { sources += [ + "NetworkCommissioningThreadDriver.cpp", "ThreadStackManagerImpl.cpp", "ThreadStackManagerImpl.h", ] } + + if (chip_enable_wifi) { + sources += [ + "NetworkCommissioningWiFiDriver.cpp", + "WiFiManager.cpp", + "WiFiManager.h", + ] + } } diff --git a/src/platform/Tizen/ConfigurationManagerImpl.cpp b/src/platform/Tizen/ConfigurationManagerImpl.cpp index 507c22cacdd8ac..d57bd6a7454d69 100644 --- a/src/platform/Tizen/ConfigurationManagerImpl.cpp +++ b/src/platform/Tizen/ConfigurationManagerImpl.cpp @@ -177,5 +177,10 @@ void ConfigurationManagerImpl::RunConfigUnitTest(void) PosixConfig::RunConfigUnitTest(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Tizen/ConfigurationManagerImpl.h b/src/platform/Tizen/ConfigurationManagerImpl.h index 779fa93518a6a9..2180eec73da4a2 100644 --- a/src/platform/Tizen/ConfigurationManagerImpl.h +++ b/src/platform/Tizen/ConfigurationManagerImpl.h @@ -72,5 +72,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp void RunConfigUnitTest(void) override; }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Tizen/ConnectivityUtils.cpp b/src/platform/Tizen/ConnectivityUtils.cpp new file mode 100644 index 00000000000000..e86e2349318f76 --- /dev/null +++ b/src/platform/Tizen/ConnectivityUtils.cpp @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +// XXX: This is a workaround for a bug in the Tizen SDK header files. It is not +// possible to include both and at the same time. +// This will cause warning that struct ifmap is redefined. On Linux, this +// is not a problem, because in the struct is guarded with +// ifdef. To prevent this, we will define _LINUX_IF_H, so the +// will not be included. +#define _LINUX_IF_H + +#include +#include +#include +#include +#include +#include +#include + +using namespace ::chip::app::Clusters::GeneralDiagnostics; + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +InterfaceType ConnectivityUtils::GetInterfaceConnectionType(const char * ifname) +{ + InterfaceType ret = InterfaceType::EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED; + int sock = -1; + + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) + { + ChipLogError(DeviceLayer, "Failed to open socket"); + return ret; + } + + // Test wireless extensions for CONNECTION_WIFI + struct iwreq pwrq = {}; + strncpy(pwrq.ifr_name, ifname, IFNAMSIZ - 1); + + if (ioctl(sock, SIOCGIWNAME, &pwrq) != -1) + { + ret = InterfaceType::EMBER_ZCL_INTERFACE_TYPE_WI_FI; + } + else if ((strncmp(ifname, "en", 2) == 0) || (strncmp(ifname, "eth", 3) == 0)) + { + struct ethtool_cmd ecmd = {}; + ecmd.cmd = ETHTOOL_GSET; + struct ifreq ifr = {}; + ifr.ifr_data = reinterpret_cast(&ecmd); + strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); + + if (ioctl(sock, SIOCETHTOOL, &ifr) != -1) + ret = InterfaceType::EMBER_ZCL_INTERFACE_TYPE_ETHERNET; + } + + close(sock); + + return ret; +} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/Tizen/ConnectivityUtils.h b/src/platform/Tizen/ConnectivityUtils.h new file mode 100644 index 00000000000000..439e427905ace1 --- /dev/null +++ b/src/platform/Tizen/ConnectivityUtils.h @@ -0,0 +1,35 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +class ConnectivityUtils +{ +public: + static app::Clusters::GeneralDiagnostics::InterfaceType GetInterfaceConnectionType(const char * ifname); +}; + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/Tizen/NetworkCommissioningDriver.h b/src/platform/Tizen/NetworkCommissioningDriver.h index d128b8ab04b40c..50137033ccb95b 100644 --- a/src/platform/Tizen/NetworkCommissioningDriver.h +++ b/src/platform/Tizen/NetworkCommissioningDriver.h @@ -18,6 +18,7 @@ #pragma once #include +#include #include namespace chip { @@ -74,7 +75,6 @@ class TizenWiFiDriver final : public WiFiDriver private: bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); - WiFiNetworkIterator mWiFiIterator = WiFiNetworkIterator(this); WiFiNetwork mSavedNetwork; WiFiNetwork mStagingNetwork; }; @@ -126,6 +126,28 @@ class TizenThreadDriver final : public ThreadDriver #endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD +class TizenEthernetDriver final : public EthernetDriver +{ +public: + class EthernetNetworkIterator final : public NetworkIterator + { + public: + EthernetNetworkIterator(TizenEthernetDriver * aDriver); + ~EthernetNetworkIterator() override = default; + size_t Count() override { return mInterfaces.size(); } + bool Next(Network & item) override; + void Release() override { delete this; } + + private: + TizenEthernetDriver * mDriver; + std::vector mInterfaces; + size_t mInterfacesIdx = 0; + }; + + uint8_t GetMaxNetworks() override { return 1; }; + NetworkIterator * GetNetworks() override { return new EthernetNetworkIterator(this); }; +}; + } // namespace NetworkCommissioning } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Tizen/NetworkCommissioningEthernetDriver.cpp b/src/platform/Tizen/NetworkCommissioningEthernetDriver.cpp new file mode 100644 index 00000000000000..f700832651361b --- /dev/null +++ b/src/platform/Tizen/NetworkCommissioningEthernetDriver.cpp @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +using namespace chip::app::Clusters::GeneralDiagnostics; +using namespace chip::DeviceLayer::Internal; + +namespace chip { +namespace DeviceLayer { +namespace NetworkCommissioning { + +TizenEthernetDriver::EthernetNetworkIterator::EthernetNetworkIterator(TizenEthernetDriver * aDriver) : mDriver(aDriver) +{ + struct ifaddrs * ifaddr = nullptr; + VerifyOrReturn(getifaddrs(&ifaddr) == 0, ChipLogError(DeviceLayer, "Failed to get network interfaces: %s", strerror(errno))); + + for (const auto * ifa = ifaddr; ifa != nullptr; ifa = ifa->ifa_next) + { + if (ConnectivityUtils::GetInterfaceConnectionType(ifa->ifa_name) == InterfaceType::EMBER_ZCL_INTERFACE_TYPE_ETHERNET) + { + mInterfaces.push_back(ifa->ifa_name); + if (mInterfaces.size() == mDriver->GetMaxNetworks()) + { + break; + } + } + } + + freeifaddrs(ifaddr); +} + +bool TizenEthernetDriver::EthernetNetworkIterator::Next(Network & item) +{ + VerifyOrReturnValue(mInterfacesIdx < mInterfaces.size(), false); + + const auto & iface = mInterfaces[mInterfacesIdx++]; + item.networkIDLen = std::min(iface.size(), kMaxNetworkIDLen); + memcpy(item.networkID, iface.c_str(), item.networkIDLen); + item.connected = true; + + mInterfacesIdx++; + return true; +} + +} // namespace NetworkCommissioning +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp b/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp index 85a1b13f95a103..07159e0bb5de5f 100644 --- a/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp @@ -89,6 +89,12 @@ Status TizenWiFiDriver::AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, outDebugText.reduce_size(0); outNetworkIndex = 0; VerifyOrReturnError(mStagingNetwork.ssidLen == 0 || NetworkMatch(mStagingNetwork, ssid), Status::kBoundsExceeded); + + static_assert(sizeof(WiFiNetwork::ssid) <= std::numeric_limits::max(), + "Max length of WiFi ssid exceeds the limit of ssidLen field"); + static_assert(sizeof(WiFiNetwork::credentials) <= std::numeric_limits::max(), + "Max length of WiFi credentials exceeds the limit of credentialsLen field"); + VerifyOrReturnError(credentials.size() <= sizeof(mStagingNetwork.credentials), Status::kOutOfRange); VerifyOrReturnError(ssid.size() <= sizeof(mStagingNetwork.ssid), Status::kOutOfRange); diff --git a/src/platform/Tizen/PlatformManagerImpl.cpp b/src/platform/Tizen/PlatformManagerImpl.cpp index b053ab44d7aaaf..cc36d91a3aa507 100644 --- a/src/platform/Tizen/PlatformManagerImpl.cpp +++ b/src/platform/Tizen/PlatformManagerImpl.cpp @@ -39,10 +39,14 @@ PlatformManagerImpl PlatformManagerImpl::sInstance; CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) { ReturnErrorOnFailure(Internal::PosixConfig::Init()); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); + + ReturnErrorOnFailure(Internal::GenericPlatformManagerImpl_POSIX::_InitChipStack()); + + // Now set up our device instance info provider. We couldn't do that + // earlier, because the generic implementation sets a generic one. SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); - return Internal::GenericPlatformManagerImpl_POSIX::_InitChipStack(); + return CHIP_NO_ERROR; } } // namespace DeviceLayer diff --git a/src/platform/Zephyr/ConfigurationManagerImpl.cpp b/src/platform/Zephyr/ConfigurationManagerImpl.cpp index 6dfe51ab023f55..bd19057e65d3bf 100644 --- a/src/platform/Zephyr/ConfigurationManagerImpl.cpp +++ b/src/platform/Zephyr/ConfigurationManagerImpl.cpp @@ -180,5 +180,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) PlatformMgr().Shutdown(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Zephyr/ConfigurationManagerImpl.h b/src/platform/Zephyr/ConfigurationManagerImpl.h index 5f331d14d81897..166237fba32d81 100644 --- a/src/platform/Zephyr/ConfigurationManagerImpl.h +++ b/src/platform/Zephyr/ConfigurationManagerImpl.h @@ -99,5 +99,13 @@ inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * / return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Zephyr/Logging.cpp b/src/platform/Zephyr/Logging.cpp index 5fb3b98aea5c40..f65a5bbf472d33 100644 --- a/src/platform/Zephyr/Logging.cpp +++ b/src/platform/Zephyr/Logging.cpp @@ -49,7 +49,7 @@ void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char const size_t prefixLen = strlen(formattedMsg); vsnprintfcb(formattedMsg + prefixLen, sizeof(formattedMsg) - prefixLen, msg, v); - const char * allocatedMsg = log_strdup(formattedMsg); + const char * allocatedMsg = formattedMsg; // Invoke the Zephyr logging library to log the message. // diff --git a/src/platform/Zephyr/PlatformManagerImpl.cpp b/src/platform/Zephyr/PlatformManagerImpl.cpp index 22c9961fba989b..53053b5eae74f7 100644 --- a/src/platform/Zephyr/PlatformManagerImpl.cpp +++ b/src/platform/Zephyr/PlatformManagerImpl.cpp @@ -106,7 +106,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) // Initialize the configuration system. err = Internal::ZephyrConfig::Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); #if !CONFIG_NORDIC_SECURITY_BACKEND // Add entropy source based on Zephyr entropy driver diff --git a/src/platform/android/BLEManagerImpl.cpp b/src/platform/android/BLEManagerImpl.cpp index 4aab1c74c62aaa..f2068dc5da7eb3 100644 --- a/src/platform/android/BLEManagerImpl.cpp +++ b/src/platform/android/BLEManagerImpl.cpp @@ -449,7 +449,7 @@ void BLEManagerImpl::NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) // ===== start implement virtual methods on BleConnectionDelegate. -void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const uint16_t connDiscriminator) +void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -461,7 +461,20 @@ void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const u VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); env->ExceptionClear(); - env->CallVoidMethod(mBLEManagerObject, mOnNewConnectionMethod, static_cast(connDiscriminator)); + // TODO: The API we have here does not handle short discriminators in any + // sane way. Just do what we used to do, which is pretend that a short + // discriminator is actually a long discriminator with the low bits all 0. + uint16_t discriminator; + if (connDiscriminator.IsShortDiscriminator()) + { + discriminator = static_cast(connDiscriminator.GetShortValue()) + << (SetupDiscriminator::kLongBits - SetupDiscriminator::kShortBits); + } + else + { + discriminator = connDiscriminator.GetLongValue(); + } + env->CallVoidMethod(mBLEManagerObject, mOnNewConnectionMethod, static_cast(discriminator)); VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); exit: diff --git a/src/platform/android/BLEManagerImpl.h b/src/platform/android/BLEManagerImpl.h index 718db85c71b147..361129cdd42bbe 100644 --- a/src/platform/android/BLEManagerImpl.h +++ b/src/platform/android/BLEManagerImpl.h @@ -90,7 +90,7 @@ class BLEManagerImpl final : public BLEManager, // ===== Members that implement virtual methods on BleConnectionDelegate. - void NewConnection(BleLayer * bleLayer, void * appState, uint16_t connDiscriminator) override; + void NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) override; CHIP_ERROR CancelConnection() override; // ===== Members for internal use by the following friends. diff --git a/src/platform/android/ConfigurationManagerImpl.cpp b/src/platform/android/ConfigurationManagerImpl.cpp index 5c42175148e641..9ce80257b53fcc 100644 --- a/src/platform/android/ConfigurationManagerImpl.cpp +++ b/src/platform/android/ConfigurationManagerImpl.cpp @@ -215,5 +215,10 @@ CHIP_ERROR ConfigurationManagerImpl::GetUniqueId(char * buf, size_t bufSize) return ReadConfigValueStr(AndroidConfig::kConfigKey_UniqueId, buf, bufSize, dateLen); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/android/ConfigurationManagerImpl.h b/src/platform/android/ConfigurationManagerImpl.h index 45b93bdc76b618..6e1a2ed9870e66 100644 --- a/src/platform/android/ConfigurationManagerImpl.h +++ b/src/platform/android/ConfigurationManagerImpl.h @@ -83,5 +83,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp jobject mConfigurationManagerObject = nullptr; }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/android/PlatformManagerImpl.cpp b/src/platform/android/PlatformManagerImpl.cpp index 0fe62600ad6e0c..4a6211b68713e0 100644 --- a/src/platform/android/PlatformManagerImpl.cpp +++ b/src/platform/android/PlatformManagerImpl.cpp @@ -46,14 +46,16 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() // Initialize the configuration system. err = Internal::AndroidConfig::Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. err = Internal::GenericPlatformManagerImpl_POSIX::_InitChipStack(); SuccessOrExit(err); + // Now set up our device instance info provider. We couldn't do that + // earlier, because the generic implementation sets a generic one. + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); + exit: return err; } diff --git a/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.cpp b/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.cpp index 23c860a1a32d82..b30390506580bd 100644 --- a/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.cpp +++ b/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.cpp @@ -180,5 +180,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) hal_reboot(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.h b/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.h index 0239f9a8dee22e..037ad2019967e7 100644 --- a/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.h +++ b/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.h @@ -91,9 +91,6 @@ class ConfigurationManagerImpl final : public Internal::GenericConfigurationMana CHIP_ERROR WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) override; void RunConfigUnitTest(void) override; - friend ConfigurationManager & ConfigurationMgr(void); - friend ConfigurationManagerImpl & ConfigurationMgrImpl(void); - static ConfigurationManagerImpl sInstance; // ===== Private members reserved for use by this class only. @@ -101,33 +98,19 @@ class ConfigurationManagerImpl final : public Internal::GenericConfigurationMana static void DoFactoryReset(intptr_t arg); }; -/** - * Returns the public interface of the ConfigurationManager singleton object. - * - * Chip applications should use this to access features of the ConfigurationManager object - * that are common to all platforms. - */ -inline ConfigurationManager & ConfigurationMgr(void) +inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) { - return ConfigurationManagerImpl::sInstance; + log_error("ConfigurationManagerImpl::_GetPrimaryWiFiMACAddress() is not supported now.\r\n"); + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } /** - * Returns the platform-specific implementation of the ConfigurationManager singleton object. + * Returns the platform-specific implementation of the ConfigurationManager object. * - * Chip applications can use this to gain access to features of the ConfigurationManager - * that are specific to the BL602 platform. + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. */ -inline ConfigurationManagerImpl & ConfigurationMgrImpl(void) -{ - return ConfigurationManagerImpl::sInstance; -} - -inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) -{ - log_error("ConfigurationManagerImpl::_GetPrimaryWiFiMACAddress() is not supported now.\r\n"); - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} +ConfigurationManager & ConfigurationMgrImpl(); } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/bouffalolab/BL602/InetPlatformConfig.h b/src/platform/bouffalolab/BL602/InetPlatformConfig.h index cdf045a928069d..0c17f57a4c798a 100644 --- a/src/platform/bouffalolab/BL602/InetPlatformConfig.h +++ b/src/platform/bouffalolab/BL602/InetPlatformConfig.h @@ -43,5 +43,5 @@ #endif // INET_CONFIG_NUM_TCP_ENDPOINTS #ifndef INET_CONFIG_NUM_UDP_ENDPOINTS -#define INET_CONFIG_NUM_UDP_ENDPOINTS 4 +#define INET_CONFIG_NUM_UDP_ENDPOINTS 6 #endif // INET_CONFIG_NUM_UDP_ENDPOINTS diff --git a/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.h b/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.h index c5bfac61a21383..70090297551aa3 100644 --- a/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.h +++ b/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.h @@ -129,7 +129,6 @@ class BLWiFiDriver final : public WiFiDriver bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); CHIP_ERROR StartScanWiFiNetworks(ByteSpan ssid); - WiFiNetworkIterator mWiFiIterator = WiFiNetworkIterator(this); WiFiNetwork mSavedNetwork; WiFiNetwork mStagingNetwork; ScanCallback * mpScanCallback; diff --git a/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp b/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp index 3e359ff707fbc6..26585e132fc91b 100644 --- a/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp +++ b/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp @@ -188,8 +188,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) { CHIP_ERROR err; - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - // Initialize the configuration system. err = Internal::BL602Config::Init(); log_error("err: %d\r\n", err); diff --git a/src/platform/cc13x2_26x2/ConfigurationManagerImpl.cpp b/src/platform/cc13x2_26x2/ConfigurationManagerImpl.cpp index 15a00a54aa1ca7..5ceae39b5d5ed4 100644 --- a/src/platform/cc13x2_26x2/ConfigurationManagerImpl.cpp +++ b/src/platform/cc13x2_26x2/ConfigurationManagerImpl.cpp @@ -184,5 +184,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) SysCtrlSystemReset(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/cc13x2_26x2/ConfigurationManagerImpl.h b/src/platform/cc13x2_26x2/ConfigurationManagerImpl.h index ad44199c34ddb5..0e1cb7726c587e 100644 --- a/src/platform/cc13x2_26x2/ConfigurationManagerImpl.h +++ b/src/platform/cc13x2_26x2/ConfigurationManagerImpl.h @@ -75,5 +75,13 @@ inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * b return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/cc13x2_26x2/PlatformManagerImpl.cpp b/src/platform/cc13x2_26x2/PlatformManagerImpl.cpp index b9b85e67845717..ec87573cd54e98 100644 --- a/src/platform/cc13x2_26x2/PlatformManagerImpl.cpp +++ b/src/platform/cc13x2_26x2/PlatformManagerImpl.cpp @@ -107,7 +107,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) // Initialize the configuration system. err = Internal::CC13X2_26X2Config::Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); // DMM Addition DMMPolicy_Params dmmPolicyParams; diff --git a/src/platform/cc32xx/ConfigurationManagerImpl.cpp b/src/platform/cc32xx/ConfigurationManagerImpl.cpp index 36028eab69a18d..4ba66c9f80bce6 100644 --- a/src/platform/cc32xx/ConfigurationManagerImpl.cpp +++ b/src/platform/cc32xx/ConfigurationManagerImpl.cpp @@ -197,5 +197,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) MAP_PRCMHibernateCycleTrigger(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/cc32xx/ConfigurationManagerImpl.h b/src/platform/cc32xx/ConfigurationManagerImpl.h index 64be94ae27f57e..48e1771597f7a8 100644 --- a/src/platform/cc32xx/ConfigurationManagerImpl.h +++ b/src/platform/cc32xx/ConfigurationManagerImpl.h @@ -69,5 +69,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/cc32xx/PlatformManagerImpl.cpp b/src/platform/cc32xx/PlatformManagerImpl.cpp index 36a81fb2330ca4..258fe59d580832 100644 --- a/src/platform/cc32xx/PlatformManagerImpl.cpp +++ b/src/platform/cc32xx/PlatformManagerImpl.cpp @@ -69,7 +69,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) // Initialize the configuration system. err = Internal::CC32XXConfig::Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); // Initialize LwIP. tcpip_init(NULL, NULL); diff --git a/src/platform/fake/BUILD.gn b/src/platform/fake/BUILD.gn index ab4fe755a1cfb9..858517e8bf74bd 100644 --- a/src/platform/fake/BUILD.gn +++ b/src/platform/fake/BUILD.gn @@ -20,6 +20,7 @@ assert(chip_device_platform == "fake") static_library("fake") { sources = [ + "../SingletonConfigurationManager.cpp", "CHIPDevicePlatformEvent.h", "ConfigurationManagerImpl.cpp", "ConfigurationManagerImpl.h", diff --git a/src/platform/fake/ConfigurationManagerImpl.cpp b/src/platform/fake/ConfigurationManagerImpl.cpp index abfaecbbe6dd44..04b4b52ca89df1 100644 --- a/src/platform/fake/ConfigurationManagerImpl.cpp +++ b/src/platform/fake/ConfigurationManagerImpl.cpp @@ -19,12 +19,10 @@ ConfigurationManagerImpl & ConfigurationManagerImpl::GetDefaultInstance() return sInstance; } -ConfigurationManager & ConfigurationMgr() +ConfigurationManager & ConfigurationMgrImpl() { return ConfigurationManagerImpl::GetDefaultInstance(); } -void SetConfigurationMgr(ConfigurationManager * configurationManager) {} - } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/fake/ConfigurationManagerImpl.h b/src/platform/fake/ConfigurationManagerImpl.h index 40f53e0d0f3c9d..c63b97eaaf83d5 100644 --- a/src/platform/fake/ConfigurationManagerImpl.h +++ b/src/platform/fake/ConfigurationManagerImpl.h @@ -108,5 +108,13 @@ class ConfigurationManagerImpl : public ConfigurationManager System::Clock::Seconds32 mFirmwareBuildChipEpochTime = System::Clock::Seconds32(0); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/mbed/ConfigurationManagerImpl.cpp b/src/platform/mbed/ConfigurationManagerImpl.cpp index b22e48cdc7f6b3..1a5b98846143bf 100644 --- a/src/platform/mbed/ConfigurationManagerImpl.cpp +++ b/src/platform/mbed/ConfigurationManagerImpl.cpp @@ -235,5 +235,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) system_reset(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/mbed/ConfigurationManagerImpl.h b/src/platform/mbed/ConfigurationManagerImpl.h index e73c14cae0f81f..30ac3a7083a238 100644 --- a/src/platform/mbed/ConfigurationManagerImpl.h +++ b/src/platform/mbed/ConfigurationManagerImpl.h @@ -75,5 +75,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/mbed/NetworkCommissioningDriver.h b/src/platform/mbed/NetworkCommissioningDriver.h index 29c917c6b56888..82d83d73558417 100644 --- a/src/platform/mbed/NetworkCommissioningDriver.h +++ b/src/platform/mbed/NetworkCommissioningDriver.h @@ -143,7 +143,6 @@ class WiFiDriverImpl final : public WiFiDriver chip::DeviceLayer::Internal::WiFiAuthSecurityType NsapiToNetworkSecurity(nsapi_security_t nsapi_security); - WiFiNetworkIterator mWiFiIterator = WiFiNetworkIterator(this); WiFiNetwork mSavedNetwork; WiFiNetwork mStagingNetwork; ScanCallback * mScanCallback; diff --git a/src/platform/mbed/PlatformManagerImpl.cpp b/src/platform/mbed/PlatformManagerImpl.cpp index 6040d36b36eae3..25b5e5e5ccb723 100644 --- a/src/platform/mbed/PlatformManagerImpl.cpp +++ b/src/platform/mbed/PlatformManagerImpl.cpp @@ -92,8 +92,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) tcpip_init(NULL, NULL); #endif - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - auto err = System::Clock::InitClock_RealTime(); SuccessOrExit(err); diff --git a/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp index ce2c4a235cdaa8..f8e6518b2d466a 100644 --- a/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp @@ -184,6 +184,7 @@ CHIP_ERROR BLEManagerImpl::_Init() VerifyOrExit(bleAppCreated == pdPASS, err = CHIP_ERROR_INCORRECT_STATE); /* BLE Radio Init */ + XCVR_TemperatureUpdate(BOARD_GetTemperature()); VerifyOrExit(XCVR_Init(BLE_MODE, DR_2MBPS) == gXcvrSuccess_c, err = CHIP_ERROR_INCORRECT_STATE); /* Create BLE Controller Task */ diff --git a/src/platform/nxp/k32w/k32w0/BUILD.gn b/src/platform/nxp/k32w/k32w0/BUILD.gn index dddeef7374b20a..e813d8253c48bd 100644 --- a/src/platform/nxp/k32w/k32w0/BUILD.gn +++ b/src/platform/nxp/k32w/k32w0/BUILD.gn @@ -47,8 +47,6 @@ static_library("k32w0") { "NFCManagerImpl.h", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", - "RamStorage.cpp", - "RamStorage.h", "ble_function_mux.c", ] diff --git a/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.cpp index ec29b04d2e81a8..451536e8deedbd 100644 --- a/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.cpp @@ -291,5 +291,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) RESET_SystemReset(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.h b/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.h index bdceee20899ace..689dc8d9732d0c 100644 --- a/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.h +++ b/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.h @@ -84,5 +84,13 @@ inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * b return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/nxp/k32w/k32w0/K32W0Config.cpp b/src/platform/nxp/k32w/k32w0/K32W0Config.cpp index bab9d1eb2e618b..c22f4c5a862312 100644 --- a/src/platform/nxp/k32w/k32w0/K32W0Config.cpp +++ b/src/platform/nxp/k32w/k32w0/K32W0Config.cpp @@ -36,7 +36,8 @@ namespace chip { namespace DeviceLayer { namespace Internal { -static ramBufferDescriptor * ramDescr; +osaMutexId_t K32WConfig::pdmMutexHandle = NULL; +static ramBufferDescriptor * ramDescr = NULL; constexpr uint16_t kNvmIdChipConfigData = 0x5000; constexpr uint16_t kRamBufferInitialSize = 3072; @@ -47,6 +48,8 @@ CHIP_ERROR K32WConfig::Init() int pdmStatus; /* Initialise the Persistent Data Manager */ + pdmMutexHandle = OSA_MutexCreate(); + VerifyOrExit((NULL != pdmMutexHandle), err = CHIP_ERROR_NO_MEMORY); pdmStatus = PDM_Init(); SuccessOrExit(err = MapPdmInitStatus(pdmStatus)); @@ -57,9 +60,38 @@ CHIP_ERROR K32WConfig::Init() } exit: + if (err != CHIP_NO_ERROR) + { + if (pdmMutexHandle) + { + OSA_MutexDestroy(pdmMutexHandle); + } + if (ramDescr) + { + free(ramDescr); + } + } return err; } +void K32WConfig::MutexLock(osaMutexId_t mutexId, uint32_t millisec) +{ + osaStatus_t status = OSA_MutexLock(mutexId, millisec); + if (osaStatus_Success != status) + { + ChipLogProgress(DeviceLayer, "OSA mutex lock failed."); + } +} + +void K32WConfig::MutexUnlock(osaMutexId_t mutexId) +{ + osaStatus_t status = OSA_MutexUnlock(mutexId); + if (osaStatus_Success != status) + { + ChipLogProgress(DeviceLayer, "OSA mutex unlock failed."); + } +} + CHIP_ERROR K32WConfig::ReadConfigValue(Key key, bool & val) { CHIP_ERROR err; @@ -139,53 +171,119 @@ CHIP_ERROR K32WConfig::ReadConfigValueCounter(uint8_t counterIdx, uint32_t & val CHIP_ERROR K32WConfig::WriteConfigValue(Key key, bool val) { CHIP_ERROR err; - rsError status; PDM_teStatus pdmStatus; + rsError ramStatus = RS_ERROR_NONE; VerifyOrExit(ValidConfigKey(key), err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. - status = ramStorageSet(&ramDescr, key, (uint8_t *) &val, sizeof(bool)); - SuccessOrExit(err = MapRamStorageStatus(status)); + MutexLock(pdmMutexHandle, osaWaitForever_c); + + /* first delete all occurrences of "key" */ + ramStorageDelete(ramDescr, key, -1); + + /* resize RAM Buffer if needed */ + ramStatus = ramStorageResize(&ramDescr, key, (uint8_t *) &val, sizeof(bool)); + SuccessOrExit(err = MapRamStorageStatus(ramStatus)); + + /* add to RAM buffer */ + ramStatus = ramStorageSet(ramDescr, key, (uint8_t *) &val, sizeof(bool)); + SuccessOrExit(err = MapRamStorageStatus(ramStatus)); + + /* schedule flash writing */ + pdmStatus = PDM_eSaveRecordDataInIdleTask(kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); + SuccessOrExit(err = MapPdmStatus(pdmStatus)); + +exit: + MutexUnlock(pdmMutexHandle); + return err; +} + +CHIP_ERROR K32WConfig::WriteConfigValueSync(Key key, bool val) +{ + CHIP_ERROR err; + PDM_teStatus pdmStatus; + rsError ramStatus = RS_ERROR_NONE; + + VerifyOrExit(ValidConfigKey(key), err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. + MutexLock(pdmMutexHandle, osaWaitForever_c); + + /* first delete all occurrences of "key" */ + ramStorageDelete(ramDescr, key, -1); - pdmStatus = - PDM_eSaveRecordDataInIdleTask((uint16_t) kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); + /* resize RAM Buffer if needed */ + ramStatus = ramStorageResize(&ramDescr, key, (uint8_t *) &val, sizeof(bool)); + SuccessOrExit(err = MapRamStorageStatus(ramStatus)); + + /* add to RAM buffer */ + ramStatus = ramStorageSet(ramDescr, key, (uint8_t *) &val, sizeof(bool)); + SuccessOrExit(err = MapRamStorageStatus(ramStatus)); + + // Interrupts are disabled to ensure there is no context switch during the actual + // writing, thus avoiding race conditions. + OSA_InterruptDisable(); + pdmStatus = PDM_eSaveRecordData(kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); + OSA_InterruptEnable(); SuccessOrExit(err = MapPdmStatus(pdmStatus)); + exit: + MutexUnlock(pdmMutexHandle); return err; } CHIP_ERROR K32WConfig::WriteConfigValue(Key key, uint32_t val) { CHIP_ERROR err; - rsError status; PDM_teStatus pdmStatus; + rsError ramStatus = RS_ERROR_NONE; VerifyOrExit(ValidConfigKey(key), err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. - status = ramStorageSet(&ramDescr, key, (uint8_t *) &val, sizeof(uint32_t)); - SuccessOrExit(err = MapRamStorageStatus(status)); + MutexLock(pdmMutexHandle, osaWaitForever_c); + + /* first delete all occurrences of "key" */ + ramStorageDelete(ramDescr, key, -1); - pdmStatus = - PDM_eSaveRecordDataInIdleTask((uint16_t) kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); + /* resize RAM Buffer if needed */ + ramStatus = ramStorageResize(&ramDescr, key, (uint8_t *) &val, sizeof(uint32_t)); + SuccessOrExit(err = MapRamStorageStatus(ramStatus)); + + /* add to RAM buffer */ + ramStatus = ramStorageSet(ramDescr, key, (uint8_t *) &val, sizeof(uint32_t)); + SuccessOrExit(err = MapRamStorageStatus(ramStatus)); + + /* schedule flash writing */ + pdmStatus = PDM_eSaveRecordDataInIdleTask(kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); SuccessOrExit(err = MapPdmStatus(pdmStatus)); exit: + MutexUnlock(pdmMutexHandle); return err; } CHIP_ERROR K32WConfig::WriteConfigValue(Key key, uint64_t val) { CHIP_ERROR err; - rsError status; PDM_teStatus pdmStatus; + rsError ramStatus = RS_ERROR_NONE; VerifyOrExit(ValidConfigKey(key), err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. - status = ramStorageSet(&ramDescr, key, (uint8_t *) &val, sizeof(uint64_t)); - SuccessOrExit(err = MapRamStorageStatus(status)); + MutexLock(pdmMutexHandle, osaWaitForever_c); + + /* first delete all occurrences of "key" */ + ramStorageDelete(ramDescr, key, -1); + + /* resize RAM Buffer if needed */ + ramStatus = ramStorageResize(&ramDescr, key, (uint8_t *) &val, sizeof(uint64_t)); + SuccessOrExit(err = MapRamStorageStatus(ramStatus)); - pdmStatus = - PDM_eSaveRecordDataInIdleTask((uint16_t) kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); + /* add to RAM buffer */ + ramStatus = ramStorageSet(ramDescr, key, (uint8_t *) &val, sizeof(uint64_t)); + SuccessOrExit(err = MapRamStorageStatus(ramStatus)); + + /* schedule flash writing */ + pdmStatus = PDM_eSaveRecordDataInIdleTask(kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); SuccessOrExit(err = MapPdmStatus(pdmStatus)); exit: + MutexUnlock(pdmMutexHandle); return err; } @@ -198,26 +296,35 @@ CHIP_ERROR K32WConfig::WriteConfigValueStr(Key key, const char * str, size_t str { CHIP_ERROR err; PDM_teStatus pdmStatus; - rsError status; + rsError ramStatus = RS_ERROR_NONE; VerifyOrExit(ValidConfigKey(key), err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. + MutexLock(pdmMutexHandle, osaWaitForever_c); - if (str != NULL) + if (!str) { - status = ramStorageSet(&ramDescr, key, (uint8_t *) str, strLen); - SuccessOrExit(err = MapRamStorageStatus(status)); - - pdmStatus = - PDM_eSaveRecordDataInIdleTask((uint16_t) kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); - SuccessOrExit(err = MapPdmStatus(pdmStatus)); + ramStatus = ramStorageDelete(ramDescr, key, -1); + SuccessOrExit(err = MapRamStorageStatus(ramStatus)); } else { - err = ClearConfigValue(key); - SuccessOrExit(err); + /* first delete all occurrences of "key" */ + ramStorageDelete(ramDescr, key, -1); + + /* resize RAM Buffer if needed */ + ramStatus = ramStorageResize(&ramDescr, key, (uint8_t *) str, strLen); + SuccessOrExit(err = MapRamStorageStatus(ramStatus)); + + /* add to RAM buffer */ + ramStatus = ramStorageSet(ramDescr, key, (uint8_t *) str, strLen); + SuccessOrExit(err = MapRamStorageStatus(ramStatus)); + + /* schedule flash writing */ + pdmStatus = PDM_eSaveRecordDataInIdleTask(kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); } exit: + MutexUnlock(pdmMutexHandle); return err; } @@ -239,14 +346,15 @@ CHIP_ERROR K32WConfig::ClearConfigValue(Key key) PDM_teStatus pdmStatus; VerifyOrExit(ValidConfigKey(key), err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. - status = ramStorageDelete(ramDescr, key, 0); + MutexLock(pdmMutexHandle, osaWaitForever_c); + status = ramStorageDelete(ramDescr, key, -1); SuccessOrExit(err = MapRamStorageStatus(status)); - pdmStatus = - PDM_eSaveRecordDataInIdleTask((uint16_t) kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); + pdmStatus = PDM_eSaveRecordDataInIdleTask(kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); SuccessOrExit(err = MapPdmStatus(pdmStatus)); exit: + MutexUnlock(pdmMutexHandle); return err; } @@ -269,14 +377,18 @@ CHIP_ERROR K32WConfig::FactoryResetConfig(void) CHIP_ERROR err = CHIP_NO_ERROR; PDM_teStatus pdmStatus; + MutexLock(pdmMutexHandle, osaWaitForever_c); FactoryResetConfigInternal(kMinConfigKey_ChipConfig, kMaxConfigKey_ChipConfig); FactoryResetConfigInternal(kMinConfigKey_KVSKey, kMaxConfigKey_KVSKey); FactoryResetConfigInternal(kMinConfigKey_KVSValue, kMaxConfigKey_KVSValue); - pdmStatus = PDM_eSaveRecordData((uint16_t) kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); + pdmStatus = PDM_eSaveRecordData(kNvmIdChipConfigData, ramDescr, ramDescr->ramBufferLen + kRamDescHeaderSize); SuccessOrExit(err = MapPdmStatus(pdmStatus)); exit: + free((void *) ramDescr); + ramDescr = NULL; + MutexUnlock(pdmMutexHandle); return err; } @@ -284,7 +396,7 @@ void K32WConfig::FactoryResetConfigInternal(Key firstKey, Key lastKey) { for (Key key = firstKey; key <= lastKey; key++) { - ramStorageDelete(ramDescr, key, 0); + ramStorageDelete(ramDescr, key, -1); } } diff --git a/src/platform/nxp/k32w/k32w0/K32W0Config.h b/src/platform/nxp/k32w/k32w0/K32W0Config.h index 803149947a7a71..cc8919cf21ebb9 100644 --- a/src/platform/nxp/k32w/k32w0/K32W0Config.h +++ b/src/platform/nxp/k32w/k32w0/K32W0Config.h @@ -29,7 +29,9 @@ #include #include "PDM.h" -#include "RamStorage.h" +#include "fsl_os_abstraction.h" +#include "pdm_ram_storage_glue.h" +#include "ram_storage.h" namespace chip { namespace DeviceLayer { @@ -122,6 +124,7 @@ class K32WConfig static CHIP_ERROR ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen); static CHIP_ERROR ReadConfigValueCounter(uint8_t counterIdx, uint32_t & val); static CHIP_ERROR WriteConfigValue(Key key, bool val); + static CHIP_ERROR WriteConfigValueSync(Key key, bool val); static CHIP_ERROR WriteConfigValue(Key key, uint32_t val); static CHIP_ERROR WriteConfigValue(Key key, uint64_t val); static CHIP_ERROR WriteConfigValueStr(Key key, const char * str); @@ -135,6 +138,12 @@ class K32WConfig static void RunConfigUnitTest(void); + // Log error wrappers for OSA mutex lock/unlock. + static void MutexLock(osaMutexId_t mutexId, uint32_t millisec); + static void MutexUnlock(osaMutexId_t mutexId); + + static osaMutexId_t pdmMutexHandle; + protected: static constexpr uint8_t GetPDMId(uint32_t key); static constexpr uint8_t GetRecordKey(uint32_t key); diff --git a/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.cpp index 8cd1914211f121..f2fbd071bc3654 100644 --- a/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.cpp @@ -93,10 +93,14 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t { // This is the ID of the actual data pdmInternalId = chip::DeviceLayer::Internal::K32WConfigKey(pdmIdKvsValue, keyId); + ChipLogProgress(DeviceLayer, "KVS, get the value of Matter key [%s] with PDM id: %i", key, pdmInternalId); err = chip::DeviceLayer::Internal::K32WConfig::ReadConfigValueBin(pdmInternalId, (uint8_t *) value, value_size, read_bytes); *read_bytes_size = read_bytes; - - ChipLogProgress(DeviceLayer, "KVS, get Matter key [%s] with PDM id: %i", key, pdmInternalId); + } + else + { + ChipLogProgress(DeviceLayer, "KVS, error in getting the value of Matter key [%s]. Key not found in persistent storage.", + key); } exit: @@ -118,15 +122,9 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, keyId = GetStringKeyId(key, &freeKeyId); - // Key already exists - if (keyId < kMaxNumberOfKeys) - { - // Update just the value in this case - putKey = false; - } - else + // Key does not exist. Write both key and value in persistent storage. + if (kMaxNumberOfKeys == keyId) { - // Need to write both the value and the string key putKey = true; keyId = freeKeyId; } diff --git a/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.h b/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.h index 0b0a09178ed44d..df942779fe4bc2 100644 --- a/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.h +++ b/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.h @@ -1,3 +1,4 @@ + /* * * Copyright (c) 2021 Project CHIP Authors diff --git a/src/platform/nxp/k32w/k32w0/Logging.cpp b/src/platform/nxp/k32w/k32w0/Logging.cpp index eca2baf51216c1..da545b6c7aff85 100644 --- a/src/platform/nxp/k32w/k32w0/Logging.cpp +++ b/src/platform/nxp/k32w/k32w0/Logging.cpp @@ -28,7 +28,6 @@ static constexpr uint8_t category_max_len_bytes = 3; #endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD static bool isLogInitialized; -extern uint8_t gOtLogUartInstance; extern "C" uint32_t otPlatAlarmMilliGetNow(void); namespace chip { @@ -108,8 +107,7 @@ void ENFORCE_FORMAT(1, 0) GenericLog(const char * format, va_list arg, const cha if (!isLogInitialized) { - isLogInitialized = true; - gOtLogUartInstance = 0; + isLogInitialized = true; otPlatUartEnable(); } diff --git a/src/platform/nxp/k32w/k32w0/OTAImageProcessorImpl.cpp b/src/platform/nxp/k32w/k32w0/OTAImageProcessorImpl.cpp index 27deee3fece95f..a44d0cb1dfec6e 100644 --- a/src/platform/nxp/k32w/k32w0/OTAImageProcessorImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/OTAImageProcessorImpl.cpp @@ -83,7 +83,11 @@ void OTAImageProcessorImpl::TriggerNewRequestForData() { if (mDownloader) { + // The chip lock needs to be taken here to avoid having race conditions + // when trying to read attributes during OTA transfer. See https://github.com/project-chip/connectedhomeip/issues/18327 + PlatformMgr().LockChipStack(); this->mDownloader->FetchNextData(); + PlatformMgr().UnlockChipStack(); } } @@ -209,7 +213,7 @@ bool OTAImageProcessorImpl::IsFirstImageRun() { bool firstRun = false; - if (CHIP_NO_ERROR == (K32WConfig::ReadConfigValue(K32WConfig::kConfigKey_FirstRunOfOTAImage, firstRun))) + if (CHIP_NO_ERROR == K32WConfig::ReadConfigValue(K32WConfig::kConfigKey_FirstRunOfOTAImage, firstRun)) { return firstRun; } @@ -276,9 +280,7 @@ void OTAImageProcessorImpl::HandleApply(intptr_t context) OTA_CommitImage(NULL); if (OTA_ImageAuthenticate() == gOtaImageAuthPass_c) { - - /* TODO internal: MATTER-126 */ - /*if (CHIP_NO_ERROR == K32WConfig::WriteConfigValue(K32WConfig::kConfigKey_FirstRunOfOTAImage, firstRun)) */ + if (CHIP_NO_ERROR == K32WConfig::WriteConfigValueSync(K32WConfig::kConfigKey_FirstRunOfOTAImage, firstRun)) { /* Set the necessary information to inform the SSBL that a new image is available */ DeviceLayer::ConfigurationMgr().StoreSoftwareVersion(imageProcessor->mSoftwareVersion); @@ -286,10 +288,14 @@ void OTAImageProcessorImpl::HandleApply(intptr_t context) ChipLogProgress(SoftwareUpdate, "OTA image authentication success. Device will reboot with the new image!"); ResetMCU(); } + else + { + ChipLogProgress(SoftwareUpdate, "Failed to write kConfigKey_FirstRunOfOTAImage key."); + } } else { - ChipLogError(SoftwareUpdate, "Image authentication error"); + ChipLogError(SoftwareUpdate, "Image authentication error."); } } diff --git a/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp index 911b2e9ad73d71..5f00b346bddcde 100644 --- a/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp @@ -35,9 +35,12 @@ #include #endif +#if defined(MBEDTLS_USE_TINYCRYPT) +#include "ecc.h" +#endif + #include -#include "K32W061.h" #include "MemManager.h" #include "RNG_Interface.h" #include "TimersManager.h" @@ -49,6 +52,10 @@ namespace DeviceLayer { PlatformManagerImpl PlatformManagerImpl::sInstance; +#if defined(MBEDTLS_USE_TINYCRYPT) +osaMutexId_t PlatformManagerImpl::rngMutexHandle = NULL; +#endif + CHIP_ERROR PlatformManagerImpl::InitBoardFwk(void) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -93,6 +100,18 @@ static int app_entropy_source(void * data, unsigned char * output, size_t len, s return 0; } +#if defined(MBEDTLS_USE_TINYCRYPT) +int PlatformManagerImpl::uECC_RNG_Function(uint8_t * dest, unsigned int size) +{ + int res; + OSA_MutexLock(rngMutexHandle, osaWaitForever_c); + res = (chip::Crypto::DRBG_get_bytes(dest, size) == CHIP_NO_ERROR) ? size : 0; + OSA_MutexUnlock(rngMutexHandle); + + return res; +} +#endif + CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) { uint32_t chipType; @@ -111,8 +130,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) goto exit; } - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - mStartTime = System::SystemClock().GetMonotonicTimestamp(); #if CHIP_SYSTEM_CONFIG_USE_LWIP @@ -123,6 +140,13 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) err = chip::Crypto::add_entropy_source(app_entropy_source, NULL, 16); SuccessOrExit(err); +#if defined(MBEDTLS_USE_TINYCRYPT) + /* Set RNG function for tinycrypt operations. */ + rngMutexHandle = OSA_MutexCreate(); + VerifyOrExit((NULL != rngMutexHandle), err = CHIP_ERROR_NO_MEMORY); + uECC_set_rng(PlatformManagerImpl::uECC_RNG_Function); +#endif + // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. err = Internal::GenericPlatformManagerImpl_FreeRTOS::_InitChipStack(); diff --git a/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.h b/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.h index 70ece1cdf11f3c..6e241c1dbd62b8 100644 --- a/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.h +++ b/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.h @@ -25,6 +25,7 @@ #pragma once +#include "fsl_os_abstraction.h" #include namespace chip { @@ -51,6 +52,17 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener System::Clock::Timestamp GetStartTime() { return mStartTime; } CHIP_ERROR InitBoardFwk(void); +#if defined(MBEDTLS_USE_TINYCRYPT) + // Since the RNG callback will be called from multiple threads, + // use this mutex to lock/unlock the call to Matter RNG API, which + // uses some global variables. + static osaMutexId_t rngMutexHandle; + // Callback used by tinycrypt to generate random numbers. + // It must be set before calling any sign operations, + // which are used in both Matter and OT threads. + static int uECC_RNG_Function(uint8_t * dest, unsigned int size); +#endif + private: // ===== Methods that implement the PlatformManager abstract interface. diff --git a/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h b/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h index a589a86223d16d..f7514dcb68bec9 100644 --- a/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h +++ b/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h @@ -37,7 +37,7 @@ struct ChipDeviceEvent; // ==================== Platform Adaptations ==================== #define CHIP_SYSTEM_CONFIG_PLATFORM_PROVIDES_TIME 1 #define CHIP_SYSTEM_CONFIG_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent * -#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 11 +#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 7 // ========== Platform-specific Configuration Overrides ========= diff --git a/src/platform/nxp/k32w/k32w0/ThreadStackManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/ThreadStackManagerImpl.cpp index 7f5d4961ba41e4..78ccc1b9b0abf3 100644 --- a/src/platform/nxp/k32w/k32w0/ThreadStackManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/ThreadStackManagerImpl.cpp @@ -107,3 +107,8 @@ extern "C" void otPlatFree(void * aPtr) { return CHIPPlatformMemoryFree(aPtr); } + +extern "C" void * otPlatRealloc(void * p, size_t aSize) +{ + return CHIPPlatformMemoryRealloc(p, aSize); +} diff --git a/src/platform/nxp/mw320/BUILD.gn b/src/platform/nxp/mw320/BUILD.gn index 4c934d9c682f2c..ad8f60c6240815 100644 --- a/src/platform/nxp/mw320/BUILD.gn +++ b/src/platform/nxp/mw320/BUILD.gn @@ -25,6 +25,7 @@ if (chip_enable_openthread) { static_library("mw320") { sources = [ "../../FreeRTOS/SystemTimeSupport.cpp", + "../../SingletonConfigurationManager.cpp", "BLEManagerImpl.cpp", "BLEManagerImpl.h", "CHIPDevicePlatformConfig.h", diff --git a/src/platform/nxp/mw320/ConfigurationManagerImpl.cpp b/src/platform/nxp/mw320/ConfigurationManagerImpl.cpp index 77bb20c5b84577..ce936e476cd716 100644 --- a/src/platform/nxp/mw320/ConfigurationManagerImpl.cpp +++ b/src/platform/nxp/mw320/ConfigurationManagerImpl.cpp @@ -48,11 +48,6 @@ ConfigurationManagerImpl & ConfigurationManagerImpl::GetDefaultInstance() return sInstance; } -ConfigurationManager & ConfigurationMgr() -{ - return ConfigurationManagerImpl::GetDefaultInstance(); -} - CHIP_ERROR ConfigurationManagerImpl::Init() { CHIP_ERROR err; @@ -200,5 +195,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) //__NVIC_SystemReset(void); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/nxp/mw320/ConfigurationManagerImpl.h b/src/platform/nxp/mw320/ConfigurationManagerImpl.h index ffb7bbe16bbdf8..fbfa1c5d1bb152 100644 --- a/src/platform/nxp/mw320/ConfigurationManagerImpl.h +++ b/src/platform/nxp/mw320/ConfigurationManagerImpl.h @@ -94,8 +94,6 @@ class ConfigurationManagerImpl final : public Internal::GenericConfigurationMana // ===== Members for internal use by the following friends. friend class Internal::NetworkProvisioningServerImpl; - friend ConfigurationManager & ConfigurationMgr(void); - friend ConfigurationManagerImpl & ConfigurationMgrImpl(void); // static ConfigurationManagerImpl sInstance; @@ -104,30 +102,6 @@ class ConfigurationManagerImpl final : public Internal::GenericConfigurationMana static void DoFactoryReset(intptr_t arg); }; -#if 0 -/** - * Returns the public interface of the ConfigurationManager singleton object. - * - * Chip applications should use this to access features of the ConfigurationManager object - * that are common to all platforms. - */ -inline ConfigurationManager & ConfigurationMgr(void) -{ - return ConfigurationManagerImpl::sInstance; -} - -/** - * Returns the platform-specific implementation of the ConfigurationManager singleton object. - * - * Chio applications can use this to gain access to features of the ConfigurationManager - * that are specific to the MW320 platform. - */ -inline ConfigurationManagerImpl & ConfigurationMgrImpl(void) -{ - return ConfigurationManagerImpl::sInstance; -} -#endif // 0 - inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) { wifi_mac_addr_t mac_addr; @@ -139,5 +113,13 @@ inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * b return CHIP_NO_ERROR; } +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/nxp/mw320/PlatformManagerImpl.cpp b/src/platform/nxp/mw320/PlatformManagerImpl.cpp index 0ad103dc2babad..fa9732571ea6d6 100644 --- a/src/platform/nxp/mw320/PlatformManagerImpl.cpp +++ b/src/platform/nxp/mw320/PlatformManagerImpl.cpp @@ -61,8 +61,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) err = Internal::MW320Config::Init(); SuccessOrExit(err); - // SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - // Initialize LwIP. // tcpip_init(NULL, NULL); diff --git a/src/platform/qpg/ConfigurationManagerImpl.cpp b/src/platform/qpg/ConfigurationManagerImpl.cpp index 139cce0d681b8c..797e3b46c947c5 100644 --- a/src/platform/qpg/ConfigurationManagerImpl.cpp +++ b/src/platform/qpg/ConfigurationManagerImpl.cpp @@ -190,5 +190,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) qvCHIP_ResetSystem(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/qpg/ConfigurationManagerImpl.h b/src/platform/qpg/ConfigurationManagerImpl.h index d267c89bfcd57b..482ead8d743a52 100644 --- a/src/platform/qpg/ConfigurationManagerImpl.h +++ b/src/platform/qpg/ConfigurationManagerImpl.h @@ -74,5 +74,13 @@ inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * b return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/qpg/DiagnosticDataProviderImpl.cpp b/src/platform/qpg/DiagnosticDataProviderImpl.cpp index bde10b3cac0d71..e8b056879149df 100644 --- a/src/platform/qpg/DiagnosticDataProviderImpl.cpp +++ b/src/platform/qpg/DiagnosticDataProviderImpl.cpp @@ -69,6 +69,12 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & cu return CHIP_NO_ERROR; } +CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks() +{ + qvCHIP_ResetHeapStats(); + return CHIP_NO_ERROR; +} + DiagnosticDataProvider & GetDiagnosticDataProviderImpl() { return DiagnosticDataProviderImpl::GetDefaultInstance(); diff --git a/src/platform/qpg/DiagnosticDataProviderImpl.h b/src/platform/qpg/DiagnosticDataProviderImpl.h index ab6e1ed09bb8d4..d4d0c47224b5f7 100644 --- a/src/platform/qpg/DiagnosticDataProviderImpl.h +++ b/src/platform/qpg/DiagnosticDataProviderImpl.h @@ -39,9 +39,11 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider // ===== Methods that implement the PlatformManager abstract interface. + bool SupportsWatermarks() override { return true; } CHIP_ERROR GetCurrentHeapFree(uint64_t & currentHeapFree) override; CHIP_ERROR GetCurrentHeapUsed(uint64_t & currentHeapUsed) override; CHIP_ERROR GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) override; + CHIP_ERROR ResetWatermarks() override; }; /** diff --git a/src/platform/qpg/PlatformManagerImpl.cpp b/src/platform/qpg/PlatformManagerImpl.cpp index 737ac78533e623..3f32b261a4c27c 100644 --- a/src/platform/qpg/PlatformManagerImpl.cpp +++ b/src/platform/qpg/PlatformManagerImpl.cpp @@ -44,7 +44,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) // Initialize the configuration system. err = Internal::QPGConfig::Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); #if CHIP_SYSTEM_CONFIG_USE_LWIP // Initialize LwIP. diff --git a/src/platform/webos/BLEManagerImpl.cpp b/src/platform/webos/BLEManagerImpl.cpp index 12376d82671c12..5afa6a09430902 100644 --- a/src/platform/webos/BLEManagerImpl.cpp +++ b/src/platform/webos/BLEManagerImpl.cpp @@ -888,7 +888,7 @@ void BLEManagerImpl::InitiateScan(intptr_t arg) sInstance.InitiateScan(static_cast(arg)); } -void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const uint16_t connDiscriminator) +void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) { mBLEScanConfig.mDiscriminator = connDiscriminator; mBLEScanConfig.mAppState = appState; diff --git a/src/platform/webos/BLEManagerImpl.h b/src/platform/webos/BLEManagerImpl.h index bc8ad739d82bf0..a9a8a0ac88312d 100644 --- a/src/platform/webos/BLEManagerImpl.h +++ b/src/platform/webos/BLEManagerImpl.h @@ -51,7 +51,7 @@ struct BLEScanConfig BleScanState mBleScanState = BleScanState::kNotScanning; // If scanning by discriminator, what are we scanning for - uint16_t mDiscriminator = 0; + SetupDiscriminator mDiscriminator; // If scanning by address, what address are we searching for std::string mAddress; @@ -131,7 +131,7 @@ class BLEManagerImpl final : public BLEManager, // ===== Members that implement virtual methods on BleConnectionDelegate. - void NewConnection(BleLayer * bleLayer, void * appState, uint16_t connDiscriminator) override; + void NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) override; CHIP_ERROR CancelConnection() override; // ===== Members that implement virtual methods on ChipDeviceScannerDelegate diff --git a/src/platform/webos/BUILD.gn b/src/platform/webos/BUILD.gn index 06323b323528af..19fe96cf0857fd 100644 --- a/src/platform/webos/BUILD.gn +++ b/src/platform/webos/BUILD.gn @@ -78,8 +78,6 @@ static_library("webos") { "ConnectivityManagerImpl.h", "ConnectivityUtils.cpp", "ConnectivityUtils.h", - "DeviceInfoProviderImpl.cpp", - "DeviceInfoProviderImpl.h", "DeviceInstanceInfoProviderImpl.cpp", "DeviceInstanceInfoProviderImpl.h", "DeviceNetworkProvisioningDelegateImpl.cpp", diff --git a/src/platform/webos/ConfigurationManagerImpl.cpp b/src/platform/webos/ConfigurationManagerImpl.cpp index 769609406c9fd6..aaad2515f963d5 100644 --- a/src/platform/webos/ConfigurationManagerImpl.cpp +++ b/src/platform/webos/ConfigurationManagerImpl.cpp @@ -390,5 +390,10 @@ CHIP_ERROR ConfigurationManagerImpl::GetLocationCapability(uint8_t & location) return err; } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/webos/ConfigurationManagerImpl.h b/src/platform/webos/ConfigurationManagerImpl.h index 178fd6135fd758..6fc9961d6e50c0 100644 --- a/src/platform/webos/ConfigurationManagerImpl.h +++ b/src/platform/webos/ConfigurationManagerImpl.h @@ -88,5 +88,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/webos/DeviceInfoProviderImpl.cpp b/src/platform/webos/DeviceInfoProviderImpl.cpp deleted file mode 100644 index de06f831ec1052..00000000000000 --- a/src/platform/webos/DeviceInfoProviderImpl.cpp +++ /dev/null @@ -1,364 +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 -#include -#include - -#include -#include - -namespace chip { -namespace DeviceLayer { - -namespace { -constexpr TLV::Tag kLabelNameTag = TLV::ContextTag(0); -constexpr TLV::Tag kLabelValueTag = TLV::ContextTag(1); -} // anonymous namespace - -DeviceInfoProviderImpl & DeviceInfoProviderImpl::GetDefaultInstance() -{ - static DeviceInfoProviderImpl sInstance; - return sInstance; -} - -DeviceInfoProvider::FixedLabelIterator * DeviceInfoProviderImpl::IterateFixedLabel(EndpointId endpoint) -{ - return new FixedLabelIteratorImpl(endpoint); -} - -DeviceInfoProviderImpl::FixedLabelIteratorImpl::FixedLabelIteratorImpl(EndpointId endpoint) : mEndpoint(endpoint) -{ - mIndex = 0; -} - -size_t DeviceInfoProviderImpl::FixedLabelIteratorImpl::Count() -{ - // In Linux Simulation, return the size of the hardcoded labelList on all endpoints. - return 4; -} - -bool DeviceInfoProviderImpl::FixedLabelIteratorImpl::Next(FixedLabelType & output) -{ - bool retval = true; - - // In Linux Simulation, use the following hardcoded labelList on all endpoints. - CHIP_ERROR err = CHIP_NO_ERROR; - - const char * labelPtr = nullptr; - const char * valuePtr = nullptr; - - VerifyOrReturnError(mIndex < 4, false); - - ChipLogProgress(DeviceLayer, "Get the fixed label with index:%ld at endpoint:%d", mIndex, mEndpoint); - - switch (mIndex) - { - case 0: - labelPtr = "room"; - valuePtr = "bedroom 2"; - break; - case 1: - labelPtr = "orientation"; - valuePtr = "North"; - break; - case 2: - labelPtr = "floor"; - valuePtr = "2"; - break; - case 3: - labelPtr = "direction"; - valuePtr = "up"; - break; - default: - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - break; - } - - if (err == CHIP_NO_ERROR) - { - VerifyOrReturnError(std::strlen(labelPtr) <= kMaxLabelNameLength, false); - VerifyOrReturnError(std::strlen(valuePtr) <= kMaxLabelValueLength, false); - - Platform::CopyString(mFixedLabelNameBuf, kMaxLabelNameLength + 1, labelPtr); - Platform::CopyString(mFixedLabelValueBuf, kMaxLabelValueLength + 1, valuePtr); - - output.label = CharSpan::fromCharString(mFixedLabelNameBuf); - output.value = CharSpan::fromCharString(mFixedLabelValueBuf); - - mIndex++; - - retval = true; - } - else - { - retval = false; - } - - return retval; -} - -CHIP_ERROR DeviceInfoProviderImpl::SetUserLabelLength(EndpointId endpoint, size_t val) -{ - DefaultStorageKeyAllocator keyAlloc; - - return mStorage->SyncSetKeyValue(keyAlloc.UserLabelLengthKey(endpoint), &val, static_cast(sizeof(val))); -} - -CHIP_ERROR DeviceInfoProviderImpl::GetUserLabelLength(EndpointId endpoint, size_t & val) -{ - DefaultStorageKeyAllocator keyAlloc; - uint16_t len = static_cast(sizeof(val)); - - return mStorage->SyncGetKeyValue(keyAlloc.UserLabelLengthKey(endpoint), &val, len); -} - -CHIP_ERROR DeviceInfoProviderImpl::SetUserLabelAt(EndpointId endpoint, size_t index, const UserLabelType & userLabel) -{ - DefaultStorageKeyAllocator keyAlloc; - uint8_t buf[UserLabelTLVMaxSize()]; - TLV::TLVWriter writer; - writer.Init(buf); - - TLV::TLVType outerType; - ReturnErrorOnFailure(writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outerType)); - ReturnErrorOnFailure(writer.PutString(kLabelNameTag, userLabel.label)); - ReturnErrorOnFailure(writer.PutString(kLabelValueTag, userLabel.value)); - ReturnErrorOnFailure(writer.EndContainer(outerType)); - - return mStorage->SyncSetKeyValue(keyAlloc.UserLabelIndexKey(endpoint, index), buf, - static_cast(writer.GetLengthWritten())); -} - -DeviceInfoProvider::UserLabelIterator * DeviceInfoProviderImpl::IterateUserLabel(EndpointId endpoint) -{ - return new UserLabelIteratorImpl(*this, endpoint); -} - -DeviceInfoProviderImpl::UserLabelIteratorImpl::UserLabelIteratorImpl(DeviceInfoProviderImpl & provider, EndpointId endpoint) : - mProvider(provider), mEndpoint(endpoint) -{ - size_t total = 0; - - ReturnOnFailure(mProvider.GetUserLabelLength(mEndpoint, total)); - mTotal = total; - mIndex = 0; -} - -bool DeviceInfoProviderImpl::UserLabelIteratorImpl::Next(UserLabelType & output) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrReturnError(mIndex < mTotal, false); - - DefaultStorageKeyAllocator keyAlloc; - uint8_t buf[UserLabelTLVMaxSize()]; - uint16_t len = static_cast(sizeof(buf)); - - err = mProvider.mStorage->SyncGetKeyValue(keyAlloc.UserLabelIndexKey(mEndpoint, mIndex), buf, len); - VerifyOrReturnError(err == CHIP_NO_ERROR, false); - - TLV::ContiguousBufferTLVReader reader; - reader.Init(buf); - err = reader.Next(TLV::kTLVType_Structure, TLV::AnonymousTag()); - VerifyOrReturnError(err == CHIP_NO_ERROR, false); - - TLV::TLVType containerType; - VerifyOrReturnError(reader.EnterContainer(containerType) == CHIP_NO_ERROR, false); - - chip::CharSpan label; - chip::CharSpan value; - - VerifyOrReturnError(reader.Next(kLabelNameTag) == CHIP_NO_ERROR, false); - VerifyOrReturnError(reader.Get(label) == CHIP_NO_ERROR, false); - - VerifyOrReturnError(reader.Next(kLabelValueTag) == CHIP_NO_ERROR, false); - VerifyOrReturnError(reader.Get(value) == CHIP_NO_ERROR, false); - - VerifyOrReturnError(reader.VerifyEndOfContainer() == CHIP_NO_ERROR, false); - VerifyOrReturnError(reader.ExitContainer(containerType) == CHIP_NO_ERROR, false); - - Platform::CopyString(mUserLabelNameBuf, label); - Platform::CopyString(mUserLabelValueBuf, value); - - output.label = CharSpan::fromCharString(mUserLabelNameBuf); - output.value = CharSpan::fromCharString(mUserLabelValueBuf); - - mIndex++; - - return true; -} - -DeviceInfoProvider::SupportedLocalesIterator * DeviceInfoProviderImpl::IterateSupportedLocales() -{ - return new SupportedLocalesIteratorImpl(); -} - -size_t DeviceInfoProviderImpl::SupportedLocalesIteratorImpl::Count() -{ - // In Linux Simulation, return the size of the hardcoded list of Strings that are valid values for the ActiveLocale. - // {("en-US"), ("de-DE"), ("fr-FR"), ("en-GB"), ("es-ES"), ("zh-CN"), ("it-IT"), ("ja-JP")} - - return 8; -} - -bool DeviceInfoProviderImpl::SupportedLocalesIteratorImpl::Next(CharSpan & output) -{ - bool retval = true; - - // In Linux simulation, return following hardcoded list of Strings that are valid values for the ActiveLocale. - CHIP_ERROR err = CHIP_NO_ERROR; - - const char * activeLocalePtr = nullptr; - - VerifyOrReturnError(mIndex < 8, false); - - switch (mIndex) - { - case 0: - activeLocalePtr = "en-US"; - break; - case 1: - activeLocalePtr = "de-DE"; - break; - case 2: - activeLocalePtr = "fr-FR"; - break; - case 3: - activeLocalePtr = "en-GB"; - break; - case 4: - activeLocalePtr = "es-ES"; - break; - case 5: - activeLocalePtr = "zh-CN"; - break; - case 6: - activeLocalePtr = "it-IT"; - break; - case 7: - activeLocalePtr = "ja-JP"; - break; - default: - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - break; - } - - if (err == CHIP_NO_ERROR) - { - VerifyOrReturnError(std::strlen(activeLocalePtr) <= kMaxActiveLocaleLength, false); - - Platform::CopyString(mActiveLocaleBuf, kMaxActiveLocaleLength + 1, activeLocalePtr); - - output = CharSpan::fromCharString(mActiveLocaleBuf); - - mIndex++; - - retval = true; - } - else - { - retval = false; - } - - return retval; -} - -DeviceInfoProvider::SupportedCalendarTypesIterator * DeviceInfoProviderImpl::IterateSupportedCalendarTypes() -{ - return new SupportedCalendarTypesIteratorImpl(); -} - -size_t DeviceInfoProviderImpl::SupportedCalendarTypesIteratorImpl::Count() -{ - // In Linux Simulation, return the size of the hardcoded list of Strings that are valid values for the Calendar Types. - // {("kBuddhist"), ("kChinese"), ("kCoptic"), ("kEthiopian"), ("kGregorian"), ("kHebrew"), ("kIndian"), ("kJapanese"), - // ("kKorean"), ("kPersian"), ("kTaiwanese"), ("kIslamic")} - - return 12; -} - -bool DeviceInfoProviderImpl::SupportedCalendarTypesIteratorImpl::Next(CalendarType & output) -{ - bool retval = true; - - // In Linux Simulation, return following hardcoded list of Strings that are valid values for the Calendar Types. - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrReturnError(mIndex < 12, false); - - switch (mIndex) - { - case 0: - output = app::Clusters::TimeFormatLocalization::CalendarType::kBuddhist; - break; - case 1: - output = app::Clusters::TimeFormatLocalization::CalendarType::kChinese; - break; - case 2: - output = app::Clusters::TimeFormatLocalization::CalendarType::kCoptic; - break; - case 3: - output = app::Clusters::TimeFormatLocalization::CalendarType::kEthiopian; - break; - case 4: - output = app::Clusters::TimeFormatLocalization::CalendarType::kGregorian; - break; - case 5: - output = app::Clusters::TimeFormatLocalization::CalendarType::kHebrew; - break; - case 6: - output = app::Clusters::TimeFormatLocalization::CalendarType::kIndian; - break; - case 7: - output = app::Clusters::TimeFormatLocalization::CalendarType::kJapanese; - break; - case 8: - output = app::Clusters::TimeFormatLocalization::CalendarType::kKorean; - break; - case 9: - output = app::Clusters::TimeFormatLocalization::CalendarType::kPersian; - break; - case 10: - output = app::Clusters::TimeFormatLocalization::CalendarType::kTaiwanese; - break; - case 11: - output = app::Clusters::TimeFormatLocalization::CalendarType::kIslamic; - break; - default: - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - break; - } - - if (err == CHIP_NO_ERROR) - { - mIndex++; - retval = true; - } - else - { - retval = false; - } - - return retval; -} - -} // namespace DeviceLayer -} // namespace chip diff --git a/src/platform/webos/DeviceInfoProviderImpl.h b/src/platform/webos/DeviceInfoProviderImpl.h deleted file mode 100644 index 30a4643c48e440..00000000000000 --- a/src/platform/webos/DeviceInfoProviderImpl.h +++ /dev/null @@ -1,107 +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 - -#include -#include -#include - -namespace chip { -namespace DeviceLayer { - -class DeviceInfoProviderImpl : public DeviceInfoProvider -{ -public: - DeviceInfoProviderImpl() = default; - ~DeviceInfoProviderImpl() override {} - - // Iterators - FixedLabelIterator * IterateFixedLabel(EndpointId endpoint) override; - UserLabelIterator * IterateUserLabel(EndpointId endpoint) override; - SupportedLocalesIterator * IterateSupportedLocales() override; - SupportedCalendarTypesIterator * IterateSupportedCalendarTypes() override; - - static DeviceInfoProviderImpl & GetDefaultInstance(); - -protected: - class FixedLabelIteratorImpl : public FixedLabelIterator - { - public: - FixedLabelIteratorImpl(EndpointId endpoint); - size_t Count() override; - bool Next(FixedLabelType & output) override; - void Release() override { delete this; } - - private: - EndpointId mEndpoint = 0; - size_t mIndex = 0; - char mFixedLabelNameBuf[kMaxLabelNameLength + 1]; - char mFixedLabelValueBuf[kMaxLabelValueLength + 1]; - }; - - class UserLabelIteratorImpl : public UserLabelIterator - { - public: - UserLabelIteratorImpl(DeviceInfoProviderImpl & provider, EndpointId endpoint); - size_t Count() override { return mTotal; } - bool Next(UserLabelType & output) override; - void Release() override { delete this; } - - private: - DeviceInfoProviderImpl & mProvider; - EndpointId mEndpoint = 0; - size_t mIndex = 0; - size_t mTotal = 0; - char mUserLabelNameBuf[kMaxLabelNameLength + 1]; - char mUserLabelValueBuf[kMaxLabelValueLength + 1]; - }; - - class SupportedLocalesIteratorImpl : public SupportedLocalesIterator - { - public: - SupportedLocalesIteratorImpl() = default; - size_t Count() override; - bool Next(CharSpan & output) override; - void Release() override { delete this; } - - private: - size_t mIndex = 0; - char mActiveLocaleBuf[kMaxActiveLocaleLength + 1]; - }; - - class SupportedCalendarTypesIteratorImpl : public SupportedCalendarTypesIterator - { - public: - SupportedCalendarTypesIteratorImpl() = default; - size_t Count() override; - bool Next(CalendarType & output) override; - void Release() override { delete this; } - - private: - size_t mIndex = 0; - }; - - CHIP_ERROR SetUserLabelLength(EndpointId endpoint, size_t val) override; - CHIP_ERROR GetUserLabelLength(EndpointId endpoint, size_t & val) override; - CHIP_ERROR SetUserLabelAt(EndpointId endpoint, size_t index, const UserLabelType & userLabel) override; - -private: - static constexpr size_t UserLabelTLVMaxSize() { return TLV::EstimateStructOverhead(kMaxLabelNameLength, kMaxLabelValueLength); } -}; - -} // namespace DeviceLayer -} // namespace chip diff --git a/src/platform/webos/NetworkCommissioningDriver.h b/src/platform/webos/NetworkCommissioningDriver.h index 330f1b6d03295e..b466353743d713 100644 --- a/src/platform/webos/NetworkCommissioningDriver.h +++ b/src/platform/webos/NetworkCommissioningDriver.h @@ -47,7 +47,7 @@ class LinuxScanResponseIterator : public Iterator private: size_t currentIterating = 0; - // Note: We cannot post a event in ScheduleLambda since std::vector is not trivial copiable. + // Note: We cannot post a event in ScheduleLambda since std::vector is not trivial copyable. std::vector * mpScanResponse; }; @@ -102,10 +102,8 @@ class LinuxWiFiDriver final : public WiFiDriver private: bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); - WiFiNetworkIterator mWiFiIterator = WiFiNetworkIterator(this); WiFiNetwork mSavedNetwork; WiFiNetwork mStagingNetwork; - Optional mScanStatus; }; #endif // CHIP_DEVICE_CONFIG_ENABLE_WPA diff --git a/src/platform/webos/NetworkCommissioningWiFiDriver.cpp b/src/platform/webos/NetworkCommissioningWiFiDriver.cpp index 9230572170715b..aa3d7159b3267f 100644 --- a/src/platform/webos/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/webos/NetworkCommissioningWiFiDriver.cpp @@ -179,14 +179,8 @@ void LinuxWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * cal CHIP_ERROR err = DeviceLayer::ConnectivityMgrImpl().StartWiFiScan(ssid, callback); if (err != CHIP_NO_ERROR) { - mScanStatus.SetValue(Status::kUnknownError); callback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); } - else - { - // On linux platform, once "scan" is started, we can say the result will always be success. - mScanStatus.SetValue(Status::kSuccess); - } } size_t LinuxWiFiDriver::WiFiNetworkIterator::Count() diff --git a/src/platform/webos/PlatformManagerImpl.cpp b/src/platform/webos/PlatformManagerImpl.cpp index ec04141e621dd1..299c62dfa72e0c 100644 --- a/src/platform/webos/PlatformManagerImpl.cpp +++ b/src/platform/webos/PlatformManagerImpl.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -165,14 +164,15 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() // Initialize the configuration system. ReturnErrorOnFailure(Internal::PosixConfig::Init()); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - SetDeviceInfoProvider(&DeviceInfoProviderImpl::GetDefaultInstance()); - SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. ReturnErrorOnFailure(Internal::GenericPlatformManagerImpl_POSIX::_InitChipStack()); + // Now set up our device instance info provider. We couldn't do that + // earlier, because the generic implementation sets a generic one. + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); + mStartTime = System::SystemClock().GetMonotonicTimestamp(); return CHIP_NO_ERROR; diff --git a/src/protocols/bdx/BdxTransferSession.h b/src/protocols/bdx/BdxTransferSession.h index 7696d0473c9dc8..f5ef397ca7d9e8 100644 --- a/src/protocols/bdx/BdxTransferSession.h +++ b/src/protocols/bdx/BdxTransferSession.h @@ -174,7 +174,6 @@ class DLL_EXPORT TransferSession * @param initData Data for initializing this object and for populating a TransferInit message * The role parameter will determine whether to populate a ReceiveInit or SendInit * @param timeout The amount of time to wait for a response before considering the transfer failed - * @param curTime The current time since epoch. Needed to set a start time for the transfer timeout. * * @return CHIP_ERROR Result of initialization and preparation of a TransferInit message. May also indicate if the * TransferSession object is unable to handle this request. diff --git a/src/protocols/bdx/TransferFacilitator.h b/src/protocols/bdx/TransferFacilitator.h index 3729b4adec90e3..3cc3b55f7d0717 100644 --- a/src/protocols/bdx/TransferFacilitator.h +++ b/src/protocols/bdx/TransferFacilitator.h @@ -137,8 +137,8 @@ class Initiator : public TransferFacilitator * @param[in] layer A System::Layer pointer to use to start the polling timer * @param[in] role The role of the Initiator: Sender or Receiver of BDX data * @param[in] initData Data needed for preparing a transfer request BDX message - * @param[in] timeoutMs The chosen timeout delay for the BDX transfer in milliseconds - * @param[in] pollFreqMs The period for the TransferSession poll timer in milliseconds + * @param[in] timeout The chosen timeout delay for the BDX transfer in milliseconds + * @param[in] pollFreq The period for the TransferSession poll timer in milliseconds */ CHIP_ERROR InitiateTransfer(System::Layer * layer, TransferRole role, const TransferSession::TransferInitData & initData, System::Clock::Timeout timeout, diff --git a/src/protocols/secure_channel/Constants.h b/src/protocols/secure_channel/Constants.h index b7c66687e322db..108b547f86e4f8 100644 --- a/src/protocols/secure_channel/Constants.h +++ b/src/protocols/secure_channel/Constants.h @@ -60,7 +60,6 @@ enum class MsgType : uint8_t PASE_Pake1 = 0x22, PASE_Pake2 = 0x23, PASE_Pake3 = 0x24, - PASE_PakeError = 0x2F, // Certificate-based session establishment Message Types CASE_Sigma1 = 0x30, diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp index cbe4988aff45f7..fc84abe8cd89f1 100644 --- a/src/protocols/secure_channel/PASESession.cpp +++ b/src/protocols/secure_channel/PASESession.cpp @@ -87,7 +87,7 @@ void PASESession::Clear() // It's done so that no security related information will be leaked. memset(&mPASEVerifier, 0, sizeof(mPASEVerifier)); memset(&mKe[0], 0, sizeof(mKe)); - mNextExpectedMsg = MsgType::PASE_PakeError; + mNextExpectedMsg.ClearValue(); mSpake2p.Clear(); mCommissioningHash.Clear(); @@ -185,8 +185,8 @@ CHIP_ERROR PASESession::WaitForPairing(SessionManager & sessionManager, const Sp memmove(mSalt, salt.data(), mSaltLength); memmove(&mPASEVerifier, &verifier, sizeof(verifier)); - mIterationCount = pbkdf2IterCount; - mNextExpectedMsg = MsgType::PBKDFParamRequest; + mIterationCount = pbkdf2IterCount; + mNextExpectedMsg.SetValue(MsgType::PBKDFParamRequest); mPairingComplete = false; mLocalMRPConfig = mrpLocalConfig; @@ -234,8 +234,9 @@ void PASESession::OnResponseTimeout(ExchangeContext * ec) VerifyOrReturn(ec != nullptr, ChipLogError(SecureChannel, "PASESession::OnResponseTimeout was called by null exchange")); VerifyOrReturn(mExchangeCtxt == nullptr || mExchangeCtxt == ec, ChipLogError(SecureChannel, "PASESession::OnResponseTimeout exchange doesn't match")); + // If we were waiting for something, mNextExpectedMsg had better have a value. ChipLogError(SecureChannel, "PASESession timed out while waiting for a response from the peer. Expected message type was %u", - to_underlying(mNextExpectedMsg)); + to_underlying(mNextExpectedMsg.Value())); // Discard the exchange so that Clear() doesn't try closing it. The // exchange will handle that. DiscardExchange(); @@ -293,7 +294,7 @@ CHIP_ERROR PASESession::SendPBKDFParamRequest() ReturnErrorOnFailure( mExchangeCtxt->SendMessage(MsgType::PBKDFParamRequest, std::move(req), SendFlags(SendMessageFlags::kExpectResponse))); - mNextExpectedMsg = MsgType::PBKDFParamResponse; + mNextExpectedMsg.SetValue(MsgType::PBKDFParamResponse); ChipLogDetail(SecureChannel, "Sent PBKDF param request"); @@ -418,7 +419,7 @@ CHIP_ERROR PASESession::SendPBKDFParamResponse(ByteSpan initiatorRandom, bool in mExchangeCtxt->SendMessage(MsgType::PBKDFParamResponse, std::move(resp), SendFlags(SendMessageFlags::kExpectResponse))); ChipLogDetail(SecureChannel, "Sent PBKDF param response"); - mNextExpectedMsg = MsgType::PASE_Pake1; + mNextExpectedMsg.SetValue(MsgType::PASE_Pake1); return CHIP_NO_ERROR; } @@ -545,7 +546,7 @@ CHIP_ERROR PASESession::SendMsg1() mExchangeCtxt->SendMessage(MsgType::PASE_Pake1, std::move(msg), SendFlags(SendMessageFlags::kExpectResponse))); ChipLogDetail(SecureChannel, "Sent spake2p msg1"); - mNextExpectedMsg = MsgType::PASE_Pake2; + mNextExpectedMsg.SetValue(MsgType::PASE_Pake2); return CHIP_NO_ERROR; } @@ -606,7 +607,7 @@ CHIP_ERROR PASESession::HandleMsg1_and_SendMsg2(System::PacketBufferHandle && ms err = mExchangeCtxt->SendMessage(MsgType::PASE_Pake2, std::move(msg2), SendFlags(SendMessageFlags::kExpectResponse)); SuccessOrExit(err); - mNextExpectedMsg = MsgType::PASE_Pake3; + mNextExpectedMsg.SetValue(MsgType::PASE_Pake3); } ChipLogDetail(SecureChannel, "Sent spake2p msg2"); @@ -682,7 +683,7 @@ CHIP_ERROR PASESession::HandleMsg2_and_SendMsg3(System::PacketBufferHandle && ms err = mExchangeCtxt->SendMessage(MsgType::PASE_Pake3, std::move(msg3), SendFlags(SendMessageFlags::kExpectResponse)); SuccessOrExit(err); - mNextExpectedMsg = MsgType::StatusReport; + mNextExpectedMsg.SetValue(MsgType::StatusReport); } ChipLogDetail(SecureChannel, "Sent spake2p msg3"); @@ -703,8 +704,7 @@ CHIP_ERROR PASESession::HandleMsg3(System::PacketBufferHandle && msg) ChipLogDetail(SecureChannel, "Received spake2p msg3"); - // We will set NextExpectedMsg to PASE_PakeError in all cases - mNextExpectedMsg = MsgType::PASE_PakeError; + mNextExpectedMsg.ClearValue(); System::PacketBufferTLVReader tlvReader; TLV::TLVType containerType = TLV::kTLVType_Structure; @@ -784,7 +784,8 @@ CHIP_ERROR PASESession::ValidateReceivedMessage(ExchangeContext * exchange, cons } VerifyOrReturnError(!msg.IsNull(), CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(payloadHeader.HasMessageType(mNextExpectedMsg) || payloadHeader.HasMessageType(MsgType::StatusReport), + VerifyOrReturnError((mNextExpectedMsg.HasValue() && payloadHeader.HasMessageType(mNextExpectedMsg.Value())) || + payloadHeader.HasMessageType(MsgType::StatusReport), CHIP_ERROR_INVALID_MESSAGE_TYPE); return CHIP_NO_ERROR; @@ -835,7 +836,8 @@ CHIP_ERROR PASESession::OnMessageReceived(ExchangeContext * exchange, const Payl break; case MsgType::StatusReport: - err = HandleStatusReport(std::move(msg), mNextExpectedMsg == MsgType::StatusReport); + err = + HandleStatusReport(std::move(msg), mNextExpectedMsg.HasValue() && (mNextExpectedMsg.Value() == MsgType::StatusReport)); break; default: diff --git a/src/protocols/secure_channel/PASESession.h b/src/protocols/secure_channel/PASESession.h index cb44865075935d..19918b7a3515d5 100644 --- a/src/protocols/secure_channel/PASESession.h +++ b/src/protocols/secure_channel/PASESession.h @@ -210,7 +210,8 @@ class DLL_EXPORT PASESession : public Messaging::UnsolicitedMessageHandler, void Finish(); - Protocols::SecureChannel::MsgType mNextExpectedMsg = Protocols::SecureChannel::MsgType::PASE_PakeError; + // mNextExpectedMsg is set when we are expecting a message. + Optional mNextExpectedMsg; #ifdef ENABLE_HSM_SPAKE Spake2pHSM_P256_SHA256_HKDF_HMAC mSpake2p; diff --git a/src/protocols/secure_channel/RendezvousParameters.h b/src/protocols/secure_channel/RendezvousParameters.h index e81162cb237c29..a5b76ed40482ee 100644 --- a/src/protocols/secure_channel/RendezvousParameters.h +++ b/src/protocols/secure_channel/RendezvousParameters.h @@ -54,6 +54,8 @@ class RendezvousParameters return *this; } + // Discriminators in RendezvousParameters are always long (12-bit) + // discriminators. bool HasDiscriminator() const { return mDiscriminator <= kMaxRendezvousDiscriminatorValue; } uint16_t GetDiscriminator() const { return mDiscriminator; } RendezvousParameters & SetDiscriminator(uint16_t discriminator) diff --git a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp index 3a26d0df1ee06d..dd76f91a0cd454 100644 --- a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp +++ b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp @@ -40,7 +40,6 @@ bool SessionEstablishmentExchangeDispatch::MessagePermitted(Protocols::Id protoc case static_cast(Protocols::SecureChannel::MsgType::PASE_Pake1): case static_cast(Protocols::SecureChannel::MsgType::PASE_Pake2): case static_cast(Protocols::SecureChannel::MsgType::PASE_Pake3): - case static_cast(Protocols::SecureChannel::MsgType::PASE_PakeError): case static_cast(Protocols::SecureChannel::MsgType::CASE_Sigma1): case static_cast(Protocols::SecureChannel::MsgType::CASE_Sigma2): case static_cast(Protocols::SecureChannel::MsgType::CASE_Sigma3): diff --git a/src/setup_payload/AdditionalDataPayloadGenerator.h b/src/setup_payload/AdditionalDataPayloadGenerator.h index 912da9d1dbe60c..1b99334b8f8011 100644 --- a/src/setup_payload/AdditionalDataPayloadGenerator.h +++ b/src/setup_payload/AdditionalDataPayloadGenerator.h @@ -23,9 +23,13 @@ */ #pragma once + +#if CHIP_HAVE_CONFIG_H +#include +#endif + #include #include -#include #include namespace chip { diff --git a/src/setup_payload/Base38Decode.cpp b/src/setup_payload/Base38Decode.cpp index e2255335c2502e..3556182829e362 100644 --- a/src/setup_payload/Base38Decode.cpp +++ b/src/setup_payload/Base38Decode.cpp @@ -99,8 +99,8 @@ CHIP_ERROR base38Decode(std::string base38, std::vector & result) { result.clear(); - int base38CharactersNumber = static_cast(base38.length()); - int decodedBase38Characters = 0; + size_t base38CharactersNumber = base38.length(); + size_t decodedBase38Characters = 0; while (base38CharactersNumber > 0) { uint8_t base38CharactersInChunk; @@ -128,10 +128,10 @@ CHIP_ERROR base38Decode(std::string base38, std::vector & result) uint32_t value = 0; - for (int i = (base38CharactersInChunk - 1); i >= 0; i--) + for (size_t i = base38CharactersInChunk; i > 0; i--) { uint8_t v = 0; - CHIP_ERROR err = decodeChar(base38[static_cast(decodedBase38Characters + i)], v); + CHIP_ERROR err = decodeChar(base38[decodedBase38Characters + i - 1], v); if (err != CHIP_NO_ERROR) { @@ -143,7 +143,7 @@ CHIP_ERROR base38Decode(std::string base38, std::vector & result) decodedBase38Characters += base38CharactersInChunk; base38CharactersNumber -= base38CharactersInChunk; - for (int i = 0; i < bytesInDecodedChunk; i++) + for (size_t i = 0; i < bytesInDecodedChunk; i++) { result.push_back(static_cast(value)); value >>= 8; diff --git a/src/setup_payload/ManualSetupPayloadGenerator.cpp b/src/setup_payload/ManualSetupPayloadGenerator.cpp index 25ffa738e99048..b565907d43296a 100644 --- a/src/setup_payload/ManualSetupPayloadGenerator.cpp +++ b/src/setup_payload/ManualSetupPayloadGenerator.cpp @@ -38,14 +38,14 @@ static uint32_t chunk1PayloadRepresentation(const PayloadContents & payload) * - VID/PID present flag */ - constexpr int kDiscriminatorShift = (kPayloadDiscriminatorFieldLengthInBits - kManualSetupChunk1DiscriminatorMsbitsLength); + constexpr int kDiscriminatorShift = (kManualSetupDiscriminatorFieldLengthInBits - kManualSetupChunk1DiscriminatorMsbitsLength); constexpr uint32_t kDiscriminatorMask = (1 << kManualSetupChunk1DiscriminatorMsbitsLength) - 1; static_assert(kManualSetupChunk1VidPidPresentBitPos >= kManualSetupChunk1DiscriminatorMsbitsPos + kManualSetupChunk1DiscriminatorMsbitsLength, "Discriminator won't fit"); - uint32_t discriminatorChunk = (payload.discriminator >> kDiscriminatorShift) & kDiscriminatorMask; + uint32_t discriminatorChunk = (payload.discriminator.GetShortValue() >> kDiscriminatorShift) & kDiscriminatorMask; uint32_t vidPidPresentFlag = payload.commissioningFlow != CommissioningFlow::kStandard ? 1 : 0; uint32_t result = (discriminatorChunk << kManualSetupChunk1DiscriminatorMsbitsPos) | @@ -61,11 +61,10 @@ static uint32_t chunk2PayloadRepresentation(const PayloadContents & payload) * - Discriminator */ - constexpr int kDiscriminatorShift = (kPayloadDiscriminatorFieldLengthInBits - kManualSetupDiscriminatorFieldLengthInBits); constexpr uint32_t kDiscriminatorMask = (1 << kManualSetupChunk2DiscriminatorLsbitsLength) - 1; constexpr uint32_t kPincodeMask = (1 << kManualSetupChunk2PINCodeLsbitsLength) - 1; - uint32_t discriminatorChunk = (payload.discriminator >> kDiscriminatorShift) & kDiscriminatorMask; + uint32_t discriminatorChunk = payload.discriminator.GetShortValue() & kDiscriminatorMask; uint32_t result = ((payload.setUpPINCode & kPincodeMask) << kManualSetupChunk2PINCodeLsbitsPos) | (discriminatorChunk << kManualSetupChunk2DiscriminatorLsbitsPos); diff --git a/src/setup_payload/ManualSetupPayloadParser.cpp b/src/setup_payload/ManualSetupPayloadParser.cpp index ba45646a955e0f..ec0a56427b8f0d 100644 --- a/src/setup_payload/ManualSetupPayloadParser.cpp +++ b/src/setup_payload/ManualSetupPayloadParser.cpp @@ -151,10 +151,6 @@ CHIP_ERROR ManualSetupPayloadParser::populatePayload(SetupPayload & outPayload) discriminator |= ((chunk1 >> kManualSetupChunk1DiscriminatorMsbitsPos) & kDiscriminatorMsbitsMask) << kManualSetupChunk2DiscriminatorLsbitsLength; - // Since manual code only contains upper msbits of discriminator, re-align - constexpr int kDiscriminatorShift = (kPayloadDiscriminatorFieldLengthInBits - kManualSetupDiscriminatorFieldLengthInBits); - discriminator <<= kDiscriminatorShift; - constexpr uint32_t kPincodeMsbitsMask = (1 << kManualSetupChunk3PINCodeMsbitsLength) - 1; constexpr uint32_t kPincodeLsbitsMask = (1 << kManualSetupChunk2PINCodeLsbitsLength) - 1; @@ -200,9 +196,8 @@ CHIP_ERROR ManualSetupPayloadParser::populatePayload(SetupPayload & outPayload) outPayload.commissioningFlow = isLongCode ? CommissioningFlow::kCustom : CommissioningFlow::kStandard; static_assert(kSetupPINCodeFieldLengthInBits <= 32, "Won't fit in uint32_t"); outPayload.setUpPINCode = static_cast(setUpPINCode); - static_assert(kManualSetupDiscriminatorFieldLengthInBits <= 16, "Won't fit in uint16_t"); - outPayload.discriminator = static_cast(discriminator); - outPayload.isShortDiscriminator = true; + static_assert(kManualSetupDiscriminatorFieldLengthInBits <= 8, "Won't fit in uint8_t"); + outPayload.discriminator.SetShortValue(static_cast(discriminator)); return result; } diff --git a/src/setup_payload/QRCodeSetupPayloadGenerator.cpp b/src/setup_payload/QRCodeSetupPayloadGenerator.cpp index 207a16a3e96c14..cc55888583cf84 100644 --- a/src/setup_payload/QRCodeSetupPayloadGenerator.cpp +++ b/src/setup_payload/QRCodeSetupPayloadGenerator.cpp @@ -170,8 +170,8 @@ static CHIP_ERROR generateBitSet(PayloadContents & payload, MutableByteSpan & bi kCommissioningFlowFieldLengthInBits, kTotalPayloadDataSizeInBits)); ReturnErrorOnFailure(populateBits(bits.data(), offset, payload.rendezvousInformation.Raw(), kRendezvousInfoFieldLengthInBits, kTotalPayloadDataSizeInBits)); - ReturnErrorOnFailure(populateBits(bits.data(), offset, payload.discriminator, kPayloadDiscriminatorFieldLengthInBits, - kTotalPayloadDataSizeInBits)); + ReturnErrorOnFailure(populateBits(bits.data(), offset, payload.discriminator.GetLongValue(), + kPayloadDiscriminatorFieldLengthInBits, kTotalPayloadDataSizeInBits)); ReturnErrorOnFailure( populateBits(bits.data(), offset, payload.setUpPINCode, kSetupPINCodeFieldLengthInBits, kTotalPayloadDataSizeInBits)); ReturnErrorOnFailure(populateBits(bits.data(), offset, 0, kPaddingFieldLengthInBits, kTotalPayloadDataSizeInBits)); diff --git a/src/setup_payload/QRCodeSetupPayloadParser.cpp b/src/setup_payload/QRCodeSetupPayloadParser.cpp index 0eb88be7c9d2ab..340dcf68b9a1a1 100644 --- a/src/setup_payload/QRCodeSetupPayloadParser.cpp +++ b/src/setup_payload/QRCodeSetupPayloadParser.cpp @@ -358,7 +358,7 @@ CHIP_ERROR QRCodeSetupPayloadParser::populatePayload(SetupPayload & outPayload) ReturnErrorOnFailure(readBits(buf, indexToReadFrom, dest, kPayloadDiscriminatorFieldLengthInBits)); static_assert(kPayloadDiscriminatorFieldLengthInBits <= 16, "Won't fit in uint16_t"); - outPayload.discriminator = static_cast(dest); + outPayload.discriminator.SetLongValue(static_cast(dest)); ReturnErrorOnFailure(readBits(buf, indexToReadFrom, dest, kSetupPINCodeFieldLengthInBits)); static_assert(kSetupPINCodeFieldLengthInBits <= 32, "Won't fit in uint32_t"); diff --git a/src/setup_payload/SetupPayload.cpp b/src/setup_payload/SetupPayload.cpp index 12260a0087cd29..7b951cd5be2c10 100644 --- a/src/setup_payload/SetupPayload.cpp +++ b/src/setup_payload/SetupPayload.cpp @@ -79,10 +79,7 @@ bool PayloadContents::isValidQRCodePayload() const return false; } - if (discriminator >= 1 << kPayloadDiscriminatorFieldLengthInBits) - { - return false; - } + // Discriminator validity is enforced by the SetupDiscriminator class. if (setUpPINCode >= 1 << kSetupPINCodeFieldLengthInBits) { @@ -94,15 +91,8 @@ bool PayloadContents::isValidQRCodePayload() const bool PayloadContents::isValidManualCode() const { - // The discriminator for manual setup code is 4 most significant bits - // in a regular 12 bit discriminator. Let's make sure that the provided - // discriminator fits within 12 bits (kPayloadDiscriminatorFieldLengthInBits). - // The manual setup code generator will only use 4 most significant bits from - // it. - if (discriminator >= 1 << kPayloadDiscriminatorFieldLengthInBits) - { - return false; - } + // Discriminator validity is enforced by the SetupDiscriminator class. + if (setUpPINCode >= 1 << kSetupPINCodeFieldLengthInBits) { return false; diff --git a/src/setup_payload/SetupPayload.h b/src/setup_payload/SetupPayload.h index fa9e6ded9c5662..10c664e38d153a 100644 --- a/src/setup_payload/SetupPayload.h +++ b/src/setup_payload/SetupPayload.h @@ -30,6 +30,7 @@ #include #include +#include namespace chip { @@ -39,13 +40,13 @@ const int kVendorIDFieldLengthInBits = 16; const int kProductIDFieldLengthInBits = 16; const int kCommissioningFlowFieldLengthInBits = 2; const int kRendezvousInfoFieldLengthInBits = 8; -const int kPayloadDiscriminatorFieldLengthInBits = 12; +const int kPayloadDiscriminatorFieldLengthInBits = SetupDiscriminator::kLongBits; const int kSetupPINCodeFieldLengthInBits = 27; const int kPaddingFieldLengthInBits = 4; const int kRawVendorTagLengthInBits = 7; // See section 5.1.3. Manual Pairing Code in the Matter specification -const int kManualSetupDiscriminatorFieldLengthInBits = 4; +const int kManualSetupDiscriminatorFieldLengthInBits = SetupDiscriminator::kShortBits; const int kManualSetupChunk1DiscriminatorMsbitsPos = 0; const int kManualSetupChunk1DiscriminatorMsbitsLength = 2; const int kManualSetupChunk1VidPidPresentBitPos = @@ -119,12 +120,11 @@ struct PayloadContents uint16_t productID = 0; CommissioningFlow commissioningFlow = CommissioningFlow::kStandard; RendezvousInformationFlags rendezvousInformation = RendezvousInformationFlag::kNone; - uint16_t discriminator = 0; - uint32_t setUpPINCode = 0; + SetupDiscriminator discriminator; + uint32_t setUpPINCode = 0; bool isValidQRCodePayload() const; bool isValidManualCode() const; - bool isShortDiscriminator = false; bool operator==(PayloadContents & input) const; static bool IsValidSetupPIN(uint32_t setupPIN); diff --git a/src/setup_payload/SetupPayloadHelper.cpp b/src/setup_payload/SetupPayloadHelper.cpp index 63ecb81f96a6aa..ec1ebb047738aa 100644 --- a/src/setup_payload/SetupPayloadHelper.cpp +++ b/src/setup_payload/SetupPayloadHelper.cpp @@ -129,7 +129,7 @@ static CHIP_ERROR addParameter(SetupPayload & setupPayload, const SetupPayloadPa break; case SetupPayloadKey_Discriminator: ChipLogDetail(SetupPayload, "Loaded discriminator: %u", (uint16_t) parameter.uintValue); - setupPayload.discriminator = static_cast(parameter.uintValue); + setupPayload.discriminator.SetLongValue(static_cast(parameter.uintValue)); break; case SetupPayloadKey_SetupPINCode: ChipLogDetail(SetupPayload, "Loaded setupPinCode: %lu", (unsigned long) parameter.uintValue); diff --git a/src/setup_payload/java/SetupPayloadParser-JNI.cpp b/src/setup_payload/java/SetupPayloadParser-JNI.cpp index 0cc1010ae8a1b6..52435876a961c2 100644 --- a/src/setup_payload/java/SetupPayloadParser-JNI.cpp +++ b/src/setup_payload/java/SetupPayloadParser-JNI.cpp @@ -106,7 +106,20 @@ jobject TransformSetupPayload(JNIEnv * env, SetupPayload & payload) env->SetIntField(setupPayload, vendorId, payload.vendorID); env->SetIntField(setupPayload, productId, payload.productID); env->SetIntField(setupPayload, commissioningFlow, static_cast(payload.commissioningFlow)); - env->SetIntField(setupPayload, discriminator, payload.discriminator); + // TODO: The API we have here does not handle short discriminators in any + // sane way. Just do what we used to do, which is pretend that a short + // discriminator is actually a long discriminator with the low bits all 0. + uint16_t discriminatorValue; + if (payload.discriminator.IsShortDiscriminator()) + { + discriminatorValue = static_cast(payload.discriminator.GetShortValue()) + << (SetupDiscriminator::kLongBits - SetupDiscriminator::kShortBits); + } + else + { + discriminatorValue = payload.discriminator.GetLongValue(); + } + env->SetIntField(setupPayload, discriminator, discriminatorValue); env->SetLongField(setupPayload, setUpPinCode, payload.setUpPINCode); env->SetObjectField(setupPayload, discoveryCapabilities, CreateCapabilitiesHashSet(env, payload.rendezvousInformation)); @@ -257,8 +270,8 @@ void TransformSetupPayloadFromJobject(JNIEnv * env, jobject jPayload, SetupPaylo payload.vendorID = env->GetIntField(jPayload, vendorId); payload.productID = env->GetIntField(jPayload, productId); payload.commissioningFlow = static_cast(env->GetIntField(jPayload, commissioningFlow)); - payload.discriminator = env->GetIntField(jPayload, discriminator); - payload.setUpPINCode = env->GetLongField(jPayload, setUpPinCode); + payload.discriminator.SetLongValue(env->GetIntField(jPayload, discriminator)); + payload.setUpPINCode = env->GetLongField(jPayload, setUpPinCode); jobject discoveryCapabilitiesObj = env->GetObjectField(jPayload, discoveryCapabilities); CreateCapabilitiesFromHashSet(env, discoveryCapabilitiesObj, payload.rendezvousInformation); diff --git a/src/setup_payload/tests/TestHelpers.h b/src/setup_payload/tests/TestHelpers.h index 4c1a53da9053d4..57866478ba4055 100644 --- a/src/setup_payload/tests/TestHelpers.h +++ b/src/setup_payload/tests/TestHelpers.h @@ -50,8 +50,8 @@ inline SetupPayload GetDefaultPayload() payload.productID = 1; payload.commissioningFlow = CommissioningFlow::kStandard; payload.rendezvousInformation = RendezvousInformationFlags(RendezvousInformationFlag::kSoftAP); - payload.discriminator = 128; - payload.setUpPINCode = 2048; + payload.discriminator.SetLongValue(128); + payload.setUpPINCode = 2048; return payload; } diff --git a/src/setup_payload/tests/TestManualCode.cpp b/src/setup_payload/tests/TestManualCode.cpp index d4d768820a0d8a..89a98780f9c5b8 100644 --- a/src/setup_payload/tests/TestManualCode.cpp +++ b/src/setup_payload/tests/TestManualCode.cpp @@ -64,8 +64,8 @@ bool CheckGenerator(const PayloadContents & payload, std::string expectedResult, PayloadContents GetDefaultPayload() { PayloadContents payload; - payload.setUpPINCode = 12345679; - payload.discriminator = 2560; + payload.setUpPINCode = 12345679; + payload.discriminator.SetLongValue(2560); return payload; } @@ -127,8 +127,8 @@ void TestDecimalRepresentation_FullPayloadWithoutZeros_DoesNotRequireCustomFlow( void TestDecimalRepresentation_AllZeros(nlTestSuite * inSuite, void * inContext) { PayloadContents payload; - payload.setUpPINCode = 0; - payload.discriminator = 0; + payload.setUpPINCode = 0; + payload.discriminator.SetLongValue(0); std::string expectedResult; @@ -138,8 +138,8 @@ void TestDecimalRepresentation_AllZeros(nlTestSuite * inSuite, void * inContext) void TestDecimalRepresentation_AllOnes(nlTestSuite * inSuite, void * inContext) { PayloadContents payload; - payload.setUpPINCode = 0x7FFFFFF; - payload.discriminator = 0xFFF; + payload.setUpPINCode = 0x7FFFFFF; + payload.discriminator.SetLongValue(0xFFF); payload.commissioningFlow = CommissioningFlow::kCustom; payload.vendorID = 65535; payload.productID = 65535; @@ -149,18 +149,8 @@ void TestDecimalRepresentation_AllOnes(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, CheckGenerator(payload, expectedResult, /*allowInvalidPayload*/ true)); } -void TestDecimalRepresentation_InvalidPayload(nlTestSuite * inSuite, void * inContext) -{ - PayloadContents payload = GetDefaultPayload(); - payload.discriminator = 0x1f00; - - ManualSetupPayloadGenerator generator(payload); - std::string result; - NL_TEST_ASSERT(inSuite, generator.payloadDecimalStringRepresentation(result) == CHIP_ERROR_INVALID_ARGUMENT); -} - void assertPayloadValues(nlTestSuite * inSuite, CHIP_ERROR actualError, CHIP_ERROR expectedError, const PayloadContents & payload, - uint32_t pinCode, uint16_t discriminator, uint16_t vendorID, uint16_t productID) + uint32_t pinCode, const SetupDiscriminator & discriminator, uint16_t vendorID, uint16_t productID) { NL_TEST_ASSERT(inSuite, actualError == expectedError); NL_TEST_ASSERT(inSuite, payload.setUpPINCode == pinCode); @@ -172,7 +162,7 @@ void assertPayloadValues(nlTestSuite * inSuite, CHIP_ERROR actualError, CHIP_ERR void TestGenerateAndParser_ManualSetupCodeWithLongDiscriminator(nlTestSuite * inSuite, void * inContext) { PayloadContents payload = GetDefaultPayload(); - payload.discriminator = 0xa1f; + payload.discriminator.SetLongValue(0xa1f); { // Test short 11 digit code @@ -182,14 +172,18 @@ void TestGenerateAndParser_ManualSetupCodeWithLongDiscriminator(nlTestSuite * in SetupPayload outPayload; CHIP_ERROR err = ManualSetupPayloadParser(result).populatePayload(outPayload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, 0xa00, payload.vendorID, + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SetupDiscriminator discriminator; + discriminator.SetShortValue(0xa); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, discriminator, payload.vendorID, payload.productID); } payload.vendorID = 1; payload.productID = 1; payload.commissioningFlow = CommissioningFlow::kCustom; - payload.discriminator = 0xb1f; + payload.discriminator.SetLongValue(0xb1f); { // Test long 21 digit code @@ -199,7 +193,11 @@ void TestGenerateAndParser_ManualSetupCodeWithLongDiscriminator(nlTestSuite * in SetupPayload outPayload; CHIP_ERROR err = ManualSetupPayloadParser(result).populatePayload(outPayload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, 0xb00, payload.vendorID, + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SetupDiscriminator discriminator; + discriminator.SetShortValue(0xb); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, discriminator, payload.vendorID, payload.productID); } } @@ -212,17 +210,27 @@ void TestPayloadParser_FullPayload(nlTestSuite * inSuite, void * inContext) decimalString = "63610875354536714526"; decimalString += Verhoeff10::ComputeCheckChar(decimalString.c_str()); CHIP_ERROR err = ManualSetupPayloadParser(decimalString).populatePayload(payload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 123456780, 2560, 45367, 14526); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SetupDiscriminator discriminator; + discriminator.SetShortValue(0xa); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 123456780, discriminator, 45367, 14526); decimalString = "52927623630456200032"; decimalString += Verhoeff10::ComputeCheckChar(decimalString.c_str()); err = ManualSetupPayloadParser(decimalString).populatePayload(payload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 38728284, 1280, 4562, 32); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + discriminator.SetShortValue(0x5); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 38728284, discriminator, 4562, 32); decimalString = "40000100000000100001"; decimalString += Verhoeff10::ComputeCheckChar(decimalString.c_str()); err = ManualSetupPayloadParser(decimalString).populatePayload(payload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 1, 0, 1, 1); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + discriminator.SetShortValue(0); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 1, discriminator, 1, 1); } void TestGenerateAndParser_FullPayload(nlTestSuite * inSuite, void * inContext) @@ -238,7 +246,11 @@ void TestGenerateAndParser_FullPayload(nlTestSuite * inSuite, void * inContext) SetupPayload outPayload; CHIP_ERROR err = ManualSetupPayloadParser(result).populatePayload(outPayload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, payload.discriminator, payload.vendorID, + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SetupDiscriminator discriminator; + discriminator.SetShortValue(payload.discriminator.GetShortValue()); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, discriminator, payload.vendorID, payload.productID); } @@ -252,7 +264,11 @@ void TestGenerateAndParser_PartialPayload(nlTestSuite * inSuite, void * inContex SetupPayload outPayload; CHIP_ERROR err = ManualSetupPayloadParser(result).populatePayload(outPayload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, payload.discriminator, payload.vendorID, + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SetupDiscriminator discriminator; + discriminator.SetShortValue(payload.discriminator.GetShortValue()); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, discriminator, payload.vendorID, payload.productID); } @@ -266,19 +282,29 @@ void TestPayloadParser_PartialPayload(nlTestSuite * inSuite, void * inContext) decimalString += Verhoeff10::ComputeCheckChar(decimalString.c_str()); NL_TEST_ASSERT(inSuite, decimalString.length() == 11); err = ManualSetupPayloadParser(decimalString).populatePayload(payload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 123456780, 2560, 0, 0); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SetupDiscriminator discriminator; + discriminator.SetShortValue(0xa); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 123456780, discriminator, 0, 0); decimalString = "0000010000"; decimalString += Verhoeff10::ComputeCheckChar(decimalString.c_str()); NL_TEST_ASSERT(inSuite, decimalString.length() == 11); err = ManualSetupPayloadParser(decimalString).populatePayload(payload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 1, 0, 0, 0); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + discriminator.SetShortValue(0); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 1, discriminator, 0, 0); decimalString = "63610875350000000000"; decimalString += Verhoeff10::ComputeCheckChar(decimalString.c_str()); NL_TEST_ASSERT(inSuite, decimalString.length() == 21); err = ManualSetupPayloadParser(decimalString).populatePayload(payload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 123456780, 2560, 0, 0); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + discriminator.SetShortValue(0xa); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 123456780, discriminator, 0, 0); // no discriminator (= 0) decimalString = "0033407535"; @@ -305,6 +331,7 @@ void TestPayloadParser_PartialPayload(nlTestSuite * inSuite, void * inContext) void TestShortCodeReadWrite(nlTestSuite * inSuite, void * context) { PayloadContents inPayload = GetDefaultPayload(); + SetupPayload outPayload; std::string result; @@ -312,6 +339,9 @@ void TestShortCodeReadWrite(nlTestSuite * inSuite, void * context) generator.payloadDecimalStringRepresentation(result); ManualSetupPayloadParser(result).populatePayload(outPayload); + // Override the discriminator in the input payload with the short version, + // since that's what we will produce. + inPayload.discriminator.SetShortValue(inPayload.discriminator.GetShortValue()); NL_TEST_ASSERT(inSuite, inPayload == outPayload); } @@ -321,6 +351,7 @@ void TestLongCodeReadWrite(nlTestSuite * inSuite, void * context) inPayload.commissioningFlow = CommissioningFlow::kCustom; inPayload.vendorID = 1; inPayload.productID = 1; + SetupPayload outPayload; std::string result; @@ -328,6 +359,9 @@ void TestLongCodeReadWrite(nlTestSuite * inSuite, void * context) generator.payloadDecimalStringRepresentation(result); ManualSetupPayloadParser(result).populatePayload(outPayload); + // Override the discriminator in the input payload with the short version, + // since that's what we will produce. + inPayload.discriminator.SetShortValue(inPayload.discriminator.GetShortValue()); NL_TEST_ASSERT(inSuite, inPayload == outPayload); } @@ -336,7 +370,8 @@ void assertEmptyPayloadWithError(nlTestSuite * inSuite, CHIP_ERROR actualError, { NL_TEST_ASSERT(inSuite, actualError == expectedError); NL_TEST_ASSERT(inSuite, - payload.setUpPINCode == 0 && payload.discriminator == 0 && payload.productID == 0 && payload.vendorID == 0); + payload.setUpPINCode == 0 && payload.discriminator.GetLongValue() == 0 && payload.productID == 0 && + payload.vendorID == 0); } void TestPayloadParser_InvalidEntry(nlTestSuite * inSuite, void * inContext) @@ -524,7 +559,6 @@ const nlTest sTests[] = NL_TEST_DEF("Generate Decimal Representation from Full Payload with Zeros", TestDecimalRepresentation_FullPayloadWithZeros), NL_TEST_DEF("Decimal Representation from Full Payload without Zeros", TestDecimalRepresentation_FullPayloadWithoutZeros_DoesNotRequireCustomFlow), NL_TEST_DEF("Decimal Representation from Full Payload without Zeros (Custom Flow)", TestDecimalRepresentation_FullPayloadWithoutZeros), - NL_TEST_DEF("Test Decimal Representation - Invalid Payload", TestDecimalRepresentation_InvalidPayload), NL_TEST_DEF("Test 12 bit discriminator for manual setup code", TestGenerateAndParser_ManualSetupCodeWithLongDiscriminator), NL_TEST_DEF("Test Decimal Representation - All Zeros", TestDecimalRepresentation_AllZeros), NL_TEST_DEF("Test Decimal Representation - All Ones", TestDecimalRepresentation_AllOnes), diff --git a/src/setup_payload/tests/TestQRCode.cpp b/src/setup_payload/tests/TestQRCode.cpp index 7b4a4d39c4c993..2eec6efceff8e8 100644 --- a/src/setup_payload/tests/TestQRCode.cpp +++ b/src/setup_payload/tests/TestQRCode.cpp @@ -89,8 +89,8 @@ void TestMaximumValues(nlTestSuite * inSuite, void * inContext) inPayload.commissioningFlow = CommissioningFlow::kCustom; inPayload.rendezvousInformation = RendezvousInformationFlags( RendezvousInformationFlag::kBLE, RendezvousInformationFlag::kSoftAP, RendezvousInformationFlag::kOnNetwork); - inPayload.discriminator = static_cast((1 << kPayloadDiscriminatorFieldLengthInBits) - 1); - inPayload.setUpPINCode = static_cast((1 << kSetupPINCodeFieldLengthInBits) - 1); + inPayload.discriminator.SetLongValue(static_cast((1 << kPayloadDiscriminatorFieldLengthInBits) - 1)); + inPayload.setUpPINCode = static_cast((1 << kSetupPINCodeFieldLengthInBits) - 1); NL_TEST_ASSERT(inSuite, CheckWriteRead(inPayload, /* allowInvalidPayload */ true)); } @@ -309,12 +309,7 @@ void TestSetupPayloadVerify(nlTestSuite * inSuite, void * inContext) test_payload.rendezvousInformation = invalid; NL_TEST_ASSERT(inSuite, test_payload.isValidQRCodePayload() == false); - // test invalid discriminator - test_payload = payload; - test_payload.discriminator = 1 << kPayloadDiscriminatorFieldLengthInBits; - NL_TEST_ASSERT(inSuite, test_payload.isValidQRCodePayload() == false); - - // test invalid stetup PIN + // test invalid setup PIN test_payload = payload; test_payload.setUpPINCode = 1 << kSetupPINCodeFieldLengthInBits; NL_TEST_ASSERT(inSuite, test_payload.isValidQRCodePayload() == false); @@ -358,9 +353,9 @@ void TestPayloadInEquality(nlTestSuite * inSuite, void * inContext) { SetupPayload payload = GetDefaultPayload(); - SetupPayload unequalPayload = GetDefaultPayload(); - unequalPayload.discriminator = 28; - unequalPayload.setUpPINCode = 121233; + SetupPayload unequalPayload = GetDefaultPayload(); + unequalPayload.discriminator.SetLongValue(28); + unequalPayload.setUpPINCode = 121233; NL_TEST_ASSERT(inSuite, !(payload == unequalPayload)); } diff --git a/src/system/SystemLayerImplSelect.cpp b/src/system/SystemLayerImplSelect.cpp index a7fc85748daf82..98f4fe71547826 100644 --- a/src/system/SystemLayerImplSelect.cpp +++ b/src/system/SystemLayerImplSelect.cpp @@ -77,6 +77,12 @@ void LayerImplSelect::Shutdown() } } mTimerPool.ReleaseAll(); + + for (auto & w : mSocketWatchPool) + { + w.DisableAndClear(); + } + #else // CHIP_SYSTEM_CONFIG_USE_DISPATCH mTimerList.Clear(); mTimerPool.ReleaseAll(); @@ -246,6 +252,39 @@ CHIP_ERROR LayerImplSelect::RequestCallbackOnPendingRead(SocketWatchToken token) VerifyOrReturnError(watch != nullptr, CHIP_ERROR_INVALID_ARGUMENT); watch->mPendingIO.Set(SocketEventFlags::kRead); + +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + if (watch->mRdSource == nullptr) + { + // First time requesting callback for read events: install a dispatch source + dispatch_queue_t dispatchQueue = GetDispatchQueue(); + if (dispatchQueue == nullptr) + { + // Note: if no dispatch queue is available, callbacks most probably will not work, + // unless, as in some tests from a test-specific local loop, + // the select based event handling (Prepare/WaitFor/HandleEvents) is invoked. + ChipLogError(DeviceLayer, + "RequestCallbackOnPendingRead with no dispatch queue: callback may not work (might be ok in tests)"); + } + else + { + watch->mRdSource = + dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, static_cast(watch->mFD), 0, dispatchQueue); + ReturnErrorCodeIf(watch->mRdSource == nullptr, CHIP_ERROR_NO_MEMORY); + dispatch_source_set_event_handler(watch->mRdSource, ^{ + if (watch->mPendingIO.Has(SocketEventFlags::kRead) && watch->mCallback != nullptr) + { + SocketEvents events; + events.Set(SocketEventFlags::kRead); + watch->mCallback(events, watch->mCallbackData); + } + }); + // only now we are sure the source exists and can become active + dispatch_activate(watch->mRdSource); + } + } +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH + return CHIP_NO_ERROR; } @@ -255,6 +294,40 @@ CHIP_ERROR LayerImplSelect::RequestCallbackOnPendingWrite(SocketWatchToken token VerifyOrReturnError(watch != nullptr, CHIP_ERROR_INVALID_ARGUMENT); watch->mPendingIO.Set(SocketEventFlags::kWrite); + +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + if (watch->mWrSource == nullptr) + { + // First time requesting callback for read events: install a dispatch source + dispatch_queue_t dispatchQueue = GetDispatchQueue(); + if (dispatchQueue == nullptr) + { + // Note: if no dispatch queue is available, callbacks most probably will not work, + // unless, as in some tests from a test-specific local loop, + // the select based event handling (Prepare/WaitFor/HandleEvents) is invoked. + ChipLogError(DeviceLayer, + "RequestCallbackOnPendingWrite with no dispatch queue: callback may not work (might be ok in tests)"); + } + else + { + watch->mWrSource = + dispatch_source_create(DISPATCH_SOURCE_TYPE_WRITE, static_cast(watch->mFD), 0, dispatchQueue); + ReturnErrorCodeIf(watch->mWrSource == nullptr, CHIP_ERROR_NO_MEMORY); + dispatch_source_set_event_handler(watch->mWrSource, ^{ + if (watch->mPendingIO.Has(SocketEventFlags::kWrite) && watch->mCallback != nullptr) + { + SocketEvents events; + events.Set(SocketEventFlags::kWrite); + watch->mCallback(events, watch->mCallbackData); + } + }); + // only now we are sure the source exists and can become active + watch->mPendingIO.Set(SocketEventFlags::kWrite); + dispatch_activate(watch->mWrSource); + } + } +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH + return CHIP_NO_ERROR; } @@ -262,7 +335,9 @@ CHIP_ERROR LayerImplSelect::ClearCallbackOnPendingRead(SocketWatchToken token) { SocketWatch * watch = reinterpret_cast(token); VerifyOrReturnError(watch != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + watch->mPendingIO.Clear(SocketEventFlags::kRead); + return CHIP_NO_ERROR; } @@ -270,7 +345,9 @@ CHIP_ERROR LayerImplSelect::ClearCallbackOnPendingWrite(SocketWatchToken token) { SocketWatch * watch = reinterpret_cast(token); VerifyOrReturnError(watch != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + watch->mPendingIO.Clear(SocketEventFlags::kWrite); + return CHIP_NO_ERROR; } @@ -282,10 +359,14 @@ CHIP_ERROR LayerImplSelect::StopWatchingSocket(SocketWatchToken * tokenInOut) VerifyOrReturnError(watch != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(watch->mFD >= 0, CHIP_ERROR_INCORRECT_STATE); +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + watch->DisableAndClear(); +#else watch->Clear(); // Wake the thread calling select so that it stops selecting on the socket. Signal(); +#endif return CHIP_NO_ERROR; } @@ -426,7 +507,28 @@ void LayerImplSelect::SocketWatch::Clear() mPendingIO.ClearAll(); mCallback = nullptr; mCallbackData = 0; +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + mRdSource = nullptr; + mWrSource = nullptr; +#endif +} + +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH +void LayerImplSelect::SocketWatch::DisableAndClear() +{ + if (mRdSource) + { + dispatch_source_cancel(mRdSource); + dispatch_release(mRdSource); + } + if (mWrSource) + { + dispatch_source_cancel(mWrSource); + dispatch_release(mWrSource); + } + Clear(); } +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH } // namespace System } // namespace chip diff --git a/src/system/SystemLayerImplSelect.h b/src/system/SystemLayerImplSelect.h index 338214c3b8720a..f193a8860d961c 100644 --- a/src/system/SystemLayerImplSelect.h +++ b/src/system/SystemLayerImplSelect.h @@ -90,6 +90,11 @@ class LayerImplSelect : public LayerSocketsLoop int mFD; SocketEvents mPendingIO; SocketWatchCallback mCallback; +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + dispatch_source_t mRdSource; + dispatch_source_t mWrSource; + void DisableAndClear(); +#endif intptr_t mCallbackData; }; SocketWatch mSocketWatchPool[kSocketWatchMax]; diff --git a/src/tools/chip-cert/Cmd_GenCert.cpp b/src/tools/chip-cert/Cmd_GenCert.cpp index 75153464084414..baed859b89143b 100644 --- a/src/tools/chip-cert/Cmd_GenCert.cpp +++ b/src/tools/chip-cert/Cmd_GenCert.cpp @@ -141,7 +141,6 @@ const char * const gCmdOptionHelp = " x509-der - X.509 DER raw format\n" " x509-hex - X.509 DER hex encoded format\n" " chip - raw CHIP TLV format\n" - " chip-hex - hex encoded CHIP TLV format\n" " chip-b64 - base-64 encoded CHIP TLV format (default)\n" " chip-hex - hex encoded CHIP TLV format\n" "\n" diff --git a/src/tools/chip-cert/Cmd_PrintCert.cpp b/src/tools/chip-cert/Cmd_PrintCert.cpp index 298606136660cd..2bef2ed868c2a2 100644 --- a/src/tools/chip-cert/Cmd_PrintCert.cpp +++ b/src/tools/chip-cert/Cmd_PrintCert.cpp @@ -84,7 +84,7 @@ OptionSet *gCmdOptionSets[] = // clang-format on const char * gInFileName = nullptr; -const char * gOutFileName = nullptr; +const char * gOutFileName = "-"; bool HandleOption(const char * progName, OptionSet * optSet, int id, const char * name, const char * arg) { diff --git a/src/transport/raw/tests/NetworkTestHelpers.h b/src/transport/raw/tests/NetworkTestHelpers.h index bbf3fcb936310e..cde07460556eb5 100644 --- a/src/transport/raw/tests/NetworkTestHelpers.h +++ b/src/transport/raw/tests/NetworkTestHelpers.h @@ -64,7 +64,8 @@ class LoopbackTransportDelegate public: virtual ~LoopbackTransportDelegate() {} - // Called by the loopback transport when it drops a message due to a nonzero mNumMessagesToDrop. + // Called by the loopback transport when it drops one of a configurable number of messages (mDroppedMessageCount) after a + // configurable allowed number of messages (mNumMessagesToAllowBeforeDropping) virtual void OnMessageDropped() {} }; @@ -102,19 +103,30 @@ class LoopbackTransport : public Transport::Base { ReturnErrorOnFailure(mMessageSendError); mSentMessageCount++; - - if (mNumMessagesToDrop == 0) + bool dropMessage = false; + if (mNumMessagesToAllowBeforeDropping > 0) { - System::PacketBufferHandle receivedMessage = msgBuf.CloneData(); - mPendingMessageQueue.push(PendingMessageItem(address, std::move(receivedMessage))); - mSystemLayer->ScheduleWork(OnMessageReceived, this); + --mNumMessagesToAllowBeforeDropping; } - else + else if (mNumMessagesToDrop > 0) + { + dropMessage = true; + --mNumMessagesToDrop; + } + + if (dropMessage) { - mNumMessagesToDrop--; mDroppedMessageCount++; if (mDelegate != nullptr) + { mDelegate->OnMessageDropped(); + } + } + else + { + System::PacketBufferHandle receivedMessage = msgBuf.CloneData(); + mPendingMessageQueue.push(PendingMessageItem(address, std::move(receivedMessage))); + mSystemLayer->ScheduleWork(OnMessageReceived, this); } return CHIP_NO_ERROR; @@ -124,10 +136,11 @@ class LoopbackTransport : public Transport::Base void Reset() { - mNumMessagesToDrop = 0; - mDroppedMessageCount = 0; - mSentMessageCount = 0; - mMessageSendError = CHIP_NO_ERROR; + mNumMessagesToDrop = 0; + mDroppedMessageCount = 0; + mSentMessageCount = 0; + mNumMessagesToAllowBeforeDropping = 0; + mMessageSendError = CHIP_NO_ERROR; } struct PendingMessageItem @@ -143,11 +156,12 @@ class LoopbackTransport : public Transport::Base System::Layer * mSystemLayer = nullptr; std::queue mPendingMessageQueue; Transport::PeerAddress mTxAddress; - uint32_t mNumMessagesToDrop = 0; - uint32_t mDroppedMessageCount = 0; - uint32_t mSentMessageCount = 0; - CHIP_ERROR mMessageSendError = CHIP_NO_ERROR; - LoopbackTransportDelegate * mDelegate = nullptr; + uint32_t mNumMessagesToDrop = 0; + uint32_t mDroppedMessageCount = 0; + uint32_t mSentMessageCount = 0; + uint32_t mNumMessagesToAllowBeforeDropping = 0; + CHIP_ERROR mMessageSendError = CHIP_NO_ERROR; + LoopbackTransportDelegate * mDelegate = nullptr; }; } // namespace Test diff --git a/third_party/cyw30739_sdk/repos/30739A0 b/third_party/cyw30739_sdk/repos/30739A0 index ab7601a74bdffc..c233760b419d55 160000 --- a/third_party/cyw30739_sdk/repos/30739A0 +++ b/third_party/cyw30739_sdk/repos/30739A0 @@ -1 +1 @@ -Subproject commit ab7601a74bdffc7374353c1e19b22388bb3dcedd +Subproject commit c233760b419d556632430380e3645fad1766ca22 diff --git a/third_party/cyw30739_sdk/repos/CYW930739M2EVB-01 b/third_party/cyw30739_sdk/repos/CYW930739M2EVB-01 index 3132c30e1ec305..d5f5b678236866 160000 --- a/third_party/cyw30739_sdk/repos/CYW930739M2EVB-01 +++ b/third_party/cyw30739_sdk/repos/CYW930739M2EVB-01 @@ -1 +1 @@ -Subproject commit 3132c30e1ec305fc53969220e056f5e55532a9b3 +Subproject commit d5f5b678236866620b8f4a88360fb035d3407e06 diff --git a/third_party/nxp/k32w0_sdk/BUILD.gn b/third_party/nxp/k32w0_sdk/BUILD.gn index f2307bafa95ca4..79d2e2a6ee1a6a 100644 --- a/third_party/nxp/k32w0_sdk/BUILD.gn +++ b/third_party/nxp/k32w0_sdk/BUILD.gn @@ -29,6 +29,13 @@ group("k32w0_sdk") { public_deps = [ k32w0_sdk_target ] } +if (chip_crypto == "tinycrypt") { + assert( + mbedtls_repo == + "//third_party/connectedhomeip/third_party/nxp/libs/mbedtls", + "mbedtls_repo must be set to nxp mbedtls-tinycrypt library when chip_crypto == \"tinycrypt\"") +} + config("mbedtls_k32w0_config") { defines = [ "MBEDTLS_CONFIG_FILE=", @@ -53,7 +60,7 @@ config("mbedtls_k32w0_config") { ] } - if (mbedtls_use_tinycrypt) { + if (chip_crypto == "tinycrypt") { defines += [ "MBEDTLS_USE_TINYCRYPT", "MBEDTLS_OPTIMIZE_TINYCRYPT_ASM", @@ -62,7 +69,7 @@ config("mbedtls_k32w0_config") { include_dirs = [ chip_root ] - if (mbedtls_use_tinycrypt) { + if (chip_crypto == "tinycrypt") { include_dirs += [ "${mbedtls_repo}/repo/include/tinycrypt" ] } } @@ -73,7 +80,7 @@ mbedtls_target("mbedtls") { "${k32w0_sdk_root}/middleware/mbedtls/port/ksdk/ksdk_mbedtls.c", ] - if (mbedtls_use_tinycrypt) { + if (chip_crypto == "tinycrypt") { sources += [ "${mbedtls_repo}/repo/tinycrypt/ecc.c", "${mbedtls_repo}/repo/tinycrypt/ecc_dh.c", diff --git a/third_party/nxp/k32w0_sdk/k32w0_sdk.gni b/third_party/nxp/k32w0_sdk/k32w0_sdk.gni index a0aa55ada6b4be..d0aa619d6a6968 100644 --- a/third_party/nxp/k32w0_sdk/k32w0_sdk.gni +++ b/third_party/nxp/k32w0_sdk/k32w0_sdk.gni @@ -24,12 +24,19 @@ import("${chip_root}/src/platform/nxp/k32w/k32w0/args.gni") declare_args() { # Location of the k32w0 SDK. - k32w0_sdk_root = getenv("NXP_K32W061_SDK_ROOT") + k32w0_sdk_root = getenv("NXP_K32W0_SDK_ROOT") chip_with_DK6 = true chip_with_OM15082 = 0 chip_with_ot_cli = 0 chip_with_low_power = 0 - mbedtls_use_tinycrypt = false + build_for_k32w061 = 1 + build_for_k32w041am = 0 + build_for_k32w041a = 0 + build_for_k32w041 = 0 + device = "K32W061" + board = "k32w061dk6" + chip_with_ntag = 1 + chip_with_high_power = 0 } assert(k32w0_sdk_root != "", "k32w0_sdk_root must be specified") @@ -57,6 +64,54 @@ template("k32w0_sdk") { chip_with_ot_cli == 0 && chip_with_se05x == 0), "Please disable low power if expansion board, openthread CLI or SE is needed!") + if (build_for_k32w041am == 1 || build_for_k32w041a == 1 || + build_for_k32w041 == 1) { + build_for_k32w061 = 0 + } + + if (build_for_k32w061 == 1) { + assert(build_for_k32w061 == 1 && build_for_k32w041am == 0 && + build_for_k32w041a == 0 && build_for_k32w041 == 0, + "Please build for only one platform") + device = "K32W061" + board = "k32w061dk6" + chip_with_ntag = 1 + chip_with_high_power = 0 + } + if (build_for_k32w041am == 1) { + assert(build_for_k32w041am == 1 && build_for_k32w061 == 0 && + build_for_k32w041a == 0 && build_for_k32w041 == 0, + "Please build for only one platform") + device = "K32W041AM" + board = "k32w041amdk6" + chip_with_high_power = 1 + chip_with_ntag = 0 + } + if (build_for_k32w041a == 1) { + assert(build_for_k32w041a == 1 && build_for_k32w061 == 0 && + build_for_k32w041am == 0 && build_for_k32w041 == 0, + "Please build for only one platform") + device = "K32W041A" + board = "k32w041adk6" + chip_with_high_power = 1 + chip_with_ntag = 0 + } + if (build_for_k32w041 == 1) { + assert(build_for_k32w041 == 1 && build_for_k32w061 == 0 && + build_for_k32w041am == 0 && build_for_k32w041a == 0, + "Please build for only one platform") + device = "K32W041" + board = "k32w041dk6" + chip_with_ntag = 0 + chip_with_high_power = 0 + } + + print("device:", device) + print("board:", board) + print("ntag:", chip_with_ntag) + print("high power:", chip_with_high_power) + device_lowercase = string_replace(board, "dk6", "") + sdk_target_name = target_name config("${sdk_target_name}_config") { @@ -72,14 +127,23 @@ template("k32w0_sdk") { if (chip_with_DK6) { if (chip_with_low_power != 0) { - _sdk_include_dirs += [ "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/openthread/lped/bm" ] + _sdk_include_dirs += [ "${k32w0_sdk_root}/boards/${board}/wireless_examples/openthread/lped/bm" ] } else { - _sdk_include_dirs += [ "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/openthread/reed/bm" ] + _sdk_include_dirs += [ "${k32w0_sdk_root}/boards/${board}/wireless_examples/openthread/reed/bm" ] } } if (chip_with_low_power != 0) { - _sdk_include_dirs += [ "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/hybrid/ble_ot/lped_ble_wuart/ble_802_15_4_common" ] + _sdk_include_dirs += [ "${k32w0_sdk_root}/boards/${board}/wireless_examples/hybrid/ble_ot/lped_ble_wuart/ble_802_15_4_common" ] + } + + if (chip_with_ntag != 0) { + _sdk_include_dirs += [ + "${k32w0_sdk_root}/middleware/ntag_i2c_plus/HAL_I2C/inc", + "${k32w0_sdk_root}/middleware/ntag_i2c_plus/HAL_NTAG/inc", + "${k32w0_sdk_root}/middleware/ntag_i2c_plus/inc", + "${k32w0_sdk_root}/middleware/ntag_i2c_plus/HAL_TMR/inc", + ] } _sdk_include_dirs += [ @@ -87,16 +151,12 @@ template("k32w0_sdk") { "${k32w0_sdk_root}/CMSIS/Include", "${k32w0_sdk_root}/components/serial_manager", "${k32w0_sdk_root}/components/uart", - "${k32w0_sdk_root}/devices/K32W061", - "${k32w0_sdk_root}/devices/K32W061/drivers", - "${k32w0_sdk_root}/devices/K32W061/utilities", - "${k32w0_sdk_root}/devices/K32W061/utilities/debug_console", - "${k32w0_sdk_root}/devices/K32W061/utilities/str", + "${k32w0_sdk_root}/devices/${device}", + "${k32w0_sdk_root}/devices/${device}/drivers", + "${k32w0_sdk_root}/devices/${device}/utilities", + "${k32w0_sdk_root}/devices/${device}/utilities/debug_console", + "${k32w0_sdk_root}/devices/${device}/utilities/str", "${k32w0_sdk_root}/middleware/mbedtls/port/ksdk", - "${k32w0_sdk_root}/middleware/ntag_i2c_plus/HAL_I2C/inc", - "${k32w0_sdk_root}/middleware/ntag_i2c_plus/HAL_NTAG/inc", - "${k32w0_sdk_root}/middleware/ntag_i2c_plus/inc", - "${k32w0_sdk_root}/middleware/ntag_i2c_plus/HAL_TMR/inc", "${k32w0_sdk_root}/middleware/wireless/ble_controller/interface", "${k32w0_sdk_root}/middleware/wireless/bluetooth/application/common", "${k32w0_sdk_root}/middleware/wireless/bluetooth/application/common/gatt_db", @@ -112,7 +172,7 @@ template("k32w0_sdk") { "${k32w0_sdk_root}/middleware/wireless/framework/Keyboard/Interface", "${k32w0_sdk_root}/middleware/wireless/framework/LED/Interface", "${k32w0_sdk_root}/middleware/wireless/framework/Lists", - "${k32w0_sdk_root}/middleware/wireless/framework/LowPower/Interface/k32w061dk6", + "${k32w0_sdk_root}/middleware/wireless/framework/LowPower/Interface/${board}", "${k32w0_sdk_root}/middleware/wireless/framework/MemManager/Interface", "${k32w0_sdk_root}/middleware/wireless/framework/Messaging/Interface", "${k32w0_sdk_root}/middleware/wireless/framework/ModuleInfo", @@ -137,9 +197,9 @@ template("k32w0_sdk") { ] libs = [ - "${k32w0_sdk_root}/middleware/wireless/ble_controller/lib/lib_ble_controller.a", - "${k32w0_sdk_root}//middleware/wireless/bluetooth/host/lib/lib_ble_5-0_host_peripheral_cm4_noFP.a", - "${k32w0_sdk_root}/middleware/wireless/ieee-802.15.4/lib/libMiniMac_Dynamic_MMAC.a", + "${k32w0_sdk_root}/middleware/wireless/ble_controller/lib/lib_ble_controller_peripheral_commissioning.a", + "${k32w0_sdk_root}//middleware/wireless/bluetooth/host/lib/lib_ble_5-0_host_matter_cm4_noFP.a", + "${k32w0_sdk_root}/middleware/wireless/ieee-802.15.4/lib/libMiniMac_Sched.a", "${k32w0_sdk_root}/middleware/wireless/framework/PDM/Library/libPDM_extFlash.a", "${k32w0_sdk_root}/middleware/wireless/framework/SecLib/lib_crypto_m4.a", "${k32w0_sdk_root}/middleware/wireless/framework/XCVR/lib/libRadio.a", @@ -148,18 +208,20 @@ template("k32w0_sdk") { defines = [ "gPWR_CpuClk_48MHz=1", "gMainThreadPriority_c=5", - "CPU_K32W061HN", "CPU_JN518X", "CPU_JN518X_REV=2", "JENNIC_CHIP_FAMILY_NAME=_JN518x", + "MAC_PROTO_TAG=1", + "JENNIC_CHIP_FAMILY_JN518x", "gPWR_LDOMEM_0_9V_PD=0", "SDK_DEBUGCONSOLE=DEBUGCONSOLE_REDIRECT_TO_SDK", + "PRINTF_ADVANCED_ENABLE", "NO_SYSCORECLK_UPD=0", "USE_RTOS=1", "USE_SDK_OSA=0", "gSerialManagerMaxInterfaces_c=2", "FSL_RTOS_FREE_RTOS=1", - "gTotalHeapSize_c=0xB000", + "gTotalHeapSize_c=0xC8BC", "gUartDebugConsole_d=1", "DEBUG_SERIAL_INTERFACE_INSTANCE=0", "APP_SERIAL_INTERFACE_INSTANCE=1", @@ -168,6 +230,7 @@ template("k32w0_sdk") { "gOtaEepromPostedOperations_d=1", "gOtaVerifyWrite_d=0", "gExternalFlashIsCiphered_d=1", + "PDM_USE_DYNAMIC_MEMORY=1", "gBootData_None_c=1", "PROGRAM_PAGE_SZ=256", "configFRTOS_MEMORY_SCHEME=4", @@ -220,6 +283,7 @@ template("k32w0_sdk") { "PDM_EXT_FLASH=1", "gEepromType_d=gEepromDevice_MX25R8035F_c", "gPdmNbSegments=63", + "gRadioUsePdm_d=1", ] if (chip_with_OM15082 != 0) { @@ -266,6 +330,34 @@ template("k32w0_sdk") { ] } + if (build_for_k32w061 == 1) { + defines += [ "CPU_K32W061HN" ] + } else if (build_for_k32w041am == 1) { + defines += [ "CPU_K32W041AMZ" ] + } else if (build_for_k32w041a == 1) { + defines += [ "CPU_K32W041AZ" ] + } else if (build_for_k32w041 == 1) { + defines += [ "CPU_K32W041HN" ] + } + + if (chip_with_high_power == 1) { + defines += [ + "K32WMCM_APP_BUILD", + "JENNIC_CHIP_FAMILY_JN518x", + ] + _sdk_include_dirs += [ + "${k32w0_sdk_root}/middleware/wireless/ieee-802.15.4/Include", + "${k32w0_sdk_root}/middleware/wireless/ieee-802.15.4/mMac/Include", + ] + } + + if (chip_with_ntag == 1) { + defines += [ + "CONFIG_CHIP_NFC_COMMISSIONING=1", + "CHIP_DEVICE_CONFIG_ENABLE_NFC=1", + ] + } + if (defined(invoker.defines)) { defines += invoker.defines } @@ -309,35 +401,31 @@ template("k32w0_sdk") { "${k32w0_sdk_root}/components/serial_manager/serial_manager.c", "${k32w0_sdk_root}/components/serial_manager/serial_port_uart.c", "${k32w0_sdk_root}/components/uart/usart_adapter.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_adc.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_aes.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_clock.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_common.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_ctimer.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_flash.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_flexcomm.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_fmeas.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_gpio.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_i2c.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_i2c_freertos.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_inputmux.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_ntag.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_pint.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_power.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_reset.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_rng.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_rtc.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_sha.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_spifi.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_usart.c", - "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_wtimer.c", - "${k32w0_sdk_root}/devices/K32W061/mcuxpresso/startup_k32w061.c", - "${k32w0_sdk_root}/devices/K32W061/system_K32W061.c", - "${k32w0_sdk_root}/devices/K32W061/utilities/debug_console/fsl_debug_console.c", - "${k32w0_sdk_root}/devices/K32W061/utilities/str/fsl_str.c", - "${k32w0_sdk_root}/middleware/ntag_i2c_plus/HAL_I2C/i2c_jn_fsl.c", - "${k32w0_sdk_root}/middleware/ntag_i2c_plus/HAL_NTAG/ntag_driver.c", - "${k32w0_sdk_root}/middleware/ntag_i2c_plus/HAL_TMR/timer_driver_jn.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_adc.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_aes.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_clock.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_common.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_ctimer.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_flash.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_flexcomm.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_fmeas.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_gpio.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_i2c.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_i2c_freertos.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_inputmux.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_pint.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_power.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_reset.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_rng.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_rtc.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_sha.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_spifi.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_usart.c", + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_wtimer.c", + "${k32w0_sdk_root}/devices/${device}/mcuxpresso/startup_${device_lowercase}.c", + "${k32w0_sdk_root}/devices/${device}/system_${device}.c", + "${k32w0_sdk_root}/devices/${device}/utilities/debug_console/fsl_debug_console.c", + "${k32w0_sdk_root}/devices/${device}/utilities/str/fsl_str.c", "${k32w0_sdk_root}/middleware/wireless/ble_controller/config/controller_config.c", "${k32w0_sdk_root}/middleware/wireless/bluetooth/application/common/ble_conn_manager.c", "${k32w0_sdk_root}/middleware/wireless/bluetooth/application/common/ble_host_tasks.c", @@ -351,9 +439,9 @@ template("k32w0_sdk") { "${k32w0_sdk_root}/middleware/wireless/framework/LED/Source/LED.c", "${k32w0_sdk_root}/middleware/wireless/framework/Lists/GenericList.c", "${k32w0_sdk_root}/middleware/wireless/framework/Logging/Source/dbg_logging.c", - "${k32w0_sdk_root}/middleware/wireless/framework/LowPower/Source/k32w061dk6/PWR.c", - "${k32w0_sdk_root}/middleware/wireless/framework/LowPower/Source/k32w061dk6/PWRLib.c", - "${k32w0_sdk_root}/middleware/wireless/framework/LowPower/Source/k32w061dk6/PWR_setjmp.S", + "${k32w0_sdk_root}/middleware/wireless/framework/LowPower/Source/${board}/PWR.c", + "${k32w0_sdk_root}/middleware/wireless/framework/LowPower/Source/${board}/PWRLib.c", + "${k32w0_sdk_root}/middleware/wireless/framework/LowPower/Source/${board}/PWR_setjmp.S", "${k32w0_sdk_root}/middleware/wireless/framework/MemManager/Source/MemManager.c", "${k32w0_sdk_root}/middleware/wireless/framework/Messaging/Source/Messaging.c", "${k32w0_sdk_root}/middleware/wireless/framework/OSAbstraction/Source/fsl_os_abstraction_free_rtos.c", @@ -379,37 +467,36 @@ template("k32w0_sdk") { ] if (chip_with_DK6) { - if (chip_with_low_power != 0) { + sources += [ + "${k32w0_sdk_root}/boards/${board}/wireless_examples/openthread/reed/bm/board.c", + "${k32w0_sdk_root}/boards/${board}/wireless_examples/openthread/reed/bm/board_utility.c", + "${k32w0_sdk_root}/boards/${board}/wireless_examples/openthread/reed/bm/hardware_init.c", + ] + + if (chip_with_se05x != 0) { sources += [ - "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/openthread/lped/bm/board.c", - "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/openthread/lped/bm/board_utility.c", - "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/openthread/lped/bm/clock_config.c", - "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/openthread/lped/bm/hardware_init.c", - "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/openthread/lped/bm/pin_mux.c", + "${chip_root}/third_party/simw-top-mini/repo/demos/ksdk/common/boards/DK6/wireless_examples/chip/clock_config.c", + "${chip_root}/third_party/simw-top-mini/repo/demos/ksdk/common/boards/DK6/wireless_examples/chip/pin_mux.c", ] } else { sources += [ - "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/openthread/reed/bm/board.c", - "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/openthread/reed/bm/board_utility.c", - "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/openthread/reed/bm/hardware_init.c", + "${k32w0_sdk_root}/boards/${board}/wireless_examples/openthread/reed/bm/clock_config.c", + "${k32w0_sdk_root}/boards/${board}/wireless_examples/openthread/reed/bm/pin_mux.c", ] - - if (chip_with_se05x != 0) { - sources += [ - "${chip_root}/third_party/simw-top-mini/repo/demos/ksdk/common/boards/DK6/wireless_examples/chip/clock_config.c", - "${chip_root}/third_party/simw-top-mini/repo/demos/ksdk/common/boards/DK6/wireless_examples/chip/pin_mux.c", - ] - } else { - sources += [ - "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/openthread/reed/bm/clock_config.c", - "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/openthread/reed/bm/pin_mux.c", - ] - } } } if (chip_with_low_power != 0) { - sources += [ "${k32w0_sdk_root}/boards/k32w061dk6/wireless_examples/hybrid/ble_ot/lped_ble_wuart/ble_802_15_4_common/app_dual_mode_low_power.c" ] + sources += [ "${k32w0_sdk_root}/boards/${board}/wireless_examples/hybrid/ble_ot/lped_ble_wuart/ble_802_15_4_common/app_dual_mode_low_power.c" ] + } + + if (chip_with_ntag != 0) { + sources += [ + "${k32w0_sdk_root}/devices/${device}/drivers/fsl_ntag.c", + "${k32w0_sdk_root}/middleware/ntag_i2c_plus/HAL_I2C/i2c_jn_fsl.c", + "${k32w0_sdk_root}/middleware/ntag_i2c_plus/HAL_NTAG/ntag_driver.c", + "${k32w0_sdk_root}/middleware/ntag_i2c_plus/HAL_TMR/timer_driver_jn.c", + ] } if (!defined(public_deps)) { diff --git a/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh b/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh index 417731e01f5216..1ae747ee5dcf23 100755 --- a/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh +++ b/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh @@ -1,10 +1,12 @@ #!/bin/bash -if [[ ! -d $NXP_K32W061_SDK_ROOT ]]; then - echo "NXP_K32W061_SDK_ROOT is not set" +if [[ ! -d $NXP_K32W0_SDK_ROOT ]]; then + echo "NXP_K32W0_SDK_ROOT is not set" exit 1 fi +board=$(ls "$NXP_K32W0_SDK_ROOT"/boards) + convert_to_dos() { [[ $(file -b - <$1) != *"CRLF"* ]] && sed -i 's/$/\r/' "$1" @@ -13,59 +15,5 @@ convert_to_dos() { SOURCE=${BASH_SOURCE[0]} SOURCE_DIR=$(cd "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd) -convert_to_dos "$NXP_K32W061_SDK_ROOT"/boards/k32w061dk6/wireless_examples/openthread/reed/bm/gpio_pins.h -patch -N --binary -d "$NXP_K32W061_SDK_ROOT"/boards/k32w061dk6/wireless_examples/openthread/reed/bm -p1 <"$SOURCE_DIR/gpio_pins_h.patch" - -convert_to_dos "$NXP_K32W061_SDK_ROOT"/boards/k32w061dk6/wireless_examples/hybrid/ble_ot/lped_ble_wuart/ble_802_15_4_common/app_dual_mode_low_power.h -patch -N --binary -d "$NXP_K32W061_SDK_ROOT"/boards/k32w061dk6/wireless_examples/hybrid/ble_ot/lped_ble_wuart/ble_802_15_4_common -p1 <"$SOURCE_DIR/app_dual_mode_low_power_h.patch" - -convert_to_dos "$NXP_K32W061_SDK_ROOT"/boards/k32w061dk6/wireless_examples/hybrid/ble_ot/lped_ble_wuart/ble_802_15_4_common/app_dual_mode_switch.h -patch -N --binary -d "$NXP_K32W061_SDK_ROOT"/boards/k32w061dk6/wireless_examples/hybrid/ble_ot/lped_ble_wuart/ble_802_15_4_common -p1 <"$SOURCE_DIR/app_dual_mode_switch_h.patch" - -convert_to_dos "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/SecLib/SecLib.h -patch -N --binary -d "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/SecLib -p1 <"$SOURCE_DIR/SecLib_h.patch" - -convert_to_dos "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/OtaSupport/Source/OtaUtils.c -patch -N --binary -d "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/OtaSupport/Source -p1 <"$SOURCE_DIR/OtaUtils_c.patch" - -convert_to_dos "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/OtaSupport/Source/OtaSupport.c -patch -N --binary -d "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/OtaSupport/Source -p1 <"$SOURCE_DIR/OtaSupport_c.patch" - -convert_to_dos "$NXP_K32W061_SDK_ROOT"/middleware/wireless/bluetooth/host/interface/ble_utils.h -patch -N --binary -d "$NXP_K32W061_SDK_ROOT"/middleware/wireless/bluetooth/host/interface -p1 <"$SOURCE_DIR/ble_utils_h.patch" - -convert_to_dos "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/Flash/External/Source/Eeprom_MX25R8035F.c -patch -N --binary -d "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/Flash/External/Source -p1 <"$SOURCE_DIR/Eeprom_MX25R8035F_c.patch" - -convert_to_dos "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/MemManager/Interface/MemManager.h -patch -N --binary -d "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/MemManager/Interface -p1 <"$SOURCE_DIR/MemManager_h.patch" - -#internal: THREADIP-3660 -patch -N --binary -d ./third_party/openthread/ot-nxp/src/k32w0/platform -p1 <"$SOURCE_DIR/settings_k32w_c.patch" - -SIGN_FILE_PATH="$NXP_K32W061_SDK_ROOT"/tools/imagetool/sign_images.sh -convert_to_dos "$SIGN_FILE_PATH" -patch -N --binary -d "$NXP_K32W061_SDK_ROOT"/tools/imagetool/ -p1 <"$SOURCE_DIR/sign_images_sh.patch" -sed -i 's/\r$//' "$SIGN_FILE_PATH" - -echo "Downloading PDM and BLE libraries from NXP server..." - -rm -rf patch_for_K32W061_SDK_2_6_4.zip patch_for_K32W061_SDK_2_6_4 -wget https://www.nxp.com/downloads/en/libraries/patch_for_K32W061_SDK_2_6_4.zip -exitCode=$? -if [ "$exitCode" -ne 0 ]; then - echo "Download error" - exit -fi - -unzip patch_for_K32W061_SDK_2_6_4.zip -cp patch_for_K32W061_SDK_2_6_4/controller_config.c "$NXP_K32W061_SDK_ROOT"/middleware/wireless/ble_controller/config/ -cp patch_for_K32W061_SDK_2_6_4/controller_interface.h "$NXP_K32W061_SDK_ROOT"/middleware/wireless/ble_controller/interface/ -cp patch_for_K32W061_SDK_2_6_4/lib_ble_controller.a "$NXP_K32W061_SDK_ROOT"/middleware/wireless/ble_controller/lib/ -cp patch_for_K32W061_SDK_2_6_4/libPDM_extFlash.a "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/PDM/Library/ - -rm -rf patch_for_K32W061_SDK_2_6_4.zip -rm -rf patch_for_K32W061_SDK_2_6_4 - -echo "K32W SDK MR3 QP1 was patched!" +echo "SDK 2.6.6 doesn't need any patching!" exit 0 diff --git a/third_party/openthread/ot-ifx b/third_party/openthread/ot-ifx index e80949a96db29c..64bc0568bbb713 160000 --- a/third_party/openthread/ot-ifx +++ b/third_party/openthread/ot-ifx @@ -1 +1 @@ -Subproject commit e80949a96db29c6229cb78de650d120257284db7 +Subproject commit 64bc0568bbb7136244f2ae5e58ae074b64392e9b diff --git a/third_party/openthread/ot-nxp b/third_party/openthread/ot-nxp index 7a55fa48f51188..611561714fed15 160000 --- a/third_party/openthread/ot-nxp +++ b/third_party/openthread/ot-nxp @@ -1 +1 @@ -Subproject commit 7a55fa48f51188f24135b9e57834ae57acf2e0ff +Subproject commit 611561714fed15d8046c30933f3d3b84b6a9908c diff --git a/third_party/openthread/platforms/nxp/k32w/k32w0/BUILD.gn b/third_party/openthread/platforms/nxp/k32w/k32w0/BUILD.gn index b942608b82ac9b..c6946d3d1d06ab 100644 --- a/third_party/openthread/platforms/nxp/k32w/k32w0/BUILD.gn +++ b/third_party/openthread/platforms/nxp/k32w/k32w0/BUILD.gn @@ -23,7 +23,11 @@ import("${chip_root}/third_party/nxp/k32w0_sdk/k32w0_sdk.gni") openthread_nxp_root = "${chip_root}/third_party/openthread/ot-nxp" config("openthread_k32w0_config") { - include_dirs = [ "${openthread_nxp_root}/src/k32w0/k32w061" ] + include_dirs = [ + "${openthread_nxp_root}/src/k32w0/k32w061", + "${openthread_nxp_root}/src/k32w0/platform", + "${openthread_nxp_root}/src/common", + ] include_dirs += [ "${chip_root}/examples/platform/nxp/k32w/k32w0" ] if (is_clang) { @@ -52,14 +56,16 @@ source_set("openthread_mbedtls_config_k32w0") { source_set("libopenthread-k32w0") { sources = [ + "${openthread_nxp_root}/src/common/ram_storage.c", "${openthread_nxp_root}/src/k32w0/platform/alarm.c", "${openthread_nxp_root}/src/k32w0/platform/diag.c", "${openthread_nxp_root}/src/k32w0/platform/entropy.c", "${openthread_nxp_root}/src/k32w0/platform/flash.c", + "${openthread_nxp_root}/src/k32w0/platform/flash_pdm.c", "${openthread_nxp_root}/src/k32w0/platform/logging.c", "${openthread_nxp_root}/src/k32w0/platform/misc.c", + "${openthread_nxp_root}/src/k32w0/platform/pdm_ram_storage_glue.c", "${openthread_nxp_root}/src/k32w0/platform/radio.c", - "${openthread_nxp_root}/src/k32w0/platform/settings_k32w.c", "${openthread_nxp_root}/src/k32w0/platform/system.c", "${openthread_nxp_root}/src/k32w0/platform/uart.c", ] diff --git a/third_party/qpg_sdk/qpg_executable.gni b/third_party/qpg_sdk/qpg_executable.gni index 454040e25d728f..4950939182b1b4 100644 --- a/third_party/qpg_sdk/qpg_executable.gni +++ b/third_party/qpg_sdk/qpg_executable.gni @@ -97,7 +97,7 @@ template("qpg_executable") { gen_ota_header("$executable_target_name.ota") { ota_header_script_name = "${root_out_dir}/${executable_target_name}.ota" out_dir = rebase_path(root_out_dir, root_build_dir) - ota_header_generator = "${qpg_sdk_root}/Tools/ota/generate_ota_img.py" + ota_header_generator = "${qpg_sdk_root}/Tools/Ota/generate_ota_img.py" ota_header_options = [ string_join("=", @@ -119,7 +119,7 @@ template("qpg_executable") { [ "--pem_file_path", rebase_path(qpg_sdk_root, root_build_dir) + - "/Tools/ota/example_private_key.pem.example", + "/Tools/Ota/example_private_key.pem.example", ]), "--pem_password=test1234", "--sign", diff --git a/third_party/qpg_sdk/repo b/third_party/qpg_sdk/repo index fa660d1762c709..35ccb383fb401a 160000 --- a/third_party/qpg_sdk/repo +++ b/third_party/qpg_sdk/repo @@ -1 +1 @@ -Subproject commit fa660d1762c70938430d058f5830777770356bbd +Subproject commit 35ccb383fb401ad8ed02162a33915b1dff2af9d0 diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index eef1aab171ff5c..70d6a5b8a11fb8 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit eef1aab171ff5c114c98aaee6f236f3a0bbc2a6a +Subproject commit 70d6a5b8a11fb8c5c4baf2fcb1824a0f2723f7ba diff --git a/third_party/telink_sdk/repo b/third_party/telink_sdk/repo index acb77b52970a5c..6a3cb0a3615cf7 160000 --- a/third_party/telink_sdk/repo +++ b/third_party/telink_sdk/repo @@ -1 +1 @@ -Subproject commit acb77b52970a5c0a7f5d81273a2f49c884c880dd +Subproject commit 6a3cb0a3615cf7f2f0418440d3ae9d93f6f3e595 diff --git a/third_party/zap/repo b/third_party/zap/repo index 4d97641953d88a..1e9a813d5be38f 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit 4d97641953d88a0449565d9fe6093fb95e239f87 +Subproject commit 1e9a813d5be38f4f6b387439454856fe4bc122d1 diff --git a/zzz_generated/all-clusters-app/zap-generated/access.h b/zzz_generated/all-clusters-app/zap-generated/access.h index 45449aa7662e8f..62a93c3f38a0a7 100644 --- a/zzz_generated/all-clusters-app/zap-generated/access.h +++ b/zzz_generated/all-clusters-app/zap-generated/access.h @@ -403,6 +403,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -452,6 +453,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -501,6 +503,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 0689d5dc931128..c815d6432ffbf9 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -286,13 +286,16 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 46 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 47 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* HourFormat */ \ \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ + \ /* Endpoint: 1, Cluster: On/Off (server) */ \ { (uint16_t) 0xFF, (uint16_t) 0x0, (uint16_t) 0x2 }, /* StartUpOnOff */ \ \ @@ -482,8 +485,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -717,7 +721,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -780,14 +784,14 @@ { 0x00004003, ZAP_TYPE(ENUM8), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* StartUpOnOff */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* StartUpOnOff */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ { 0x00000010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* switch actions */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* switch actions */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -800,7 +804,7 @@ { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* options */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* options */ \ { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -819,7 +823,7 @@ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x00000051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* out of service */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* out of service */ \ { 0x00000055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ { 0x0000006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ @@ -918,9 +922,9 @@ { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(27) }, /* Language */ \ { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(60) }, /* AutoRelockTime */ \ { 0x00000024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* SoundVolume */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* SoundVolume */ \ { 0x00000025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* OperatingMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* OperatingMode */ \ { 0x00000026, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFF6) }, /* SupportedOperatingModes */ \ { 0x00000027, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* DefaultConfigurationRegister */ \ { 0x00000029, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -929,9 +933,9 @@ { 0x0000002B, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x00) }, /* EnablePrivacyModeButton */ \ { 0x00000030, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* WrongCodeEntryLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* WrongCodeEntryLimit */ \ { 0x00000031, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* UserCodeTemporaryDisableTime */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* UserCodeTemporaryDisableTime */ \ { 0x00000033, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* RequirePINforRemoteOperation */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0xD13) }, /* FeatureMap */ \ @@ -974,7 +978,7 @@ ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ { 0x00000017, ZAP_TYPE(BITMAP8), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* Mode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* Mode */ \ { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x17) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ @@ -1012,9 +1016,9 @@ { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0x00000000) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* OperationMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* OperationMode */ \ { 0x00000021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* ControlMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* ControlMode */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ @@ -1025,40 +1029,40 @@ { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0640) }, /* AbsMinCoolSetpointLimit */ \ { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0C80) }, /* AbsMaxCoolSetpointLimit */ \ { 0x00000011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* OccupiedCoolingSetpoint */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* OccupiedCoolingSetpoint */ \ { 0x00000012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* OccupiedHeatingSetpoint */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(14) }, /* OccupiedHeatingSetpoint */ \ { 0x00000015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(14) }, /* MinHeatSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(15) }, /* MinHeatSetpointLimit */ \ { 0x00000016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(15) }, /* MaxHeatSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* MaxHeatSetpointLimit */ \ { 0x00000017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* MinCoolSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* MinCoolSetpointLimit */ \ { 0x00000018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* MaxCoolSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* MaxCoolSetpointLimit */ \ { 0x00000019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* MinSetpointDeadBand */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* MinSetpointDeadBand */ \ { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* ControlSequenceOfOperation */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(20) }, /* ControlSequenceOfOperation */ \ { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(20) }, /* SystemMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(21) }, /* SystemMode */ \ { 0x0000001E, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* ThermostatRunningMode */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x0023) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(21) }, /* fan mode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(22) }, /* fan mode */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(22) }, /* fan mode sequence */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(23) }, /* fan mode sequence */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(23) }, /* percent setting */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(24) }, /* percent setting */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* percent current */ \ { 0x00000004, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(100) }, /* speed max */ \ { 0x00000005, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(24) }, /* speed setting */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(25) }, /* speed setting */ \ { 0x00000006, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* speed current */ \ { 0x00000007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* rock support */ \ { 0x00000008, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* rock setting */ \ @@ -1069,11 +1073,11 @@ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(25) }, /* temperature display mode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(26) }, /* temperature display mode */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(26) }, /* keypad lockout */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(27) }, /* keypad lockout */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(27) }, /* schedule programming visibility */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(28) }, /* schedule programming visibility */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -1108,25 +1112,25 @@ { 0x00000029, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Primary6Y */ \ { 0x0000002A, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Primary6Intensity */ \ { 0x00000030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(28) }, /* WhitePointX */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(29) }, /* WhitePointX */ \ { 0x00000031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(29) }, /* WhitePointY */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(30) }, /* WhitePointY */ \ { 0x00000032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(30) }, /* ColorPointRX */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(31) }, /* ColorPointRX */ \ { 0x00000033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(31) }, /* ColorPointRY */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(32) }, /* ColorPointRY */ \ { 0x00000034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* ColorPointRIntensity */ \ { 0x00000036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(32) }, /* ColorPointGX */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(33) }, /* ColorPointGX */ \ { 0x00000037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(33) }, /* ColorPointGY */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* ColorPointGY */ \ { 0x00000038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* ColorPointGIntensity */ \ { 0x0000003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* ColorPointBX */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(35) }, /* ColorPointBX */ \ { 0x0000003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(35) }, /* ColorPointBY */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(36) }, /* ColorPointBY */ \ { 0x0000003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* ColorPointBIntensity */ \ { 0x00004000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* EnhancedCurrentHue */ \ @@ -1141,7 +1145,7 @@ { 0x0000400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* ColorTempPhysicalMaxMireds */ \ { 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* CoupleColorTempToLevelMinMireds */ \ { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(36) }, /* StartUpColorTemperatureMireds */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(37) }, /* StartUpColorTemperatureMireds */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1F) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ @@ -1253,7 +1257,7 @@ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000001, ZAP_TYPE(VENDOR_ID), 2, 0, ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ @@ -1328,13 +1332,13 @@ { 0x00000025, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* struct_attr */ \ { 0x00000026, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(37) }, /* range_restricted_int8u */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(38) }, /* range_restricted_int8u */ \ { 0x00000027, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(38) }, /* range_restricted_int8s */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(39) }, /* range_restricted_int8s */ \ { 0x00000028, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(39) }, /* range_restricted_int16u */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(40) }, /* range_restricted_int16u */ \ { 0x00000029, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(40) }, /* range_restricted_int16s */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(41) }, /* range_restricted_int16s */ \ { 0x0000002A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_long_octet_string */ \ { 0x0000002B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1406,16 +1410,16 @@ ZAP_EMPTY_DEFAULT() }, /* nullable_struct */ \ { 0x00004026, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(41) }, /* nullable_range_restricted_int8u */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(42) }, /* nullable_range_restricted_int8u */ \ { 0x00004027, ZAP_TYPE(INT8S), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(42) }, /* nullable_range_restricted_int8s */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(43) }, /* nullable_range_restricted_int8s */ \ { 0x00004028, ZAP_TYPE(INT16U), 2, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(43) }, /* nullable_range_restricted_int16u */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(44) }, /* nullable_range_restricted_int16u */ \ { 0x00004029, ZAP_TYPE(INT16S), 2, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(44) }, /* nullable_range_restricted_int16s */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(45) }, /* nullable_range_restricted_int16s */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -1431,7 +1435,7 @@ { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x00004003, ZAP_TYPE(ENUM8), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(45) }, /* StartUpOnOff */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(46) }, /* StartUpOnOff */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/access.h b/zzz_generated/all-clusters-minimal-app/zap-generated/access.h index 61813697e29df0..cf4692474e5c80 100644 --- a/zzz_generated/all-clusters-minimal-app/zap-generated/access.h +++ b/zzz_generated/all-clusters-minimal-app/zap-generated/access.h @@ -186,6 +186,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ 62, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ @@ -222,6 +223,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ 0, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ @@ -258,6 +260,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h index 7da5f608c4d2e0..ea5df11f3c0d4e 100644 --- a/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h @@ -527,7 +527,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index cfa3a10c40693a..c617ca134c91a3 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -53,7 +53,7 @@ typedef struct _TestFabricScoped chip::CharSpan fabricSensitiveCharString; SimpleStruct fabricSensitiveStruct; /* TYPE WARNING: array array defaults to */ uint8_t * fabricSensitiveInt8uList; - chip::FabricIndex fabricIndex; + chip::FabricIndex FabricIndex; } TestFabricScoped; // Struct for Dimension 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 ef79df312b8fc1..bb816fa71b9696 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 @@ -9937,9 +9937,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace CurrentFabricIndex { -EmberAfStatus Get(chip::EndpointId endpoint, chip::FabricIndex * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, readable, sizeof(temp)); @@ -9951,9 +9951,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::FabricIndex * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::FabricIndex value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9961,7 +9961,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::FabricIndex value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_FABRIC_IDX_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } } // namespace CurrentFabricIndex @@ -15802,7 +15802,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_UTC_ATTRIBUTE_TYPE); } } // namespace SetpointChangeSourceTimestamp @@ -22788,9 +22788,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace VendorID { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::VendorId * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); @@ -22802,9 +22802,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -22812,7 +22812,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE); } } // namespace VendorID 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 4f45aeed5e5810..3223dd34192ddf 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 @@ -1745,8 +1745,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace CommissionedFabrics namespace CurrentFabricIndex { -EmberAfStatus Get(chip::EndpointId endpoint, chip::FabricIndex * value); // fabric_idx -EmberAfStatus Set(chip::EndpointId endpoint, chip::FabricIndex value); +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace CurrentFabricIndex namespace FeatureMap { @@ -2706,7 +2706,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace SetpointChangeAmount namespace SetpointChangeSourceTimestamp { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // epoch_s +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // utc EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); } // namespace SetpointChangeSourceTimestamp @@ -3866,8 +3866,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace VendorName namespace VendorID { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::VendorId * value); // vendor_id +EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value); } // namespace VendorID namespace ApplicationName { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 2bca6b715cf75d..441c044b5d65d3 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -1020,7 +1020,6 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(OperationalCredentials: case EnumType::kMissingCsr: case EnumType::kTableFull: case EnumType::kInvalidAdminSubject: - case EnumType::kInsufficientPrivilege: case EnumType::kFabricConflict: case EnumType::kLabelConflict: case EnumType::kInvalidFabricIndex: 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 10a067fc1e3b53..828bece6f247ec 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 @@ -934,18 +934,17 @@ namespace OperationalCredentials { // Enum for OperationalCertStatus enum class OperationalCertStatus : uint8_t { - kSuccess = 0x00, - kInvalidPublicKey = 0x01, - kInvalidNodeOpId = 0x02, - kInvalidNOC = 0x03, - kMissingCsr = 0x04, - kTableFull = 0x05, - kInvalidAdminSubject = 0x06, - kInsufficientPrivilege = 0x08, - kFabricConflict = 0x09, - kLabelConflict = 0x0A, - kInvalidFabricIndex = 0x0B, - kUnknownEnumValue = 7, + kSuccess = 0x00, + kInvalidPublicKey = 0x01, + kInvalidNodeOpId = 0x02, + kInvalidNOC = 0x03, + kMissingCsr = 0x04, + kTableFull = 0x05, + kInvalidAdminSubject = 0x06, + kFabricConflict = 0x09, + kLabelConflict = 0x0A, + kInvalidFabricIndex = 0x0B, + kUnknownEnumValue = 7, }; } // namespace OperationalCredentials diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 6d5c4cb5cf654e..058787fd2a7d23 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -1972,8 +1972,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLevel)), level)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionMask)), optionMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionOverride)), optionOverride)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1998,11 +1998,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); break; - case to_underlying(Fields::kOptionMask): - ReturnErrorOnFailure(DataModel::Decode(reader, optionMask)); + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); break; - case to_underlying(Fields::kOptionOverride): - ReturnErrorOnFailure(DataModel::Decode(reader, optionOverride)); + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); break; default: break; @@ -2021,8 +2021,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMoveMode)), moveMode)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRate)), rate)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionMask)), optionMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionOverride)), optionOverride)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2047,11 +2047,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kRate): ReturnErrorOnFailure(DataModel::Decode(reader, rate)); break; - case to_underlying(Fields::kOptionMask): - ReturnErrorOnFailure(DataModel::Decode(reader, optionMask)); + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); break; - case to_underlying(Fields::kOptionOverride): - ReturnErrorOnFailure(DataModel::Decode(reader, optionOverride)); + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); break; default: break; @@ -2071,8 +2071,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepMode)), stepMode)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepSize)), stepSize)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionMask)), optionMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionOverride)), optionOverride)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2100,11 +2100,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); break; - case to_underlying(Fields::kOptionMask): - ReturnErrorOnFailure(DataModel::Decode(reader, optionMask)); + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); break; - case to_underlying(Fields::kOptionOverride): - ReturnErrorOnFailure(DataModel::Decode(reader, optionOverride)); + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); break; default: break; @@ -2121,8 +2121,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionMask)), optionMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionOverride)), optionOverride)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2141,11 +2141,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kOptionMask): - ReturnErrorOnFailure(DataModel::Decode(reader, optionMask)); + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); break; - case to_underlying(Fields::kOptionOverride): - ReturnErrorOnFailure(DataModel::Decode(reader, optionOverride)); + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); break; default: break; @@ -2164,6 +2164,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLevel)), level)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2188,6 +2190,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); break; + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); + break; + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); + break; default: break; } @@ -2205,6 +2213,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMoveMode)), moveMode)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRate)), rate)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2229,6 +2239,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kRate): ReturnErrorOnFailure(DataModel::Decode(reader, rate)); break; + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); + break; + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); + break; default: break; } @@ -2247,6 +2263,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepMode)), stepMode)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepSize)), stepSize)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2274,6 +2292,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); break; + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); + break; + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); + break; default: break; } @@ -2289,6 +2313,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2307,6 +2333,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); + break; + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); + break; default: break; } @@ -2989,7 +3021,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kChangeType)), changeType)); ReturnErrorOnFailure( DataModel::EncodeForRead(writer, TLV::ContextTag(to_underlying(Fields::kLatestValue)), GetFabricIndex(), latestValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAdminFabricIndex)), adminFabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3020,8 +3052,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kLatestValue): ReturnErrorOnFailure(DataModel::Decode(reader, latestValue)); break; - case to_underlying(Fields::kAdminFabricIndex): - ReturnErrorOnFailure(DataModel::Decode(reader, adminFabricIndex)); + case to_underlying(Fields::kFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex)); break; default: break; @@ -3043,7 +3075,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kChangeType)), changeType)); ReturnErrorOnFailure( DataModel::EncodeForRead(writer, TLV::ContextTag(to_underlying(Fields::kLatestValue)), GetFabricIndex(), latestValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAdminFabricIndex)), adminFabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3074,8 +3106,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kLatestValue): ReturnErrorOnFailure(DataModel::Decode(reader, latestValue)); break; - case to_underlying(Fields::kAdminFabricIndex): - ReturnErrorOnFailure(DataModel::Decode(reader, adminFabricIndex)); + case to_underlying(Fields::kFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex)); break; default: break; @@ -4106,6 +4138,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4124,6 +4157,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { + case to_underlying(Fields::kFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex)); + break; default: break; } @@ -20598,7 +20634,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg1)), arg1)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -20617,8 +20653,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kArg1): - ReturnErrorOnFailure(DataModel::Decode(reader, arg1)); + case to_underlying(Fields::kFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex)); break; default: break; @@ -20695,35 +20731,103 @@ bool CommandNeedsTimedInvoke(ClusterId aCluster, CommandId aCommand) return false; } -// TODO(#20811): Actually generate the following based on ZAP metadata -// See https://github.com/project-chip/zap/issues/609 bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) { // Maybe it would be smaller code to codegen a table and walk over it? // Not sure. switch (aCluster) { + case Clusters::Identify::Id: { + switch (aCommand) + { + default: + return false; + } + } case Clusters::Groups::Id: { switch (aCommand) { case Clusters::Groups::Commands::AddGroup::Id: + return true; case Clusters::Groups::Commands::ViewGroup::Id: + return true; case Clusters::Groups::Commands::GetGroupMembership::Id: + return true; case Clusters::Groups::Commands::RemoveGroup::Id: + return true; case Clusters::Groups::Commands::RemoveAllGroups::Id: return true; + case Clusters::Groups::Commands::AddGroupIfIdentifying::Id: + return true; default: return false; } } - case Clusters::GroupKeyManagement::Id: { + case Clusters::Scenes::Id: { switch (aCommand) { - case Clusters::GroupKeyManagement::Commands::KeySetWrite::Id: - case Clusters::GroupKeyManagement::Commands::KeySetRead::Id: - case Clusters::GroupKeyManagement::Commands::KeySetRemove::Id: - case Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id: + case Clusters::Scenes::Commands::AddScene::Id: return true; + case Clusters::Scenes::Commands::ViewScene::Id: + return true; + case Clusters::Scenes::Commands::RemoveScene::Id: + return true; + case Clusters::Scenes::Commands::RemoveAllScenes::Id: + return true; + case Clusters::Scenes::Commands::StoreScene::Id: + return true; + case Clusters::Scenes::Commands::RecallScene::Id: + return true; + case Clusters::Scenes::Commands::GetSceneMembership::Id: + return true; + case Clusters::Scenes::Commands::EnhancedAddScene::Id: + return true; + case Clusters::Scenes::Commands::EnhancedViewScene::Id: + return true; + case Clusters::Scenes::Commands::CopyScene::Id: + return true; + default: + return false; + } + } + case Clusters::OnOff::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::LevelControl::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::BridgedActions::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::Basic::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::OtaSoftwareUpdateProvider::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::OtaSoftwareUpdateRequestor::Id: { + switch (aCommand) + { default: return false; } @@ -20737,24 +20841,215 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } - case Clusters::Scenes::Id: { - // Entire cluster is fabric-scoped. - return true; + case Clusters::NetworkCommissioning::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::DiagnosticLogs::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::GeneralDiagnostics::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::SoftwareDiagnostics::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::ThreadNetworkDiagnostics::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::WiFiNetworkDiagnostics::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::EthernetNetworkDiagnostics::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::AdministratorCommissioning::Id: { + switch (aCommand) + { + default: + return false; + } } case Clusters::OperationalCredentials::Id: { switch (aCommand) { case Clusters::OperationalCredentials::Commands::UpdateNOC::Id: + return true; case Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id: return true; default: return false; } } - default: - break; + case Clusters::GroupKeyManagement::Id: { + switch (aCommand) + { + case Clusters::GroupKeyManagement::Commands::KeySetWrite::Id: + return true; + case Clusters::GroupKeyManagement::Commands::KeySetRead::Id: + return true; + case Clusters::GroupKeyManagement::Commands::KeySetRemove::Id: + return true; + case Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id: + return true; + default: + return false; + } + } + case Clusters::ModeSelect::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::DoorLock::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::WindowCovering::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::BarrierControl::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::Thermostat::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::ColorControl::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::Channel::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::TargetNavigator::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::MediaPlayback::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::MediaInput::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::LowPower::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::KeypadInput::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::ContentLauncher::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::AudioOutput::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::ApplicationLauncher::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::AccountLogin::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::ElectricalMeasurement::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::TestCluster::Id: { + switch (aCommand) + { + default: + return false; + } + } } - return false; } diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index d6b1c9d3e85fd9..69612378441571 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -2260,10 +2260,10 @@ namespace Commands { namespace MoveToLevel { enum class Fields { - kLevel = 0, - kTransitionTime = 1, - kOptionMask = 2, - kOptionOverride = 3, + kLevel = 0, + kTransitionTime = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type @@ -2275,8 +2275,8 @@ struct Type uint8_t level = static_cast(0); uint16_t transitionTime = static_cast(0); - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2293,18 +2293,18 @@ struct DecodableType uint8_t level = static_cast(0); uint16_t transitionTime = static_cast(0); - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToLevel namespace Move { enum class Fields { - kMoveMode = 0, - kRate = 1, - kOptionMask = 2, - kOptionOverride = 3, + kMoveMode = 0, + kRate = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type @@ -2314,10 +2314,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Move::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + MoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2332,21 +2332,21 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Move::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + MoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Move namespace Step { enum class Fields { - kStepMode = 0, - kStepSize = 1, - kTransitionTime = 2, - kOptionMask = 3, - kOptionOverride = 4, + kStepMode = 0, + kStepSize = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, }; struct Type @@ -2359,8 +2359,8 @@ struct Type StepMode stepMode = static_cast(0); uint8_t stepSize = static_cast(0); uint16_t transitionTime = static_cast(0); - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2378,16 +2378,16 @@ struct DecodableType StepMode stepMode = static_cast(0); uint8_t stepSize = static_cast(0); uint16_t transitionTime = static_cast(0); - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Step namespace Stop { enum class Fields { - kOptionMask = 0, - kOptionOverride = 1, + kOptionsMask = 0, + kOptionsOverride = 1, }; struct Type @@ -2397,8 +2397,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2413,16 +2413,18 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Stop namespace MoveToLevelWithOnOff { enum class Fields { - kLevel = 0, - kTransitionTime = 1, + kLevel = 0, + kTransitionTime = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type @@ -2434,6 +2436,8 @@ struct Type uint8_t level = static_cast(0); uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2450,14 +2454,18 @@ struct DecodableType uint8_t level = static_cast(0); uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToLevelWithOnOff namespace MoveWithOnOff { enum class Fields { - kMoveMode = 0, - kRate = 1, + kMoveMode = 0, + kRate = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type @@ -2467,8 +2475,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); + MoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2483,17 +2493,21 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); + MoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveWithOnOff namespace StepWithOnOff { enum class Fields { - kStepMode = 0, - kStepSize = 1, - kTransitionTime = 2, + kStepMode = 0, + kStepSize = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, }; struct Type @@ -2506,6 +2520,8 @@ struct Type StepMode stepMode = static_cast(0); uint8_t stepSize = static_cast(0); uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2523,12 +2539,16 @@ struct DecodableType StepMode stepMode = static_cast(0); uint8_t stepSize = static_cast(0); uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StepWithOnOff namespace StopWithOnOff { enum class Fields { + kOptionsMask = 0, + kOptionsOverride = 1, }; struct Type @@ -2538,6 +2558,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StopWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; using ResponseType = DataModel::NullObjectType; @@ -2551,6 +2574,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StopWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StopWithOnOff @@ -3514,11 +3539,11 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields { - kAdminNodeID = 1, - kAdminPasscodeID = 2, - kChangeType = 3, - kLatestValue = 4, - kAdminFabricIndex = 254, + kAdminNodeID = 1, + kAdminPasscodeID = 2, + kChangeType = 3, + kLatestValue = 4, + kFabricIndex = 254, }; struct Type @@ -3533,9 +3558,9 @@ struct Type DataModel::Nullable adminPasscodeID; ChangeTypeEnum changeType = static_cast(0); DataModel::Nullable latestValue; - chip::FabricIndex adminFabricIndex = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); - auto GetFabricIndex() const { return adminFabricIndex; } + auto GetFabricIndex() const { return fabricIndex; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -3551,7 +3576,7 @@ struct DecodableType DataModel::Nullable adminPasscodeID; ChangeTypeEnum changeType = static_cast(0); DataModel::Nullable latestValue; - chip::FabricIndex adminFabricIndex = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -3561,11 +3586,11 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields { - kAdminNodeID = 1, - kAdminPasscodeID = 2, - kChangeType = 3, - kLatestValue = 4, - kAdminFabricIndex = 254, + kAdminNodeID = 1, + kAdminPasscodeID = 2, + kChangeType = 3, + kLatestValue = 4, + kFabricIndex = 254, }; struct Type @@ -3580,9 +3605,9 @@ struct Type DataModel::Nullable adminPasscodeID; ChangeTypeEnum changeType = static_cast(0); DataModel::Nullable latestValue; - chip::FabricIndex adminFabricIndex = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); - auto GetFabricIndex() const { return adminFabricIndex; } + auto GetFabricIndex() const { return fabricIndex; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -3598,7 +3623,7 @@ struct DecodableType DataModel::Nullable adminPasscodeID; ChangeTypeEnum changeType = static_cast(0); DataModel::Nullable latestValue; - chip::FabricIndex adminFabricIndex = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -4812,6 +4837,7 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields { + kFabricIndex = 0, }; struct Type @@ -4822,6 +4848,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } static constexpr bool kIsFabricScoped = false; + chip::FabricIndex fabricIndex = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -4832,6 +4860,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::Leave::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } + chip::FabricIndex fabricIndex = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; } // namespace Leave @@ -11451,9 +11481,9 @@ struct TypeInfo namespace CurrentFabricIndex { struct TypeInfo { - using Type = chip::FabricIndex; - using DecodableType = chip::FabricIndex; - using DecodableArgType = chip::FabricIndex; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentFabricIndex::Id; } @@ -11504,7 +11534,7 @@ struct TypeInfo Attributes::SupportedFabrics::TypeInfo::DecodableType supportedFabrics = static_cast(0); Attributes::CommissionedFabrics::TypeInfo::DecodableType commissionedFabrics = static_cast(0); Attributes::TrustedRootCertificates::TypeInfo::DecodableType trustedRootCertificates; - Attributes::CurrentFabricIndex::TypeInfo::DecodableType currentFabricIndex = static_cast(0); + Attributes::CurrentFabricIndex::TypeInfo::DecodableType currentFabricIndex = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; @@ -22615,9 +22645,9 @@ struct TypeInfo namespace VendorID { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::VendorId; + using DecodableType = chip::VendorId; + using DecodableArgType = chip::VendorId; static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::VendorID::Id; } @@ -22738,7 +22768,7 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::VendorName::TypeInfo::DecodableType vendorName; - Attributes::VendorID::TypeInfo::DecodableType vendorID = static_cast(0); + Attributes::VendorID::TypeInfo::DecodableType vendorID = static_cast(0); Attributes::ApplicationName::TypeInfo::DecodableType applicationName; Attributes::ProductID::TypeInfo::DecodableType productID = static_cast(0); Attributes::Application::TypeInfo::DecodableType application; @@ -27747,7 +27777,7 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields { - kArg1 = 254, + kFabricIndex = 254, }; struct Type @@ -27758,9 +27788,9 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr bool kIsFabricScoped = true; - chip::FabricIndex arg1 = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); - auto GetFabricIndex() const { return arg1; } + auto GetFabricIndex() const { return fabricIndex; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -27772,7 +27802,7 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::TestFabricScopedEvent::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - chip::FabricIndex arg1 = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; diff --git a/zzz_generated/bridge-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/bridge-app/zap-generated/IMClusterCommandHandler.cpp index 93cd15f439ed14..198b5688cd957c 100644 --- a/zzz_generated/bridge-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/bridge-app/zap-generated/IMClusterCommandHandler.cpp @@ -99,6 +99,43 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace AdministratorCommissioning +namespace BridgedActions { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::InstantAction::Id: { + Commands::InstantAction::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterInstantActionCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace BridgedActions + namespace DiagnosticLogs { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -729,6 +766,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::AdministratorCommissioning::Id: Clusters::AdministratorCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::BridgedActions::Id: + Clusters::BridgedActions::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::DiagnosticLogs::Id: Clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/bridge-app/zap-generated/access.h b/zzz_generated/bridge-app/zap-generated/access.h index 3b7bef42840337..2cd7b17c69cd65 100644 --- a/zzz_generated/bridge-app/zap-generated/access.h +++ b/zzz_generated/bridge-app/zap-generated/access.h @@ -155,6 +155,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -185,6 +186,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -215,6 +217,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 2959aa6b9f8e48..e0ac99ebe511d2 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -38,6 +38,11 @@ \ /* 6 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Bridged Actions (server), big-endian */ \ + \ + /* 14 - setup url, */ \ + 19, 0, 'h', 't', 't', 'p', 's', ':', '/', '/', 'e', 'x', 'a', 'm', 'p', 'l', 'e', '.', 'c', 'o', 'm', \ } #else // !BIGENDIAN_CPU @@ -53,11 +58,16 @@ \ /* 6 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Bridged Actions (server), little-endian */ \ + \ + /* 14 - setup url, */ \ + 19, 0, 'h', 't', 't', 'p', 's', ':', '/', '/', 'e', 'x', 'a', 'm', 'p', 'l', 'e', '.', 'c', 'o', 'm', \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (2) +#define GENERATED_DEFAULTS_COUNT (3) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -78,19 +88,22 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 3 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* HourFormat */ \ \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ + \ /* Endpoint: 2, Cluster: Level Control (server) */ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 } /* options */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 240 +#define GENERATED_ATTRIBUTE_COUNT 241 #define GENERATED_ATTRIBUTES \ { \ \ @@ -180,8 +193,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -400,7 +414,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -439,6 +453,7 @@ /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* action list */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* endpoint list */ \ + { 0x00000002, ZAP_TYPE(LONG_CHAR_STRING), 514, 0, ZAP_LONG_DEFAULTS_INDEX(14) }, /* setup url */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -456,7 +471,7 @@ { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* options */ \ { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -600,14 +615,18 @@ 0x00000000 /* Identify */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 2, Cluster: On/Off (server) */\ + /* Endpoint: 1, Cluster: Bridged Actions (server) */\ /* AcceptedCommandList (index=57) */ \ + 0x00000000 /* InstantAction */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 2, Cluster: On/Off (server) */\ + /* AcceptedCommandList (index=59) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Level Control (server) */\ - /* AcceptedCommandList (index=61) */ \ + /* AcceptedCommandList (index=63) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -872,39 +891,39 @@ /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ .clusterId = 0x00000025, \ .attributes = ZAP_ATTRIBUTE_INDEX(206), \ - .attributeCount = 4, \ - .clusterSize = 6, \ + .attributeCount = 5, \ + .clusterSize = 520, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 57 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(210), \ + .attributes = ZAP_ATTRIBUTE_INDEX(211), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 57 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 59 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(213), \ + .attributes = ZAP_ATTRIBUTE_INDEX(214), \ .attributeCount = 16, \ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 63 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(229), \ + .attributes = ZAP_ATTRIBUTE_INDEX(230), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -915,7 +934,7 @@ { \ /* Endpoint: 2, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(235), \ + .attributes = ZAP_ATTRIBUTE_INDEX(236), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -934,11 +953,11 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 19, 230 }, { ZAP_CLUSTER_INDEX(19), 4, 21 }, { ZAP_CLUSTER_INDEX(23), 4, 47 }, \ + { ZAP_CLUSTER_INDEX(0), 19, 230 }, { ZAP_CLUSTER_INDEX(19), 4, 535 }, { ZAP_CLUSTER_INDEX(23), 4, 47 }, \ } // Largest attribute size is needed for various buffers -#define ATTRIBUTE_LARGEST (259) +#define ATTRIBUTE_LARGEST (515) static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, "ATTRIBUTE_LARGEST larger than expected"); @@ -946,7 +965,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (298) +#define ATTRIBUTE_MAX_SIZE (812) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h index b135c1cf912ca4..928e3f5cb34265 100644 --- a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h +++ b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h @@ -132,6 +132,7 @@ 48, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ 48, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ 48, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -163,6 +164,7 @@ 0, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ 2, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ 4, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -194,6 +196,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h index 6f1df065451ab7..d2cdcf6f8f4f20 100644 --- a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h @@ -382,7 +382,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/access.h b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h index 720d1f510d6ac8..bcc942c9abadf3 100644 --- a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h index a9d314afc37f8f..fe61bee35204cb 100644 --- a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h @@ -159,6 +159,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -196,6 +197,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -233,6 +235,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h index 021eb8abc20846..7badcd7019d4dd 100644 --- a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h @@ -394,7 +394,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/access.h b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h index 4e01a3f3e186d1..91350e91ff9f31 100644 --- a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/access.h b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/access.h index 39daac3ddc525c..31a70e8e64e917 100644 --- a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/access.h @@ -147,6 +147,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -184,6 +185,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -221,6 +223,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h index 7915e261cd5d6d..7e8552964f48e3 100644 --- a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h @@ -397,7 +397,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/access.h b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h index 01a76aa0e643da..b3758058fd10cf 100644 --- a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/access.h b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h index 34697a561e01d5..237b41ab14f7f9 100644 --- a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/access.h b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h index 9c0cede84b8154..777e3e925bb60f 100644 --- a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/access.h b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/access.h index a9d314afc37f8f..fe61bee35204cb 100644 --- a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/access.h @@ -159,6 +159,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -196,6 +197,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -233,6 +235,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h index 17e77f9a6c34ad..80ac5467089dad 100644 --- a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h @@ -394,7 +394,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/access.h b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/access.h index 39daac3ddc525c..31a70e8e64e917 100644 --- a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/access.h @@ -147,6 +147,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -184,6 +185,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -221,6 +223,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h index 777c9b1217935a..b6c18a45f323e5 100644 --- a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/access.h b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/access.h index 201090c0eb5788..2c9812a8f49b3e 100644 --- a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/access.h @@ -153,6 +153,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -190,6 +191,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -227,6 +229,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h index 4e06d72cd55ee4..bbe523e4b88f85 100644 --- a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/access.h b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h index b8b1bf0427bff6..dc52e758ac44de 100644 --- a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/access.h b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h index 3b140fa88a0aa9..4d8abdc6628cae 100644 --- a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/access.h b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h index 22a567ed0e9fd2..9b53c9f83db383 100644 --- a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/access.h b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/access.h index b6d1c0dc3d2a25..8b27d8c078d2a7 100644 --- a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/access.h @@ -213,6 +213,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -250,6 +251,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -287,6 +289,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h index 9d7c4c63106df6..bebb2854973bb1 100644 --- a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h @@ -411,7 +411,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/access.h b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/access.h index 1343f78a42214e..8acaa6904b52d1 100644 --- a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/access.h @@ -153,6 +153,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -190,6 +191,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -227,6 +229,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h index 4bc1ccb9e3ef03..a0233a76958356 100644 --- a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 2bbbd0fdd8a949..6082f3ca63c80f 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -1018,8 +1018,8 @@ class LevelControlMoveToLevel : public ClusterCommand { AddArgument("Level", 0, UINT8_MAX, &mRequest.level); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1051,8 +1051,8 @@ class LevelControlMove : public ClusterCommand { AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1085,8 +1085,8 @@ class LevelControlStep : public ClusterCommand AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1116,8 +1116,8 @@ class LevelControlStop : public ClusterCommand public: LevelControlStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) { - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1150,6 +1150,8 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand { AddArgument("Level", 0, UINT8_MAX, &mRequest.level); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1181,6 +1183,8 @@ class LevelControlMoveWithOnOff : public ClusterCommand { AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1213,6 +1217,8 @@ class LevelControlStepWithOnOff : public ClusterCommand AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1242,6 +1248,8 @@ class LevelControlStopWithOnOff : public ClusterCommand public: LevelControlStopWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-with-on-off", credsIssuerConfig) { + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index dd46baf9a08ba2..56946e74d7efe5 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -2382,10 +2382,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = DataModelLogger::LogValue("AdminFabricIndex", indent + 1, value.adminFabricIndex); + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AdminFabricIndex'"); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); return err; } } @@ -2430,10 +2430,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = DataModelLogger::LogValue("AdminFabricIndex", indent + 1, value.adminFabricIndex); + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AdminFabricIndex'"); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); return err; } } @@ -2538,6 +2538,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Ba CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Basic::Events::Leave::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -3454,10 +3462,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Arg1", indent + 1, value.arg1); + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg1'"); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); return err; } } @@ -6273,7 +6281,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("TrustedRootCertificates", 1, value); } case OperationalCredentials::Attributes::CurrentFabricIndex::Id: { - chip::FabricIndex value; + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CurrentFabricIndex", 1, value); } @@ -8706,7 +8714,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("VendorName", 1, value); } case ApplicationBasic::Attributes::VendorID::Id: { - uint16_t value; + chip::VendorId value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("VendorID", 1, value); } @@ -10329,26 +10337,26 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip ChipLogProgress(chipTool, "Endpoint: %u Cluster: " ChipLogFormatMEI " Event " ChipLogFormatMEI, header.mPath.mEndpointId, ChipLogValueMEI(header.mPath.mClusterId), ChipLogValueMEI(header.mPath.mEventId)); - ChipLogProgress(chipTool, "\t Event number: %" PRIu64, header.mEventNumber); + ChipLogProgress(chipTool, " Event number: %" PRIu64, header.mEventNumber); if (header.mPriorityLevel == chip::app::PriorityLevel::Info) { - ChipLogProgress(chipTool, "\t Priority: Info"); + ChipLogProgress(chipTool, " Priority: Info"); } else if (header.mPriorityLevel == chip::app::PriorityLevel::Critical) { - ChipLogProgress(chipTool, "\t Priority: Critical"); + ChipLogProgress(chipTool, " Priority: Critical"); } else if (header.mPriorityLevel == chip::app::PriorityLevel::Debug) { - ChipLogProgress(chipTool, "\t Priority: Debug"); + ChipLogProgress(chipTool, " Priority: Debug"); } else { - ChipLogProgress(chipTool, "\t Priority: Unknown"); + ChipLogProgress(chipTool, " Priority: Unknown"); } - ChipLogProgress(chipTool, "\t Timestamp: %" PRIu64, header.mTimestamp.mValue); + ChipLogProgress(chipTool, " Timestamp: %" PRIu64, header.mTimestamp.mValue); switch (header.mPath.mClusterId) { diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index ce57b4dc6da4bf..3096464c7ce996 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -40,7 +40,6 @@ class TestList : public Command printf("Test_TC_ACT_1_1\n"); printf("Test_TC_CC_1_1\n"); printf("Test_TC_CC_2_1\n"); - printf("Test_TC_CC_3_1\n"); printf("Test_TC_CC_3_2\n"); printf("Test_TC_CC_3_3\n"); printf("Test_TC_CC_4_1\n"); @@ -53,7 +52,6 @@ class TestList : public Command 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_7_1\n"); printf("Test_TC_CC_7_2\n"); printf("Test_TC_CC_7_3\n"); printf("Test_TC_CC_7_4\n"); @@ -138,6 +136,7 @@ class TestList : public Command printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); printf("Test_TC_SC_4_2\n"); + printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); @@ -210,6 +209,7 @@ class TestList : public Command printf("TestArmFailSafe\n"); printf("TestFanControl\n"); printf("TestAccessControlConstraints\n"); + printf("TestLevelControlWithOnOffDependency\n"); printf("TestMultiAdmin\n"); printf("Test_TC_DGSW_2_1\n"); printf("Test_TC_DGSW_2_2\n"); @@ -271,6 +271,7 @@ class ManualTestList : public Command 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_1_1\n"); @@ -315,8 +316,6 @@ class ManualTestList : public Command 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_7\n"); - printf("Test_TC_CNET_4_8\n"); printf("Test_TC_CNET_4_9\n"); printf("Test_TC_CNET_4_10\n"); printf("Test_TC_CNET_4_11\n"); @@ -341,7 +340,6 @@ class ManualTestList : public Command printf("Test_TC_DGETH_3_1\n"); printf("Test_TC_DGETH_3_2\n"); printf("Test_TC_CGEN_2_2\n"); - printf("Test_TC_CGEN_2_3\n"); printf("Test_TC_CGEN_2_4\n"); printf("Test_TC_DGGEN_2_2\n"); printf("Test_TC_DGGEN_2_3\n"); @@ -407,8 +405,6 @@ class ManualTestList : public Command 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_23\n"); - printf("Test_TC_CADMIN_1_24\n"); printf("Test_TC_CADMIN_1_3\n"); printf("Test_TC_CADMIN_1_4\n"); printf("Test_TC_CADMIN_1_5\n"); @@ -416,8 +412,8 @@ class ManualTestList : public Command 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_25\n"); - printf("Test_TC_CADMIN_1_26\n"); + printf("Test_TC_CADMIN_1_23\n"); + printf("Test_TC_CADMIN_1_24\n"); printf("Test_TC_MOD_1_2\n"); printf("Test_TC_MOD_1_3\n"); printf("Test_TC_MOD_2_1\n"); @@ -494,6 +490,8 @@ class ManualTestList : public Command printf("Test_TC_CC_6_4\n"); printf("Test_TC_CC_7_5\n"); printf("Test_TC_CC_9_4\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"); @@ -516,7 +514,6 @@ class ManualTestList : public Command printf("Test_TC_OO_3_2\n"); printf("Test_TC_RH_2_2\n"); printf("Test_TC_RH_3_1\n"); - printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_2\n"); printf("Test_TC_SWTCH_3_1\n"); printf("Test_TC_SWTCH_3_2\n"); @@ -1920,7 +1917,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -1929,7 +1926,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -1937,7 +1934,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); @@ -1955,7 +1952,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -1967,7 +1964,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -2082,7 +2079,7 @@ class Test_TC_BOOL_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; default: @@ -2164,7 +2161,7 @@ class Test_TC_ACT_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -2173,7 +2170,7 @@ class Test_TC_ACT_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -2181,10 +2178,9 @@ class Test_TC_ACT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 4: @@ -2192,9 +2188,10 @@ class Test_TC_ACT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 5: @@ -2202,11 +2199,8 @@ class Test_TC_ACT_1_1Suite : public TestCommand { 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")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 11)); } break; case 6: @@ -2218,7 +2212,7 @@ class Test_TC_ACT_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -2259,13 +2253,12 @@ class Test_TC_ACT_1_1Suite : public TestCommand } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("ACT.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BridgedActions::Id, BridgedActions::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip(" !ACT.S.A0002 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Read the optional attribute(SetupURL) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACT.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BridgedActions::Id, BridgedActions::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -2298,7 +2291,7 @@ class Test_TC_ACT_1_1Suite : public TestCommand class Test_TC_CC_1_1Suite : public TestCommand { public: - Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 15, credsIssuerConfig) + Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -2341,7 +2334,7 @@ class Test_TC_CC_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -2349,7 +2342,7 @@ class Test_TC_CC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 31UL)); } @@ -2359,7 +2352,7 @@ class Test_TC_CC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); VerifyOrReturn(CheckConstraintContains("value", value, 16385UL)); @@ -2372,93 +2365,14 @@ class Test_TC_CC_1_1Suite : public TestCommand } 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("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")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16395UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16396UL)); - } - 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 16397UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16400UL)); - } - 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")); - 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 16386UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16388UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16389UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16390UL)); - } - 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")); - } - 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")); - } - 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")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 13: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2467,10 +2381,10 @@ class Test_TC_CC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 14: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -2514,65 +2428,17 @@ class Test_TC_CC_1_1Suite : public TestCommand true, chip::NullOptional); } case 4: { - LogStep(4, "Read the feature dependent attribute(CC.S.F00) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the feature dependent attribute(CC.S.F03) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the feature dependent attribute(CC.S.F04) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read the feature dependent attribute(CC.S.F04) or ColorTemperatureMireds in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the feature dependent attribute(CC.S.F01) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read the feature dependent attribute(CC.S.F02) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read the feature dependent attribute(CC.S.F00) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "Read the feature dependent attribute(CC.S.F00) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Read the global attribute: AcceptedCommandList"); + LogStep(4, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Read the global attribute: GeneratedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, + case 6: { + LogStep(6, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -2634,7 +2500,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -2644,7 +2510,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -2654,7 +2520,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -2664,7 +2530,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2674,7 +2540,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2684,7 +2550,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); } @@ -2694,8 +2560,8 @@ class Test_TC_CC_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 254)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 254)); } break; case 8: @@ -2703,7 +2569,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2713,7 +2579,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } @@ -2723,7 +2589,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bitmap8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); } @@ -2733,7 +2599,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -2743,7 +2609,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -2753,7 +2619,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -2763,7 +2629,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -2773,7 +2639,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -2783,7 +2649,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -2793,7 +2659,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -2812,7 +2678,7 @@ class Test_TC_CC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorCapabilities", value, FeatureMapValue)); - VerifyOrReturn(CheckConstraintType("value", "", "map16")); + VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 31U)); } @@ -2822,7 +2688,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2832,7 +2698,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2842,7 +2708,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2852,7 +2718,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2862,197 +2728,89 @@ class Test_TC_CC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + 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)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + 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(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; 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", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } + 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(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + 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(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; 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", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } + 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(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; break; case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + 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(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; break; case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } + shouldContinue = true; break; case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; break; case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; 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(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } + 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(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + 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(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; 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(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -3062,7 +2820,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -3072,7 +2830,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -3082,7 +2840,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -3092,7 +2850,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -3102,7 +2860,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -3112,7 +2870,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -3122,7 +2880,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -3132,7 +2890,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -3142,7 +2900,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -3152,7 +2910,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -3181,13 +2939,13 @@ class Test_TC_CC_2_1Suite : public TestCommand } case 1: { LogStep(1, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } @@ -3199,13 +2957,13 @@ class Test_TC_CC_2_1Suite : public TestCommand } case 4: { LogStep(4, "TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } @@ -3223,7 +2981,7 @@ class Test_TC_CC_2_1Suite : public TestCommand } case 8: { LogStep(8, "TH reads ColorTemperatureMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -3241,43 +2999,43 @@ class Test_TC_CC_2_1Suite : public TestCommand } case 11: { LogStep(11, "TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, true, chip::NullOptional); } case 13: { LogStep(13, "TH reads ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "TH reads ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4003 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "TH reads ColorLoopTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4004 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "TH reads ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "TH reads ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } @@ -3294,25 +3052,25 @@ class Test_TC_CC_2_1Suite : public TestCommand } case 20: { LogStep(20, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A400b && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "TH reads ColorTempPhysicalMaxMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A400c && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "TH reads CoupleColorTempToLevelMinMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A400d && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "TH reads StartUpColorTemperatureMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4010 && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::StartUpColorTemperatureMireds::Id, true, chip::NullOptional); } @@ -3323,112 +3081,220 @@ class Test_TC_CC_2_1Suite : public TestCommand true, chip::NullOptional); } case 25: { - LogStep(25, "TH reads Primary1X attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1X::Id, true, - chip::NullOptional); + LogStep(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, "TH reads Primary1Y attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1Y::Id, true, - chip::NullOptional); + LogStep(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, "TH reads Primary1Intensity attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1Intensity::Id, - true, chip::NullOptional); + LogStep(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, "TH reads Primary2X attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2X::Id, true, - chip::NullOptional); + LogStep(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, "TH reads Primary2Y attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2Y::Id, true, - chip::NullOptional); + LogStep(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, "TH reads Primary2Intensity attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2Intensity::Id, - true, chip::NullOptional); + LogStep(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, "TH reads Primary3X attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3X::Id, true, - chip::NullOptional); + LogStep(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, "TH reads Primary3Y attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3Y::Id, true, - chip::NullOptional); + LogStep(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, "TH reads Primary3Intensity attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3Intensity::Id, - true, chip::NullOptional); + LogStep(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, "TH reads Primary4X attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4X::Id, true, - chip::NullOptional); + LogStep(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, "TH reads Primary4Y attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4Y::Id, true, - chip::NullOptional); + LogStep(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, "TH reads Primary4Intensity attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4Intensity::Id, - true, chip::NullOptional); + LogStep(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, "TH reads Primary5X attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5X::Id, true, - chip::NullOptional); + LogStep(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, "TH reads Primary5Y attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5Y::Id, true, - chip::NullOptional); + LogStep(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, "TH reads Primary5Intensity attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5Intensity::Id, - true, chip::NullOptional); + LogStep(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, "TH reads Primary6X attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6X::Id, true, - chip::NullOptional); + LogStep(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, "TH reads Primary6Y attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6Y::Id, true, - chip::NullOptional); + LogStep(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, "TH reads Primary6Intensity attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6Intensity::Id, - true, chip::NullOptional); + LogStep(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, "TH reads WhitePointX attribute from DUT"); @@ -3501,18 +3367,19 @@ class Test_TC_CC_2_1Suite : public TestCommand } }; -class Test_TC_CC_3_1Suite : public TestCommand +class Test_TC_CC_3_2Suite : public TestCommand { public: - Test_TC_CC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_1", 34, credsIssuerConfig) + 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("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_3_1Suite() {} + ~Test_TC_CC_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -3523,8 +3390,12 @@ class Test_TC_CC_3_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; + uint8_t CurrentHueValue; + uint8_t CurrentHueValueAfterStopmode; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -3553,199 +3424,172 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + CurrentHueValue = value; } break; - case 16: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValue)); } break; - case 18: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 21: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 23: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 24: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } 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: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } break; - case 28: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 29: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + CurrentHueValueAfterStopmode = value; } break; - case 30: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 31: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValueAfterStopmode)); } break; - case 32: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 33: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -3788,237 +3632,216 @@ class Test_TC_CC_3_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "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 4: { - LogStep(4, "Move to hue shortest distance command"); - VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "TH sends MoveHue command to DUT with MoveMode Up"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 150U; - value.direction = static_cast(0); - value.transitionTime = 300U; + chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; + value.moveMode = static_cast(1); + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, chip::NullOptional ); } - case 5: { - LogStep(5, "Wait 290ms"); + case 6: { + LogStep(6, "Wait 3000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; + value.ms = 3000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && 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 7: { - LogStep(7, "Wait 295ms"); + case 8: { + LogStep(8, "Wait 2000"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; + value.ms = 2000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && 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 300ms"); + case 10: { + LogStep(10, "Wait 3000"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 3000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && 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, "Move to hue longest distance command"); - VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "TH sends MoveHue command to DUT with MoveMode Stop"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 200U; - value.direction = static_cast(1); - value.transitionTime = 300U; + chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; + value.moveMode = static_cast(0); + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, chip::NullOptional ); } - case 12: { - LogStep(12, "Wait 290ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; - return WaitForMs(kIdentityAlpha, value); - } case 13: { - LogStep(13, "Check current hue attribute value matched the value sent by the last command"); - 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 14: { - LogStep(14, "Wait 295ms"); + LogStep(13, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 14: { + LogStep(14, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && 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 16: { - LogStep(16, "Wait 300ms"); + case 15: { + LogStep(15, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && 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 18: { - LogStep(18, "Move to hue up command"); - VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 17: { + LogStep(17, "TH sends MoveHue command to DUT with MoveMode Down"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 250U; - value.direction = static_cast(2); - value.transitionTime = 300U; + chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; + value.moveMode = static_cast(3); + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, chip::NullOptional ); } - case 19: { - LogStep(19, "Wait 290ms"); + case 18: { + LogStep(18, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && 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 21: { - LogStep(21, "Wait 295ms"); + case 20: { + LogStep(20, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && 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 23: { - LogStep(23, "Wait 300ms"); + case 22: { + LogStep(22, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 23: { + LogStep(23, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && 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 25: { - LogStep(25, "Move to hue down command"); - VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "TH sends MoveHue command to DUT with MoveMode Stop"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 225U; - value.direction = static_cast(3); - value.transitionTime = 300U; + chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; + value.moveMode = static_cast(0); + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, chip::NullOptional ); } - case 26: { - LogStep(26, "Wait 290ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; - return WaitForMs(kIdentityAlpha, value); - } - case 27: { - LogStep(27, "Check current hue attribute value matched the value sent by the last command"); - 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 28: { - LogStep(28, "Wait 295ms"); + case 25: { + LogStep(25, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && 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 30: { - LogStep(30, "Wait 300ms"); + case 27: { + LogStep(27, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && 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 32: { - LogStep(32, "Turn off light that we turned on"); + case 29: { + LogStep(29, "Turn off light that we turned on"); 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"); + 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); } } @@ -4026,18 +3849,19 @@ class Test_TC_CC_3_1Suite : public TestCommand } }; -class Test_TC_CC_3_2Suite : public TestCommand +class Test_TC_CC_3_3Suite : public TestCommand { public: - Test_TC_CC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_2", 34, credsIssuerConfig) + Test_TC_CC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_3", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_3_2Suite() {} + ~Test_TC_CC_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -4048,6 +3872,7 @@ class Test_TC_CC_3_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4078,45 +3903,37 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -4127,150 +3944,15 @@ class Test_TC_CC_3_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 249U)); } 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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; @@ -4313,421 +3995,55 @@ class Test_TC_CC_3_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "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 4: { - LogStep(4, "Move hue up command"); - VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "TH sends StepHue command to DUT with StepMode Up"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; - value.moveMode = static_cast(1); - value.rate = 50U; + chip::app::Clusters::ColorControl::Commands::StepHue::Type value; + value.stepMode = static_cast(1); + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 5U; + value.transitionTime = 5U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id, value, chip::NullOptional ); } - case 5: { - LogStep(5, "Wait 140ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 140UL; - return WaitForMs(kIdentityAlpha, value); - } case 6: { - LogStep(6, "Check current hue attribute value matched the value sent by the last command"); - 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 7: { - LogStep(7, "Wait 145ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 145UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Check current hue attribute value matched the value sent by the last command"); - 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 9: { - LogStep(9, "Wait 150ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 150UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Check current hue attribute value matched the value sent by the last command"); - 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 11: { - LogStep(11, "Move hue stop command"); - 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(0); - value.rate = 50U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Wait 140ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 140UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Check current hue attribute value matched the value sent by the last command"); - 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 14: { - LogStep(14, "Wait 145ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 145UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Check current hue attribute value matched the value sent by the last command"); - 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 16: { - LogStep(16, "Wait 150ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 150UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Check current hue attribute value matched the value sent by the last command"); - 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 18: { - LogStep(18, "Move hue down command"); - 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(3); - value.rate = 50U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, - chip::NullOptional - - ); - } - case 19: { - LogStep(19, "Wait 140ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 140UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Check current hue attribute value matched the value sent by the last command"); - 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 21: { - LogStep(21, "Wait 145ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 145UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "Check current hue attribute value matched the value sent by the last command"); - 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 23: { - LogStep(23, "Wait 150ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 150UL; - return WaitForMs(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Check current hue attribute value matched the value sent by the last command"); - 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 25: { - LogStep(25, "Move hue stop command"); - 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(0); - value.rate = 50U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Wait 140ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 140UL; - return WaitForMs(kIdentityAlpha, value); - } - case 27: { - LogStep(27, "Check current hue attribute value matched the value sent by the last command"); - 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 28: { - LogStep(28, "Wait 145ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 145UL; - return WaitForMs(kIdentityAlpha, value); - } - case 29: { - LogStep(29, "Check current hue attribute value matched the value sent by the last command"); - 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 30: { - LogStep(30, "Wait 150ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 150UL; - return WaitForMs(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Check current hue attribute value matched the value sent by the last command"); - 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 32: { - LogStep(32, "Turn off light that we turned on"); - 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"); - 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", 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_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)); - { - 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 249U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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, 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, "Turn on light for color control tests"); - 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"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "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 4: { - LogStep(4, "Step hue up command"); - VerifyOrDo(!ShouldSkip("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 = 5U; - value.transitionTime = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Wait 1000ms"); + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Over TransitionTime,Read CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Step hue down command"); - VerifyOrDo(!ShouldSkip("CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "TH sends StepHue command to DUT with StepMode Down"); + 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 = 5U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 5U; value.transitionTime = 5U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -4736,29 +4052,29 @@ class Test_TC_CC_3_3Suite : public TestCommand ); } - case 8: { - LogStep(8, "Wait 1000ms"); + case 9: { + LogStep(9, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Over TransitionTime,Read CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Turn off light that we turned on"); + case 11: { + LogStep(11, "Turn off light that we turned on"); 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, "Check on/off attribute value is false after off command"); + case 12: { + LogStep(12, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -4769,11 +4085,12 @@ class Test_TC_CC_3_3Suite : public TestCommand class Test_TC_CC_4_1Suite : public TestCommand { public: - Test_TC_CC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_1", 13, credsIssuerConfig) + Test_TC_CC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_1", 10, 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); } @@ -4788,6 +4105,7 @@ class Test_TC_CC_4_1Suite : public TestCommand 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; } @@ -4819,63 +4137,40 @@ class Test_TC_CC_4_1Suite : public TestCommand 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", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } 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(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: + 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", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } break; - case 9: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckValue("currentSaturation", value, + mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 11: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -4918,17 +4213,26 @@ class Test_TC_CC_4_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Check Saturation attribute value matched before any change"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "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 4: { - LogStep(4, "Move to saturation command"); - VerifyOrDo(!ShouldSkip("CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "TH sends MoveToSaturation command to DUT"); + 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 = 90U; + value.saturation = mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -4937,55 +4241,29 @@ class Test_TC_CC_4_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 6ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 6UL; - return WaitForMs(kIdentityAlpha, value); - } case 6: { - LogStep(6, "Check current saturation attribute value matched the value sent by the last command"); - 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 7: { - LogStep(7, "Wait 8ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 8UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Check current saturation attribute value matched the value sent by the last command"); - 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 9: { - LogStep(9, "Wait 10ms"); + LogStep(6, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; + value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Turn off light that we turned on"); + case 8: { + LogStep(8, "Turn off light that we turned on"); 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 12: { - LogStep(12, "Check on/off attribute value is false after off command"); + case 9: { + LogStep(9, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -4996,11 +4274,12 @@ class Test_TC_CC_4_1Suite : public TestCommand class Test_TC_CC_4_2Suite : public TestCommand { public: - Test_TC_CC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_2", 48, credsIssuerConfig) + Test_TC_CC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_2", 39, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5015,8 +4294,13 @@ class Test_TC_CC_4_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; + uint8_t CurrentSaturationStep4d; + uint8_t CurrentSaturationStep5b; + uint8_t CurrentSaturationStep5d; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -5045,135 +4329,127 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } break; case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -5184,28 +4460,27 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + CurrentSaturationStep4d = 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)); shouldContinue = true; break; - case 27: + 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", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationStep4d)); } 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; @@ -5215,9 +4490,10 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + CurrentSaturationStep5b = value; } break; case 30: @@ -5229,9 +4505,9 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, CurrentSaturationStep5b)); } break; case 32: @@ -5246,9 +4522,10 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + CurrentSaturationStep5d = value; } break; case 35: @@ -5260,79 +4537,18 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationStep5d)); } 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)); { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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)); - { - uint8_t value; + bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); + VerifyOrReturn(CheckValue("onOff", value, 0)); } break; default: @@ -5370,18 +4586,27 @@ class Test_TC_CC_4_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Check Saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "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 4: { - LogStep(4, "Move saturation up command"); - VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "TH sends MoveSaturation command to DUT with MoveMode Up"); + 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.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -5389,52 +4614,52 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 40ms"); + case 6: { + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "TH reads CurrentSaturation attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 45ms"); + case 8: { + LogStep(8, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "TH reads CurrentSaturation attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 50ms"); + case 10: { + LogStep(10, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "TH reads CurrentSaturation attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Move saturation down command"); - VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "TH sends MoveSaturation command to DUT with MoveMode Down"); + 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.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -5442,52 +4667,52 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 40ms"); + case 13: { + LogStep(13, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 14: { + LogStep(14, "TH reads CurrentSaturation attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Wait 45ms"); + case 15: { + LogStep(15, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "TH reads CurrentSaturation attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 50ms"); + case 17: { + LogStep(17, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "TH reads CurrentSaturation attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Move saturation up command"); - VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "TH sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed Saturation"); + 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.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -5495,52 +4720,26 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 19: { - LogStep(19, "Wait 40ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; - return WaitForMs(kIdentityAlpha, value); - } case 20: { - LogStep(20, "Check current saturation attribute value matched the value sent by the last command"); - 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 21: { - LogStep(21, "Wait 45ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "Check current saturation attribute value matched the value sent by the last command"); - 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 23: { - LogStep(23, "Wait 50ms"); + LogStep(20, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Move saturation stop command"); - VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the Maximum allowed."); + 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.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -5548,52 +4747,39 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 26: { - LogStep(26, "Wait 40ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; - return WaitForMs(kIdentityAlpha, value); - } - case 27: { - LogStep(27, "Check current saturation attribute value matched the value sent by the last command"); - 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 28: { - LogStep(28, "Wait 45ms"); + case 23: { + LogStep(23, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "TH reads CurrentSaturation attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Wait 50ms"); + case 25: { + LogStep(25, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "CurrentSaturation value Stops incrementing"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Move saturation down command"); - VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed Saturation"); + 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.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -5601,52 +4787,39 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 33: { - LogStep(33, "Wait 40ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; - return WaitForMs(kIdentityAlpha, value); - } - case 34: { - LogStep(34, "Check current saturation attribute value matched the value sent by the last command"); - 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 35: { - LogStep(35, "Wait 45ms"); + case 28: { + LogStep(28, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 36: { - LogStep(36, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "TH reads CurrentSaturation attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "Wait 50ms"); + case 30: { + LogStep(30, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 38: { - LogStep(38, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 31: { + LogStep(31, "TH reads CurrentSaturation attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "Move saturation stop command"); - VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 32: { + LogStep(32, "TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the Minimum allowed"); + 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.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -5654,55 +4827,42 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 40: { - LogStep(40, "Wait 40ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; - return WaitForMs(kIdentityAlpha, value); - } - case 41: { - LogStep(41, "Check current saturation attribute value matched the value sent by the last command"); - 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 42: { - LogStep(42, "Wait 45ms"); + case 33: { + LogStep(33, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 43: { - LogStep(43, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 34: { + LogStep(34, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 44: { - LogStep(44, "Wait 50ms"); + case 35: { + LogStep(35, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 45: { - LogStep(45, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "CurrentSaturation value Stops decrementing"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 46: { - LogStep(46, "Turn off light that we turned on"); + case 37: { + LogStep(37, "Turn off light that we turned on"); 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 47: { - LogStep(47, "Check on/off attribute value is false after off command"); + case 38: { + LogStep(38, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -5713,11 +4873,12 @@ class Test_TC_CC_4_2Suite : public TestCommand class Test_TC_CC_4_3Suite : public TestCommand { public: - Test_TC_CC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_3", 12, credsIssuerConfig) + Test_TC_CC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_3", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5732,6 +4893,7 @@ class Test_TC_CC_4_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -5762,53 +4924,56 @@ class Test_TC_CC_4_3Suite : public TestCommand } 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5851,18 +5016,27 @@ class Test_TC_CC_4_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "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 4: { - LogStep(4, "Step saturation up command"); - VerifyOrDo(!ShouldSkip("CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "TH sends StepSaturation command to DUT with StepMode Up"); + 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 = 15U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 15U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -5871,26 +5045,26 @@ class Test_TC_CC_4_3Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 10ms"); + case 6: { + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Over TransitionTime,Read CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Over TransitionTime,TH read CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Step saturation down command"); - VerifyOrDo(!ShouldSkip("CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "TH sends StepSaturation command to DUT with StepMode Down"); + 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.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 15U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -5899,29 +5073,29 @@ class Test_TC_CC_4_3Suite : public TestCommand ); } - case 8: { - LogStep(8, "Wait 10ms"); + case 9: { + LogStep(9, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Over TransitionTime,Reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Over TransitionTime,TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Turn off light that we turned on"); + case 11: { + LogStep(11, "Turn off light that we turned on"); 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, "Check on/off attribute value is false after off command"); + case 12: { + LogStep(12, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -5932,11 +5106,13 @@ class Test_TC_CC_4_3Suite : public TestCommand class Test_TC_CC_4_4Suite : public TestCommand { public: - Test_TC_CC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_4", 11, credsIssuerConfig) + Test_TC_CC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_4", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("hueConfigValue", 0, UINT8_MAX, &mHueConfigValue); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5951,6 +5127,8 @@ class Test_TC_CC_4_4Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mHueConfigValue; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -5981,56 +5159,62 @@ class Test_TC_CC_4_4Suite : public TestCommand } 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckValue("currentHue", value, mHueConfigValue.HasValue() ? mHueConfigValue.Value() : 40U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 8: + 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", "", "uint8")); + VerifyOrReturn(CheckValue("currentSaturation", value, + mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 160U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -6073,24 +5257,33 @@ class Test_TC_CC_4_4Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Check current hue attribute value matched before any change"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "TH reads CurrentHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Check Saturation attribute value matched before any change"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "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 5: { - LogStep(5, "Move To current hue and saturation command"); - VerifyOrDo(!ShouldSkip("CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "TH sends MoveToHueAndSaturation command to DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type value; - value.hue = 40U; - value.saturation = 160U; + value.hue = mHueConfigValue.HasValue() ? mHueConfigValue.Value() : 40U; + value.saturation = mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 160U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -6099,35 +5292,35 @@ class Test_TC_CC_4_4Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 10ms"); + case 7: { + LogStep(7, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; + value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && 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 8: { - LogStep(8, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Turn off light that we turned on"); + case 10: { + LogStep(10, "Turn off light that we turned on"); 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, "Check on/off attribute value is false after off command"); + case 11: { + LogStep(11, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -6138,11 +5331,13 @@ class Test_TC_CC_4_4Suite : public TestCommand class Test_TC_CC_5_1Suite : public TestCommand { public: - Test_TC_CC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_1", 11, credsIssuerConfig) + Test_TC_CC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("colorXConfigValue", 0, UINT16_MAX, &mColorXConfigValue); + AddArgument("colorYConfigValue", 0, UINT16_MAX, &mColorYConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -6157,6 +5352,8 @@ class Test_TC_CC_5_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mColorXConfigValue; + chip::Optional mColorYConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -6187,56 +5384,61 @@ class Test_TC_CC_5_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 4: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + 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", "", "uint16")); + VerifyOrReturn(CheckValue("currentX", value, mColorXConfigValue.HasValue() ? mColorXConfigValue.Value() : 400U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 8: + 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", "", "uint16")); + VerifyOrReturn(CheckValue("currentY", value, mColorYConfigValue.HasValue() ? mColorYConfigValue.Value() : 500U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -6279,25 +5481,34 @@ class Test_TC_CC_5_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Check current x attribute value matched before any change"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "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 4: { - LogStep(4, "Check current y attribute value matched before any change"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "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 5: { - LogStep(5, "Move to Color command"); - VerifyOrDo(!ShouldSkip("CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "TH sends MoveToColor command to DUT"); + 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 = 200U; - value.colorY = 300U; - value.transitionTime = 20U; + value.colorX = mColorXConfigValue.HasValue() ? mColorXConfigValue.Value() : 400U; + value.colorY = mColorYConfigValue.HasValue() ? mColorYConfigValue.Value() : 500U; + value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, @@ -6305,35 +5516,35 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 20ms"); + case 7: { + LogStep(7, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 20UL; + value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Check current x attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Over TransitionTime, 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 8: { - LogStep(8, "Check current y attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Over TransitionTime, 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 9: { - LogStep(9, "Turn off light that we turned on"); + case 10: { + LogStep(10, "Turn off light that we turned on"); 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, "Check on/off attribute value is false after off command"); + case 11: { + LogStep(11, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -6344,11 +5555,13 @@ class Test_TC_CC_5_1Suite : public TestCommand class Test_TC_CC_5_2Suite : public TestCommand { public: - Test_TC_CC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_2", 14, credsIssuerConfig) + Test_TC_CC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_2", 15, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateXValue", INT16_MIN, INT16_MAX, &mRateXValue); + AddArgument("RateYValue", INT16_MIN, INT16_MAX, &mRateYValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -6363,8 +5576,15 @@ class Test_TC_CC_5_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateXValue; + chip::Optional mRateYValue; chip::Optional mTimeout; + uint16_t CurrentXValue; + uint16_t CurrentYValue; + uint16_t CurrentXBeforeStopCommand; + uint16_t CurrentYBeforeStopCommand; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -6393,79 +5613,86 @@ class Test_TC_CC_5_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentXValue = value; } break; - case 4: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentYValue = value; } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentXValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentXBeforeStopCommand = value; } break; - case 8: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentYValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentYBeforeStopCommand = value; } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentXBeforeStopCommand)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 11: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentYBeforeStopCommand)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -6508,24 +5735,33 @@ class Test_TC_CC_5_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Check current x attribute value matched before any change"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "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 4: { - LogStep(4, "Check current y attribute value matched before any change"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "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 5: { - LogStep(5, "Move Color command"); - VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "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 = 15; - value.rateY = 20; + value.rateX = mRateXValue.HasValue() ? mRateXValue.Value() : 50; + value.rateY = mRateYValue.HasValue() ? mRateYValue.Value() : 50; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id, value, @@ -6533,28 +5769,28 @@ class Test_TC_CC_5_2Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 150ms"); + case 7: { + LogStep(7, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 150UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Check current x attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "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, "Check current y attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "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, "Stop Move Step command"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "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; @@ -6564,28 +5800,28 @@ class Test_TC_CC_5_2Suite : public TestCommand ); } - case 10: { - LogStep(10, "Check current x attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Check current y attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Turn off light that we turned on"); + case 13: { + LogStep(13, "Turn off light that we turned on"); 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 13: { - LogStep(13, "Check on/off attribute value is false after off command"); + case 14: { + LogStep(14, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -6596,11 +5832,13 @@ class Test_TC_CC_5_2Suite : public TestCommand class Test_TC_CC_5_3Suite : public TestCommand { public: - Test_TC_CC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_3", 11, credsIssuerConfig) + Test_TC_CC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_3", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepXConfigValue", INT16_MIN, INT16_MAX, &mStepXConfigValue); + AddArgument("StepYConfigValue", INT16_MIN, INT16_MAX, &mStepYConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -6615,8 +5853,13 @@ class Test_TC_CC_5_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepXConfigValue; + chip::Optional mStepYConfigValue; chip::Optional mTimeout; + uint16_t CurrentXValue; + uint16_t CurrentYValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -6645,56 +5888,61 @@ class Test_TC_CC_5_3Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentXValue = value; } break; - case 4: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentYValue = value; } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentXValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 8: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentYValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -6737,25 +5985,34 @@ class Test_TC_CC_5_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Check current x attribute value matched before any change"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "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 4: { - LogStep(4, "Check current y attribute value matched before any change"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "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 5: { - LogStep(5, "Step Color command"); - VerifyOrDo(!ShouldSkip("CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "TH sends StepColor command to DUT"); + 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 = 15; - value.stepY = 20; - value.transitionTime = 50U; + value.stepX = mStepXConfigValue.HasValue() ? mStepXConfigValue.Value() : 100; + value.stepY = mStepYConfigValue.HasValue() ? mStepYConfigValue.Value() : 100; + value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColor::Id, value, @@ -6763,35 +6020,35 @@ class Test_TC_CC_5_3Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 50ms"); + case 7: { + LogStep(7, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Check current x attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Check current y attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Turn off light that we turned on"); + case 10: { + LogStep(10, "Turn off light that we turned on"); 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, "Check on/off attribute value is false after off command"); + case 11: { + LogStep(11, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -6802,7 +6059,7 @@ class Test_TC_CC_5_3Suite : public TestCommand class Test_TC_CC_6_1Suite : public TestCommand { public: - Test_TC_CC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_1", 9, credsIssuerConfig) + Test_TC_CC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6823,6 +6080,9 @@ class Test_TC_CC_6_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint16_t ColorTempPhysicalMinMiredsValue; + uint16_t ColorTempPhysicalMaxMiredsValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -6851,37 +6111,62 @@ class Test_TC_CC_6_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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", "", "uint16")); + 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)); - break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + 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 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperature", value, 100U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } 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(CheckValue("colorTemperature", value, ColorTempPhysicalMaxMiredsValue)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -6924,18 +6209,39 @@ class Test_TC_CC_6_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Read current color temprature"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "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, "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, "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::ColorTemperature::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Move To Color Temperature command"); - VerifyOrDo(!ShouldSkip("CC.S.C0A.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Move To Color Temperature command"); + 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.colorTemperature = 100U; - value.transitionTime = 5U; + value.colorTemperature = ColorTempPhysicalMaxMiredsValue; + value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, @@ -6943,29 +6249,29 @@ class Test_TC_CC_6_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 700ms"); + case 8: { + LogStep(8, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 700UL; + value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Read current color temprature"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Read current color temprature"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Turn off light that we turned on"); + case 10: { + LogStep(10, "Turn off light that we turned on"); 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, "Check on/off attribute value is false after off command"); + case 11: { + LogStep(11, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -6976,7 +6282,7 @@ class Test_TC_CC_6_1Suite : public TestCommand class Test_TC_CC_6_2Suite : public TestCommand { public: - Test_TC_CC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_2", 36, credsIssuerConfig) + Test_TC_CC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_2", 39, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6997,6 +6303,11 @@ class Test_TC_CC_6_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint16_t ColorTempPhysicalMinMiredsValue; + uint16_t ColorTempPhysicalMaxMiredsValue; + uint16_t ColorTemperatureValue; + uint16_t ColorTemperatureMoveModeStop; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -7025,63 +6336,71 @@ class Test_TC_CC_6_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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", "", "uint16")); + 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)); - break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + 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 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } 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)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } 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; @@ -7091,139 +6410,162 @@ class Test_TC_CC_6_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } 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)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } 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)); - shouldContinue = true; + { + 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 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)); + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); + ColorTemperatureValue = value; } break; - case 22: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 23: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureValue)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 24: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 25: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureValue)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 26: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 28: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 29: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); + ColorTemperatureMoveModeStop = value; } break; - case 30: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 31: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureMoveModeStop)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 32: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 33: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureValue)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 34: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 35: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7266,20 +6608,41 @@ class Test_TC_CC_6_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Read current color temprature"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "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, "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, "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::ColorTemperature::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Move up color temperature command"); - VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); + 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 = 10U; - value.colorTemperatureMinimumMireds = 1U; - value.colorTemperatureMaximumMireds = 255U; + value.rate = 20U; + value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; + value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, @@ -7287,54 +6650,54 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 90ms"); + case 8: { + LogStep(8, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 90UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Read current color temprature attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 95ms"); + case 10: { + LogStep(10, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 95UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "Read current color temprature attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 100ms"); + case 12: { + LogStep(12, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "Read current color temprature attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Move down color temperature command"); - VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 14: { + LogStep(14, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); + 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 = 20U; - value.colorTemperatureMinimumMireds = 1U; - value.colorTemperatureMaximumMireds = 255U; + value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; + value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, @@ -7342,54 +6705,54 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 190ms"); + case 15: { + LogStep(15, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 190UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "Read current color temprature attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Wait 195ms"); + case 17: { + LogStep(17, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 195UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "Read current color temprature attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 200ms"); + case 19: { + LogStep(19, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 200UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "Read current color temprature attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Move up color temperature command"); - VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); + 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 = 10U; - value.colorTemperatureMinimumMireds = 1U; - value.colorTemperatureMaximumMireds = 255U; + value.rate = 20U; + value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; + value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, @@ -7397,15 +6760,15 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 19: { - LogStep(19, "Stop Color Temperature command"); - VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); + 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 = 10U; - value.colorTemperatureMinimumMireds = 1U; - value.colorTemperatureMaximumMireds = 255U; + value.rate = 20U; + value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; + value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, @@ -7413,54 +6776,54 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 20: { - LogStep(20, "Wait 90ms"); + case 23: { + LogStep(23, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 90UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 21: { - LogStep(21, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "Read current color temprature attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Wait 95ms"); + case 25: { + LogStep(25, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 95UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Read current color temprature attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Wait 100ms"); + case 27: { + LogStep(27, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 25: { - LogStep(25, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "Read current color temprature attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Move down color temperature command"); - VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); + 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 = 20U; - value.colorTemperatureMinimumMireds = 1U; - value.colorTemperatureMaximumMireds = 255U; + value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; + value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, @@ -7468,15 +6831,15 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 27: { - LogStep(27, "Stop Color Temperature command"); - VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 30: { + LogStep(30, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); + 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 = 10U; - value.colorTemperatureMinimumMireds = 1U; - value.colorTemperatureMaximumMireds = 255U; + value.rate = 20U; + value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; + value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, @@ -7484,55 +6847,55 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 28: { - LogStep(28, "Wait 140ms"); + case 31: { + LogStep(31, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 140UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 32: { + LogStep(32, "Read current color temprature attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Wait 145ms"); + case 33: { + LogStep(33, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 145UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 34: { + LogStep(34, "Read current color temprature attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Wait 150ms"); + case 35: { + LogStep(35, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 150UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 33: { - LogStep(33, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "Read current color temprature attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Turn off light that we turned on"); + case 37: { + LogStep(37, "Turn off light that we turned on"); 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 35: { - LogStep(35, "Check on/off attribute value is false after off command"); + case 38: { + LogStep(38, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -7543,7 +6906,7 @@ class Test_TC_CC_6_2Suite : public TestCommand class Test_TC_CC_6_3Suite : public TestCommand { public: - Test_TC_CC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_3", 20, credsIssuerConfig) + Test_TC_CC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_3", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -7564,6 +6927,9 @@ class Test_TC_CC_6_3Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint16_t ColorTempPhysicalMinMiredsValue; + uint16_t ColorTempPhysicalMaxMiredsValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -7592,109 +6958,134 @@ class Test_TC_CC_6_3Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + ColorTempPhysicalMinMiredsValue = value; } break; - case 4: + 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)); + ColorTempPhysicalMaxMiredsValue = value; + } break; - case 5: + 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, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); + } + 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 6: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 7: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 9: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 11: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 14: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 16: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 18: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7737,21 +7128,42 @@ class Test_TC_CC_6_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Read current color temprature"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "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, "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, "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::ColorTemperature::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Step up color temperature command"); - VerifyOrDo(!ShouldSkip("CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "TH sends StepColorTemperature command to DUT with MoveMode = Up"); + 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 = 5U; - value.transitionTime = 50U; - value.colorTemperatureMinimumMireds = 5U; - value.colorTemperatureMaximumMireds = 100U; + value.stepSize = 100U; + value.transitionTime = 15U; + value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; + value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id, @@ -7759,55 +7171,55 @@ class Test_TC_CC_6_3Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 40ms"); + case 8: { + LogStep(8, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Read current color temprature"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "TH reads ColorTemperatureMireds attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 45ms"); + case 10: { + LogStep(10, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Read current color temprature"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "TH reads ColorTemperatureMireds attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 50ms"); + case 12: { + LogStep(12, "Wait 700ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 700UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Read current color temprature"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "TH reads ColorTemperatureMireds attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Step down color temperature command"); - VerifyOrDo(!ShouldSkip("CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 14: { + LogStep(14, "TH sends StepColorTemperature command to DUT with MoveMode = Down"); + 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 = 5U; - value.transitionTime = 50U; - value.colorTemperatureMinimumMireds = 5U; - value.colorTemperatureMaximumMireds = 100U; + value.stepSize = 100U; + value.transitionTime = 10U; + value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; + value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id, @@ -7815,55 +7227,55 @@ class Test_TC_CC_6_3Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 40ms"); + case 15: { + LogStep(15, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Read current color temprature"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "TH reads ColorTemperatureMireds attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Wait 45ms"); + case 17: { + LogStep(17, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Read current color temprature"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "TH reads ColorTemperatureMireds attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 50ms"); + case 19: { + LogStep(19, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read current color temprature"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "TH reads ColorTemperatureMireds attribute from DUT several times"); + 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::ColorTemperature::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Turn off light that we turned on"); + case 21: { + LogStep(21, "Turn off light that we turned on"); 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, "Check on/off attribute value is false after off command"); + case 22: { + LogStep(22, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -7871,18 +7283,19 @@ class Test_TC_CC_6_3Suite : public TestCommand } }; -class Test_TC_CC_7_1Suite : public TestCommand +class Test_TC_CC_7_2Suite : public TestCommand { public: - Test_TC_CC_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_1", 35, credsIssuerConfig) + Test_TC_CC_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_2", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT16_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_7_1Suite() {} + ~Test_TC_CC_7_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -7893,8 +7306,12 @@ class Test_TC_CC_7_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; + uint16_t EnhancedCurrentHueStep3b; + uint16_t EnhancedCurrentHueStep5b; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -7930,7 +7347,7 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -7947,7 +7364,7 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -7961,7 +7378,7 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -7975,7 +7392,7 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -7984,33 +7401,34 @@ class Test_TC_CC_7_1Suite : public TestCommand 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)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + EnhancedCurrentHueStep3b = value; } break; - case 15: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + 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", "", "uint16")); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, EnhancedCurrentHueStep3b)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } 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; @@ -8020,105 +7438,72 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + 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)); - 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", "", "uint16")); - 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 25: + 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", "", "uint16")); + 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)); - break; - case 27: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 28: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 29: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; - case 30: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + EnhancedCurrentHueStep5b = value; } break; - case 31: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 32: + 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", "", "uint16")); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, EnhancedCurrentHueStep5b)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 33: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 34: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -8161,252 +7546,202 @@ class Test_TC_CC_7_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Enhanced Move To Hue command"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1025U; - value.direction = static_cast(0); - value.transitionTime = 1U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); } case 4: { - LogStep(4, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "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 5: { - LogStep(5, "Enhanced Move To Hue command"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "TH sends EnhancedMoveHue command to DUT with MoveMode Up"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1100U; - value.direction = static_cast(0); - value.transitionTime = 300U; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; + value.moveMode = static_cast(1); + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + chip::NullOptional ); } case 6: { - LogStep(6, "Wait 290ms"); + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } case 7: { - LogStep(7, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "TH reads EnhancedCurrentHue attribute from DUT several times."); + 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 295ms"); + LogStep(8, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } case 9: { - LogStep(9, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "TH reads EnhancedCurrentHue attribute from DUT several times."); + 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 300ms"); + LogStep(10, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } case 11: { - LogStep(11, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "TH reads EnhancedCurrentHue attribute from DUT several times."); + 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, "Enhanced Move To Hue command"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "TH sends EnhancedMoveHue command to DUT with MoveMode Stop"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1150U; - value.direction = static_cast(1); - value.transitionTime = 300U; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; + value.moveMode = static_cast(0); + value.rate = 0U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + chip::NullOptional ); } case 13: { - LogStep(13, "Wait 290ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - 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 15: { - LogStep(15, "Wait 295ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "TH reads EnhancedCurrentHue attribute from DUT several times"); + 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 17: { - LogStep(17, "Wait 300ms"); + case 14: { + LogStep(14, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "TH reads EnhancedCurrentHue attribute from DUT several times."); + 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, "Enhanced Move To Hue command"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "TH sends EnhancedMoveHue command to DUT with MoveMode Down"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1200U; - value.direction = static_cast(2); - value.transitionTime = 300U; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; + value.moveMode = static_cast(3); + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + chip::NullOptional ); } - case 20: { - LogStep(20, "Wait 290ms"); + case 17: { + LogStep(17, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 21: { - LogStep(21, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "TH reads EnhancedCurrentHue attribute from DUT several times"); + 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 295ms"); + case 19: { + LogStep(19, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "TH reads EnhancedCurrentHue attribute from DUT several times"); + 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 24: { - LogStep(24, "Wait 300ms"); + case 21: { + LogStep(21, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 25: { - LogStep(25, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "TH reads EnhancedCurrentHue attribute from DUT several times"); + 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 26: { - LogStep(26, "Enhanced Move To Hue command"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 23: { + LogStep(23, "TH sends EnhancedMoveHue command to DUT with MoveMode Stop"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1300U; - value.direction = static_cast(3); - value.transitionTime = 300U; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; + value.moveMode = static_cast(0); + value.rate = 0U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + chip::NullOptional ); } - case 27: { - LogStep(27, "Wait 290ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; - return WaitForMs(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - 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 29: { - LogStep(29, "Wait 295ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; - return WaitForMs(kIdentityAlpha, value); - } - case 30: { - LogStep(30, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "TH reads EnhancedCurrentHue attribute from DUT several times."); + 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 31: { - LogStep(31, "Wait 300ms"); + case 25: { + LogStep(25, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 32: { - LogStep(32, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "TH reads EnhancedCurrentHue attribute from DUT several times."); + 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 33: { - LogStep(33, "Turn off light that we turned on"); + case 27: { + LogStep(27, "Turn off light that we turned on"); 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 34: { - LogStep(34, "Check on/off attribute value is false after off command"); + case 28: { + LogStep(28, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -8414,18 +7749,19 @@ class Test_TC_CC_7_1Suite : public TestCommand } }; -class Test_TC_CC_7_2Suite : public TestCommand +class Test_TC_CC_7_3Suite : public TestCommand { public: - Test_TC_CC_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_2", 24, credsIssuerConfig) + Test_TC_CC_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_3", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT16_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_7_2Suite() {} + ~Test_TC_CC_7_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -8436,6 +7772,7 @@ class Test_TC_CC_7_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -8466,45 +7803,37 @@ class Test_TC_CC_7_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } 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)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -8515,7 +7844,7 @@ class Test_TC_CC_7_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -8524,77 +7853,6 @@ class Test_TC_CC_7_2Suite : public TestCommand 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(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - 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(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - 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(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -8637,167 +7895,86 @@ class Test_TC_CC_7_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Check EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "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 4: { - LogStep(4, "Enhanced Move Hue Up command"); - VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "TH sends EnhancedStepHue command to DUT with StepMode Up"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; - value.moveMode = static_cast(1); - value.rate = 50U; + chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; + value.stepMode = static_cast(0); + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 50U; + value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, chip::NullOptional ); } - case 5: { - LogStep(5, "Wait 290ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; - return WaitForMs(kIdentityAlpha, value); - } case 6: { - LogStep(6, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - 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 7: { - LogStep(7, "Wait 295ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - 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 9: { - LogStep(9, "Wait 300ms"); + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - 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 11: { - LogStep(11, "Enhanced Move Hue Stop command"); - 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(0); - value.rate = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Enhanced Move Hue Down command"); - VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "TH sends EnhancedStepHue command to DUT with StepMode Down"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; - value.moveMode = static_cast(3); - value.rate = 5U; + chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; + value.stepMode = static_cast(1); + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 50U; + value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, chip::NullOptional ); } - case 14: { - LogStep(14, "Wait 40ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - 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 16: { - LogStep(16, "Wait 45ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - 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 18: { - LogStep(18, "Wait 50ms"); + case 9: { + LogStep(9, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 19: { - LogStep(19, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - 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 20: { - LogStep(20, "Enhanced Move Hue Stop command"); - 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(0); - value.rate = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, - chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Turn off light that we turned on"); + case 11: { + LogStep(11, "Turn off light that we turned on"); 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 23: { - LogStep(23, "Check on/off attribute value is false after off command"); + case 12: { + LogStep(12, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -8805,18 +7982,20 @@ class Test_TC_CC_7_2Suite : public TestCommand } }; -class Test_TC_CC_7_3Suite : public TestCommand +class Test_TC_CC_7_4Suite : public TestCommand { public: - Test_TC_CC_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_3", 12, credsIssuerConfig) + Test_TC_CC_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_4", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("EnhancedHueConfigValue", 0, UINT16_MAX, &mEnhancedHueConfigValue); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_7_3Suite() {} + ~Test_TC_CC_7_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -8827,6 +8006,8 @@ class Test_TC_CC_7_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mEnhancedHueConfigValue; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -8858,52 +8039,40 @@ class Test_TC_CC_7_3Suite : public TestCommand 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } 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(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 7: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + 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", "", "uint16")); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, + mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1200U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 10: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -8946,77 +8115,58 @@ class Test_TC_CC_7_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "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 4: { - LogStep(4, "Enhanced Step Hue Up command"); - VerifyOrDo(!ShouldSkip("CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; - value.stepMode = static_cast(0); - value.stepSize = 50U; - value.transitionTime = 1U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Wait 10ms"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; - return WaitForMs(kIdentityAlpha, value); + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); } - case 6: { - LogStep(6, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 4: { + LogStep(4, "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 7: { - LogStep(7, "Enhanced Step Hue Down command"); - VerifyOrDo(!ShouldSkip("CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "TH sends EnhancedMoveToHueAndSaturation command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; - value.stepMode = static_cast(1); - value.stepSize = 75U; - value.transitionTime = 1U; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type value; + value.enhancedHue = mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1200U; + value.saturation = mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U; + value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, - chip::NullOptional + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id, value, chip::NullOptional ); } - case 8: { - LogStep(8, "Wait 10ms"); + case 6: { + LogStep(6, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; + value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Turn off light that we turned on"); + case 8: { + LogStep(8, "Turn off light that we turned on"); 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, "Check on/off attribute value is false after off command"); + case 9: { + LogStep(9, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -9024,18 +8174,23 @@ class Test_TC_CC_7_3Suite : public TestCommand } }; -class Test_TC_CC_7_4Suite : public TestCommand +class Test_TC_CC_8_1Suite : public TestCommand { public: - Test_TC_CC_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_4", 9, credsIssuerConfig) + Test_TC_CC_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_8_1", 41, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); + AddArgument("RateXConfigValue", INT16_MIN, INT16_MAX, &mRateXConfigValue); + AddArgument("RateYConfigValue", INT16_MIN, INT16_MAX, &mRateYConfigValue); + AddArgument("ColorTemperatureMinMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMinMiredsConfigValue); + AddArgument("ColorTemperatureMaxMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMaxMiredsConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_7_4Suite() {} + ~Test_TC_CC_8_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -9046,8 +8201,20 @@ class Test_TC_CC_7_4Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; + chip::Optional mRateXConfigValue; + chip::Optional mRateYConfigValue; + chip::Optional mColorTemperatureMinMiredsConfigValue; + chip::Optional mColorTemperatureMaxMiredsConfigValue; chip::Optional mTimeout; + uint8_t CurrentHueValue; + uint8_t CurrentSaturationValue; + uint16_t CurrentXValue; + uint16_t CurrentYValue; + uint16_t ColorTemperatureMiredsValue; + uint16_t EnhancedCurrentHueValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -9076,413 +8243,262 @@ class Test_TC_CC_7_4Suite : public TestCommand } 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)); { - uint16_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 7: + 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)); + CurrentHueValue = value; + } + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValue)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - bool value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + 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, "Wait for the commissioned device to be retrieved"); - ListFreer 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 light for color control tests"); - 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"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "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 4: { - LogStep(4, "Enhanced move to hue and saturation command"); - VerifyOrDo(!ShouldSkip("CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type value; - value.enhancedHue = 1200U; - value.saturation = 90U; - value.transitionTime = 10U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Wait 10ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - 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 7: { - LogStep(7, "Turn off light that we turned on"); - 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, "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_CC_8_1Suite : public TestCommand -{ -public: - Test_TC_CC_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_8_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_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; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 5: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + CurrentSaturationValue = value; } break; - case 7: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationValue)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } break; - case 13: + case 17: 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(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 17: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 18: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentXValue = value; } break; - case 20: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentYValue = value; } break; - case 21: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + 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", "", "uint16")); + VerifyOrReturn(CheckValue("currentX", value, CurrentXValue)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 23: + 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", "", "uint16")); + VerifyOrReturn(CheckValue("currentY", value, CurrentYValue)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 24: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: + 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(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 26: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + ColorTemperatureMiredsValue = value; } break; - case 28: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 29: + 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", "", "uint16")); + VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureMiredsValue)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 30: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 32: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 33: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + EnhancedCurrentHueValue = value; } break; - case 34: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 35: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, EnhancedCurrentHueValue)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 36: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 37: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -9525,12 +8541,21 @@ class Test_TC_CC_8_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Move hue up command"); - VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "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 4: { + LogStep(4, "TH sends MoveHue command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(1); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, @@ -9538,15 +8563,15 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 4: { - LogStep(4, "Reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Stop Move Step command"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "TH sends StopMoveStep command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; value.optionsMask = 0U; @@ -9556,32 +8581,32 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 100ms"); + case 8: { + LogStep(8, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Check current hue attribute value matched the value sent by the last attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Move saturation up command"); - VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "TH sends MoveSaturation command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(1); - value.rate = 5U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -9589,15 +8614,15 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 10: { - LogStep(10, "Check Saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.C04.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Stop Move Step command"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "TH sends StopMoveStep command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; value.optionsMask = 0U; @@ -9607,32 +8632,32 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "Reads CurrentSaturation attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Wait 100ms"); + case 14: { + LogStep(14, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "Check Saturation attribute value matched the value sent by the last attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Move Color command"); - VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "TH sends MoveColor command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColor::Type value; - value.rateX = 15; - value.rateY = 20; + value.rateX = mRateXConfigValue.HasValue() ? mRateXConfigValue.Value() : 50; + value.rateY = mRateYConfigValue.HasValue() ? mRateYConfigValue.Value() : 50; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id, value, @@ -9640,21 +8665,28 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 16: { - LogStep(16, "Reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 17: { + LogStep(17, "Wait 500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs(kIdentityAlpha, value); + } + case 18: { + LogStep(18, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.C08.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.C08.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Stop Move Step command"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "TH sends StopMoveStep command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; value.optionsMask = 0U; @@ -9664,62 +8696,71 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 19: { - LogStep(19, "Reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Wait 100ms"); + case 23: { + LogStep(23, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "Check current x attribute value matched the value sent by the last attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Check current y attribute value matched the value sent by the last attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Move up color temperature command"); - VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "TH sends MoveColorTemperature command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(1); - value.rate = 10U; - value.colorTemperatureMinimumMireds = 1U; - value.colorTemperatureMaximumMireds = 255U; - value.optionsMask = 0U; - value.optionsOverride = 0U; + value.moveMode = static_cast(1); + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; + value.colorTemperatureMinimumMireds = + mColorTemperatureMinMiredsConfigValue.HasValue() ? mColorTemperatureMinMiredsConfigValue.Value() : 1U; + value.colorTemperatureMaximumMireds = + mColorTemperatureMaxMiredsConfigValue.HasValue() ? mColorTemperatureMaxMiredsConfigValue.Value() : 255U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, value, chip::NullOptional ); } - case 25: { - LogStep(25, "Reads current color temprature from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 28: { + LogStep(28, "TH reads ColorTemperatureMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Stop Move Step command"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "TH sends StopMoveStep command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; value.optionsMask = 0U; @@ -9729,32 +8770,32 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 27: { - LogStep(27, "Reads current color temprature from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 30: { + LogStep(30, "TH reads ColorTemperatureMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Wait 100ms"); + case 31: { + LogStep(31, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, "Reads current color attribute value matched the value sent by the last attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 32: { + LogStep(32, "Reads current color attribute value matched the value sent by the last attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Enhanced Move Hue Up command"); - VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 33: { + LogStep(33, "TH sends EnhancedMoveHue command to DUT."); + VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; value.moveMode = static_cast(1); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, @@ -9762,15 +8803,15 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 31: { - LogStep(31, "Reads EnhancedCurrentHue attribute value from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 34: { + LogStep(34, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C41.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Stop Move Step command"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 35: { + LogStep(35, "TH sends StopMoveStep command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; value.optionsMask = 0U; @@ -9780,35 +8821,35 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 33: { - LogStep(33, "Reads EnhancedCurrentHue attribute value from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Wait 100ms"); + case 37: { + LogStep(37, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 35: { - LogStep(35, "Check EnhancedCurrentHue attribute value matched the value sent by the last attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 38: { + LogStep(38, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Turn off light that we turned on"); + case 39: { + LogStep(39, "Turn off light that we turned on"); 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 37: { - LogStep(37, "Check on/off attribute value is false after off command"); + case 40: { + LogStep(40, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -9819,7 +8860,7 @@ class Test_TC_CC_8_1Suite : public TestCommand class Test_TC_BINFO_2_1Suite : public TestCommand { public: - Test_TC_BINFO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_1", 66, credsIssuerConfig) + Test_TC_BINFO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_1", 67, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -9829,11 +8870,6 @@ class Test_TC_BINFO_2_1Suite : public TestCommand ~Test_TC_BINFO_2_1Suite() { - if (CountryCodeBuffer != nullptr) - { - chip::Platform::MemoryFree(CountryCodeBuffer); - CountryCodeBuffer = nullptr; - } if (VendorNameValueBuffer != nullptr) { chip::Platform::MemoryFree(VendorNameValueBuffer); @@ -9902,8 +8938,6 @@ class Test_TC_BINFO_2_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - char * CountryCodeBuffer = nullptr; - chip::CharSpan CountryCode; uint16_t DataModelRevisionValue; char * VendorNameValueBuffer = nullptr; chip::CharSpan VendorNameValue; @@ -9951,24 +8985,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (CountryCodeBuffer != nullptr) - { - chip::Platform::MemoryFree(CountryCodeBuffer); - } - CountryCodeBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(CountryCodeBuffer, value.data(), value.size()); - CountryCode = chip::CharSpan(CountryCodeBuffer, value.size()); - } + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); DataModelRevisionValue = value; @@ -9990,8 +9014,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); if (VendorNameValueBuffer != nullptr) { chip::Platform::MemoryFree(VendorNameValueBuffer); @@ -10017,7 +9041,7 @@ class Test_TC_BINFO_2_1Suite : public TestCommand { chip::VendorId value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "vendor_id", "vendor_id")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65521U)); VendorIDValue = value; @@ -10039,8 +9063,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); if (ProductNameValueBuffer != nullptr) { chip::Platform::MemoryFree(ProductNameValueBuffer); @@ -10066,7 +9090,7 @@ class Test_TC_BINFO_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); ProductIDValue = value; @@ -10088,8 +9112,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); if (NodeLabelValueBuffer != nullptr) { chip::Platform::MemoryFree(NodeLabelValueBuffer); @@ -10115,15 +9139,18 @@ class Test_TC_BINFO_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("location", value, CountryCode)); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 16)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 16)); } 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)); + break; + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -10131,21 +9158,21 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("location", value, chip::CharSpan("in", 2))); } break; - case 23: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); HardwareVersionValue = value; } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10153,14 +9180,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValue("hardwareVersion", value, HardwareVersionValue)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMinLength("value", value.size(), 1)); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 64)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMinLength("value", value, 1)); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); if (HardwareVersionStringValueBuffer != nullptr) { chip::Platform::MemoryFree(HardwareVersionStringValueBuffer); @@ -10170,10 +9197,10 @@ class Test_TC_BINFO_2_1Suite : public TestCommand HardwareVersionStringValue = chip::CharSpan(HardwareVersionStringValueBuffer, value.size()); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -10181,7 +9208,7 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("hardwareVersionString", value, HardwareVersionStringValue)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -10191,14 +9218,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand SoftwareVersionValue = value; } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -10206,12 +9233,13 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValue("softwareVersion", value, SoftwareVersionValue)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value", value.size(), 1)); + VerifyOrReturn(CheckConstraintMinLength("value", value, 1)); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); if (SoftwareVersionStringValueBuffer != nullptr) { chip::Platform::MemoryFree(SoftwareVersionStringValueBuffer); @@ -10221,10 +9249,10 @@ class Test_TC_BINFO_2_1Suite : public TestCommand SoftwareVersionStringValue = chip::CharSpan(SoftwareVersionStringValueBuffer, value.size()); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -10232,14 +9260,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("softwareVersionString", value, SoftwareVersionStringValue)); } break; - case 36: + 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", "", "string")); - VerifyOrReturn(CheckConstraintMinLength("value", value.size(), 8)); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 16)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMinLength("value", value, 8)); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 16)); if (ManufacturingDateValueBuffer != nullptr) { chip::Platform::MemoryFree(ManufacturingDateValueBuffer); @@ -10249,14 +9277,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand ManufacturingDateValue = chip::CharSpan(ManufacturingDateValueBuffer, value.size()); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -10264,13 +9292,13 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("manufacturingDate", value, ManufacturingDateValue)); } break; - case 40: + 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", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); if (PartNumberValueBuffer != nullptr) { chip::Platform::MemoryFree(PartNumberValueBuffer); @@ -10280,10 +9308,10 @@ class Test_TC_BINFO_2_1Suite : public TestCommand PartNumberValue = chip::CharSpan(PartNumberValueBuffer, value.size()); } break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -10291,13 +9319,13 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("partNumber", value, PartNumberValue)); } break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 256)); + VerifyOrReturn(CheckConstraintType("value", "long_char_string", "long_char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 256)); if (ProductURLValueBuffer != nullptr) { chip::Platform::MemoryFree(ProductURLValueBuffer); @@ -10307,14 +9335,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand ProductURLValue = chip::CharSpan(ProductURLValueBuffer, value.size()); } break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -10322,13 +9350,13 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("productURL", value, ProductURLValue)); } break; - case 47: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 64)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); if (ProductLabelValueBuffer != nullptr) { chip::Platform::MemoryFree(ProductLabelValueBuffer); @@ -10338,14 +9366,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand ProductLabelValue = chip::CharSpan(ProductLabelValueBuffer, value.size()); } break; - case 48: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 49: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 50: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -10353,13 +9381,13 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("productLabel", value, ProductLabelValue)); } break; - case 51: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); if (SerialNumberValueBuffer != nullptr) { chip::Platform::MemoryFree(SerialNumberValueBuffer); @@ -10369,10 +9397,10 @@ class Test_TC_BINFO_2_1Suite : public TestCommand SerialNumberValue = chip::CharSpan(SerialNumberValueBuffer, value.size()); } break; - case 52: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 53: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -10380,19 +9408,19 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("serialNumber", value, SerialNumberValue)); } break; - case 54: + case 55: 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")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; - case 55: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 56: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -10400,25 +9428,25 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValue("localConfigDisabled", value, true)); } break; - case 57: + case 58: 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")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; - case 58: + case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 59: + case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); if (UniqueIDValueBuffer != nullptr) { chip::Platform::MemoryFree(UniqueIDValueBuffer); @@ -10428,10 +9456,10 @@ class Test_TC_BINFO_2_1Suite : public TestCommand UniqueIDValue = chip::CharSpan(UniqueIDValueBuffer, value.size()); } break; - case 60: + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 61: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -10439,7 +9467,7 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("uniqueID", value, UniqueIDValue)); } break; - case 62: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Basic::Structs::CapabilityMinimaStruct::DecodableType value; @@ -10447,14 +9475,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand CapabilityMinimaValue = value; } break; - case 63: + case 64: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 64: + case 65: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 65: + case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Basic::Structs::CapabilityMinimaStruct::DecodableType value; @@ -10484,9 +9512,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads Location from the DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Location::Id, true, - chip::NullOptional); + LogStep(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, "TH reads DataModelRevision from the DUT."); @@ -10621,7 +9654,17 @@ class Test_TC_BINFO_2_1Suite : public TestCommand chip::NullOptional); } case 21: { - LogStep(21, "TH write Location from the DUT"); + LogStep(21, "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 22: { + LogStep(22, "TH write Location from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -10629,20 +9672,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Location::Id, value, chip::NullOptional, chip::NullOptional); } - case 22: { - LogStep(22, "TH reads Location from the DUT."); + case 23: { + LogStep(23, "TH reads Location from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Location::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "TH reads HardwareVersion from the DUT"); + case 24: { + LogStep(24, "TH reads HardwareVersion from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersion::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "TH writes HardwareVersion from the DUT."); + case 25: { + LogStep(25, "TH writes HardwareVersion from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint16_t value; @@ -10650,20 +9693,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersion::Id, value, chip::NullOptional, chip::NullOptional); } - case 25: { - LogStep(25, "TH reads HardwareVersion from the DUT"); + case 26: { + LogStep(26, "TH reads HardwareVersion from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersion::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "TH reads HardwareVersionString from the DUT."); + case 27: { + LogStep(27, "TH reads HardwareVersionString from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersionString::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "TH writes HardwareVersionString from the DUT."); + case 28: { + LogStep(28, "TH writes HardwareVersionString from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -10671,20 +9714,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersionString::Id, value, chip::NullOptional, chip::NullOptional); } - case 28: { - LogStep(28, "TH reads HardwareVersionString from the DUT."); + case 29: { + LogStep(29, "TH reads HardwareVersionString from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersionString::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "TH reads SoftwareVersion from the DUT"); + case 30: { + LogStep(30, "TH reads SoftwareVersion from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersion::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, + case 31: { + LogStep(31, "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)); @@ -10695,8 +9738,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 31: { - LogStep(31, "TH writes SoftwareVersion from the DUT."); + case 32: { + LogStep(32, "TH writes SoftwareVersion from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint32_t value; @@ -10704,20 +9747,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersion::Id, value, chip::NullOptional, chip::NullOptional); } - case 32: { - LogStep(32, "TH reads SoftwareVersion from the DUT"); + case 33: { + LogStep(33, "TH reads SoftwareVersion from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersion::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "TH reads SoftwareVersionString from the DUT"); + case 34: { + LogStep(34, "TH reads SoftwareVersionString from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersionString::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "TH writes SoftwareVersionString from the DUT."); + case 35: { + LogStep(35, "TH writes SoftwareVersionString from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -10725,20 +9768,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersionString::Id, value, chip::NullOptional, chip::NullOptional); } - case 35: { - LogStep(35, "TH reads SoftwareVersionString from the DUT"); + case 36: { + LogStep(36, "TH reads SoftwareVersionString from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersionString::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "TH reads ManufacturingDate from the DUT."); + case 37: { + LogStep(37, "TH reads ManufacturingDate from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ManufacturingDate::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "Verify if the first 8 characters specify date according to ISO 8601, i.e, YYYYMMDD"); + case 38: { + LogStep(38, "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; @@ -10747,8 +9790,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 38: { - LogStep(38, "TH writes ManufacturingDate from the DUT."); + case 39: { + LogStep(39, "TH writes ManufacturingDate from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -10756,20 +9799,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ManufacturingDate::Id, value, chip::NullOptional, chip::NullOptional); } - case 39: { - LogStep(39, "TH reads ManufacturingDate from the DUT."); + case 40: { + LogStep(40, "TH reads ManufacturingDate from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ManufacturingDate::Id, true, chip::NullOptional); } - case 40: { - LogStep(40, "TH reads PartNumber from the DUT"); + case 41: { + LogStep(41, "TH reads PartNumber from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A000c && PART_NUM"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::PartNumber::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "TH writes PartNumber from the DUT."); + case 42: { + LogStep(42, "TH writes PartNumber from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -10777,20 +9820,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::PartNumber::Id, value, chip::NullOptional, chip::NullOptional); } - case 42: { - LogStep(42, "TH reads PartNumber from the DUT"); + case 43: { + LogStep(43, "TH reads PartNumber from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A000c && PART_NUM"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::PartNumber::Id, true, chip::NullOptional); } - case 43: { - LogStep(43, "TH reads ProductURL from the DUT"); + case 44: { + LogStep(44, "TH reads ProductURL from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductURL::Id, true, chip::NullOptional); } - case 44: { - LogStep(44, + case 45: { + LogStep(45, "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)); @@ -10801,8 +9844,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 45: { - LogStep(45, "TH writes ProductURL from the DUT."); + case 46: { + LogStep(46, "TH writes ProductURL from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -10810,20 +9853,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductURL::Id, value, chip::NullOptional, chip::NullOptional); } - case 46: { - LogStep(46, "TH reads ProductURL from the DUT"); + case 47: { + LogStep(47, "TH reads ProductURL from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductURL::Id, true, chip::NullOptional); } - case 47: { - LogStep(47, "TH reads ProductLabel from the DUT."); + case 48: { + LogStep(48, "TH reads ProductLabel from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductLabel::Id, true, chip::NullOptional); } - case 48: { - LogStep(48, "Verify that it does not include the name of the vendor as defined within the VendorName attribute"); + case 49: { + LogStep(49, "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; @@ -10832,8 +9875,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 49: { - LogStep(49, "TH writes ProductLabel from the DUT."); + case 50: { + LogStep(50, "TH writes ProductLabel from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -10841,19 +9884,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 50: { - LogStep(50, "TH reads ProductLabel from the DUT."); + case 51: { + LogStep(51, "TH reads ProductLabel from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductLabel::Id, true, chip::NullOptional); } - case 51: { - LogStep(51, "TH reads SerialNumber from the DUT."); + case 52: { + LogStep(52, "TH reads SerialNumber from the DUT."); + VerifyOrDo(!ShouldSkip("BINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SerialNumber::Id, true, chip::NullOptional); } - case 52: { - LogStep(52, "TH writes SerialNumber from the DUT."); + case 53: { + LogStep(53, "TH writes SerialNumber from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -10861,20 +9905,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SerialNumber::Id, value, chip::NullOptional, chip::NullOptional); } - case 53: { - LogStep(53, "TH reads SerialNumber from the DUT."); + case 54: { + LogStep(54, "TH reads SerialNumber from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SerialNumber::Id, true, chip::NullOptional); } - case 54: { - LogStep(54, "TH reads LocalConfigDisabled from the DUT."); + case 55: { + LogStep(55, "TH reads LocalConfigDisabled from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::LocalConfigDisabled::Id, true, chip::NullOptional); } - case 55: { - LogStep(55, "TH sets LocalConfigDisabled to True"); + case 56: { + LogStep(56, "TH sets LocalConfigDisabled to True"); VerifyOrDo(!ShouldSkip("BINFO.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; bool value; @@ -10882,20 +9926,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::LocalConfigDisabled::Id, value, chip::NullOptional, chip::NullOptional); } - case 56: { - LogStep(56, "TH reads LocalConfigDisabled from the DUT."); + case 57: { + LogStep(57, "TH reads LocalConfigDisabled from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::LocalConfigDisabled::Id, true, chip::NullOptional); } - case 57: { - LogStep(57, "TH reads Reachable from the DUT."); + case 58: { + LogStep(58, "TH reads Reachable from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Reachable::Id, true, chip::NullOptional); } - case 58: { - LogStep(58, "TH sends Write request message to DUT to change value of Reachable to false"); + case 59: { + LogStep(59, "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; @@ -10903,14 +9947,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Reachable::Id, value, chip::NullOptional, chip::NullOptional); } - case 59: { - LogStep(59, "TH reads UniqueID from the DUT."); + case 60: { + LogStep(60, "TH reads UniqueID from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::UniqueID::Id, true, chip::NullOptional); } - case 60: { - LogStep(60, "TH writes UniqueID from the DUT."); + case 61: { + LogStep(61, "TH writes UniqueID from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -10918,20 +9962,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::UniqueID::Id, value, chip::NullOptional, chip::NullOptional); } - case 61: { - LogStep(61, "TH reads UniqueID from the DUT."); + case 62: { + LogStep(62, "TH reads UniqueID from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::UniqueID::Id, true, chip::NullOptional); } - case 62: { - LogStep(62, "TH reads CapabilityMinima attribute from the DUT."); + case 63: { + LogStep(63, "TH reads CapabilityMinima attribute from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::CapabilityMinima::Id, true, chip::NullOptional); } - case 63: { - LogStep(63, + case 64: { + LogStep(64, "Step 56 is implicitly validating the attribute(CapabilityMinima) constraints, as long as the payload is being " "parsed successfully"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -10942,8 +9986,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 64: { - LogStep(64, "TH writes CapabilityMinima from the DUT."); + case 65: { + LogStep(65, "TH writes CapabilityMinima from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Basic::Structs::CapabilityMinimaStruct::Type value; @@ -10954,8 +9998,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::CapabilityMinima::Id, value, chip::NullOptional, chip::NullOptional); } - case 65: { - LogStep(65, "TH reads CapabilityMinima attribute from the DUT."); + case 66: { + LogStep(66, "TH reads CapabilityMinima attribute from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::CapabilityMinima::Id, true, chip::NullOptional); @@ -11011,7 +10055,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -11020,7 +10064,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -11028,7 +10072,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -11049,7 +10093,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -11061,7 +10105,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -11176,7 +10220,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } @@ -11186,7 +10230,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 3: @@ -11194,7 +10238,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 4: @@ -11206,7 +10250,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 6: @@ -11218,7 +10262,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 8: @@ -11230,7 +10274,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 10: @@ -11242,7 +10286,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 12: @@ -11254,7 +10298,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 14: @@ -11266,7 +10310,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 16: @@ -11435,7 +10479,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand class Test_TC_DGETH_2_2Suite : public TestCommand { public: - Test_TC_DGETH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_2_2", 7, credsIssuerConfig) + Test_TC_DGETH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_2_2", 22, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -11456,6 +10500,12 @@ class Test_TC_DGETH_2_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint64_t PacketRxCount; + uint64_t PacketTxCount; + uint64_t TxErrCount; + uint64_t CollisionCount; + uint64_t OverrunCount; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -11474,45 +10524,185 @@ class Test_TC_DGETH_2_2Suite : public TestCommand 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)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("packetRxCount", value, 0ULL)); + 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)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("packetTxCount", value, 0ULL)); + 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)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("txErrCount", value, 0ULL)); + 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)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("collisionCount", value, 0ULL)); + 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))); - VerifyOrReturn(CheckValue("overrunCount", value, 0ULL)); + PacketRxCount = value; + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + PacketTxCount = value; + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TxErrCount = value; + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + CollisionCount = value; + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + OverrunCount = 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)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMaxValue("value", value, PacketRxCount)); + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMaxValue("value", value, PacketTxCount)); + } + 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, TxErrCount)); + } + 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, CollisionCount)); + } + 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, OverrunCount)); } break; default: @@ -11538,8 +10728,98 @@ class Test_TC_DGETH_2_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Sends ResetCounts command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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, @@ -11547,33 +10827,33 @@ class Test_TC_DGETH_2_2Suite : public TestCommand ); } - case 2: { - LogStep(2, "Read the PacketRxCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 17: { + LogStep(17, "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 3: { - LogStep(3, "Read the PacketTxCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "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 4: { - LogStep(4, "Read the TxErrCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "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 5: { - LogStep(5, "Read the CollisionCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "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 6: { - LogStep(6, "Read the OverrunCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "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); } @@ -11628,7 +10908,7 @@ class Test_TC_FLW_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -11637,7 +10917,7 @@ class Test_TC_FLW_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -11645,7 +10925,7 @@ class Test_TC_FLW_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -11661,16 +10941,8 @@ class Test_TC_FLW_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); 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: @@ -11682,7 +10954,7 @@ class Test_TC_FLW_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -11694,7 +10966,7 @@ class Test_TC_FLW_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -11735,12 +11007,11 @@ class Test_TC_FLW_1_1Suite : public TestCommand } case 3: { LogStep(3, "Read the global attribute: 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 4: { - LogStep(4, "Read the global attribute: AttributeList"); + LogStep(4, "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); @@ -11816,7 +11087,7 @@ class Test_TC_FLW_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -11826,7 +11097,7 @@ class Test_TC_FLW_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -11836,7 +11107,7 @@ class Test_TC_FLW_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -11846,7 +11117,7 @@ class Test_TC_FLW_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } @@ -11892,7 +11163,7 @@ class Test_TC_FLW_2_1Suite : public TestCommand FlowMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "read the optional attribute: Tolerance"); + LogStep(4, "Read the optional attribute: Tolerance"); VerifyOrDo(!ShouldSkip("FLW.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); @@ -11948,7 +11219,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -11957,7 +11228,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -11965,7 +11236,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -11983,7 +11254,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); @@ -11994,7 +11265,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); @@ -12112,7 +11383,7 @@ class Test_TC_CGEN_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 2: @@ -12156,7 +11427,7 @@ class Test_TC_CGEN_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; default: @@ -12279,7 +11550,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -12288,7 +11559,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -12296,7 +11567,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); @@ -12311,7 +11582,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -12324,7 +11595,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -12426,7 +11697,7 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 2: @@ -12434,7 +11705,7 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -12464,7 +11735,7 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 9: @@ -12472,7 +11743,7 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967294UL)); } @@ -12712,7 +11983,7 @@ class Test_TC_I_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -12721,7 +11992,7 @@ class Test_TC_I_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -12730,7 +12001,7 @@ class Test_TC_I_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 4: @@ -12738,7 +12009,7 @@ class Test_TC_I_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); @@ -12753,9 +12024,8 @@ class Test_TC_I_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); } break; case 6: @@ -12763,8 +12033,8 @@ class Test_TC_I_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); } break; case 7: @@ -12772,7 +12042,7 @@ class Test_TC_I_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -12783,11 +12053,9 @@ class Test_TC_I_1_1Suite : public TestCommand 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(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 9: @@ -12797,9 +12065,11 @@ class Test_TC_I_1_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 0)); + VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 10: @@ -12852,13 +12122,12 @@ class Test_TC_I_1_1Suite : public TestCommand } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("I.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip(" !I.C.C40.Tx "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Read the optional command(TriggerEffect) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("I.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } @@ -12870,13 +12139,12 @@ class Test_TC_I_1_1Suite : public TestCommand } case 8: { LogStep(8, "Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("I.S.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip(" !I.S.C00.Tx "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Read the optional attribute(IdentifyQueryResponse) in GeneratedCommandList"); + VerifyOrDo(!ShouldSkip("I.S.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -12941,7 +12209,7 @@ class Test_TC_I_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -12951,7 +12219,7 @@ class Test_TC_I_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } @@ -13041,8 +12309,8 @@ class Test_TC_I_2_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 55U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 51U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 69U)); } break; case 3: @@ -13054,8 +12322,8 @@ class Test_TC_I_2_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 45U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 55U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 43U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 57U)); } break; case 5: @@ -13127,7 +12395,7 @@ class Test_TC_I_2_2Suite : public TestCommand ); } case 2: { - LogStep(2, "TH reads immediately IdentifyTime attribute from DUT1"); + LogStep(2, "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); @@ -13149,7 +12417,8 @@ class Test_TC_I_2_2Suite : public TestCommand LogStep(5, "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"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -13169,14 +12438,15 @@ class Test_TC_I_2_2Suite : public TestCommand ); } case 7: { - LogStep(7, "TH reads immediately IdentifyTime attribute from DUT2"); + LogStep(7, "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, "TH sends IdentifyQuery command to DUT "); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -13634,7 +12904,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -13643,7 +12913,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -13651,7 +12921,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -13667,7 +12937,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; @@ -13676,7 +12946,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; @@ -13689,7 +12959,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -13701,7 +12971,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 8: @@ -13828,7 +13098,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); } @@ -13838,7 +13108,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65533U)); } @@ -13848,7 +13118,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); } @@ -13858,7 +13128,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } @@ -13868,7 +13138,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } @@ -13976,7 +13246,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -13984,7 +13254,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); } @@ -13994,7 +13264,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); @@ -14005,7 +13275,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); } @@ -14015,7 +13285,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); @@ -14026,7 +13296,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; @@ -14035,7 +13305,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; @@ -14044,7 +13314,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; @@ -14053,7 +13323,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; @@ -14062,7 +13332,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; @@ -14071,7 +13341,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; @@ -14080,7 +13350,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -14089,7 +13359,6 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; case 13: @@ -14097,15 +13366,8 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; case 14: @@ -14117,7 +13379,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 15: @@ -14181,7 +13443,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand true, chip::NullOptional); } case 7: { - LogStep(7, "Read the optonal attribute(MinLevel) in AttributeList"); + LogStep(7, "Read the optonal 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); @@ -14212,13 +13474,12 @@ class Test_TC_LVL_1_1Suite : public TestCommand } case 12: { LogStep(12, "Read the global attribute: 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 13: { - LogStep(13, "Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip(" !LVL.S.F02 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Read the Feature-dependent(LVL.S.F02) attribute 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); } @@ -14246,7 +13507,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand class Test_TC_LVL_2_1Suite : public TestCommand { public: - Test_TC_LVL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_2_1", 24, credsIssuerConfig) + Test_TC_LVL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_2_1", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -14269,9 +13530,9 @@ class Test_TC_LVL_2_1Suite : public TestCommand uint8_t CurrentLevelValue; uint8_t MinLevelValue; - uint8_t MinLevelValue1; + uint8_t MinLevelFeatureMapNotSupportedValue; uint8_t MaxLevelValue; - uint8_t MaxLevelValue1; + uint8_t MaxLevelFeatureMapNotSupportedValue; uint16_t MinFrequencyValue; uint16_t MaxFrequencyValue; @@ -14292,221 +13553,206 @@ class Test_TC_LVL_2_1Suite : public TestCommand 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("currentLevel", value, 254U)); - } - 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); CurrentLevelValue = value; } break; - case 5: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 6: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); MinLevelValue = value; } break; - case 7: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - MinLevelValue1 = value; + MinLevelFeatureMapNotSupportedValue = value; } break; - case 8: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelValue)); MaxLevelValue = value; } break; - case 9: + 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", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelValue1)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelFeatureMapNotSupportedValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - MaxLevelValue1 = value; + MaxLevelFeatureMapNotSupportedValue = value; } break; - case 10: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelValue)); } break; - case 11: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelValue1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelValue1)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelFeatureMapNotSupportedValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelFeatureMapNotSupportedValue)); } break; - case 12: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 13: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); MinFrequencyValue = value; } break; - case 14: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); MaxFrequencyValue = value; } break; - case 15: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, MinFrequencyValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxFrequencyValue)); } break; - case 16: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 17: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelValue)); } break; - case 18: + 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", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelValue1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelValue1)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelFeatureMapNotSupportedValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelFeatureMapNotSupportedValue)); } break; - case 19: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 20: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 21: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 22: + case 19: 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)); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); } break; - case 23: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -14534,149 +13780,121 @@ class Test_TC_LVL_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Precondition: Reset level to 254"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 254U; - value.transitionTime = 0U; - value.optionMask = 1U; - value.optionOverride = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Precondition: 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 4: { - LogStep(4, "Reads the CurrentLevel attribute"); + LogStep(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 5: { - LogStep(5, "Reads the RemainingTime attribute"); + case 2: { + LogStep(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 6: { - LogStep(6, "Reads the MinLevel attribute"); + case 3: { + LogStep(3, "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 7: { - LogStep(7, "Reads the MinLevel attribute"); + case 4: { + LogStep(4, "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 8: { - LogStep(8, "Reads the MaxLevel attribute"); + case 5: { + LogStep(5, "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 9: { - LogStep(9, "Reads the MaxLevel attribute"); + case 6: { + LogStep(6, "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 10: { - LogStep(10, "Step 4b & 4C Reads the CurrentLevel attribute"); + 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 11: { - LogStep(11, "Step 4b & 4C Reads the CurrentLevel attribute"); + 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 12: { - LogStep(12, "Reads the CurrentFrequency attribute"); + case 9: { + LogStep(9, "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 13: { - LogStep(13, "Reads the MinFrequency attribute"); + case 10: { + LogStep(10, "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 14: { - LogStep(14, "Reads the MaxFrequency attribute"); + case 11: { + LogStep(11, "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 15: { - LogStep(15, "Step 7b & 7C Reads the CurrentFrequency attribute"); + 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 16: { - LogStep(16, "Reads the OnOffTransitionTime attribute"); + case 13: { + LogStep(13, "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 17: { - LogStep(17, "Reads the OnLevel attribute "); + case 14: { + LogStep(14, "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 18: { - LogStep(18, "Reads the OnLevel attribute "); + case 15: { + LogStep(15, "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 19: { - LogStep(19, "Reads the OnTransitionTime attribute "); + case 16: { + LogStep(16, "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 20: { - LogStep(20, "Reads the OffTransitionTime attribute "); + case 17: { + LogStep(17, "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 21: { - LogStep(21, "Reads the DefaultMoveRate attribute "); + case 18: { + LogStep(18, "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 22: { - LogStep(22, "Reads the Options attribute "); + case 19: { + LogStep(19, "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 23: { - LogStep(23, "Reads the StartUpCurrentLevel attribute "); + case 20: { + LogStep(20, "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); @@ -14750,7 +13968,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); OnOffTransitionTimeValue = value; @@ -14767,7 +13985,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn( CheckValue("onOffTransitionTime", value, mOnOffTransitionTimeConfigValue.HasValue() ? mOnOffTransitionTimeConfigValue.Value() : 10U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintNotValue("value", value, OnOffTransitionTimeValue)); } break; @@ -14776,7 +13994,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); OnLevelValue = value; @@ -14793,7 +14011,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("onLevel", value)); VerifyOrReturn(CheckValue("onLevel.Value()", value.Value(), mOnLevelConfigValue.HasValue() ? mOnLevelConfigValue.Value() : 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintNotValue("value", value, OnLevelValue)); } break; @@ -14802,7 +14020,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); OnTransitionTimeValue = value; @@ -14819,7 +14037,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("onTransitionTime", value)); VerifyOrReturn(CheckValue("onTransitionTime.Value()", value.Value(), mOnTransitionTimeConfigValue.HasValue() ? mOnTransitionTimeConfigValue.Value() : 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintNotValue("value", value, OnTransitionTimeValue)); } break; @@ -14828,7 +14046,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); OffTransitionTimeValue = value; @@ -14845,7 +14063,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("offTransitionTime", value)); VerifyOrReturn(CheckValue("offTransitionTime.Value()", value.Value(), mOffTransitionTimeConfigValue.HasValue() ? mOffTransitionTimeConfigValue.Value() : 10U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintNotValue("value", value, OffTransitionTimeValue)); } break; @@ -14854,7 +14072,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); DefaultMoveRatevalue = value; @@ -14871,7 +14089,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("defaultMoveRate", value)); VerifyOrReturn(CheckValue("defaultMoveRate.Value()", value.Value(), mDefaultMoveRateConfigValue.HasValue() ? mDefaultMoveRateConfigValue.Value() : 111U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintNotValue("value", value, DefaultMoveRatevalue)); } break; @@ -14880,7 +14098,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); StartUpCurrentLevelValue = value; @@ -14898,7 +14116,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn( CheckValue("startUpCurrentLevel.Value()", value.Value(), mStartUpCurrentLevelConfigValue.HasValue() ? mStartUpCurrentLevelConfigValue.Value() : 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintNotValue("value", value, StartUpCurrentLevelValue)); } break; @@ -15075,7 +14293,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand class Test_TC_LVL_3_1Suite : public TestCommand { public: - Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 22, credsIssuerConfig) + Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -15124,33 +14342,36 @@ class Test_TC_LVL_3_1Suite : public TestCommand } 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 4: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -15158,14 +14379,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 64U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -15173,14 +14394,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 100U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -15188,24 +14409,24 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 128U)); } break; - case 14: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -15213,17 +14434,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 64U)); } 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)); - break; - case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -15268,153 +14482,143 @@ class Test_TC_LVL_3_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads the MinLevel attribute"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads the MinLevel attribute"); 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 4: { - LogStep(4, "Reads the MaxLevel attribute"); + case 5: { + LogStep(5, "Reads the MaxLevel attribute"); 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 5: { - LogStep(5, "sends a MoveToLevelWithOnOff command"); + case 6: { + LogStep(6, "sends a MoveToLevelWithOnOff command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 64U; - value.transitionTime = 0U; + value.level = 64U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, value, chip::NullOptional ); } - case 6: { - LogStep(6, "Wait 100ms"); + case 7: { + LogStep(7, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Reads CurrentLevel attribute from DUT"); + case 8: { + LogStep(8, "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 8: { - LogStep(8, "sends a Move to level command"); + case 9: { + LogStep(9, "sends a Move to level command"); 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 = 0U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.level = 100U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional ); } - case 9: { - LogStep(9, "Wait 100 ms"); + case 10: { + LogStep(10, "Wait 100 ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Reads CurrentLevel attribute from DUT"); + case 11: { + LogStep(11, "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 11: { - LogStep(11, "sends a Move to level command"); + case 12: { + LogStep(12, "sends a Move to level command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 128U; - value.transitionTime = 100U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.level = 128U; + value.transitionTime = 100U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional ); } - case 12: { - LogStep(12, "Wait 11000ms"); + case 13: { + LogStep(13, "Wait 11000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 11000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Reads CurrentLevel attribute from DUT"); + case 14: { + LogStep(14, "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 14: { - LogStep(14, "Reads the OnOffTransitionTime attribute from the DUT"); + case 15: { + LogStep(15, "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 15: { - LogStep(15, "sends a Move to level command"); + case 16: { + LogStep(16, "sends a Move to level command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 64U; - value.transitionTime = 65535U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.level = 64U; + value.transitionTime = 65535U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional ); } - case 16: { - LogStep(16, "Wait 1000ms"); + case 17: { + LogStep(17, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Reads CurrentLevel attribute from DUT"); + case 18: { + LogStep(18, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && 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, "Reset level to 254"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 254U; - value.transitionTime = 0U; - value.optionMask = 1U; - value.optionOverride = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } case 19: { - LogStep(19, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Precondition send Off Command"); + LogStep(19, "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; @@ -15422,8 +14626,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 21: { - LogStep(21, "Check on/off attribute value is false after off command"); + 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); } @@ -15435,7 +14639,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand class Test_TC_LVL_4_1Suite : public TestCommand { public: - Test_TC_LVL_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_4_1", 22, credsIssuerConfig) + Test_TC_LVL_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_4_1", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -15488,42 +14692,45 @@ class Test_TC_LVL_4_1Suite : public TestCommand } 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); MinlevelValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); 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)); 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)); { uint8_t value; @@ -15531,18 +14738,18 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, MaxlevelValue)); } 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)); + shouldContinue = true; + break; + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -15552,23 +14759,19 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 14: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); DefaultMoveRateValue = 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)); - shouldContinue = true; break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -15576,15 +14779,12 @@ class Test_TC_LVL_4_1Suite : public TestCommand 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)); - break; - case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -15629,48 +14829,59 @@ class Test_TC_LVL_4_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads Minlevel attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads Minlevel attribute from 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 4: { - LogStep(4, "sends a MoveToLevelWithOnOff command"); + case 5: { + LogStep(5, "sends a MoveToLevelWithOnOff command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 1U; - value.transitionTime = 0U; + value.level = 1U; + value.transitionTime = 0U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, value, chip::NullOptional ); } - case 5: { - LogStep(5, "reads max level attribute from DUT"); + case 6: { + LogStep(6, "reads max level attribute from 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, "sends a Move up command"); + case 7: { + LogStep(7, "sends a Move up command"); 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 = 32U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.moveMode = static_cast(0); + value.rate = 32U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional ); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Physically verify that the DUT moves at a rate of 32 units per second or as close as possible to this rate " "and completes moving to its maximum level"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.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); @@ -15678,36 +14889,38 @@ class Test_TC_LVL_4_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Wait 9000ms"); + case 9: { + LogStep(9, "Wait 9000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Reads CurrentLevel attribute from DUT"); + case 10: { + LogStep(10, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000 && LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "sends a MoveWithOnOff command"); + case 11: { + LogStep(11, "sends a Move command"); 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(1); - value.rate = 64U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveWithOnOff::Id, value, + chip::app::Clusters::LevelControl::Commands::Move::Type value; + value.moveMode = static_cast(1); + value.rate = 64U; + value.optionsMask = 1U; + value.optionsOverride = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional ); } - case 11: { - LogStep(11, + case 12: { + LogStep(12, "Physically verify that the DUT moves at a rate of 64 units per second or as close as possible to this rate " "and complete moving to its minimum level"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.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' for successgarbage: not in length on purpose", 28); @@ -15715,51 +14928,52 @@ class Test_TC_LVL_4_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 12: { - LogStep(12, "Wait 5000ms"); + case 13: { + LogStep(13, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "reads CurrentLevel attribute from DUT"); + case 14: { + LogStep(14, "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 14: { - LogStep(14, "reads default move rate attribute from DUT"); + case 15: { + LogStep(15, "reads default move rate attribute from 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 15: { - LogStep(15, "sends a Move up command at default move rate"); + case 16: { + LogStep(16, "sends a Move up command at default move rate"); VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; - value.moveMode = static_cast(0); - value.rate = 255U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.moveMode = static_cast(0); + value.rate = 255U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional ); } - case 16: { - LogStep(16, "Wait 100ms"); + case 17: { + LogStep(17, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Physically verify that the device moves at the rate recorded in step 3a and completes moving to its maximum " "level"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C05.Rsp && LVL.S.A0014"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -15767,29 +14981,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 18: { - LogStep(18, "Reset level to 254"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 254U; - value.transitionTime = 0U; - value.optionMask = 1U; - value.optionOverride = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } case 19: { - LogStep(19, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Precondition send Off Command"); + LogStep(19, "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; @@ -15797,8 +14990,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 21: { - LogStep(21, "Check on/off attribute value is false after off command"); + 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); } @@ -15810,7 +15003,7 @@ class Test_TC_LVL_4_1Suite : public TestCommand class Test_TC_LVL_5_1Suite : public TestCommand { public: - Test_TC_LVL_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_5_1", 16, credsIssuerConfig) + Test_TC_LVL_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_5_1", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -15862,56 +15055,87 @@ class Test_TC_LVL_5_1Suite : public TestCommand } 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); MinlevelValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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("currentLevel", value, MinlevelValue)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckValue("currentLevel", value, static_cast(MinlevelValue + 1))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); CurrentlevelValue = value; } break; - case 6: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", value, 2U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + } break; - case 7: + 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 8: + 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", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 60U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 68U)); + VerifyOrReturn(CheckValue("currentLevel", value, 66U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); } break; - case 9: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", value, 66U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + } break; - case 10: + 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 11: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -15919,17 +15143,34 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, CurrentlevelValue)); } break; - case 12: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", value, CurrentlevelValue)); + } break; - case 13: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", value, 2U)); + } break; - case 14: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", value, 2U)); + } break; - case 15: + 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; @@ -15974,106 +15215,178 @@ class Test_TC_LVL_5_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads Minlevel attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads Minlevel attribute from 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 4: { - LogStep(4, "Sends MoveToLevelWithOnOff command to DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "Sends MoveToLevelWithOnOff command to DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = MinlevelValue; - value.transitionTime = 0U; + value.level = static_cast(MinlevelValue + 1); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, value, chip::NullOptional ); } - case 5: { - LogStep(5, "Reads current level attribute from DUT"); - 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 6: { - LogStep(6, "Sends step up command to DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Sends MoveToLevelWithOnOff command to DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && !LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::Step::Type value; - value.stepMode = static_cast(0); - value.stepSize = 64U; - value.transitionTime = 20U; - value.optionMask = 1U; - value.optionOverride = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Step::Id, value, - chip::NullOptional + chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; + value.level = 2U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, + value, chip::NullOptional ); } case 7: { - LogStep(7, "Wait 4000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 4000UL; - return WaitForMs(kIdentityAlpha, value); + LogStep(7, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); } case 8: { LogStep(8, "Reads current level attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("LVL.S.A0000 && !LVL.S.A0002 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Sends a StepWithOnOff command"); - VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Sends step up command to DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type value; - value.stepMode = static_cast(1); - value.stepSize = 64U; - value.transitionTime = 20U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::StepWithOnOff::Id, value, + chip::app::Clusters::LevelControl::Commands::Step::Type value; + value.stepMode = static_cast(0); + value.stepSize = 64U; + value.transitionTime = 20U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Step::Id, value, chip::NullOptional ); } case 10: { - LogStep(10, "Wait 4000ms"); + LogStep(10, "Sends step up command to DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && !LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LevelControl::Commands::Step::Type value; + value.stepMode = static_cast(0); + value.stepSize = 64U; + value.transitionTime = 20U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Step::Id, value, + chip::NullOptional + + ); + } + case 11: { + LogStep(11, "Wait 2500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 4000UL; + value.ms = 2500UL; return WaitForMs(kIdentityAlpha, value); } - case 11: { - LogStep(11, "Reads current level attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp && LVL.S.M.VarRate"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Reset level to 254"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp && !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, "Sends a StepWithOnOff command"); + VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 254U; - value.transitionTime = 0U; - value.optionMask = 1U; - value.optionOverride = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, + chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type value; + value.stepMode = static_cast(1); + value.stepSize = 64U; + value.transitionTime = 20U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::StepWithOnOff::Id, value, chip::NullOptional ); } - case 13: { - LogStep(13, "Wait 100ms"); + case 15: { + LogStep(15, "Sends a StepWithOnOff command"); + VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && !LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type value; + value.stepMode = static_cast(1); + value.stepSize = 64U; + value.transitionTime = 20U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::StepWithOnOff::Id, value, + chip::NullOptional + + ); + } + case 16: { + LogStep(16, "Wait 2500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 2500UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "Precondition send Off Command"); + case 17: { + LogStep(17, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C06.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, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C06.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 19: { + LogStep(19, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && 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, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && !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; @@ -16081,8 +15394,8 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 15: { - LogStep(15, "Check on/off attribute value is false after off command"); + 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); } @@ -16094,7 +15407,7 @@ class Test_TC_LVL_5_1Suite : public TestCommand class Test_TC_LVL_6_1Suite : public TestCommand { public: - Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 20, credsIssuerConfig) + Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -16146,20 +15459,23 @@ class Test_TC_LVL_6_1Suite : public TestCommand } 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); MinlevelValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -16169,65 +15485,58 @@ class Test_TC_LVL_6_1Suite : public TestCommand CurrentLevelValue = 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)); + 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))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 22U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 28U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 21U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 29U)); VerifyOrReturn(CheckConstraintNotValue("value", value, CurrentLevelValue)); } 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)); - 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)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 45U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 55U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 43U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 57U)); VerifyOrReturn(CheckConstraintNotValue("value", value, CurrentLevelValue)); } 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)); - break; - case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -16272,65 +15581,76 @@ class Test_TC_LVL_6_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads Minlevel attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads Minlevel attribute from 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 4: { - LogStep(4, "Sends MoveToLevelWithOnOff command to DUT"); + case 5: { + LogStep(5, "Sends MoveToLevelWithOnOff command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 1U; - value.transitionTime = 0U; + value.level = 1U; + value.transitionTime = 0U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, value, chip::NullOptional ); } - case 5: { - LogStep(5, "Reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "Reads CurrentLevel attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Sends a move up command to DUT"); + case 7: { + LogStep(7, "Sends a move up command to DUT"); 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 = 5U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.moveMode = static_cast(0); + value.rate = 5U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional ); } - case 7: { - LogStep(7, "Wait 5000ms"); + case 8: { + LogStep(8, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Sends stop command to DUT"); + case 9: { + LogStep(9, "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.optionMask = 1U; - value.optionOverride = 1U; + value.optionsMask = 1U; + value.optionsOverride = 1U; 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"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "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); @@ -16338,48 +15658,49 @@ class Test_TC_LVL_6_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Reads CurrentLevel attribute from DUT"); + case 11: { + LogStep(11, "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, "Sends a move up command to DUT"); + case 12: { + LogStep(12, "Sends a move up command to DUT"); 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 = 5U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.moveMode = static_cast(0); + value.rate = 5U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional ); } - case 12: { - LogStep(12, "Wait 5000ms"); + case 13: { + LogStep(13, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Sends stop command to DUT"); + case 14: { + LogStep(14, "Sends StopWithOnOff command to DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::Stop::Type value; - value.optionMask = 1U; - value.optionOverride = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Stop::Id, value, + chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type value; + value.optionsMask = 1U; + value.optionsOverride = 1U; + 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"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "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); @@ -16387,36 +15708,15 @@ class Test_TC_LVL_6_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Reads CurrentLevel attribute from DUT"); + case 16: { + LogStep(16, "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, "Reset level to 254"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 254U; - value.transitionTime = 0U; - value.optionMask = 1U; - value.optionOverride = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } case 17: { - LogStep(17, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Precondition send Off Command"); + LogStep(17, "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; @@ -16424,8 +15724,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 19: { - LogStep(19, "Check on/off attribute value is false after off command"); + 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); } @@ -16481,7 +15781,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -16490,7 +15790,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -16512,7 +15812,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65533UL)); VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 5)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 4: @@ -16526,7 +15826,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -16538,7 +15838,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -16655,7 +15955,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -16663,7 +15963,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); } @@ -16673,7 +15973,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -16686,7 +15986,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -16695,7 +15995,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -16731,7 +16031,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand true, chip::NullOptional); } case 2: { - LogStep(2, "Read the optional global attribute: FeatureMap"); + LogStep(2, "Read the global attribute: FeatureMap"); VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::FeatureMap::Id, true, @@ -16815,7 +16115,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -16824,7 +16124,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -16833,7 +16133,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 4: @@ -16841,7 +16141,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -16854,7 +16154,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -16863,7 +16163,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -16872,7 +16172,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -16883,7 +16183,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; @@ -16919,7 +16219,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand ApplicationLauncher::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the optional global attribute: FeatureMap"); + LogStep(2, "Read the global attribute: FeatureMap"); VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.AP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Attributes::FeatureMap::Id, true, chip::NullOptional); @@ -16932,7 +16232,6 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand } case 4: { LogStep(4, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.A0000 && APPLAUNCHER.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -17021,7 +16320,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -17029,8 +16328,9 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 1UL)); } break; case 3: @@ -17038,7 +16338,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -17051,7 +16351,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -17060,7 +16360,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -17069,7 +16369,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -17085,7 +16385,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 8: @@ -17120,14 +16420,12 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand chip::NullOptional); } case 2: { - LogStep(2, "Read the optional global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.NU"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Read the global attribute: FeatureMap"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000 && MEDIAINPUT.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -17216,7 +16514,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -17225,7 +16523,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -17233,7 +16531,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -17250,7 +16548,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -17262,7 +16560,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -17336,7 +16634,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { public: Test_TC_CHANNEL_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CHANNEL_1_6", 10, credsIssuerConfig) + TestCommand("Test_TC_CHANNEL_1_6", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -17379,7 +16677,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -17387,7 +16685,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); } @@ -17397,7 +16695,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -17410,7 +16708,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -17419,7 +16717,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -17428,7 +16726,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; @@ -17437,10 +16735,8 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 8: @@ -17448,10 +16744,41 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + 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))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", 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, 1UL)); + } + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -17483,15 +16810,13 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand chip::NullOptional); } case 2: { - LogStep(2, "Read the optional global attribute: FeatureMap"); + LogStep(2, "Read the global attribute: FeatureMap"); VerifyOrDo(!ShouldSkip("CHANNEL.S.CL || CHANNEL.S.LI"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0000 && CHANNEL.S.A0001 && CHANNEL.S.A0002"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -17514,17 +16839,37 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand chip::NullOptional); } case 7: { - LogStep(7, "Read the global attribute: AcceptedCommandList"); + LogStep(7, "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 8: { - LogStep(8, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::GeneratedCommandList::Id, true, + LogStep(8, "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 9: { - LogStep(9, + LogStep(9, "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 10: { + LogStep(10, "Read the global attribute: GeneratedCommandList"); + VerifyOrDo(!ShouldSkip(" !CHANNEL.S.C01.Tx "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); + } + case 11: { + LogStep(11, "Read the global attribute: GeneratedCommandList"); + VerifyOrDo(!ShouldSkip("CHANNEL.S.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); + } + case 12: { + LogStep(12, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -17543,7 +16888,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { public: Test_TC_MEDIAPLAYBACK_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAPLAYBACK_1_7", 13, credsIssuerConfig) + TestCommand("Test_TC_MEDIAPLAYBACK_1_7", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -17586,7 +16931,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -17594,7 +16939,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); } @@ -17604,7 +16949,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); @@ -17618,7 +16963,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -17627,7 +16972,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; @@ -17636,7 +16981,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; @@ -17645,7 +16990,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; @@ -17654,7 +16999,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; @@ -17663,7 +17008,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; @@ -17672,7 +17017,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -17683,11 +17028,83 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + 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, 4UL)); + } + 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, 5UL)); + } + 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, 6UL)); + } + 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, 7UL)); + } + 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, 8UL)); + } + 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, 9UL)); + } + 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, 11UL)); + } + 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)); shouldContinue = true; break; @@ -17719,7 +17136,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand true, chip::NullOptional); } case 2: { - LogStep(2, "Read the optional global attribute: FeatureMap"); + LogStep(2, "Read the global attribute: FeatureMap"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.AS || MEDIAPLAYBACK.S.VS"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::FeatureMap::Id, true, chip::NullOptional); @@ -17771,12 +17188,60 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Read the global attribute: GeneratedCommandList"); + LogStep(11, "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::GeneratedCommandList::Id, true, chip::NullOptional); + MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, + LogStep(12, "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 13: { + LogStep(13, "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 14: { + LogStep(14, "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 15: { + LogStep(15, "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 16: { + LogStep(16, "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 17: { + LogStep(17, "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 18: { + LogStep(18, "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 19: { + LogStep(19, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, + MediaPlayback::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 20: { + LogStep(20, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -17838,7 +17303,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -17846,7 +17311,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); } @@ -17856,7 +17321,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); @@ -17871,7 +17336,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -17886,7 +17351,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 1UL)); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -17898,7 +17363,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -18021,7 +17486,7 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -18030,7 +17495,7 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -18038,9 +17503,8 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + 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)); @@ -18053,13 +17517,8 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "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)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; case 5: @@ -18067,7 +17526,7 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -18076,7 +17535,7 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -18118,13 +17577,12 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand } case 3: { LogStep(3, "Read the global attribute: 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 4: { - LogStep(4, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip(" !TGTNAV.S.A0001 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "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); } @@ -18157,7 +17615,7 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand class Test_TC_APBSC_1_10Suite : public TestCommand { public: - Test_TC_APBSC_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_APBSC_1_10", 7, credsIssuerConfig) + Test_TC_APBSC_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_APBSC_1_10", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -18200,7 +17658,7 @@ class Test_TC_APBSC_1_10Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -18209,7 +17667,7 @@ class Test_TC_APBSC_1_10Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -18217,7 +17675,7 @@ class Test_TC_APBSC_1_10Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); @@ -18231,6 +17689,33 @@ class Test_TC_APBSC_1_10Suite : public TestCommand } 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)); + } + 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, 3UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -18239,10 +17724,10 @@ class Test_TC_APBSC_1_10Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -18251,10 +17736,10 @@ class Test_TC_APBSC_1_10Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -18292,23 +17777,39 @@ class Test_TC_APBSC_1_10Suite : public TestCommand } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0000 && APBSC.S.A0001 && APBSC.S.A0003"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Read the global attribute: AcceptedCommandList"); + LogStep(4, "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::AcceptedCommandList::Id, true, chip::NullOptional); + ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Read the global attribute: GeneratedCommandList"); + LogStep(5, "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::GeneratedCommandList::Id, true, chip::NullOptional); + ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, + LogStep(6, "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 7: { + LogStep(7, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -18370,7 +17871,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -18378,7 +17879,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); } @@ -18388,7 +17889,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -18401,7 +17902,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -18410,7 +17911,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -18419,7 +17920,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -18428,7 +17929,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -18437,7 +17938,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; @@ -18473,15 +17974,13 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand ContentLauncher::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the optional global attribute: FeatureMap"); + LogStep(2, "Read the global attribute: FeatureMap"); VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.CS || CONTENTLAUNCHER.S.UP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.A0000 && CONTENTLAUNCHER.S.A0001"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -18577,7 +18076,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -18586,7 +18085,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -18594,7 +18093,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -18607,7 +18106,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); @@ -18618,7 +18117,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -20025,7 +19524,8 @@ class Test_TC_MEDIAINPUT_3_13Suite : public TestCommand } case 3: { LogStep(3, "TH reads the InputList attribute from the DUT to show list of Inputs available"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000 && MEDIAINPUT.S.C0003"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -20173,7 +19673,7 @@ class Test_TC_CHANNEL_5_2Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 2: @@ -20221,7 +19721,7 @@ class Test_TC_CHANNEL_5_2Suite : public TestCommand } case 2: { LogStep(2, "TH sends a ChangeChannelByNumber command"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.C0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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; @@ -20233,7 +19733,7 @@ class Test_TC_CHANNEL_5_2Suite : public TestCommand } case 3: { LogStep(3, "Verify that the channel has changed on the device"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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( @@ -20310,7 +19810,7 @@ class Test_TC_CHANNEL_5_3Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 3: @@ -20334,7 +19834,7 @@ class Test_TC_CHANNEL_5_3Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "ChannelInfo", "ChannelInfo")); } break; default: @@ -20381,7 +19881,7 @@ class Test_TC_CHANNEL_5_3Suite : public TestCommand } case 4: { LogStep(4, "Sends a SkipChannel command to the DUT"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.C0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CHANNEL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Channel::Commands::SkipChannel::Type value; value.count = 1U; @@ -20392,7 +19892,7 @@ class Test_TC_CHANNEL_5_3Suite : public TestCommand } case 5: { LogStep(5, "Verify that the channel has changed on the device"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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( @@ -20553,7 +20053,7 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 1: { LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -20563,13 +20063,14 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 2: { LogStep(2, "Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "Sends a Play command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -20579,7 +20080,7 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 4: { LogStep(4, "Verify that the media state is playing"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 = @@ -20589,14 +20090,15 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand return UserPrompt(kIdentityAlpha, value); } case 5: { - LogStep(5, "Reads the playback state attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "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, "sends a Pause command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -20606,7 +20108,7 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 7: { LogStep(7, "Verify that the media is paused"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 = @@ -20616,13 +20118,15 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand return UserPrompt(kIdentityAlpha, value); } case 8: { - LogStep(8, "Reads the playback state attribute"); + LogStep(8, "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, "Sends a Stop command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::StopPlayback::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::StopPlayback::Id, value, @@ -20632,7 +20136,7 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 10: { LogStep(10, "Verify that the media is stoped"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 = @@ -20642,8 +20146,9 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand return UserPrompt(kIdentityAlpha, value); } case 11: { - LogStep(11, "Reads the playback state attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "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); } @@ -20829,7 +20334,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 1: { LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -20839,13 +20344,14 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 2: { LogStep(2, "Reads the CurrentState attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "Sends a Play command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -20855,7 +20361,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 4: { LogStep(4, "Verify that the media state is playing"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 = @@ -20866,13 +20372,14 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 5: { LogStep(5, "Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "Sends a StartOver command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -20882,7 +20389,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 7: { LogStep(7, "Verify that the media is started over"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 = @@ -20893,7 +20400,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 8: { LogStep(8, "Sends a Next command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -20903,7 +20410,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 9: { LogStep(9, "Verify that the next media item in the queue has been loaded"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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( @@ -20914,7 +20421,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 10: { LogStep(10, "Sends a Previous command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -20924,7 +20431,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 11: { LogStep(11, "Verify that the previous media item in the queue has been loaded"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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( @@ -20935,7 +20442,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 12: { LogStep(12, "Sends a SkipForward command to the DUT "); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type value; value.deltaPositionMilliseconds = 10000ULL; @@ -20946,7 +20453,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 13: { LogStep(13, "Verify that the media has skipped forward 10 seconds"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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( @@ -20957,13 +20464,14 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 14: { LogStep(14, "Reads the SampledPosition attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "Sends a SkipBackward command to the DUT "); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type value; value.deltaPositionMilliseconds = 10000ULL; @@ -20974,7 +20482,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 16: { LogStep(16, "Verify that the media has skipped backward 10 seconds"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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( @@ -20985,7 +20493,8 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 17: { LogStep(17, "Reads the SampledPosition attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } @@ -21113,7 +20622,7 @@ class Test_TC_MEDIAPLAYBACK_6_3Suite : public TestCommand } case 1: { LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -21123,7 +20632,7 @@ class Test_TC_MEDIAPLAYBACK_6_3Suite : public TestCommand } case 2: { LogStep(2, "Sends a Seek command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C000B"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::Seek::Type value; value.position = 10000ULL; @@ -21134,7 +20643,7 @@ class Test_TC_MEDIAPLAYBACK_6_3Suite : public TestCommand } case 3: { LogStep(3, "Verify that the media has moved to 10 seconds from the starting point"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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( @@ -21145,7 +20654,8 @@ class Test_TC_MEDIAPLAYBACK_6_3Suite : public TestCommand } case 4: { LogStep(4, "Reads the SampledPosition attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } @@ -21191,7 +20701,7 @@ class Test_TC_MEDIAPLAYBACK_6_3Suite : public TestCommand } case 9: { LogStep(9, "Sends a Seek command Position value beyond the furthest valid position"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C000B"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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; @@ -21390,7 +20900,7 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 1: { LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -21400,7 +20910,8 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 2: { LogStep(2, "Reads the CurrentState attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } @@ -21412,7 +20923,7 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 4: { LogStep(4, "Sends a FastForward command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -21422,19 +20933,21 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 5: { LogStep(5, "Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 6: { LogStep(6, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 7: { LogStep(7, "Sends a FastForward command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -21444,13 +20957,14 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 8: { LogStep(8, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 9: { LogStep(9, "Sends a Rewind command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -21460,24 +20974,25 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 10: { LogStep(10, "Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 11: { LogStep(11, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = - chip::Span("Please enter 'y' if PlaybackSpeed value is -2garbage: not in length on purpose", 45); + chip::Span("Please enter 'y' if PlaybackSpeed value is -1garbage: not in length on purpose", 45); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } case 12: { LogStep(12, "Sends a Rewind command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -21498,7 +21013,7 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 14: { LogStep(14, "Sends a Play command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -21508,13 +21023,14 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 15: { LogStep(15, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 16: { LogStep(16, "Sends consecutive FastForward commands"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -21524,7 +21040,7 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 17: { LogStep(17, "Sends consecutive Rewind commands"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -21583,7 +21099,7 @@ class Test_TC_AUDIOOUTPUT_7_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "OutPutInfo")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 2: @@ -21695,7 +21211,7 @@ class Test_TC_AUDIOOUTPUT_7_2Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "OutPutInfo")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); audioOutputListValues = value; } break; @@ -21814,7 +21330,7 @@ class Test_TC_TGTNAV_8_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -21824,7 +21340,7 @@ class Test_TC_TGTNAV_8_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); TargetListValues = value; } break; @@ -21890,7 +21406,7 @@ class Test_TC_TGTNAV_8_1Suite : public TestCommand } case 4: { LogStep(4, "Reads the CurrentTarget attribute"); - VerifyOrDo(!ShouldSkip("TGTNAV.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TGTNAV.S.A0001 && TGTNAV.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::CurrentTarget::Id, true, chip::NullOptional); } @@ -21923,6 +21439,8 @@ class Test_TC_APBSC_9_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + chip::VendorId vendorID; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -21944,16 +21462,17 @@ class Test_TC_APBSC_9_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::VendorId value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "vendor-id")); + VerifyOrReturn(CheckConstraintType("value", "vendor_id", "vendor_id")); + vendorID = value; } break; case 3: @@ -21961,8 +21480,8 @@ class Test_TC_APBSC_9_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 256)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 256)); } break; case 4: @@ -21970,7 +21489,7 @@ class Test_TC_APBSC_9_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -21980,7 +21499,7 @@ class Test_TC_APBSC_9_1Suite : public TestCommand { chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "struct")); + VerifyOrReturn(CheckConstraintType("value", "ApplicationBasicApplication", "ApplicationBasicApplication")); } break; case 6: @@ -21997,8 +21516,8 @@ class Test_TC_APBSC_9_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; case 8: @@ -22006,7 +21525,7 @@ class Test_TC_APBSC_9_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -22130,7 +21649,7 @@ class Test_TC_CONTENTLAUNCHER_10_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 2: @@ -22138,7 +21657,7 @@ class Test_TC_CONTENTLAUNCHER_10_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; default: @@ -22226,7 +21745,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -22235,7 +21754,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -22244,7 +21763,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 4: @@ -22252,7 +21771,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -22269,7 +21788,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; @@ -22278,7 +21797,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; @@ -22287,7 +21806,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -22300,7 +21819,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 9: @@ -22697,7 +22216,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -22706,7 +22225,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -22714,7 +22233,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -22734,7 +22253,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -22746,7 +22265,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -22776,7 +22295,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); + LogStep(1, "Read the global attribute: ClusterRevision"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::ClusterRevision::Id, true, chip::NullOptional); } @@ -22861,7 +22380,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } @@ -22871,7 +22390,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -22881,7 +22400,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 273U)); } @@ -22892,7 +22411,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("pirOccupiedToUnoccupiedDelay", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -22903,7 +22422,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("pirUnoccupiedToOccupiedDelay", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -22914,7 +22433,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("pirUnoccupiedToOccupiedThreshold", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } @@ -22925,7 +22444,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("ultrasonicOccupiedToUnoccupiedDelay", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -22936,7 +22455,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("ultrasonicUnoccupiedToOccupiedDelay", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -22947,7 +22466,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("ultrasonicUnoccupiedToOccupiedThreshold", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } @@ -22958,7 +22477,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("physicalContactOccupiedToUnoccupiedDelay", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -22969,7 +22488,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("physicalContactUnoccupiedToOccupiedDelay", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -22980,7 +22499,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("physicalContactUnoccupiedToOccupiedThreshold", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } @@ -23134,7 +22653,7 @@ class Test_TC_OO_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -23143,7 +22662,7 @@ class Test_TC_OO_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -23152,7 +22671,7 @@ class Test_TC_OO_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 4: @@ -23160,12 +22679,8 @@ class Test_TC_OO_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16385UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16386UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -23178,13 +22693,11 @@ class Test_TC_OO_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "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)); + 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 6: @@ -23192,13 +22705,10 @@ class Test_TC_OO_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); } break; case 7: @@ -23206,10 +22716,10 @@ class Test_TC_OO_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); } break; case 8: @@ -23221,7 +22731,7 @@ class Test_TC_OO_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 9: @@ -23269,25 +22779,23 @@ class Test_TC_OO_1_1Suite : public TestCommand } case 4: { LogStep(4, "Read the global attribute: 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 5: { - LogStep(5, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip(" !OO.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "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 6: { LogStep(6, "Read the global attribute: 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 7: { - LogStep(7, "Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip(" !OO.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "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); } @@ -23357,7 +22865,7 @@ class Test_TC_OO_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 2: @@ -23365,7 +22873,7 @@ class Test_TC_OO_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 3: @@ -23373,7 +22881,7 @@ class Test_TC_OO_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -23383,7 +22891,7 @@ class Test_TC_OO_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -23393,7 +22901,7 @@ class Test_TC_OO_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } break; default: @@ -23419,30 +22927,30 @@ class Test_TC_OO_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the mandatory attribute: OnOff"); + LogStep(1, "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, "read LT attribute: GlobalSceneControl"); + LogStep(2, "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, "read LT attribute: OnTime"); + LogStep(3, "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, "read LT attribute: OffWaitTime"); + LogStep(4, "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, "read LT attribute: StartUpOnOff"); + LogStep(5, "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); @@ -23748,7 +23256,8 @@ class Test_TC_OO_2_2Suite : public TestCommand } case 17: { LogStep(17, "Operate on device to set OnOff attribute manually to on"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -23758,12 +23267,14 @@ class Test_TC_OO_2_2Suite : public TestCommand } case 18: { LogStep(18, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, "Operate on device to set OnOff attribute manually to off"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -23773,7 +23284,8 @@ class Test_TC_OO_2_2Suite : public TestCommand } case 20: { LogStep(20, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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: { @@ -24283,7 +23795,7 @@ class Test_TC_PS_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -24291,9 +23803,9 @@ class Test_TC_PS_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15UL)); } break; case 3: @@ -24301,7 +23813,7 @@ class Test_TC_PS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -24317,14 +23829,8 @@ class Test_TC_PS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); 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)); } break; case 5: @@ -24332,15 +23838,10 @@ class Test_TC_PS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); + 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)); } break; case 6: @@ -24348,12 +23849,9 @@ class Test_TC_PS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); 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)); } break; case 7: @@ -24361,13 +23859,8 @@ class Test_TC_PS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 24UL)); VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); } break; @@ -24380,7 +23873,7 @@ class Test_TC_PS_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 9: @@ -24392,7 +23885,7 @@ class Test_TC_PS_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 10: @@ -24438,25 +23931,25 @@ class Test_TC_PS_1_1Suite : public TestCommand chip::NullOptional); } case 4: { - LogStep(4, "Read the Feature related(PS.S.F00-WIRED) attribute in AttributeList"); + LogStep(4, "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 5: { - LogStep(5, "Read the Feature related(PS.S.F01-BAT) attribute in AttributeList"); + LogStep(5, "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 6: { - LogStep(6, "Read the Feature related(PS.S.F02-RECHG) attribute in AttributeList"); + LogStep(6, "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 7: { - LogStep(7, "Read the Feature related(PS.S.F03-REPLC) attribute in AttributeList"); + LogStep(7, "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); @@ -24532,7 +24025,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::Clusters::PowerSource::PowerSourceStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -24542,7 +24035,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -24552,7 +24045,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); } break; case 4: @@ -24560,7 +24053,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -24570,7 +24063,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -24580,7 +24073,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::Clusters::PowerSource::WiredCurrentType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } @@ -24590,7 +24083,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -24600,7 +24093,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -24610,7 +24103,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -24620,7 +24113,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 11: @@ -24628,7 +24121,8 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 8)); } break; case 12: @@ -24636,7 +24130,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -24646,7 +24140,9 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); } break; case 14: @@ -24654,7 +24150,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -24664,7 +24160,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::Clusters::PowerSource::BatChargeLevel value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } @@ -24674,7 +24170,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 17: @@ -24682,7 +24178,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::Clusters::PowerSource::BatReplaceability value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -24692,7 +24188,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 19: @@ -24700,7 +24196,8 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 8)); } break; case 20: @@ -24708,8 +24205,8 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 60)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 60)); } break; case 21: @@ -24717,7 +24214,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 80UL)); } @@ -24727,8 +24224,8 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 20)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 20)); } break; case 23: @@ -24736,8 +24233,8 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 20)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 20)); } break; case 24: @@ -24745,7 +24242,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32UL)); } @@ -24755,7 +24252,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -24765,7 +24262,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -24775,7 +24272,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::Clusters::PowerSource::BatChargeState value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -24785,7 +24282,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -24795,7 +24292,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 30: @@ -24803,7 +24300,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -24813,7 +24310,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -25075,7 +24572,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -25084,7 +24581,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -25093,7 +24590,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 4: @@ -25101,7 +24598,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -25117,7 +24614,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; @@ -25126,7 +24623,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; @@ -25135,7 +24632,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; @@ -25144,7 +24641,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; @@ -25153,7 +24650,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; @@ -25162,7 +24659,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; @@ -25175,7 +24672,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 12: @@ -25187,7 +24684,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 13: @@ -25345,7 +24842,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -25355,7 +24852,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -25365,7 +24862,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -25375,7 +24872,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } @@ -25385,7 +24882,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -25395,7 +24892,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -25405,7 +24902,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -25415,7 +24912,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } @@ -25425,7 +24922,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { int8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int8")); + VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -127)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); } @@ -25514,7 +25011,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand class Test_TC_PCC_1_1Suite : public TestCommand { public: - Test_TC_PCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_1_1", 7, credsIssuerConfig) + Test_TC_PCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_1_1", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25557,7 +25054,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -25566,7 +25063,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -25574,7 +25071,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -25590,6 +25087,150 @@ class Test_TC_PCC_1_1Suite : public TestCommand } 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, 3UL)); + } + 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, 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, 5UL)); + } + 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)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); + } + 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, 21UL)); + } + 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, 22UL)); + } + 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, 23UL)); + } + 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, 33UL)); + } + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25598,10 +25239,10 @@ class Test_TC_PCC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25610,10 +25251,10 @@ class Test_TC_PCC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -25655,17 +25296,113 @@ class Test_TC_PCC_1_1Suite : public TestCommand PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "TH reads the AcceptedCommandList attribute from the DUT"); + LogStep(4, "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::AcceptedCommandList::Id, true, chip::NullOptional); + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "TH reads the GeneratedCommandList attribute from the DUT"); + LogStep(5, "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::GeneratedCommandList::Id, true, chip::NullOptional); + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "TH reads the EventList attribute from the DUT"); + LogStep(6, "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 7: { + LogStep(7, "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 8: { + LogStep(8, "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 9: { + LogStep(9, "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 10: { + LogStep(10, "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 11: { + LogStep(11, "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 12: { + LogStep(12, "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 13: { + LogStep(13, "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 14: { + LogStep(14, "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 15: { + LogStep(15, "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 16: { + LogStep(16, "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 17: { + LogStep(17, "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 18: { + LogStep(18, "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 19: { + LogStep(19, "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 20: { + LogStep(20, "TH reads the AcceptedCommandList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 21: { + LogStep(21, "TH reads the GeneratedCommandList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 22: { + LogStep(22, "TH reads the EventList attribute from the DUT"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -25724,7 +25461,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -25734,7 +25471,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -25744,161 +25481,117 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 4: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 5: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 6: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 7: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 8: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 9: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 10: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 11: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 12: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 13: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 14: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map16")); + VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 8U)); } @@ -25908,7 +25601,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -25918,7 +25611,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } @@ -25928,63 +25621,47 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 18: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 19: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint24")); + VerifyOrReturn(CheckConstraintType("value", "int24u", "int24u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 16777215UL)); } break; case 20: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint24")); + VerifyOrReturn(CheckConstraintType("value", "int24u", "int24u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 16777215UL)); } break; case 21: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -25994,21 +25671,17 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 23: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } @@ -26181,7 +25854,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand class Test_TC_PCC_2_2Suite : public TestCommand { public: - Test_TC_PCC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_2_2", 7, credsIssuerConfig) + Test_TC_PCC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_2_2", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -26226,7 +25899,7 @@ class Test_TC_PCC_2_2Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveOperationMode", value, 1U)); + VerifyOrReturn(CheckValue("effectiveOperationMode", value, 0U)); } break; case 3: @@ -26237,13 +25910,24 @@ class Test_TC_PCC_2_2Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveOperationMode", value, 2U)); + 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::PumpOperationMode 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::PumpOperationMode value; @@ -26274,39 +25958,55 @@ class Test_TC_PCC_2_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Write 1 to the OperationMode attribute to DUT: OperationMode"); + LogStep(1, "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::PumpOperationMode value; - value = static_cast(1); + value = static_cast(0); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, chip::NullOptional); } case 2: { - LogStep(2, "Reads the attribute: EffectiveOperationMode"); + LogStep(2, "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, "Write 2 to the OperationMode attribute to DUT: OperationMode"); - VerifyOrDo(!ShouldSkip("PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH write 1 (Minimum) to the OperationMode attribute to DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0020 && PCC.M.ControlModeConstSpeed"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; - value = static_cast(2); + value = static_cast(1); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, chip::NullOptional); } case 4: { - LogStep(4, "Reads the attribute: EffectiveOperationMode"); - VerifyOrDo(!ShouldSkip("PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "TH reads from the DUT the EffectiveOperationMode attribute"); + VerifyOrDo(!ShouldSkip("PCC.S.A0011 && PCC.M.ControlModeConstSpeed"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Write 3 to the OperationMode attribute to DUT: OperationMode"); + LogStep(5, "TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time."); + VerifyOrDo(!ShouldSkip("PCC.S.A0020 && PCC.M.ControlModeConstSpeed"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode 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, "TH reads from the DUT the EffectiveOperationMode attribute"); + VerifyOrDo(!ShouldSkip("PCC.S.A0011 && PCC.M.ControlModeConstSpeed"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH write 3 (Local) to the OperationMode attribute to DUT"); VerifyOrDo(!ShouldSkip("PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; @@ -26315,8 +26015,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 6: { - LogStep(6, "Reads the attribute: EffectiveOperationMode"); + case 8: { + LogStep(8, "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); @@ -26871,7 +26571,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -26880,7 +26580,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -26888,7 +26588,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); @@ -26906,7 +26606,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -26918,7 +26618,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -27034,7 +26734,7 @@ class Test_TC_RH_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -27043,7 +26743,7 @@ class Test_TC_RH_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -27051,7 +26751,7 @@ class Test_TC_RH_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -27071,7 +26771,7 @@ class Test_TC_RH_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -27083,7 +26783,7 @@ class Test_TC_RH_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -27198,7 +26898,7 @@ class Test_TC_RH_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -27208,7 +26908,7 @@ class Test_TC_RH_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -27218,7 +26918,7 @@ class Test_TC_RH_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -27228,7 +26928,7 @@ class Test_TC_RH_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } @@ -27269,6 +26969,7 @@ class Test_TC_RH_2_1Suite : public TestCommand } case 3: { LogStep(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); } @@ -27286,7 +26987,7 @@ class Test_TC_RH_2_1Suite : public TestCommand class Test_TC_SC_4_2Suite : public TestCommand { public: - Test_TC_SC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_2", 46, credsIssuerConfig) + Test_TC_SC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_2", 47, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -27349,10 +27050,10 @@ class Test_TC_SC_4_2Suite : public TestCommand { 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(CheckConstraintMinLength("value.instanceName", value.instanceName.size(), 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.instanceName", value.instanceName.size(), 16)); if (deviceInstanceNameBeforeReboot1Buffer != nullptr) { chip::Platform::MemoryFree(deviceInstanceNameBeforeReboot1Buffer); @@ -27368,10 +27069,10 @@ class Test_TC_SC_4_2Suite : public TestCommand { 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, 12)); VerifyOrReturn(CheckConstraintIsUpperCase("value.hostName", value.hostName, true)); VerifyOrReturn(CheckConstraintIsHexString("value.hostName", value.hostName, true)); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName.size(), 12)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName.size(), 12)); } shouldContinue = true; break; @@ -27380,10 +27081,10 @@ class Test_TC_SC_4_2Suite : public TestCommand { 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)); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName.size(), 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName.size(), 16)); } shouldContinue = true; break; @@ -27500,7 +27201,7 @@ class Test_TC_SC_4_2Suite : public TestCommand { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.deviceName", value.deviceName.size(), 32)); + VerifyOrReturn(CheckConstraintMaxLength("value.deviceName", value.deviceName, 32)); } shouldContinue = true; break; @@ -27527,7 +27228,7 @@ class Test_TC_SC_4_2Suite : public TestCommand { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.pairingInstruction", value.pairingInstruction.size(), 128)); + VerifyOrReturn(CheckConstraintMaxLength("value.pairingInstruction", value.pairingInstruction, 128)); } shouldContinue = true; break; @@ -27554,45 +27255,49 @@ class Test_TC_SC_4_2Suite : public TestCommand 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)); { 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(CheckConstraintMinLength("value.instanceName", value.instanceName.size(), 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.instanceName", value.instanceName.size(), 16)); VerifyOrReturn(CheckConstraintNotValue("value.instanceName", value.instanceName, deviceInstanceNameBeforeReboot1)); } shouldContinue = true; break; - case 26: + case 27: 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, 12)); VerifyOrReturn(CheckConstraintIsUpperCase("value.hostName", value.hostName, true)); VerifyOrReturn(CheckConstraintIsHexString("value.hostName", value.hostName, true)); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName.size(), 12)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName.size(), 12)); } shouldContinue = true; break; - case 27: + case 28: 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)); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName.size(), 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName.size(), 16)); } shouldContinue = true; break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27600,7 +27305,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27608,7 +27313,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27616,7 +27321,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27624,7 +27329,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27632,7 +27337,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27641,7 +27346,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 34: + case 35: if (IsUnsupported(status.mStatus)) { shouldContinue = true; @@ -27655,7 +27360,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27668,7 +27373,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27681,7 +27386,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27690,7 +27395,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27700,16 +27405,16 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 39: + 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(CheckConstraintMaxLength("value.deviceName", value.deviceName.size(), 32)); + VerifyOrReturn(CheckConstraintMaxLength("value.deviceName", value.deviceName, 32)); } shouldContinue = true; break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27718,7 +27423,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27727,16 +27432,16 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 42: + 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))); - VerifyOrReturn(CheckConstraintMaxLength("value.pairingInstruction", value.pairingInstruction.size(), 128)); + VerifyOrReturn(CheckConstraintMaxLength("value.pairingInstruction", value.pairingInstruction, 128)); } shouldContinue = true; break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -27745,11 +27450,11 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -27796,14 +27501,15 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 3: { LogStep(3, "Check Hostname"); - VerifyOrDo(!ShouldSkip("(WIFI || ETH) && !THREAD"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("( MCORE.SC.WIFI || MCORE.SC.ETH ) && !MCORE.SC.THR"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 4: { LogStep(4, "Check Hostname"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && (!WIFI && !ETH) && THREAD"), + VerifyOrDo(!ShouldSkip("( !MCORE.SC.WIFI && !MCORE.SC.ETH ) && MCORE.SC.THR "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; @@ -27825,7 +27531,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 7: { LogStep(7, "Check Vendor ID (_V)"); - VerifyOrDo(!ShouldSkip("VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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; @@ -27833,7 +27539,8 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 8: { LogStep(8, "Check Device Type ID (_T)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DEVTYPE_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && 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() : 5ULL; @@ -27847,28 +27554,28 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 10: { LogStep(10, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 11: { LogStep(11, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 12: { LogStep(12, "Optional TXT key for MRP Retry Interval Idle (CRI)"); - VerifyOrDo(!ShouldSkip("CRI_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 13: { LogStep(13, "Optional TXT key for MRP Retry Interval Active (CRA)"); - VerifyOrDo(!ShouldSkip("CRA_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -27881,35 +27588,35 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 15: { LogStep(15, "Optional TXT key for device type (DT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MCORE.SC.DT_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 device name (DN)"); - VerifyOrDo(!ShouldSkip("DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 17: { LogStep(17, "Optional TXT key for rotating device identifier (RI)"); - VerifyOrDo(!ShouldSkip("RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 18: { LogStep(18, "Optional TXT key for pairing hint (PH)"); - VerifyOrDo(!ShouldSkip("PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 19: { LogStep(19, "Optional TXT key for pairing instructions (PI)"); - VerifyOrDo(!ShouldSkip("PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -27922,12 +27629,14 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 21: { LogStep(21, "Stop target device"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Stop::Type value; return Stop(kIdentityAlpha, value); } case 22: { LogStep(22, "Start target device with the provided discriminator for basic commissioning advertisement"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Start::Type value; value.discriminator.Emplace(); @@ -27935,14 +27644,25 @@ class Test_TC_SC_4_2Suite : public TestCommand return Start(kIdentityAlpha, value); } case 23: { - LogStep(23, "Wait for the commissioned device to be retrieved"); + LogStep(23, "TH is rebooted"); + 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 TH and enter 'y' after TH startsgarbage: not in length on purpose", 50); + 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 24: { - LogStep(24, "Open Commissioning Window"); + case 25: { + LogStep(25, "Open Commissioning Window"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -27952,140 +27672,142 @@ class Test_TC_SC_4_2Suite : public TestCommand ); } - case 25: { - LogStep(25, "Check Instance Name"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } case 26: { - LogStep(26, "Check Hostname"); - VerifyOrDo(!ShouldSkip("(WIFI || ETH) && !THREAD"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Check Instance Name"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 27: { LogStep(27, "Check Hostname"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && (!WIFI && !ETH) && THREAD"), + VerifyOrDo(!ShouldSkip("( MCORE.SC.WIFI || MCORE.SC.ETH ) && !MCORE.SC.THR "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 28: { - LogStep(28, "Check Long Discriminator _L"); + LogStep(28, "Check Hostname"); + VerifyOrDo(!ShouldSkip("( !MCORE.SC.WIFI && !MCORE.SC.ETH ) && MCORE.SC.THR"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); + } + case 29: { + LogStep(29, "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 29: { - LogStep(29, "Check Short Discriminator (_S)"); + case 30: { + LogStep(30, "Check Short Discriminator (_S)"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByShortDiscriminator::Type value; value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; return FindCommissionableByShortDiscriminator(kIdentityAlpha, value); } - case 30: { - LogStep(30, "Check Vendor ID (_V)"); - VerifyOrDo(!ShouldSkip("VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 31: { + LogStep(31, "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 31: { - LogStep(31, "Check Device Type ID (_T)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DEVTYPE_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 32: { + LogStep(32, "Check Device Type ID (_T)"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && 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() : 5ULL; return FindCommissionableByDeviceType(kIdentityAlpha, value); } - case 32: { - LogStep(32, "Check Commissioning Mode (_CM)"); + case 33: { + LogStep(33, "Check Commissioning Mode (_CM)"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByCommissioningMode::Type value; return FindCommissionableByCommissioningMode(kIdentityAlpha, value); } - case 33: { - LogStep(33, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } case 34: { LogStep(34, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 35: { - LogStep(35, "Optional TXT key for MRP Retry Interval Idle (CRI)"); - VerifyOrDo(!ShouldSkip("CRI_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(35, "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 36: { - LogStep(36, "Optional TXT key for MRP Retry Interval Active (CRA)"); - VerifyOrDo(!ShouldSkip("CRA_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(36, "Optional TXT key for MRP Retry Interval Idle (CRI)"); + 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 37: { - LogStep(37, "TXT key for commissioning mode (CM)"); + LogStep(37, "Optional TXT key for MRP Retry Interval Active (CRA)"); + 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 38: { - LogStep(38, "Optional TXT key for device type (DT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(38, "TXT key for commissioning mode (CM)"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 39: { - LogStep(39, "Optional TXT key for device name (DN)"); - VerifyOrDo(!ShouldSkip("DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(39, "Optional TXT key for device type (DT)"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MCORE.SC.DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 40: { - LogStep(40, "Optional TXT key for rotating device identifier (RI)"); - VerifyOrDo(!ShouldSkip("RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(40, "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 41: { - LogStep(41, "Optional TXT key for pairing hint (PH)"); - VerifyOrDo(!ShouldSkip("PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(41, "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 42: { - LogStep(42, "Optional TXT key for pairing instructions (PI)"); - VerifyOrDo(!ShouldSkip("PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(42, "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 43: { - LogStep(43, "Check IPs"); + LogStep(43, "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 44: { - LogStep(44, "TH adds an unknown key/value pair in the advertised data"); + LogStep(44, "Check IPs"); + ListFreer listFreer; + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); + } + case 45: { + LogStep(45, "TH adds an unknown key/value pair in the advertised data"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -28096,8 +27818,8 @@ class Test_TC_SC_4_2Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 45: { - LogStep(45, "Scan for DNS-SD commissioner advertisements from TH"); + case 46: { + LogStep(46, "Scan for DNS-SD commissioner advertisements from TH"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -28111,10 +27833,10 @@ class Test_TC_SC_4_2Suite : public TestCommand } }; -class Test_TC_SWTCH_2_1Suite : public TestCommand +class Test_TC_SWTCH_1_1Suite : public TestCommand { public: - Test_TC_SWTCH_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_2_1", 4, credsIssuerConfig) + Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -28122,7 +27844,7 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SWTCH_2_1Suite() {} + ~Test_TC_SWTCH_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -28135,6 +27857,8 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint32_t FeatureMapValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -28154,33 +27878,284 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfPositions", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); + FeatureMapValue = value; } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentPosition", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckValue("featureMap", value, FeatureMapValue)); } 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)); { - uint8_t value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("multiPressMax", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + } + 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, 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, 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 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer 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 global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "Read the FeatureMap value and verify LS is set to 1; MS, MSR, MSL, MSM are all set to 0"); + 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 3: { + LogStep(3, "Check values of flags in this FeatureMap"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in 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, "Check values of flags in this FeatureMap"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in 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, "Check values of flags in this FeatureMap"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in 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, "Check values of flags in this FeatureMap"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in 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, "read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "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, "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 10: { + LogStep(10, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 11: { + LogStep(11, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); + } + case 12: { + LogStep(12, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + 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; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 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("numberOfPositions", value, 2U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); + } + 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("currentPosition", value, 0U)); + 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)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("multiPressMax", value, 2U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; default: @@ -28272,7 +28247,7 @@ class Test_TC_TMP_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "", "unit16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -28281,7 +28256,7 @@ class Test_TC_TMP_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -28289,11 +28264,10 @@ class Test_TC_TMP_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + 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)); @@ -28306,15 +28280,8 @@ class Test_TC_TMP_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "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)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 5: @@ -28322,7 +28289,11 @@ class Test_TC_TMP_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -28334,7 +28305,7 @@ class Test_TC_TMP_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -28375,13 +28346,12 @@ class Test_TC_TMP_1_1Suite : public TestCommand } case 3: { LogStep(3, "Read the global attribute: 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 4: { - LogStep(4, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip(" !TMP.S.A0003 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "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); } @@ -28456,7 +28426,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -28466,7 +28436,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -28476,7 +28446,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -28486,7 +28456,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } @@ -28514,25 +28484,25 @@ class Test_TC_TMP_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the mandatory attribute: MeasuredValue"); + LogStep(1, "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 2: { - LogStep(2, "read the mandatory attribute: MinMeasuredValue"); + LogStep(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 3: { - LogStep(3, "read the mandatory attribute: MaxMeasuredValue"); + LogStep(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 4: { - LogStep(4, "read the optional attribute: Tolerance"); + LogStep(4, "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); @@ -28545,7 +28515,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand class Test_TC_TSTAT_1_1Suite : public TestCommand { public: - Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 17, credsIssuerConfig) + Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -28588,7 +28558,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -28596,8 +28566,8 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 63UL)); } break; @@ -28606,7 +28576,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); @@ -28622,13 +28592,8 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 24UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; case 5: @@ -28636,8 +28601,8 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; case 6: @@ -28645,13 +28610,8 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 7: @@ -28659,8 +28619,8 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; case 8: @@ -28668,8 +28628,8 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; case 9: @@ -28677,9 +28637,10 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 30UL)); } break; case 10: @@ -28687,7 +28648,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 32UL)); VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); @@ -28698,7 +28659,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 52UL)); VerifyOrReturn(CheckConstraintContains("value", value, 53UL)); VerifyOrReturn(CheckConstraintContains("value", value, 54UL)); @@ -28709,7 +28670,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 55UL)); VerifyOrReturn(CheckConstraintContains("value", value, 56UL)); VerifyOrReturn(CheckConstraintContains("value", value, 57UL)); @@ -28720,7 +28681,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -28732,7 +28693,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -28741,13 +28702,9 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -28788,32 +28745,32 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::NullOptional); } case 4: { - LogStep(4, "Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "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 5: { - LogStep(5, "Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "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 6: { - LogStep(6, "Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "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 7: { - LogStep(7, "Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "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 8: { - LogStep(8, "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)); + LogStep(8, "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); } @@ -28858,16 +28815,6 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Read the global attribute: EventList"); - 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; } @@ -28876,7 +28823,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand class Test_TC_TSTAT_2_1Suite : public TestCommand { public: - Test_TC_TSTAT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_2_1", 51, credsIssuerConfig) + Test_TC_TSTAT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_2_1", 50, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -28918,7 +28865,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -28928,7 +28875,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -28938,7 +28885,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } @@ -28948,7 +28895,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -28958,7 +28905,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -28968,7 +28915,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -28978,7 +28925,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -28988,7 +28935,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -28998,7 +28945,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -29008,7 +28955,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 63U)); } @@ -29018,7 +28965,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int8")); + VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 25)); VerifyOrReturn(CheckConstraintMaxValue("value", value, -25)); } @@ -29028,9 +28975,9 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } break; case 13: @@ -29038,9 +28985,9 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; case 14: @@ -29048,9 +28995,9 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } break; case 15: @@ -29058,9 +29005,9 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; case 16: @@ -29068,9 +29015,9 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; case 17: @@ -29078,7 +29025,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -29088,7 +29035,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -29098,7 +29045,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -29108,7 +29055,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int8")); + VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 25)); } @@ -29118,7 +29065,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } @@ -29128,7 +29075,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::Clusters::Thermostat::ThermostatControlSequence value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } @@ -29138,121 +29085,127 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } 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(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; - case 26: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } break; - case 27: + 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", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 28: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 29: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } break; - case 30: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1440U)); } break; - case 31: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } break; - case 32: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map16")); + VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); } break; - case 33: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; - case 34: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; - case 35: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "utc")); + VerifyOrReturn(CheckConstraintType("value", "utc", "utc")); + } + 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(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; case 36: @@ -29260,7 +29213,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -29270,7 +29223,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -29280,7 +29233,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -29290,7 +29243,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -29300,106 +29253,96 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 43: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); } break; - case 44: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 45: + 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")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; - case 46: + 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")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; - case 47: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; - case 48: + 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", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } break; - case 49: + 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(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; - case 50: + case 49: 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")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } break; default: @@ -29426,7 +29369,6 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand } case 1: { LogStep(1, "Reads mandatory attributes from DUT: LocalTemperature"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::LocalTemperature::Id, true, chip::NullOptional); } @@ -29438,7 +29380,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand } case 3: { LogStep(3, "Read Occupancy attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::Occupancy::Id, true, chip::NullOptional); } @@ -29492,36 +29434,36 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand } case 12: { LogStep(12, "Reads optional attributes from DUT: OccupiedCoolingSetpoint"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 13: { LogStep(13, "Reads mandatory attributes from DUT: OccupiedHeatingSetpoint"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } case 14: { LogStep(14, "Read UnoccupiedCoolingSetpoint attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Read UnoccupiedHeatingSetpoint attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Reads mandatory attributes from DUT: MinHeatSetpointLimit"); + LogStep(16, "Reads attribute from DUT: MinHeatSetpointLimit"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "Reads mandatory attributes from DUT: MaxHeatSetpointLimit"); + LogStep(17, "Reads attribute from DUT: 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); @@ -29540,7 +29482,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand } case 20: { LogStep(20, "Reads optional attributes from DUT: MinSetpointDeadBand"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, true, chip::NullOptional); } @@ -29552,180 +29494,166 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand } case 22: { LogStep(22, "Reads mandatory attributes from DUT: ControlSequenceOfOperation"); - 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 23: { LogStep(23, "Reads mandatory attributes from DUT: SystemMode"); - 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 24: { - LogStep(24, - "Read AlarmMask attribute from the DUT and Verify that the DUT responds with a map8 value.The value has to be " - "in the range of 0x00 to 0x07."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A001d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 25: { - LogStep(25, "Read ThermostatRunningMode attribute from the DUT"); + LogStep(24, "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 26: { - LogStep(26, "Reads constraints of optional attributes from DUT: StartOfWeek"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "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 27: { - LogStep(27, "Reads optional attributes from DUT: NumberOfWeeklyTransitions"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "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 28: { - LogStep(28, "Reads optional attributes from DUT: NumberOfDailyTransitions"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "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 29: { - LogStep(29, "Read TemperatureSetpointHold attribute from the DUT"); + case 28: { + LogStep(28, "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 30: { - LogStep(30, "Read TemperatureSetpointHoldDuration attribute from the DUT"); + case 29: { + LogStep(29, "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 31: { - LogStep(31, "Read ThermostatProgrammingOperationMode attribute from the DUT"); + case 30: { + LogStep(30, "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 32: { - LogStep(32, "Read ThermostatRunningState attribute from the DUT"); + case 31: { + LogStep(31, "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 33: { - LogStep(33, "Read SetpointChangeSource attribute from the DUT"); + case 32: { + LogStep(32, "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 34: { - LogStep(34, "Read SetpointChangeAmount attribute from the DUT"); + case 33: { + LogStep(33, "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 35: { - LogStep(35, "Read SetpointChangeSourceTimestamp attribute from the DUT"); + case 34: { + LogStep(34, "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 36: { - LogStep(36, "Read OccupiedSetback attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 35: { + LogStep(35, "Read OccupiedSetback attribute from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedSetback::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "Read OccupiedSetbackMin attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0035"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "Read OccupiedSetbackMin attribute from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedSetbackMin::Id, true, chip::NullOptional); } - case 38: { - LogStep(38, "Read OccupiedSetbackMax attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 37: { + LogStep(37, "Read OccupiedSetbackMax attribute from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedSetbackMax::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "Read UnoccupiedSetback attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 38: { + LogStep(38, "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 40: { - LogStep(40, "Read UnoccupiedSetbackMin attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 39: { + LogStep(39, "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 41: { - LogStep(41, "Read UnoccupiedSetbackMax attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0039"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 40: { + LogStep(40, "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 42: { - LogStep(42, "Read EmergencyHeatDelta attribute from the DUT"); + case 41: { + LogStep(41, "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 43: { - LogStep(43, "Read ACType attribute from the DUT"); + case 42: { + LogStep(42, "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 44: { - LogStep(44, "Read ACCapacity attribute from the DUT"); + case 43: { + LogStep(43, "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 45: { - LogStep(45, "Read ACRefrigerantType attribute from the DUT"); + case 44: { + LogStep(44, "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 46: { - LogStep(46, "Read ACCompressorType attribute from the DUT"); + case 45: { + LogStep(45, "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 47: { - LogStep(47, "Read ACErrorCode attribute from the DUT"); + case 46: { + LogStep(46, "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 48: { - LogStep(48, "Read ACLouverPosition attribute from the DUT"); + case 47: { + LogStep(47, "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 49: { - LogStep(49, "Read ACCoilTemperature attribute from the DUT"); + case 48: { + LogStep(48, "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 50: { - LogStep(50, "Read ACCapacityFormat attribute from the DUT"); + case 49: { + LogStep(49, "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); @@ -29780,7 +29708,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } @@ -29804,7 +29732,6 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand 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), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); @@ -29817,7 +29744,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } @@ -29854,8 +29781,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -29863,7 +29789,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("unoccupiedCoolingSetpoint", value, 2600)); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } @@ -29897,7 +29823,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("unoccupiedHeatingSetpoint", value, 2000)); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } @@ -29931,18 +29857,21 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("minHeatSetpointLimit", value, 700)); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } 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; + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("minHeatSetpointLimit", value, 800)); + } break; case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); @@ -29951,26 +29880,35 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); 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)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("maxHeatSetpointLimit", value, 3000)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); + } break; case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -29978,34 +29916,33 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("maxHeatSetpointLimit", value, 2900)); } break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); 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)); + break; + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("minCoolSetpointLimit", value, 1600)); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } break; - case 49: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 50: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -30013,14 +29950,11 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("minCoolSetpointLimit", value, 2000)); } break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -30029,33 +29963,35 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 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)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("maxCoolSetpointLimit", value, 3200)); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("maxCoolSetpointLimit", value, 2000)); + } break; case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -30065,7 +30001,6 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand 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)); @@ -30077,20 +30012,23 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 68: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("minSetpointDeadBand", value, 25)); - VerifyOrReturn(CheckConstraintType("value", "", "temp-s8")); + VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 25)); } break; - case 69: + case 70: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 70: + case 71: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int8_t value; @@ -30098,33 +30036,33 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("minSetpointDeadBand", value, 5)); } break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; case 72: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 73: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 74: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 75: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 76: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Thermostat::ThermostatControlSequence value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("controlSequenceOfOperation", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } break; - case 76: + case 77: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 77: + case 78: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Thermostat::ThermostatControlSequence value; @@ -30132,20 +30070,19 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("controlSequenceOfOperation", value, 2U)); } break; - case 78: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 79: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 80: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 81: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 82: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 83: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -30153,24 +30090,20 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 1700)); } break; - case 83: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; case 84: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 85: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 86: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 30)); + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 2300)); } 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; @@ -30201,7 +30134,6 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand break; case 93: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 94: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -30227,7 +30159,6 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand 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)); @@ -30272,13 +30203,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 1: { LogStep(1, "Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 2: { LogStep(2, "Writes a value back that is different but valid for OccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2500; @@ -30288,13 +30219,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 3: { LogStep(3, "Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 4: { - LogStep(4, "Writes OccupiedCoolingSetpoint to value below the MinCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Writes OccupiedCoolingSetpoint to value below the ABSMinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 30; @@ -30304,7 +30235,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 5: { LogStep(5, "Writes OccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4000; @@ -30314,13 +30245,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 6: { LogStep(6, "Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 1600; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); } case 7: { LogStep(7, "Writes the CoolingSetpoint below the HeatingSetpoint when auto is enabled"); @@ -30334,7 +30265,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 8: { LogStep(8, "Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3200; @@ -30344,13 +30275,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 9: { LogStep(9, "Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } case 10: { LogStep(10, "Writes a value back that is different but valid for OccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2100; @@ -30360,13 +30291,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 11: { LogStep(11, "Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } case 12: { LogStep(12, "Writes OccupiedHeatingSetpoint to value below the MinHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 600; @@ -30376,7 +30307,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 13: { LogStep(13, "Writes OccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4010; @@ -30386,7 +30317,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 14: { LogStep(14, "Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 700; @@ -30412,23 +30343,23 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 17: { LogStep(17, "Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 3000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); } case 18: { LogStep(18, "Reads UnoccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); } case 19: { LogStep(19, "Writes a value back that is different but valid for UnoccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2500; @@ -30438,13 +30369,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 20: { LogStep(20, "Reads it back again to confirm the successful write of UnoccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); } case 21: { - LogStep(21, "Writes UnoccupiedCoolingSetpoint to value below the MinHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(21, "Writes UnoccupiedCoolingSetpoint to value below the MinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1002; @@ -30453,8 +30384,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand chip::NullOptional); } case 22: { - LogStep(22, "Writes UnoccupiedCoolingSetpoint to value above the MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(22, "Writes UnoccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4010; @@ -30464,7 +30395,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 23: { LogStep(23, "Writes the limit of MinCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1800; @@ -30474,7 +30405,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 24: { LogStep(24, "Writes the limit of MaxCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3000; @@ -30484,13 +30415,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 25: { LogStep(25, "Reads UnoccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, true, chip::NullOptional); } case 26: { LogStep(26, "Writes a value back that is different but valid for UnoccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2500; @@ -30500,13 +30431,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 27: { LogStep(27, "Reads it back again to confirm the successful write of UnoccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, true, chip::NullOptional); } case 28: { LogStep(28, "Writes UnoccupiedHeatingSetpoint to value below the MinHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 500; @@ -30516,7 +30447,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 29: { LogStep(29, "Writes UnoccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4010; @@ -30526,7 +30457,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 30: { LogStep(30, "Writes the limit of MinHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1800; @@ -30536,7 +30467,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 31: { LogStep(31, "Writes the limit of MaxHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3000; @@ -30546,389 +30477,382 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 32: { LogStep(32, "Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, true, chip::NullOptional); } case 33: { LogStep(33, "Writes a value back that is different but valid for MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.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); + int16_t value; + value = 800; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); } case 34: { LogStep(34, "Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.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); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, + true, chip::NullOptional); } case 35: { - LogStep(35, "Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(35, "Writes a value back that is different but violates the deadband"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0015 && TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; - value = 650; + value = 2000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } case 36: { - LogStep(36, "Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(36, "Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; - value = 4050; + value = 650; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } case 37: { - LogStep(37, "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(37, "Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; - value = 700; + value = 4050; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } case 38: { - LogStep(38, "Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(38, "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.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); + int16_t value; + value = 700; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); } case 39: { - LogStep(39, "Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(39, "Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 3000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); } case 40: { - LogStep(40, "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && A_MINHEATSETPOINTLIMIT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(40, "Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && 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 41: { + LogStep(41, "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 700; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 41: { - LogStep(41, "Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("A_MINHEATSETPOINTLIMIT && TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 42: { + LogStep(42, "Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0015 && TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 42: { - LogStep(42, "Writes a value back that is different but valid for MaxHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 43: { + LogStep(43, "Writes a value back that is different but valid for MaxHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2900; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 43: { - LogStep(43, "Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 44: { + LogStep(44, "Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && 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 44: { - LogStep(44, "Writes MaxHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 45: { + LogStep(45, "Writes MaxHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 500; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 45: { - LogStep(45, "Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 46: { + LogStep(46, "Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 46: { - LogStep(46, "Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 47: { + LogStep(47, "Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 700; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 47: { - LogStep(47, "Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 48: { + LogStep(48, "Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 3000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); } - case 48: { - LogStep(48, "Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 49: { + LogStep(49, "Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, true, chip::NullOptional); } - case 49: { - LogStep(49, "Writes a value back that is different but valid for MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 50: { + LogStep(50, "Writes a value back that is different but valid for MinCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 50: { - LogStep(50, "Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 51: { + LogStep(51, "Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, true, chip::NullOptional); } - case 51: { - LogStep(51, "Writes MinCoolSetpointLimit to value below the AbsMinCoolSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 52: { + LogStep(52, "Writes MinCoolSetpointLimit to value below the AbsMinCoolSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 52: { - LogStep(52, "Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 53: { + LogStep(53, "Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 53: { - LogStep(53, "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 54: { + LogStep(54, "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1600; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 54: { - LogStep(54, "Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 55: { + LogStep(55, "Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3200; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 55: { - LogStep(55, "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && A_MINCOOLSETPOINTLIMIT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 56: { + LogStep(56, "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1600; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 56: { - LogStep(56, "Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 57: { + LogStep(57, "Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, true, chip::NullOptional); } - case 57: { - LogStep(57, "Writes a value back that is different but valid for MaxCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } case 58: { - LogStep(58, "Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(58, "Writes a value back that is different but valid for MaxCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 2000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); } case 59: { - LogStep(59, "Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(59, "Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, + true, chip::NullOptional); + } + case 60: { + LogStep(60, "Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 60: { - LogStep(60, "Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 61: { + LogStep(61, "Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 61: { - LogStep(61, "Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 62: { + LogStep(62, "Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 1600; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); } - case 62: { - LogStep(62, "Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 63: { + LogStep(63, "Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3200; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 63: { - LogStep(63, "Writes (sets back) default value of MinHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 64: { + LogStep(64, "Writes (sets back) default value of MinHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 700; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 64: { - LogStep(64, "Writes (sets back)default value of MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 65: { + LogStep(65, "Writes (sets back)default value of MaxHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0016 &&!TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 3000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); } - case 65: { - LogStep(65, "Writes MaxHeatSetpointLimit That meets the deadband of 2.5C"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && A_MAXHEATSETPOINTLIMIT &&!TSTAT.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 66: { + LogStep(66, "Writes MaxHeatSetpointLimit That meets the deadband of 2.5C"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0016 &&!TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2950; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 66: { - LogStep(66, "Writes (sets back) default value of MinCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 67: { + LogStep(67, "Writes (sets back) default value of MinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1600; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 67: { - LogStep(67, "Writes (sets back) default value of MaxCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 68: { + LogStep(68, "Writes (sets back) default value of MaxCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3200; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 68: { - LogStep(68, "Reads MinSetpointDeadBand attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 69: { + LogStep(69, "Reads MinSetpointDeadBand attribute from Server DUT and verifies that the value is within range"); + 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 69: { - LogStep(69, "Writes a value back that is different but valid for MinSetpointDeadBand attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 70: { + LogStep(70, "Writes a value back that is different but valid for MinSetpointDeadBand attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int8_t value; value = 5; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 70: { - LogStep(70, "Reads it back again to confirm the successful write of MinSetpointDeadBand attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 71: { + LogStep(71, "Reads it back again to confirm the successful write of MinSetpointDeadBand attribute"); + 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 71: { - LogStep(71, "Writes the value below MinSetpointDeadBand"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 72: { + LogStep(72, "Writes the value below MinSetpointDeadBand"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int8_t value; value = -1; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 72: { - LogStep(72, "Writes the value above MinSetpointDeadBand "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 73: { + LogStep(73, "Writes the value above MinSetpointDeadBand "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int8_t value; value = 30; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 73: { - LogStep(73, "Writes the min limit of MinSetpointDeadBand"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 74: { + LogStep(74, "Writes the min limit of MinSetpointDeadBand"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int8_t value; value = 0; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 74: { - LogStep(74, "Writes the max limit of MinSetpointDeadBand"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 75: { + LogStep(75, "Writes the max limit of MinSetpointDeadBand"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int8_t value; value = 25; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 75: { - LogStep(75, "Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 76: { + LogStep(76, "Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ControlSequenceOfOperation::Id, true, chip::NullOptional); } - case 76: { - LogStep(76, "Write Attribute command for ControlSequenceOfOperation with a new valid value"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 77: { + LogStep(77, "Write Attribute command for ControlSequenceOfOperation with a new valid value"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::ThermostatControlSequence value; value = static_cast(2); @@ -30936,24 +30860,23 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::ControlSequenceOfOperation::Id, value, chip::NullOptional, chip::NullOptional); } - case 77: { - LogStep(77, "Read it back again to confirm the successful write"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 78: { + LogStep(78, "Read it back again to confirm the successful write"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ControlSequenceOfOperation::Id, true, chip::NullOptional); } - case 78: { - LogStep(78, "Writes MaxHeatSetpointLimit attribute to default value of 2950 to meet deadband constraint"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && A_MINHEATSETPOINTLIMIT && TSTAT.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 79: { + LogStep(79, "Writes MaxHeatSetpointLimit attribute to default value of 2950 to meet deadband constraint"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2950; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 79: { - LogStep(79, "Sets OccupiedCoolingSetpoint to default value"); + case 80: { + LogStep(80, "Sets OccupiedCoolingSetpoint to default value"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -30962,20 +30885,19 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 80: { - LogStep(80, "Sets OccupiedHeatingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 81: { + LogStep(81, "Sets OccupiedHeatingSetpoint to default value"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 2000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); } - case 81: { - LogStep(81, "Sends SetpointRaise Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 82: { + LogStep(82, "Sends SetpointRaise Command Heat Only"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type value; value.mode = static_cast(0); @@ -30985,26 +30907,25 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand ); } - case 82: { - LogStep(82, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 83: { + LogStep(83, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } - case 83: { - LogStep(83, "Sets OccupiedHeatingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 84: { + LogStep(84, "Sets OccupiedHeatingSetpoint to default value"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 2000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); } - case 84: { - LogStep(84, "Sends SetpointRaise Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 85: { + LogStep(85, "Sends SetpointRaise Command Heat Only"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type value; value.mode = static_cast(0); @@ -31014,26 +30935,15 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand ); } - case 85: { - LogStep(85, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 86: { + LogStep(86, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } - case 86: { - LogStep(86, "Sets OccupiedCoolingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - int16_t value; - value = 2600; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, - chip::NullOptional); - } case 87: { - LogStep(87, "Sends SetpointRaise Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(87, "Sends SetpointRaise Command Cool Only"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type value; value.mode = static_cast(1); @@ -31045,13 +30955,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 88: { LogStep(88, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 89: { LogStep(89, "Sets OccupiedCoolingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2600; @@ -31060,9 +30970,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand chip::NullOptional); } case 90: { - LogStep(90, "Sends SetpointRaise Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(90, "Sends SetpointRaise Command Cool Only"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type value; value.mode = static_cast(1); @@ -31074,13 +30983,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 91: { LogStep(91, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 92: { LogStep(92, "Sets OccupiedCoolingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2600; @@ -31090,18 +30999,17 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 93: { LogStep(93, "Sets OccupiedHeatingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 2000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); } case 94: { - LogStep(94, "Sends SetpointRaise Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(94, "Sends SetpointRaise Command Heat & Cool"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type value; value.mode = static_cast(2); @@ -31113,19 +31021,19 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 95: { LogStep(95, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 96: { LogStep(96, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } case 97: { LogStep(97, "Sets OccupiedCoolingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2600; @@ -31135,18 +31043,17 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 98: { LogStep(98, "Sets OccupiedHeatingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 2000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); } case 99: { - LogStep(99, "Sends SetpointRaise Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(99, "Sends SetpointRaise Command Heat & Cool"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type value; value.mode = static_cast(2); @@ -31158,13 +31065,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 100: { LogStep(100, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 101: { LogStep(101, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } @@ -31219,7 +31126,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -31228,7 +31135,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -31236,7 +31143,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -31256,7 +31163,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -31268,7 +31175,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -31385,7 +31292,7 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } @@ -31395,7 +31302,7 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } @@ -31405,7 +31312,7 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } @@ -31713,7 +31620,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 2: { LogStep(2, "Verify device temperature displayed in °C"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -31740,7 +31647,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 5: { LogStep(5, "Verify device temperature displayed in °F"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -31784,7 +31691,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 10: { LogStep(10, "Verify all device functionality available to the user"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -31810,7 +31717,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 13: { LogStep(13, "Verify device operates at Level 1 reduced functionality"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -31836,7 +31743,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 16: { LogStep(16, "Verify device operates at Level 2 reduced functionality"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -31862,7 +31769,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 19: { LogStep(19, "Verify device operates at Level 3 reduced functionality"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -31888,7 +31795,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 22: { LogStep(22, "Verify device operates at Level 4 reduced functionality"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -31914,7 +31821,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 25: { LogStep(25, "Verify device operates at least functionality level"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -31946,7 +31853,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 29: { LogStep(29, "Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; value = 0U; @@ -31956,7 +31863,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 30: { LogStep(30, "Verify local schedule programming functionality is enabled at the thermostat"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -31983,7 +31890,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 33: { LogStep(33, "Verify local schedule programming functionality is disabled at the thermostat"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -32066,7 +31973,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -32076,7 +31983,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "RoutingRole")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } @@ -32086,7 +31993,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); } break; case 4: @@ -32098,7 +32005,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -32112,7 +32019,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 8: @@ -32128,7 +32035,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 11: @@ -32148,7 +32055,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); } break; case 15: @@ -32156,7 +32063,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -32166,7 +32073,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -32176,7 +32083,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -32186,7 +32093,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -32196,7 +32103,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -32206,7 +32113,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -32216,7 +32123,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -32226,7 +32133,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -32236,7 +32143,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -32246,7 +32153,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -32256,7 +32163,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -32266,7 +32173,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -32276,7 +32183,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 28: @@ -32284,7 +32191,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 29: @@ -32292,7 +32199,9 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } break; case 30: @@ -32304,7 +32213,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "octstr")); + VerifyOrReturn(CheckConstraintType("value", "octet_string", "octet_string")); } break; case 32: @@ -32316,7 +32225,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -32641,7 +32550,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32651,7 +32560,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32661,7 +32570,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32671,7 +32580,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32681,7 +32590,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32691,7 +32600,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32701,7 +32610,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32711,7 +32620,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32721,7 +32630,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32731,7 +32640,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32741,7 +32650,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32751,7 +32660,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32761,7 +32670,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32771,7 +32680,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32781,7 +32690,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32791,7 +32700,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32801,7 +32710,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32981,7 +32890,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32991,7 +32900,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33001,7 +32910,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33011,7 +32920,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33021,7 +32930,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33031,7 +32940,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33041,7 +32950,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33051,7 +32960,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33061,7 +32970,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33071,7 +32980,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33081,7 +32990,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33091,7 +33000,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33101,7 +33010,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33115,7 +33024,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33125,7 +33034,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33135,7 +33044,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33414,7 +33323,7 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -33423,7 +33332,7 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -33431,7 +33340,7 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); @@ -33449,7 +33358,7 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -33461,7 +33370,7 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -33599,6 +33508,8 @@ class Test_TC_ULABEL_2_2Suite : public TestCommand 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: @@ -33751,7 +33662,7 @@ class Test_TC_ULABEL_2_3Suite : public TestCommand chip::NullOptional, chip::NullOptional); } case 2: { - LogStep(2, "TH reads LabelList attribute of the DUT"); + LogStep(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; @@ -33847,7 +33758,10 @@ class Test_TC_ULABEL_2_4Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 0)); + 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; @@ -33907,7 +33821,16 @@ class Test_TC_ULABEL_2_4Suite : public TestCommand ListFreer listFreer; chip::app::DataModel::List value; - value = chip::app::DataModel::List(); + { + 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); } @@ -33965,11 +33888,9 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> - value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "octet_string", "octet_string")); } break; case 2: @@ -33977,7 +33898,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } break; case 3: @@ -33985,7 +33906,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } @@ -33995,7 +33916,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -34005,7 +33926,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int8")); + VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -120)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 0)); } @@ -34015,7 +33936,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -34025,7 +33946,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -34035,7 +33956,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -34045,7 +33966,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -34055,7 +33976,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -34065,7 +33986,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -34075,7 +33996,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 13: @@ -34083,7 +34004,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; default: @@ -34109,10 +34030,10 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Reads NetworkInterface structure attribute from DUT"); + LogStep(1, "TH reads BSSID attribute from DUT"); VerifyOrDo(!ShouldSkip("DGWIFI.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::NetworkInterfaces::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::Bssid::Id, true, chip::NullOptional); } case 2: { LogStep(2, "Reads SecurityType attribute constraints"); @@ -34239,7 +34160,9 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("beaconLostCount", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } break; case 3: @@ -34247,7 +34170,9 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("beaconRxCount", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } break; case 4: @@ -34255,7 +34180,9 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("packetMulticastRxCount", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } break; case 5: @@ -34263,7 +34190,9 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("packetMulticastTxCount", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } break; case 6: @@ -34271,7 +34200,9 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("packetUnicastRxCount", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } break; case 7: @@ -34279,7 +34210,9 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("packetUnicastTxCount", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } break; default: @@ -34401,7 +34334,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); } @@ -34411,7 +34344,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32768UL)); } @@ -34421,7 +34354,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); @@ -34439,7 +34372,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); } break; @@ -34448,7 +34381,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -34463,7 +34396,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -34588,7 +34521,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::Clusters::WindowCovering::Type value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } @@ -34598,7 +34531,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 63U)); } @@ -34608,7 +34541,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 63U)); } @@ -34618,7 +34551,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::Clusters::WindowCovering::EndProductType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); } @@ -34628,7 +34561,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); } @@ -34641,7 +34574,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -34651,7 +34584,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -34661,7 +34594,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -34671,7 +34604,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -34681,7 +34614,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -34691,7 +34624,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -34701,7 +34634,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -34711,7 +34644,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -34721,7 +34654,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map16")); + VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2047U)); } @@ -34731,7 +34664,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -34741,7 +34674,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -34751,7 +34684,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -34761,7 +34694,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -34771,7 +34704,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -34781,7 +34714,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -34791,7 +34724,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "Percent")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -34801,7 +34734,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "Percent")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -35485,7 +35418,7 @@ class Test_TC_WNCV_2_5Suite : public TestCommand { chip::app::Clusters::WindowCovering::EndProductType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); } @@ -35575,7 +35508,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -35585,7 +35518,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -35595,7 +35528,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -35605,7 +35538,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -35615,7 +35548,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); } break; case 8: @@ -35652,7 +35585,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 21U)); } @@ -35667,7 +35600,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -35677,7 +35610,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); } @@ -35687,7 +35620,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -35697,7 +35630,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); } @@ -35726,7 +35659,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -35736,7 +35669,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -35981,7 +35914,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -35991,7 +35924,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); } @@ -36001,7 +35934,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -36011,7 +35944,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); } @@ -36021,7 +35954,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); } break; case 8: @@ -36058,7 +35991,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 10U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 42U)); } @@ -36073,7 +36006,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -36083,7 +36016,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -36093,7 +36026,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -36103,7 +36036,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -36132,7 +36065,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -36142,7 +36075,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -36397,7 +36330,7 @@ class Test_TC_WNCV_3_3Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); } break; case 6: @@ -38982,7 +38915,7 @@ class TV_ApplicationBasicClusterSuite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::VendorId value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("vendorID", value, 1U)); } @@ -48205,7 +48138,7 @@ class TestConstraintsSuite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value", value.size(), 5)); + VerifyOrReturn(CheckConstraintMinLength("value", value, 5)); } break; case 18: @@ -48213,7 +48146,7 @@ class TestConstraintsSuite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 20)); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 20)); } break; case 19: @@ -48240,8 +48173,8 @@ class TestConstraintsSuite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintIsUpperCase("value", value, false)); VerifyOrReturn(CheckConstraintIsLowerCase("value", value, true)); + VerifyOrReturn(CheckConstraintIsUpperCase("value", value, false)); } break; case 23: @@ -48995,10 +48928,10 @@ class TestDiscoverySuite : public TestCommand { 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(CheckConstraintMinLength("value.instanceName", value.instanceName.size(), 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.instanceName", value.instanceName.size(), 16)); if (deviceInstanceNameBeforeRebootBuffer != nullptr) { chip::Platform::MemoryFree(deviceInstanceNameBeforeRebootBuffer); @@ -49116,7 +49049,7 @@ class TestDiscoverySuite : public TestCommand { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.deviceName", value.deviceName.size(), 32)); + VerifyOrReturn(CheckConstraintMaxLength("value.deviceName", value.deviceName, 32)); } shouldContinue = true; break; @@ -49143,7 +49076,7 @@ class TestDiscoverySuite : public TestCommand { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.pairingInstruction", value.pairingInstruction.size(), 128)); + VerifyOrReturn(CheckConstraintMaxLength("value.pairingInstruction", value.pairingInstruction, 128)); } shouldContinue = true; break; @@ -49176,10 +49109,10 @@ class TestDiscoverySuite : public TestCommand { 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(CheckConstraintMinLength("value.instanceName", value.instanceName.size(), 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.instanceName", value.instanceName.size(), 16)); VerifyOrReturn(CheckConstraintNotValue("value.instanceName", value.instanceName, deviceInstanceNameBeforeReboot)); } shouldContinue = true; @@ -51676,7 +51609,7 @@ class TestFabricRemovalWhileSubscribedSuite : public TestCommand chip::Optional mPayload; chip::Optional mTimeout; - chip::FabricIndex ourFabricIndex; + uint8_t ourFabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -51700,15 +51633,15 @@ class TestFabricRemovalWhileSubscribedSuite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("commissionedFabrics", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::FabricIndex value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); ourFabricIndex = value; } @@ -51731,7 +51664,7 @@ class TestFabricRemovalWhileSubscribedSuite : public TestCommand chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -52061,7 +51994,7 @@ class TestGeneralCommissioningSuite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; default: @@ -52415,7 +52348,7 @@ class TestOperationalCredentialsClusterSuite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - chip::FabricIndex ourFabricIndex; + uint8_t ourFabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -52438,7 +52371,7 @@ class TestOperationalCredentialsClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); } break; @@ -52447,16 +52380,16 @@ class TestOperationalCredentialsClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::FabricIndex value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); ourFabricIndex = value; } @@ -52687,6 +52620,9 @@ class TestModeSelectClusterSuite : public TestCommand } VerifyOrReturn(CheckNoMoreListItems("supportedModes", iter_0, 3)); } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintMinLength("value", value, 3)); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 3)); } break; case 4: @@ -53099,7 +53035,7 @@ class TestSelfFabricRemovalSuite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - chip::FabricIndex ourFabricIndex; + uint8_t ourFabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -53123,15 +53059,15 @@ class TestSelfFabricRemovalSuite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("commissionedFabrics", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::FabricIndex value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); ourFabricIndex = value; } @@ -54138,7 +54074,7 @@ class TestArmFailSafeSuite : public TestCommand VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 3: @@ -55145,318 +55081,11 @@ class TestAccessControlConstraintsSuite : public TestCommand } }; -class TestMultiAdminSuite : public TestCommand +class TestLevelControlWithOnOffDependencySuite : 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)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 9)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - 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), Basic::Id, Basic::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), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 16: { - LogStep(16, "read the mandatory attribute: NodeLabel from gamma"); - return ReadAttribute(kIdentityGamma, GetEndpoint(0), Basic::Id, Basic::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), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - 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", 5, credsIssuerConfig) + TestLevelControlWithOnOffDependencySuite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("TestLevelControlWithOnOffDependency", 33, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -55464,7 +55093,7 @@ class Test_TC_DGSW_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGSW_2_1Suite() {} + ~TestLevelControlWithOnOffDependencySuite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -55494,36 +55123,179 @@ class Test_TC_DGSW_2_1Suite : public TestCommand 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::DecodableList - value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckValue("currentLevel", value, 1U)); } break; - case 2: + 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)); { - uint64_t value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckValue("onOffTransitionTime", value, 0U)); } break; - case 3: + 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)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckValueNonNull("onLevel", value)); + VerifyOrReturn(CheckValue("onLevel.Value()", value.Value(), 254U)); } break; - case 4: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint64_t value; + 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)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", 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)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", 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)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", 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)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", 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)); + { + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckValue("currentLevel", value, 127U)); } break; default: @@ -55549,129 +55321,245 @@ class Test_TC_DGSW_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Reads a list of ThreadMetrics struct non-global attribute from DUT."); - VerifyOrDo(!ShouldSkip("DGSW.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::ThreadMetrics::Id, true, chip::NullOptional); + LogStep(1, "Sends a MoveToLevel command to set current level to min value"); + ListFreer listFreer; + chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; + value.level = 1U; + value.transitionTime = 0U; + value.optionsMask = 1U; + value.optionsOverride = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, + chip::NullOptional + + ); } case 2: { - LogStep(2, "Reads CurrentHeapFree non-global attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapFree::Id, true, chip::NullOptional); + 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 CurrentHeapUsed non-global attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id, true, chip::NullOptional); + 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, "Reads CurrentHeapHighWaterMark non-global attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id, true, chip::NullOptional); + 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); } - 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", 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_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 - // + 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 - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; + ); + } + 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 - switch (mTestIndex - 1) - { - case 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)); + ); + } + 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 current level to a mid value"); + ListFreer listFreer; + chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; + value.level = 127U; + value.transitionTime = 0U; + value.optionsMask = 1U; + value.optionsOverride = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, + chip::NullOptional - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + ); } - } + 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 - 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"); + ); + } + 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::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } - case 1: { - LogStep(1, - "Reads a list of SoftwareFault struct from DUT and data type in each field of the struct must match the value " - "listed in spec"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + 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 Test_TC_DGSW_2_3Suite : public TestCommand +class TestMultiAdminSuite : public TestCommand { public: - Test_TC_DGSW_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_3", 5, credsIssuerConfig) + TestMultiAdminSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestMultiAdmin", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); + 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); } - ~Test_TC_DGSW_2_3Suite() {} + ~TestMultiAdminSuite() + { + if (readFromAlphaBuffer != nullptr) + { + chip::Platform::MemoryFree(readFromAlphaBuffer); + readFromAlphaBuffer = nullptr; + } + } chip::System::Clock::Timeout GetWaitDuration() const override { @@ -55680,10 +55568,17 @@ class Test_TC_DGSW_2_3Suite : public TestCommand private: chip::Optional mNodeId; - chip::Optional mCluster; + 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; } // @@ -55702,32 +55597,93 @@ class Test_TC_DGSW_2_3Suite : public TestCommand 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)); + VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); + VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 9)); + shouldContinue = true; + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); + } } break; - case 3: + 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)); { - uint64_t value; + chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + 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 4: + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint64_t value; + chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + 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)); } @@ -55744,19 +55700,455 @@ class Test_TC_DGSW_2_3Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); + LogStep(0, "Stop target device"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 1: { - LogStep(1, "Sends ResetWatermarks to DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); ListFreer listFreer; - chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Commands::ResetWatermarks::Id, value, chip::NullOptional + 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), Basic::Id, Basic::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), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 16: { + LogStep(16, "read the mandatory attribute: NodeLabel from gamma"); + return ReadAttribute(kIdentityGamma, GetEndpoint(0), Basic::Id, Basic::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), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); + } + } + 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", 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_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) + { + case 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)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); + } + 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)); + { + uint64_t 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, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Reads a list of ThreadMetrics struct non-global attribute from DUT."); + VerifyOrDo(!ShouldSkip("DGSW.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::ThreadMetrics::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Reads CurrentHeapFree non-global attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGSW.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::CurrentHeapFree::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Reads CurrentHeapUsed non-global attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGSW.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads CurrentHeapHighWaterMark non-global attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGSW.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id, true, chip::NullOptional); + } + } + 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", 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_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) + { + case 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, + "Reads a list of SoftwareFault struct from DUT and data type in each field of the struct must match the value " + "listed in spec"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGSW.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + 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", 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_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) + { + case 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(CheckConstraintType("value", "list", "list")); + } + 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)); + { + uint64_t 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, "Wait for the commissioned device to be retrieved"); + ListFreer 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 ResetWatermarks to DUT"); + VerifyOrDo(!ShouldSkip("DGSW.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Commands::ResetWatermarks::Id, value, chip::NullOptional ); } @@ -61845,7 +62237,7 @@ class DL_SchedulesSuite : public TestCommand class Test_TC_DRLK_2_2Suite : public TestCommand { public: - Test_TC_DRLK_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_2", 23, credsIssuerConfig) + Test_TC_DRLK_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_2", 28, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -61939,15 +62331,29 @@ class Test_TC_DRLK_2_2Suite : public TestCommand 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_UNSUPPORTED_WRITE)); break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("requirePINforRemoteOperation", value, false)); + } 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), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -61955,48 +62361,51 @@ class Test_TC_DRLK_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("requirePINforRemoteOperation", value, true)); } break; - case 10: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 12: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 13: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 16: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 17: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 18: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 19: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userCodeTemporaryDisableTime", value, 15U)); - } + shouldContinue = true; break; - case 20: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 21: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; default: @@ -62097,7 +62506,25 @@ class Test_TC_DRLK_2_2Suite : public TestCommand chip::NullOptional); } case 6: { - LogStep(6, "TH sends Lock Door Command to the DUT without PINCode"); + LogStep(6, + "TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify DUT responds with " + "UNSUPPORTED_WRITE"); + VerifyOrDo(!ShouldSkip("!DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + bool value; + value = false; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, + DoorLock::Attributes::RequirePINforRemoteOperation::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads the RequirePINforRemoteOperation attribute from the DUT"); + VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, + DoorLock::Attributes::RequirePINforRemoteOperation::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH sends Lock Door Command to the DUT without PINCode"); VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; @@ -62106,8 +62533,8 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ); } - case 7: { - LogStep(7, "TH sends Lock Door Command to the DUT with valid PINCode"); + case 9: { + LogStep(9, "TH sends Lock Door Command to the DUT with valid PINCode"); VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; @@ -62118,8 +62545,8 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ); } - case 8: { - LogStep(8, "TH writes the RequirePINforRemoteOperation attribute value as True on the DUT"); + case 10: { + LogStep(10, "TH writes the RequirePINforRemoteOperation attribute value as True on the DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; bool value; @@ -62128,15 +62555,27 @@ class Test_TC_DRLK_2_2Suite : public TestCommand DoorLock::Attributes::RequirePINforRemoteOperation::Id, value, chip::NullOptional, chip::NullOptional); } - case 9: { - LogStep(9, "TH reads the RequirePINforRemoteOperation attribute from the DUT"); + case 11: { + LogStep(11, + "TH writes the RequirePINforRemoteOperation attribute value as True on the DUT and Verify DUT responds with " + "UNSUPPORTED_WRITE"); + VerifyOrDo(!ShouldSkip("!DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + bool value; + value = true; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, + DoorLock::Attributes::RequirePINforRemoteOperation::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 12: { + LogStep(12, "TH reads the RequirePINforRemoteOperation attribute from the DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::RequirePINforRemoteOperation::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH sends Lock Door Command to the DUT with valid PINCode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "TH sends Lock Door Command to the DUT with valid PINCode"); + VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp && DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.pinCode.Emplace(); @@ -62146,9 +62585,9 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ); } - case 11: { - LogStep(11, "TH sends Lock Door Command to the DUT without valid PINCode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 14: { + LogStep(14, "TH sends Lock Door Command to the DUT without valid PINCode"); + VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp && DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.pinCode.Emplace(); @@ -62158,20 +62597,19 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH sends Lock Door Command to the DUT without any argument PINCode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "TH sends Lock Door Command to the DUT without any argument PINCode"); + VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp && DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 13: { - LogStep(13, "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT"); + case 16: { + LogStep(16, + "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and Verify that the DUT sends Success response"); VerifyOrDo(!ShouldSkip("DRLK.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -62179,8 +62617,20 @@ class Test_TC_DRLK_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 14: { - LogStep(14, "TH writes UserCodeTemporaryDisableTime attribute value as 5 seconds on the DUT"); + case 17: { + LogStep(17, + "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and verify DUT responds with UNSUPPORTED_WRITE"); + VerifyOrDo(!ShouldSkip("!DRLK.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 3U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 18: { + LogStep(18, + "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on the DUT and Verify that the DUT send " + "the Success response"); VerifyOrDo(!ShouldSkip("DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -62189,74 +62639,92 @@ class Test_TC_DRLK_2_2Suite : public TestCommand DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, value, chip::NullOptional, chip::NullOptional); } - case 15: { - LogStep(15, "TH sends Lock Door Command to the DUT with invalid PINCode"); + case 19: { + LogStep(19, + "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on the DUT and Verify DUT responds with " + "UNSUPPORTED_WRITE"); + VerifyOrDo(!ShouldSkip("!DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 15U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, + DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 20: { + LogStep(20, "TH sends Lock Door Command to the DUT with invalid PINCode"); VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("12345garbage: not in length on purpose"), 5); + value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123458garbage: not in length on purpose"), 6); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 16: { - LogStep(16, "TH sends Lock Door Command to the DUT with invalid PINCode"); + case 21: { + LogStep(21, "TH sends Lock Door Command to the DUT with invalid PINCode"); VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("54321garbage: not in length on purpose"), 5); + value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123458garbage: not in length on purpose"), 6); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 17: { - LogStep(17, "TH sends Lock Door Command to the DUT with invalid PINCode"); + case 22: { + LogStep(22, "TH sends Lock Door Command to the DUT with invalid PINCode"); VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("987623garbage: not in length on purpose"), 6); + value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123458garbage: 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, "TH sends Lock Door Command to the DUT with invalid PINCode"); + case 23: { + LogStep(23, "TH sends Lock Door Command to the DUT with invalid PINCode"); VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("67890garbage: not in length on purpose"), 5); + value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123458garbage: not in length on purpose"), 6); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 19: { - LogStep(19, "TH reads UserCodeTemporaryDisableTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, true, chip::NullOptional); + case 24: { + LogStep(24, + "TH reads UserCodeTemporaryDisableTime attribute from DUT and After sending 3 failure responses verify that " + "UserCodeTemporaryDisableTime attribute is triggered"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in 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, "TH sends Lock Door Command to the DUT with valid PINCode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep( + 25, + "TH sends Lock Command to the DUT with valid PINCode before UserCodeTemporaryDisableTime attribute time expires"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); 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 - - ); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in 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, "Clean the created user"); + case 26: { + LogStep(26, "Clean the created user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; value.userIndex = 1U; @@ -62265,8 +62733,8 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ); } - case 22: { - LogStep(22, "Cleanup the created credential"); + case 27: { + LogStep(27, "Cleanup the created credential"); VerifyOrDo(!ShouldSkip("DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -62848,27 +63316,19 @@ class Test_TC_DRLK_2_5Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value.weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("value.weekDayIndex", value.weekDayIndex, NumberOfWeekDaySchedulesSupportedPerUser)); - VerifyOrReturn(CheckConstraintMinValue("value.userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value.userIndex", value.userIndex, NumberOfTotalUsersSupported)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckConstraintHasValue("value.daysMask", value.daysMask, true)); - VerifyOrReturn(CheckConstraintMinValue("value.daysMask.Value()", value.daysMask.Value(), 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.daysMask.Value()", value.daysMask.Value(), 6U)); - VerifyOrReturn(CheckConstraintHasValue("value.startHour", value.startHour, true)); - VerifyOrReturn(CheckConstraintMinValue("value.startHour.Value()", value.startHour.Value(), 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.startHour.Value()", value.startHour.Value(), 23U)); - VerifyOrReturn(CheckConstraintHasValue("value.startMinute", value.startMinute, true)); - VerifyOrReturn(CheckConstraintMinValue("value.startMinute.Value()", value.startMinute.Value(), 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.startMinute.Value()", value.startMinute.Value(), 59U)); + 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(), 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.endHour.Value()", value.endHour.Value(), 23U)); + VerifyOrReturn(CheckConstraintMinValue("value.endHour.Value()", value.endHour.Value(), 16U)); VerifyOrReturn(CheckConstraintHasValue("value.endMinute", value.endMinute, true)); - VerifyOrReturn(CheckConstraintMinValue("value.endMinute.Value()", value.endMinute.Value(), 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.endMinute.Value()", value.endMinute.Value(), 59U)); + VerifyOrReturn(CheckConstraintMinValue("value.endMinute.Value()", value.endMinute.Value(), 55U)); } break; case 7: @@ -62897,7 +63357,7 @@ class Test_TC_DRLK_2_5Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2U)); + 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)); @@ -62964,19 +63424,19 @@ class Test_TC_DRLK_2_5Suite : public TestCommand ); } case 3: { - LogStep(3, "Get Max number of Week Day schedules for user"); + LogStep(3, "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, "Get number of supported users"); + LogStep(4, "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, "Send Set Week Day Schedule Command to DUT"); + LogStep(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; @@ -62993,7 +63453,7 @@ class Test_TC_DRLK_2_5Suite : public TestCommand ); } case 6: { - LogStep(6, "send GetWeekDay Schedule Command "); + LogStep(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; @@ -63006,7 +63466,7 @@ class Test_TC_DRLK_2_5Suite : public TestCommand ); } case 7: { - LogStep(7, "Send Set Week Day Schedule Command to DUT and verify INVALID_COMMAND response"); + LogStep(7, "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; @@ -63023,7 +63483,7 @@ class Test_TC_DRLK_2_5Suite : public TestCommand ); } case 8: { - LogStep(8, "send GetWeekDay Schedule Command to DUT and verify INVALID_COMMAND response"); + LogStep(8, "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; @@ -63036,7 +63496,7 @@ class Test_TC_DRLK_2_5Suite : public TestCommand ); } case 9: { - LogStep(9, "Clear all week day schedules for the first user"); + LogStep(9, "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; @@ -63048,12 +63508,12 @@ class Test_TC_DRLK_2_5Suite : public TestCommand ); } case 10: { - LogStep(10, "send GetWeekDay Schedule Command "); + LogStep(10, "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 = 2U; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -63078,7 +63538,7 @@ class Test_TC_DRLK_2_5Suite : public TestCommand class Test_TC_DRLK_2_7Suite : public TestCommand { public: - Test_TC_DRLK_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_7", 16, credsIssuerConfig) + Test_TC_DRLK_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_7", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -63173,16 +63633,17 @@ class Test_TC_DRLK_2_7Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value.yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("value.yearDayIndex", value.yearDayIndex, NumberOfYearDaySchedulesSupportedPerUser)); - VerifyOrReturn(CheckConstraintMinValue("value.userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value.userIndex", value.userIndex, NumberOfTotalUsersSupported)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, true)); - VerifyOrReturn(CheckConstraintType("value.localStartTime.Value()", "", "epoch-s")); - VerifyOrReturn(CheckConstraintHasValue("value.localEndTime", value.localEndTime, true)); - VerifyOrReturn(CheckConstraintType("value.localEndTime.Value()", "", "epoch-s")); + 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: @@ -63201,36 +63662,39 @@ class Test_TC_DRLK_2_7Suite : public TestCommand } 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, 10U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 5U)); - VerifyOrReturn(CheckValue("status", value.status, 1U)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); VerifyOrReturn(CheckConstraintHasValue("value.localEndTime", value.localEndTime, false)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + 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, 1U)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); VerifyOrReturn(CheckConstraintHasValue("value.localEndTime", value.localEndTime, false)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -63242,12 +63706,19 @@ class Test_TC_DRLK_2_7Suite : public TestCommand 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 14: + 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 15: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; default: @@ -63304,19 +63775,19 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } case 3: { - LogStep(3, "Get Max number of year Day schedules for user"); + LogStep(3, "TH reads NumberOfYearDay SchedulesSupportedPerUser attribute"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && 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, "Get number of supported users"); + LogStep(4, "TH reads NumberOfTotalUsers Supported attribute"); VerifyOrDo(!ShouldSkip("DRLK.C.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, "Send Set Year Day Schedule Command to DUT"); + LogStep(5, "TH sends Set Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0e.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; @@ -63330,7 +63801,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } case 6: { - LogStep(6, "send Get Year Day Schedule Command"); + LogStep(6, "TH sends Get Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63343,7 +63814,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } case 7: { - LogStep(7, "Send Set Year Day Schedule Command to DUT and verify INVALID_COMMAND response"); + LogStep(7, "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; @@ -63357,7 +63828,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } case 8: { - LogStep(8, "send Get Year Day Schedule Command to DUT and Verify INVALID_FIELD response"); + LogStep(8, "TH sends Get Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63370,7 +63841,28 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } case 9: { - LogStep(9, "send Get Year Day Schedule Command to DUT and verify FAILURE response"); + LogStep(9, "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, "TH sends Get Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63382,8 +63874,8 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } - case 10: { - LogStep(10, "Clear a year day schedule for the first user"); + case 11: { + LogStep(11, "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; @@ -63394,8 +63886,8 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } - case 11: { - LogStep(11, "send Get Year Day Schedule Command to DUT and verify NOT_FOUND response"); + case 12: { + LogStep(12, "TH sends Get Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx && DRLK.S.C10.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63407,8 +63899,8 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } - case 12: { - LogStep(12, "Send Set Year Day Schedule Command to DUT "); + case 13: { + LogStep(13, "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; @@ -63421,8 +63913,8 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } - case 13: { - LogStep(13, "send Get Year Day Schedule Command"); + case 14: { + LogStep(14, "TH sends Get Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63434,8 +63926,20 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } - case 14: { - LogStep(14, "Clear a year day schedule for the first user"); + case 15: { + LogStep(15, "TH sends Clear Year Day Schedule to DUT"); + VerifyOrDo(!ShouldSkip("DRLK.S.F04 && 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.F04 && DRLK.S.C10.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; @@ -63446,8 +63950,8 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } - case 15: { - LogStep(15, "Cleanup the created user"); + case 17: { + LogStep(17, "Cleanup the created user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; value.userIndex = 1U; @@ -63464,7 +63968,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand class Test_TC_DRLK_2_9Suite : public TestCommand { public: - Test_TC_DRLK_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_9", 18, credsIssuerConfig) + Test_TC_DRLK_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_9", 24, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -63556,9 +64060,9 @@ class Test_TC_DRLK_2_9Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value.credentialExists", "", "boolean")); - VerifyOrReturn(CheckConstraintMinValue("value.userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value.userIndex", value.userIndex, NumberOfTotalUsersSupported)); + 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)); @@ -63600,6 +64104,10 @@ class Test_TC_DRLK_2_9Suite : public TestCommand } 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::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -63610,10 +64118,29 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 11: + case 12: + 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 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)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -63625,10 +64152,10 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 12: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -63636,16 +64163,20 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; - case 14: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 16: + 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::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -63657,9 +64188,12 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 17: + 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)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -63758,7 +64292,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } case 6: { - LogStep(6, "TH sends Set Credential Command to DUT and verify the INVALID_COMMAND if any of the fields are invalid"); + LogStep(6, "TH sends Set Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63768,7 +64302,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand value.credential.credentialType = static_cast(1); value.credential.credentialIndex = 2U; - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("1234garbage: not in length on purpose"), 4); + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("4321garbage: not in length on purpose"), 4); value.userIndex.SetNonNull(); value.userIndex.Value() = 2U; value.userStatus.SetNonNull(); @@ -63781,7 +64315,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } case 7: { - LogStep(7, "TH sends Set Credential Command to DUT and verify response as DUPLICATE if CredentialData is repeated"); + LogStep(7, "TH sends Set Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63804,7 +64338,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } case 8: { - LogStep(8, "TH sends Set Credential Command to DUT and verify response as OCCUPIED if CredentialIndex is repeated"); + LogStep(8, "TH sends Set Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63828,8 +64362,55 @@ class Test_TC_DRLK_2_9Suite : public TestCommand } case 9: { LogStep(9, - "TH sends Set Credential Command to DUT and verify the DUT response as OCCUPIED if the CredentialIndex is not " - "associated with the UserIndex"); + "TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response command with " + "response as OCCUPIED if the CredentialIndex is repeated"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.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 10: { + LogStep(10, "TH sends Set Credential Command to DUT"); + VerifyOrDo(!ShouldSkip("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 = 3U; + + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); + value.userIndex.SetNonNull(); + value.userIndex.Value() = 3U; + value.userStatus.SetNonNull(); + value.userStatus.Value() = static_cast(0); + 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 11: { + LogStep(11, + "TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response command with " + "response as OCCUPIED if the CredentialIndex is repeated"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.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 12: { + LogStep(12, "TH sends Set Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63851,8 +64432,21 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH sends Clear Credential Command to DUT"); + case 13: { + LogStep(13, + "TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response command with " + "response as OCCUPIED if the CredentialIndex is repeated"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.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 14: { + LogStep(14, "TH sends Clear Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -63866,10 +64460,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 11: { - LogStep(11, - "TH sends Get Credential Status Command and verify that the CredentialType and CredentialIndex for the " - "provided value is cleared"); + case 15: { + LogStep(15, "TH sends Get Credential Status Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63883,8 +64475,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH sends Set User Command to DUT"); + case 16: { + LogStep(16, "TH sends Set User Command to DUT"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetUser::Type value; value.operationType = static_cast(0); @@ -63904,8 +64496,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 13: { - LogStep(13, "TH sends Set Credential Command to DUT"); + case 17: { + LogStep(17, "TH sends Set Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63913,7 +64505,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand value.operationType = static_cast(0); value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 3U; + value.credential.credentialIndex = 1U; value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); value.userIndex.SetNonNull(); @@ -63927,8 +64519,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 14: { - LogStep(14, "TH sends Clear Credential Command to DUT"); + case 18: { + LogStep(18, "TH sends Clear Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -63942,8 +64534,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 15: { - LogStep(15, "TH sends Get Credential Status Command"); + case 19: { + LogStep(19, "TH sends Get Credential Status Command"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63957,8 +64549,21 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 16: { - LogStep(16, "TH sends Get Credential Status Command"); + case 20: { + LogStep(20, + "TH sends Get Credential command to DUT and Verify that the CredentialType for the provided value is cleared " + "Verify that the CredentialIndex is cleared"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.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 21: { + LogStep(21, "TH sends Get Credential Status Command"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63972,8 +64577,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 17: { - LogStep(17, "TH sends Clear Credential Command to DUT"); + case 22: { + LogStep(22, "TH sends Clear Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -63987,6 +64592,16 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } + case 23: { + LogStep(23, "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; } @@ -67729,6 +68344,62 @@ class Test_TC_DD_3_20Suite : public TestCommand } }; +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: @@ -70538,118 +71209,6 @@ class Test_TC_CNET_4_6Suite : public TestCommand } }; -class Test_TC_CNET_4_7Suite : public TestCommand -{ -public: - Test_TC_CNET_4_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_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_CNET_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_CNET_4_8Suite : public TestCommand -{ -public: - Test_TC_CNET_4_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_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_CNET_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_CNET_4_9Suite : public TestCommand { public: @@ -71994,10 +72553,10 @@ class Test_TC_CGEN_2_2Suite : public TestCommand } }; -class Test_TC_CGEN_2_3Suite : public TestCommand +class Test_TC_CGEN_2_4Suite : public TestCommand { public: - Test_TC_CGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_3", 0, credsIssuerConfig) + Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72005,7 +72564,7 @@ class Test_TC_CGEN_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_3Suite() {} + ~Test_TC_CGEN_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72050,10 +72609,10 @@ class Test_TC_CGEN_2_3Suite : public TestCommand } }; -class Test_TC_CGEN_2_4Suite : public TestCommand +class Test_TC_DGGEN_2_2Suite : public TestCommand { public: - Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) + Test_TC_DGGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72061,63 +72620,7 @@ class Test_TC_CGEN_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_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_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() {} + ~Test_TC_DGGEN_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75723,30 +76226,30 @@ class Test_TC_CADMIN_1_22Suite : public TestCommand } }; -class Test_TC_CADMIN_1_23Suite : public TestCommand +class Test_TC_CADMIN_1_3Suite : public TestCommand { public: - Test_TC_CADMIN_1_23Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_23", 0, credsIssuerConfig) + Test_TC_CADMIN_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_3", 17, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); } - ~Test_TC_CADMIN_1_23Suite() {} + ~Test_TC_CADMIN_1_3Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } private: chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mNodeId2; + chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -75760,6 +76263,116 @@ class Test_TC_CADMIN_1_23Suite : public TestCommand switch (mTestIndex - 1) { + case 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::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 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::FabricDescriptor::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(CheckNoMoreListItems("fabrics", iter_0, 1)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::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(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + 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("chiptest1", 9))); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); + } + 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::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest2", 9))); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); + } + 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("windowStatus", value, 0U)); + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -75775,72 +76388,182 @@ class Test_TC_CADMIN_1_23Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "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); } - 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", 0, 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_24Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; + case 1: { + LogStep(1, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 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 - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + ); + } + case 2: { + LogStep(2, "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), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 3: { + LogStep(3, "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), Basic::Id, Basic::Attributes::NodeLabel::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "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:0000000000I31506010", 22); + return PairWithCode(kIdentityBeta, value); + } + case 5: { + LogStep(5, "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 6: { + LogStep(6, "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, true, chip::NullOptional); + } + case 7: { + LogStep(7, "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 8: { + LogStep(8, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::CharSpan value; + value = chip::Span("chiptest1garbage: not in length on purpose", 9); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 9: { + LogStep(9, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, + chip::NullOptional); + } + case 10: { + LogStep(10, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::CharSpan value; + value = chip::Span("chiptest2garbage: not in length on purpose", 9); + return WriteAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 11: { + LogStep(11, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, + chip::NullOptional); } + case 12: { + LogStep(12, "TH_CR2 opens a commissioning window on DUT_CE using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 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(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + ); } - } + case 13: { + LogStep(13, "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 14: { + LogStep(14, "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 15: { + LogStep(15, "TH_CR2 opens a commissioning window on DUT_CE using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 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(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + ); + } + case 16: { + LogStep(16, "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:0000000000I31506010", 22); + return PairWithCode(kIdentityAlpha, value); + } } return CHIP_NO_ERROR; } }; -class Test_TC_CADMIN_1_3Suite : public TestCommand +class Test_TC_CADMIN_1_4Suite : public TestCommand { public: - Test_TC_CADMIN_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_3", 17, credsIssuerConfig) + Test_TC_CADMIN_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_4", 17, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -75850,7 +76573,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand AddArgument("payload", &mPayload); } - ~Test_TC_CADMIN_1_3Suite() {} + ~Test_TC_CADMIN_1_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } @@ -75889,9 +76612,8 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; case 4: @@ -75915,7 +76637,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -75929,11 +76651,9 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 8: @@ -75944,9 +76664,9 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest1", 9))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; case 10: @@ -75957,9 +76677,9 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest2", 9))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; case 12: @@ -76001,28 +76721,20 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand { case 0: { LogStep(0, "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 1: { - LogStep(1, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(1, "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::OpenCommissioningWindow::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 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, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); @@ -76043,79 +76755,72 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand chip::NullOptional); } case 4: { - LogStep(4, "Commission from beta"); + LogStep(4, "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:0000000000I31506010", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 5: { - LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE"); + LogStep(5, "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 6: { - LogStep(6, "Query fabrics list"); + LogStep(6, "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, true, chip::NullOptional); } case 7: { - LogStep(7, "Query fabrics list"); + LogStep(7, "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); + OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); } case 8: { LogStep(8, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; - value = chip::Span("chiptest1garbage: not in length on purpose", 9); + value = chip::Span("chiptestgarbage: not in length on purpose", 8); return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } case 9: { LogStep(9, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "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("chiptest2garbage: not in length on purpose", 9); + value = chip::Span("chiptestgarbage: not in length on purpose", 8); return WriteAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } case 11: { - LogStep(11, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "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(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "TH_CR2 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "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::OpenCommissioningWindow::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 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(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); @@ -76134,32 +76839,24 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "TH_CR2 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "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::OpenCommissioningWindow::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 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(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); } case 16: { LogStep(16, "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 = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityAlpha, value); } } @@ -76167,27 +76864,31 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand } }; -class Test_TC_CADMIN_1_4Suite : public TestCommand +class Test_TC_CADMIN_1_5Suite : public TestCommand { public: - Test_TC_CADMIN_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_4", 17, credsIssuerConfig) + Test_TC_CADMIN_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_5", 16, 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("discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("payload", &mPayload); } - ~Test_TC_CADMIN_1_4Suite() {} + ~Test_TC_CADMIN_1_5Suite() {} 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 mDiscriminator; chip::Optional mPayload; @@ -76213,55 +76914,24 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand 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::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); - } + 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)); - 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::FabricDescriptor::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(CheckNoMoreListItems("fabrics", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } + 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)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::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(CheckNoMoreListItems("fabrics", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -76271,41 +76941,26 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); } break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); 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", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); - } break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); 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("windowStatus", value, 0U)); - } + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; @@ -76326,67 +76981,103 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand { case 0: { LogStep(0, "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 1: { - LogStep(1, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(1, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 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::OpenBasicCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); } case 2: { - LogStep(2, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Wait for PIXIT.CADMIN.CwDuration + 10 seconds"); ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 190000UL; + return WaitForMs(kIdentityAlpha, value); } case 3: { - LogStep(3, "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), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Commission from beta"); + LogStep(3, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.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 4: { + LogStep(4, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 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, "TH_CR2 starts a commissioning process with DUT_CE"); + LogStep(5, "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::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); + 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, "Query fabrics list"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); + LogStep(6, "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 7: { - LogStep(7, "Query fabrics list"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); + LogStep(7, "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 8: { - LogStep(8, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + LogStep(8, "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; @@ -76395,80 +77086,112 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand chip::NullOptional, chip::NullOptional); } case 9: { - LogStep(9, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + LogStep(9, "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), Basic::Id, Basic::Attributes::NodeLabel::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "TH_CR1 opens a new commissioning window on DUT_CE using wrong PakeVerifier value using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), 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), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322zgarbage: not in length on purpose"), + 89); + 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 11: { - LogStep(11, "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(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); + LogStep(11, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 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 12: { - LogStep(12, "TH_CR2 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "TH_CR1 opens another commissioning window on DUT_CE using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 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 13: { - LogStep(13, "Wait for the commissioning window in step 13 to timeout"); + LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); + 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 14: { - LogStep(14, "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 15: { - LogStep(15, "TH_CR2 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp && PICS_SKIP_SAMPLE_APP"), 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::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, "TH_CR1 starts a commissioning process with DUT_CE before the timeout from step 12"); + case 15: { + LogStep(15, "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 = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityAlpha, value); + return PairWithCode(kIdentityGamma, value); } } return CHIP_NO_ERROR; } }; -class Test_TC_CADMIN_1_5Suite : public TestCommand +class Test_TC_CADMIN_1_6Suite : public TestCommand { public: - Test_TC_CADMIN_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_5", 16, credsIssuerConfig) + Test_TC_CADMIN_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_6", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -76480,7 +77203,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand AddArgument("payload", &mPayload); } - ~Test_TC_CADMIN_1_5Suite() {} + ~Test_TC_CADMIN_1_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } @@ -76546,335 +77269,14 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand } break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 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), EMBER_ZCL_STATUS_FAILURE)); - break; - case 15: - 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, "TH_CR1 starts a commissioning process with DUT_CE"); - ListFreer 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_CR1 opens a new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 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 2: { - LogStep(2, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 190000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), 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 4: { - LogStep(4, "TH_CR1 opens a new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 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, "TH_CR1 revokes the commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0002"), 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 6: { - LogStep(6, "TH_CR2 starts a commissioning process with 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 7: { - LogStep(7, "TH_CR1 revokes the commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0002"), 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 8: { - LogStep(8, "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), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 9: { - LogStep(9, "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), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "TH_CR1 opens a new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322zgarbage: not in length on purpose"), - 89); - value.discriminator = 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 11: { - LogStep(11, "TH_CR1 opens a new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 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 12: { - LogStep(12, "TH_CR1 opens a new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 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 13: { - LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), 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 14: { - LogStep(14, "TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0002 && PICS_SKIP_SAMPLE_APP"), 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 15: { - LogStep(15, "TH_CR3 starts a commissioning process with DUT_CE"); - 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); - } - } - 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", 16, 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("discriminator", 0, UINT16_MAX, &mDiscriminator); - 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 mDiscriminator; - chip::Optional mPayload; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 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), 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), 0)); - 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)); - 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("chiptest", 8))); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 1)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -76904,6 +77306,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand { case 0: { LogStep(0, "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; @@ -76911,7 +77314,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand } case 1: { LogStep(1, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -76922,7 +77325,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand ); } case 2: { - LogStep(2, "Wait for PIXIT_COMM_WIN(180) + 10"); + LogStep(2, "Wait for PIXIT.CADMIN.CwDuration + 10"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 190000UL; @@ -76930,7 +77333,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand } case 3: { LogStep(3, "Commission from beta"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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; @@ -76939,7 +77342,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand } case 4: { LogStep(4, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -76951,7 +77354,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand } case 5: { LogStep(5, "TH_CR1 revokes the commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -76961,7 +77364,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand ); } case 6: { - LogStep(6, "Commission from beta"); + LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -76970,7 +77373,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand } case 7: { LogStep(7, "TH_CR1 revokes the commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -76996,7 +77399,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand } case 10: { LogStep(10, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -77007,8 +77410,8 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand ); } case 11: { - LogStep(11, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(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; @@ -77028,6 +77431,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand } case 13: { LogStep(13, "TH_CR2 starts a commissioning process on DUT_CE"); + 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; @@ -77035,7 +77439,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand } case 14: { LogStep(14, "TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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, @@ -77046,6 +77450,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand } case 15: { LogStep(15, "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; @@ -77212,6 +77617,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand { case 0: { LogStep(0, "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; @@ -77219,7 +77625,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 1: { LogStep(1, "TH_CR1 opens a new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 900U; @@ -77240,6 +77646,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 2: { LogStep(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; @@ -77248,6 +77655,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 3: { LogStep(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; @@ -77256,6 +77664,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 4: { LogStep(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; @@ -77264,6 +77673,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 5: { LogStep(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; @@ -77272,6 +77682,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 6: { LogStep(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; @@ -77280,6 +77691,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 7: { LogStep(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; @@ -77288,6 +77700,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 8: { LogStep(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; @@ -77296,6 +77709,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 9: { LogStep(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; @@ -77304,6 +77718,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 10: { LogStep(10, "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; @@ -77312,6 +77727,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 11: { LogStep(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; @@ -77320,6 +77736,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 12: { LogStep(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; @@ -77328,6 +77745,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 13: { LogStep(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; @@ -77336,6 +77754,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 14: { LogStep(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; @@ -77344,6 +77763,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 15: { LogStep(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; @@ -77352,6 +77772,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 16: { LogStep(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; @@ -77360,6 +77781,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 17: { LogStep(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; @@ -77368,6 +77790,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 18: { LogStep(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; @@ -77376,6 +77799,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 19: { LogStep(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; @@ -77384,6 +77808,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 20: { LogStep(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; @@ -77392,6 +77817,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 21: { LogStep(21, "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; @@ -77400,6 +77826,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 22: { LogStep(22, "TH_CR2 starts a commissioning process with DUT_CE using valid 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; @@ -77408,6 +77835,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand } case 23: { LogStep(23, "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; @@ -77423,7 +77851,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand { public: Test_TC_CADMIN_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_10", 24, credsIssuerConfig) + TestCommand("Test_TC_CADMIN_1_10", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -77554,10 +77982,6 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand 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; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -77575,6 +77999,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand { case 0: { LogStep(0, "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; @@ -77582,7 +78007,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 1: { LogStep(1, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 900U; @@ -77594,6 +78019,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 2: { LogStep(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; @@ -77602,6 +78028,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 3: { LogStep(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; @@ -77610,6 +78037,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 4: { LogStep(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; @@ -77618,6 +78046,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 5: { LogStep(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; @@ -77626,6 +78055,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 6: { LogStep(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; @@ -77634,6 +78064,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 7: { LogStep(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; @@ -77642,6 +78073,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 8: { LogStep(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; @@ -77650,6 +78082,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 9: { LogStep(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; @@ -77658,6 +78091,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 10: { LogStep(10, "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; @@ -77674,6 +78108,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 12: { LogStep(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; @@ -77682,6 +78117,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 13: { LogStep(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; @@ -77690,6 +78126,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 14: { LogStep(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; @@ -77698,6 +78135,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 15: { LogStep(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; @@ -77706,6 +78144,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 16: { LogStep(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; @@ -77714,6 +78153,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 17: { LogStep(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; @@ -77722,6 +78162,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 18: { LogStep(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; @@ -77730,6 +78171,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 19: { LogStep(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; @@ -77738,6 +78180,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 20: { LogStep(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; @@ -77746,6 +78189,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 21: { LogStep(21, "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; @@ -77753,21 +78197,14 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand return PairWithCode(kIdentityBeta, value); } case 22: { - LogStep(22, "TH_CR2 starts a commissioning process with DUT_CE using valid setup code"); + LogStep(22, "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 = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); return PairWithCode(kIdentityBeta, value); } - case 23: { - LogStep(23, "TH_CR3 starts a commissioning process with DUT_CE"); - 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:0000000000I31506010", 22); - return PairWithCode(kIdentityGamma, value); - } } return CHIP_NO_ERROR; } @@ -77864,7 +78301,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 10: @@ -77894,7 +78331,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 14: @@ -77924,6 +78361,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand { case 0: { LogStep(0, "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; @@ -77931,7 +78369,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand } case 1: { LogStep(1, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -77951,6 +78389,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand } case 3: { LogStep(3, "TH_CR3 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 = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; @@ -77958,7 +78397,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand } case 4: { LogStep(4, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -77985,7 +78424,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand } case 7: { LogStep(7, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -77997,7 +78436,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand } case 8: { LogStep(8, "TH_CR1 opens a new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -78031,7 +78470,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand } case 11: { LogStep(11, "TH_CR1 re-opens new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -78052,7 +78491,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand } case 12: { LogStep(12, "TH_CR3 opens a new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -78086,7 +78525,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand } case 15: { LogStep(15, "TH_CR1 opens a new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -78107,7 +78546,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand } case 16: { LogStep(16, "TH_CR2 opens a new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -78131,18 +78570,18 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand } }; -class Test_TC_CADMIN_1_25Suite : public TestCommand +class Test_TC_CADMIN_1_23Suite : public TestCommand { public: - Test_TC_CADMIN_1_25Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_25", 8, credsIssuerConfig) + 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_25Suite() {} + ~Test_TC_CADMIN_1_23Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(330)); } @@ -78236,6 +78675,7 @@ class Test_TC_CADMIN_1_25Suite : public TestCommand } case 2: { LogStep(2, "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; @@ -78243,6 +78683,7 @@ class Test_TC_CADMIN_1_25Suite : public TestCommand } case 3: { LogStep(3, "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; @@ -78261,11 +78702,13 @@ class Test_TC_CADMIN_1_25Suite : public TestCommand } case 5: { LogStep(5, "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, "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 = 179U; @@ -78277,6 +78720,7 @@ class Test_TC_CADMIN_1_25Suite : public TestCommand } case 7: { LogStep(7, "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); } @@ -78285,18 +78729,18 @@ class Test_TC_CADMIN_1_25Suite : public TestCommand } }; -class Test_TC_CADMIN_1_26Suite : public TestCommand +class Test_TC_CADMIN_1_24Suite : public TestCommand { public: - Test_TC_CADMIN_1_26Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_26", 8, credsIssuerConfig) + Test_TC_CADMIN_1_24Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_24", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CADMIN_1_26Suite() {} + ~Test_TC_CADMIN_1_24Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(330)); } @@ -78372,6 +78816,7 @@ class Test_TC_CADMIN_1_26Suite : public TestCommand { case 0: { LogStep(0, "Factory Reset the DUT_CE"); + 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); @@ -78389,6 +78834,7 @@ class Test_TC_CADMIN_1_26Suite : public TestCommand } case 2: { LogStep(2, "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; @@ -78396,6 +78842,7 @@ class Test_TC_CADMIN_1_26Suite : public TestCommand } case 3: { LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -78423,11 +78870,13 @@ class Test_TC_CADMIN_1_26Suite : public TestCommand } case 5: { LogStep(5, "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, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 179U; @@ -78448,6 +78897,7 @@ class Test_TC_CADMIN_1_26Suite : public TestCommand } case 7: { LogStep(7, "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); } @@ -81639,7 +82089,7 @@ class Test_TC_FLW_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); ValueBeforeChange = value; @@ -81654,7 +82104,7 @@ class Test_TC_FLW_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); @@ -81700,7 +82150,7 @@ class Test_TC_FLW_2_2Suite : public TestCommand } case 3: { LogStep(3, "read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } @@ -81980,7 +82430,6 @@ class Test_TC_OCC_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupancy", value, 0U)); OccupancyValue = value; } break; @@ -81993,6 +82442,7 @@ class Test_TC_OCC_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintNotValue("value", value, OccupancyValue)); } break; default: @@ -82035,7 +82485,7 @@ class Test_TC_OCC_3_1Suite : public TestCommand } case 3: { LogStep(3, "Reads back Occupancy attribute from DUT after few seconds"); - VerifyOrDo(!ShouldSkip("OCC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } @@ -82656,173 +83106,1288 @@ class Test_TC_CC_5_4Suite : public TestCommand switch (testIndex) { } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_6_4Suite : public TestCommand -{ -public: - Test_TC_CC_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_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_CC_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; + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CC_6_4Suite : public TestCommand +{ +public: + Test_TC_CC_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_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_CC_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_CC_7_5Suite : public TestCommand +{ +public: + Test_TC_CC_7_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_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_CC_7_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_CC_9_4Suite : public TestCommand +{ +public: + Test_TC_CC_9_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_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_CC_9_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_CC_3_1Suite : public TestCommand +{ +public: + Test_TC_CC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_1", 35, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("hueShortestDistance", 0, UINT8_MAX, &mHueShortestDistance); + AddArgument("hueLongestDistance", 0, UINT8_MAX, &mHueLongestDistance); + AddArgument("hueDirectionUp", 0, UINT8_MAX, &mHueDirectionUp); + AddArgument("hueDirectionDown", 0, UINT8_MAX, &mHueDirectionDown); + } + + ~Test_TC_CC_3_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(150)); } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + chip::Optional mHueShortestDistance; + chip::Optional mHueLongestDistance; + chip::Optional mHueDirectionUp; + chip::Optional mHueDirectionDown; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 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)); + { + 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 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(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + 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(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + 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( + CheckValue("currentHue", value, mHueShortestDistance.HasValue() ? mHueShortestDistance.Value() : 150U)); + } + 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(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)); + 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(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + } + 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( + CheckValue("currentHue", value, mHueLongestDistance.HasValue() ? mHueLongestDistance.Value() : 200U)); + } + 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)); + { + 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 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(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + } + 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(CheckValue("currentHue", value, mHueDirectionUp.HasValue() ? mHueDirectionUp.Value() : 250U)); + } + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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)); + { + 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 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 30: + 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 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentHue", value, mHueDirectionDown.HasValue() ? mHueDirectionDown.Value() : 170U)); + } + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + 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, "Turn on light for color control tests"); + 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"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "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 4: { + LogStep(4, "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 5: { + LogStep(5, "TH sends MoveToHue command to DUT another Hue with Direction Shortest distance and TransitionTime 300"); + 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 = mHueShortestDistance.HasValue() ? mHueShortestDistance.Value() : 150U; + 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 5000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 7: { + LogStep(7, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Wait 5000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 10: { + LogStep(10, "Wait 20s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 20000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 12: { + LogStep(12, "TH sends MoveToHue command to DUT another Hue with Direction Longest distance and TransitionTime 300"); + 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 = mHueLongestDistance.HasValue() ? mHueLongestDistance.Value() : 200U; + 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 13: { + LogStep(13, "Wait 5000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 15: { + LogStep(15, "Wait 5000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep(16, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 17: { + LogStep(17, "Wait 20s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 20000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 18: { + LogStep(18, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 19: { + LogStep(19, "TH sends MoveToHue command to DUT another Hue with Direction Up and TransitionTime 300"); + 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 = mHueDirectionUp.HasValue() ? mHueDirectionUp.Value() : 250U; + 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 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, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 22: { + LogStep(22, "Wait 5000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 23: { + LogStep(23, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 24: { + LogStep(24, "Wait 20s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 20000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 25: { + LogStep(25, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 26: { + LogStep(26, "TH sends MoveToHue command to DUT another Hue with Direction Down and TransitionTime 300"); + 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 = mHueDirectionDown.HasValue() ? mHueDirectionDown.Value() : 170U; + 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 27: { + LogStep(27, "Wait 5000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 28: { + LogStep(28, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 29: { + LogStep(29, "Wait 5000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 30: { + LogStep(30, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 31: { + LogStep(31, "Wait 20s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 20000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 32: { + LogStep(32, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 33: { + LogStep(33, "Turn off light that we turned on"); + 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 34: { + LogStep(34, "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_CC_7_1Suite : public TestCommand +{ +public: + Test_TC_CC_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_1", 36, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("EnhancedHueConfigValue", 0, UINT16_MAX, &mEnhancedHueConfigValue); + AddArgument("EnhancedHueShortestDistanceConfigValue", 0, UINT16_MAX, &mEnhancedHueShortestDistanceConfigValue); + AddArgument("EnhancedHueLongestDistanceConfigValue", 0, UINT16_MAX, &mEnhancedHueLongestDistanceConfigValue); + AddArgument("EnhancedHueDirectionUpConfigValue", 0, UINT16_MAX, &mEnhancedHueDirectionUpConfigValue); + AddArgument("EnhancedHueDirectionDownConfigValue", 0, UINT16_MAX, &mEnhancedHueDirectionDownConfigValue); + } + + ~Test_TC_CC_7_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(150)); } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + chip::Optional mEnhancedHueConfigValue; + chip::Optional mEnhancedHueShortestDistanceConfigValue; + chip::Optional mEnhancedHueLongestDistanceConfigValue; + chip::Optional mEnhancedHueDirectionUpConfigValue; + chip::Optional mEnhancedHueDirectionDownConfigValue; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 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)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, + mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1025U)); + 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)); + 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)); + { + 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)); + 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(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)); + 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(CheckValue( + "enhancedCurrentHue", value, + mEnhancedHueShortestDistanceConfigValue.HasValue() ? mEnhancedHueShortestDistanceConfigValue.Value() : 1050U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + 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(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + 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, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + 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( + "enhancedCurrentHue", value, + mEnhancedHueLongestDistanceConfigValue.HasValue() ? mEnhancedHueLongestDistanceConfigValue.Value() : 1200U)); + 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)); + 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(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)); + 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, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + 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( + CheckValue("enhancedCurrentHue", value, + mEnhancedHueDirectionUpConfigValue.HasValue() ? mEnhancedHueDirectionUpConfigValue.Value() : 1300U)); + 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)); + 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(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + 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(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + 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(CheckValue( + "enhancedCurrentHue", value, + mEnhancedHueDirectionDownConfigValue.HasValue() ? mEnhancedHueDirectionDownConfigValue.Value() : 1100U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: + 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, "Turn on light for color control tests"); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::On::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + ); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 2: { + LogStep(2, "Check on/off attribute value is true after on command"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + case 3: { + LogStep(3, "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); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_7_5Suite : public TestCommand -{ -public: - Test_TC_CC_7_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_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_CC_7_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; + case 4: { + LogStep(4, "TH sends EnhancedMoveToHue command to DUT"); + 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 = mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1025U; + 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 - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + ); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 5: { + LogStep(5, "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 6: { + LogStep(6, "TH sends EnhancedMoveToHue command to DUT"); + 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 = + mEnhancedHueShortestDistanceConfigValue.HasValue() ? mEnhancedHueShortestDistanceConfigValue.Value() : 1050U; + 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 - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + ); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_9_4Suite : public TestCommand -{ -public: - Test_TC_CC_9_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_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_CC_9_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 - // + case 7: { + LogStep(7, "Wait 5500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5500UL; + return WaitForMs(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + 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 9: { + LogStep(9, "Wait 5500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5500UL; + return WaitForMs(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + 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 11: { + LogStep(11, "Wait 20s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 20000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + 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 13: { + LogStep(13, "TH sends EnhancedMoveToHue command to DUT"); + 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 = + mEnhancedHueLongestDistanceConfigValue.HasValue() ? mEnhancedHueLongestDistanceConfigValue.Value() : 1200U; + 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 - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; + ); + } + case 14: { + LogStep(14, "Wait 5500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5500UL; + return WaitForMs(kIdentityAlpha, value); + } + case 15: { + LogStep(15, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + 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 16: { + LogStep(16, "Wait 5500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5500UL; + return WaitForMs(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + 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 18: { + LogStep(18, "Wait 20s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 20000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 19: { + LogStep(19, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + 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 20: { + LogStep(20, "TH sends EnhancedMoveToHue command to DUT"); + 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 = mEnhancedHueDirectionUpConfigValue.HasValue() ? mEnhancedHueDirectionUpConfigValue.Value() : 1300U; + 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 - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + ); + } + case 21: { + LogStep(21, "Wait 5500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5500UL; + return WaitForMs(kIdentityAlpha, value); + } + case 22: { + LogStep(22, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + 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 5500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5500UL; + return WaitForMs(kIdentityAlpha, value); + } + case 24: { + LogStep(24, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + 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, "Wait 20s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 20000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 26: { + LogStep(26, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + 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 27: { + LogStep(27, "TH sends EnhancedMoveToHue command to DUT "); + 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 = + mEnhancedHueDirectionDownConfigValue.HasValue() ? mEnhancedHueDirectionDownConfigValue.Value() : 1100U; + 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 - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + ); } - } + case 28: { + LogStep(28, "Wait 5500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5500UL; + return WaitForMs(kIdentityAlpha, value); + } + case 29: { + LogStep(29, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + 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 5500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5500UL; + return WaitForMs(kIdentityAlpha, value); + } + case 31: { + LogStep(31, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + 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 20s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 20000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 33: { + LogStep(33, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + 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, "Turn off light that we turned on"); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::Off::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + ); + } + case 35: { + LogStep(35, "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; } @@ -82831,7 +84396,7 @@ class Test_TC_CC_9_4Suite : public TestCommand class Test_TC_CC_9_1Suite : public TestCommand { public: - Test_TC_CC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_1", 72, credsIssuerConfig) + Test_TC_CC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_1", 73, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -82849,14 +84414,14 @@ class Test_TC_CC_9_1Suite : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; - uint16_t ColorLoopStartEnhancedHue; - uint16_t ColorLoopStoredEnhancedHueValue1; - uint16_t ColorLoopStartEnhancedHue2; - uint16_t ColorLoopStoredEnhancedHueValue2; - uint16_t ColorLoopStartEnhancedHue3; - uint16_t ColorLoopStoredEnhancedHueValue3; - uint16_t ColorLoopStartEnhancedHue4; - uint16_t ColorLoopStoredEnhancedHue4; + 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; } @@ -82896,6 +84461,9 @@ class Test_TC_CC_9_1Suite : public TestCommand 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)); { uint8_t value; @@ -82903,10 +84471,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -82914,10 +84482,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -82925,10 +84493,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -82936,10 +84504,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -82947,7 +84515,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -82955,46 +84523,46 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHue = value; + ColorLoopStartEnhancedHueStep5d = value; } break; - case 18: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep5d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep5d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83002,26 +84570,26 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueValue1 = value; + ColorLoopStoredEnhancedHueStep6c = value; } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue1)); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep6c)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83029,10 +84597,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83040,7 +84608,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83048,46 +84616,46 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHue2 = value; + ColorLoopStartEnhancedHueStep8d = value; } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue2)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep8d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue2)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep8d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83095,30 +84663,30 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueValue2 = value; + ColorLoopStoredEnhancedHueStep9c = value; } break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue2)); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep9c)); } break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83126,10 +84694,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 16384U)); } break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83137,10 +84705,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83148,7 +84716,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83156,46 +84724,46 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 47: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 48: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHue3 = value; + ColorLoopStartEnhancedHueStep12d = value; } break; - case 49: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue3)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep12d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 50: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 51: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue3)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep12d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 52: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 53: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83203,26 +84771,26 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 54: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueValue3 = value; + ColorLoopStoredEnhancedHueStep13c = value; } break; - case 55: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue3)); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep13c)); } break; - case 56: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 57: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83230,10 +84798,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 58: + case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 59: + case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83241,7 +84809,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 60: + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83249,46 +84817,46 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 61: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 62: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHue4 = value; + ColorLoopStartEnhancedHueStep15d = value; } break; - case 63: + case 64: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue3)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep15d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 64: + case 65: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 65: + case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue4)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep15d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 66: + case 67: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 67: + case 68: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83296,26 +84864,26 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 68: + case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHue4 = value; + ColorLoopStoredEnhancedHueStep16b = value; } break; - case 69: + case 70: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHue4)); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep16b)); } break; - case 70: + case 71: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 71: + case 72: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -83359,7 +84927,7 @@ class Test_TC_CC_9_1Suite : public TestCommand } case 3: { LogStep(3, "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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; @@ -83380,8 +84948,17 @@ class Test_TC_CC_9_1Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "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 6: { + LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83396,15 +84973,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83419,15 +84997,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 8: { - LogStep(8, "Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83442,15 +85021,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 10: { - LogStep(10, "Read ColorLoopTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83465,15 +85045,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "Read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 14: { + LogStep(14, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83488,53 +85069,58 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 14: { - LogStep(14, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "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, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "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"); + case 17: { + LogStep(17, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "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, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "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"); + case 20: { + LogStep(20, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83549,27 +85135,30 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 22: { - LogStep(22, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 23: { + LogStep(23, "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, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "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, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83584,15 +85173,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 26: { - LogStep(26, "Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83607,53 +85197,58 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 28: { - LogStep(28, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "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, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 30: { + LogStep(30, "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"); + case 31: { + LogStep(31, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 32: { + LogStep(32, "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, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 33: { + LogStep(33, "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"); + case 34: { + LogStep(34, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 34: { - LogStep(34, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 35: { + LogStep(35, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83668,27 +85263,30 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 36: { - LogStep(36, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 37: { + LogStep(37, "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, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 38: { + LogStep(38, "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, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 39: { + LogStep(39, "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, "Enhanced Move To Hue command"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 40: { + LogStep(40, "Enhanced Move To Hue command"); + 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; @@ -83701,22 +85299,23 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 40: { - LogStep(40, "Wait 1000ms"); + case 41: { + LogStep(41, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 41: { - LogStep(41, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 42: { + LogStep(42, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 43: { + LogStep(43, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83731,15 +85330,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 43: { - LogStep(43, "Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 44: { + LogStep(44, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 45: { + LogStep(45, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83754,53 +85354,58 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 45: { - LogStep(45, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 46: { + LogStep(46, "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, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 47: { + LogStep(47, "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"); + case 48: { + LogStep(48, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 48: { - LogStep(48, "Read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 49: { + LogStep(49, "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, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 50: { + LogStep(50, "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"); + case 51: { + LogStep(51, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 51: { - LogStep(51, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 52: { + LogStep(52, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 53: { + LogStep(53, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83815,27 +85420,30 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 53: { - LogStep(53, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 54: { + LogStep(54, "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, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 55: { + LogStep(55, "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, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 56: { + LogStep(56, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 57: { + LogStep(57, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83850,15 +85458,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 57: { - LogStep(57, "Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 58: { + LogStep(58, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 59: { + LogStep(59, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83873,53 +85482,58 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 59: { - LogStep(59, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 60: { + LogStep(60, "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, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 61: { + LogStep(61, "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"); + case 62: { + LogStep(62, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 62: { - LogStep(62, "Read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 63: { + LogStep(63, "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, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 64: { + LogStep(64, "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"); + case 65: { + LogStep(65, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 65: { - LogStep(65, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 66: { + LogStep(66, "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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 67: { + LogStep(67, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -83934,34 +85548,37 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 67: { - LogStep(67, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 68: { + LogStep(68, "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, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 69: { + LogStep(69, "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, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 70: { + LogStep(70, "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"); + case 71: { + LogStep(71, "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"); + case 72: { + LogStep(72, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -83972,7 +85589,7 @@ class Test_TC_CC_9_1Suite : public TestCommand class Test_TC_CC_9_2Suite : public TestCommand { public: - Test_TC_CC_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_2", 31, credsIssuerConfig) + Test_TC_CC_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_2", 32, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -83991,7 +85608,7 @@ class Test_TC_CC_9_2Suite : public TestCommand chip::Optional mTimeout; uint16_t ColorLoopStartEnhancedHueValue; - uint16_t ColorLoopStartEnhancedHue1; + uint16_t ColorLoopStartEnhancedHue; uint16_t ColorLoopStoredEnhancedHueValue; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -84032,6 +85649,9 @@ class Test_TC_CC_9_2Suite : public TestCommand 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)); { uint8_t value; @@ -84039,7 +85659,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84047,7 +85667,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84055,7 +85675,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84063,10 +85683,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84074,7 +85694,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84082,11 +85702,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84094,34 +85714,34 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStartEnhancedHueValue = value; } break; - case 15: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84129,46 +85749,46 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHue1 = value; + ColorLoopStartEnhancedHue = value; } break; - case 22: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue1)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 24: + 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", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue1)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84176,7 +85796,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84184,7 +85804,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStoredEnhancedHueValue = value; } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84192,10 +85812,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -84239,7 +85859,7 @@ class Test_TC_CC_9_2Suite : public TestCommand } case 3: { LogStep(3, "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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; @@ -84260,8 +85880,17 @@ class Test_TC_CC_9_2Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "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 6: { + LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -84276,33 +85905,37 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 6: { - LogStep(6, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "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, "Read ColorLoopDirection attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "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, "Read ColorLoopTime attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "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, "Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "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, "Color Loop Set Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "Color Loop Set Command - Set all Attributes"); + 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); @@ -84317,53 +85950,58 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 11: { - LogStep(11, "Read ColorLoopActive attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "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, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "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"); + case 14: { + LogStep(14, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "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, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "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"); + case 17: { + LogStep(17, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "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, "Color Loop Set Command - Start Color Loop"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "Color Loop Set Command - Start Color Loop"); + 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); @@ -84378,47 +86016,51 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 19: { - LogStep(19, "Read ColorLoopDirection attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "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"); + case 21: { + LogStep(21, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 21: { - LogStep(21, "Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "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, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 23: { + LogStep(23, "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"); + case 24: { + LogStep(24, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "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, "Color Loop Set Command - Start Color Loop"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Color Loop Set Command - Start Color Loop"); + 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); @@ -84433,34 +86075,37 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 26: { - LogStep(26, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "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, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "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, "Read EnhancedCurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "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"); + case 30: { + LogStep(30, "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"); + case 31: { + LogStep(31, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -84471,7 +86116,7 @@ class Test_TC_CC_9_2Suite : public TestCommand class Test_TC_CC_9_3Suite : public TestCommand { public: - Test_TC_CC_9_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_3", 30, credsIssuerConfig) + Test_TC_CC_9_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_3", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -84530,6 +86175,9 @@ class Test_TC_CC_9_3Suite : public TestCommand 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)); { uint8_t value; @@ -84537,7 +86185,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84545,7 +86193,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84553,7 +86201,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84561,10 +86209,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84572,7 +86220,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84580,11 +86228,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84592,34 +86240,34 @@ class Test_TC_CC_9_3Suite : public TestCommand ColorLoopStartEnhancedHueValue = value; } break; - case 15: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84627,38 +86275,38 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 60U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 21: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 23: + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84666,7 +86314,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84674,7 +86322,7 @@ class Test_TC_CC_9_3Suite : public TestCommand ColorLoopStoredEnhancedHueValue = value; } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84682,10 +86330,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -84729,7 +86377,7 @@ class Test_TC_CC_9_3Suite : public TestCommand } case 3: { LogStep(3, "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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; @@ -84750,8 +86398,17 @@ class Test_TC_CC_9_3Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "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 6: { + LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); + 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); @@ -84766,33 +86423,37 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 6: { - LogStep(6, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "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, "Read ColorLoopDirection attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "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, "Read ColorLoopTime attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "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, "Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "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, "Color Loop Set Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "Color Loop Set Command - Set all Attributes"); + 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); @@ -84807,53 +86468,58 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 11: { - LogStep(11, "Read ColorLoopActive attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "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, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "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"); + case 14: { + LogStep(14, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "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, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "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"); + case 17: { + LogStep(17, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "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, "Color Loop Set Command - Start Color Loop"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "Color Loop Set Command - Start Color Loop"); + 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); @@ -84868,41 +86534,44 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 19: { - LogStep(19, "Read ColorLoopTime attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "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"); + case 21: { + LogStep(21, "Wait for 60S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 60000UL; return WaitForMs(kIdentityAlpha, value); } - case 21: { - LogStep(21, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "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"); + case 23: { + LogStep(23, "Wait for 60S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 60000UL; return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "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, "Color Loop Set Command - Start Color Loop"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "Color Loop Set Command - Start Color Loop"); + 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); @@ -84917,34 +86586,37 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 25: { - LogStep(25, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "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, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "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, "Read EnhancedCurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "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"); + 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 29: { - LogStep(29, "Check on/off attribute value is false after off command"); + 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); } } @@ -85989,8 +87661,8 @@ class Test_TC_OO_2_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 270U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 320U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); } break; case 38: @@ -86038,8 +87710,8 @@ class Test_TC_OO_2_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 270U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 325U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); } break; case 48: @@ -86078,8 +87750,8 @@ class Test_TC_OO_2_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 270U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 320U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); } break; case 54: @@ -86110,8 +87782,8 @@ class Test_TC_OO_2_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 180U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 220U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); } break; case 59: @@ -86179,8 +87851,8 @@ class Test_TC_OO_2_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 270U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 320U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); } break; case 71: @@ -86267,7 +87939,8 @@ class Test_TC_OO_2_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 300U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); } break; case 85: @@ -86327,8 +88000,8 @@ class Test_TC_OO_2_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 270U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 320U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); } break; case 94: @@ -86366,8 +88039,8 @@ class Test_TC_OO_2_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 180U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 220U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); } break; case 101: @@ -86402,8 +88075,8 @@ class Test_TC_OO_2_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 270U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 320U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); } break; case 106: @@ -86430,8 +88103,8 @@ class Test_TC_OO_2_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 180U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 220U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); } break; case 110: @@ -86492,8 +88165,8 @@ class Test_TC_OO_2_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 270U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 320U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); } break; case 120: @@ -86522,7 +88195,7 @@ class Test_TC_OO_2_3Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); } break; case 124: @@ -86541,8 +88214,8 @@ class Test_TC_OO_2_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 270U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 320U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); } break; case 127: @@ -86579,7 +88252,7 @@ class Test_TC_OO_2_3Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); } break; case 132: @@ -87278,18 +88951,18 @@ class Test_TC_OO_2_3Suite : public TestCommand } case 92: { LogStep(92, "18b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 93: { LogStep(93, "18b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 94: { LogStep(94, "18b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("OO.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, chip::NullOptional); } @@ -87729,7 +89402,7 @@ class Test_TC_RH_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -87739,7 +89412,7 @@ class Test_TC_RH_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -87749,7 +89422,7 @@ class Test_TC_RH_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); ValueBeforeChange = value; @@ -87764,7 +89437,7 @@ class Test_TC_RH_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); } break; @@ -87798,7 +89471,7 @@ class Test_TC_RH_2_2Suite : public TestCommand } case 2: { LogStep(2, "Reads constraints of attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("RH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); } @@ -87820,7 +89493,7 @@ class Test_TC_RH_2_2Suite : public TestCommand } case 5: { LogStep(5, "Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("RH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } @@ -87885,62 +89558,6 @@ class Test_TC_RH_3_1Suite : public TestCommand } }; -class Test_TC_SWTCH_1_1Suite : public TestCommand -{ -public: - Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_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_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) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(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: @@ -88156,7 +89773,7 @@ class Test_TC_TMP_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); } @@ -88166,7 +89783,7 @@ class Test_TC_TMP_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -88176,9 +89793,9 @@ class Test_TC_TMP_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); valueBeforeChange = value; } break; @@ -88191,9 +89808,9 @@ class Test_TC_TMP_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); } break; @@ -88220,13 +89837,13 @@ class Test_TC_TMP_2_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the mandatory attribute: MinMeasuredValue"); + LogStep(1, "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, "read the mandatory attribute: MaxMeasuredValue"); + LogStep(2, "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); @@ -88249,7 +89866,7 @@ class Test_TC_TMP_2_2Suite : public TestCommand } case 5: { LogStep(5, "Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } @@ -89500,7 +91117,7 @@ class Test_TC_LUNIT_2_1Suite : public TestCommand class Test_TC_LUNIT_3_1Suite : public TestCommand { public: - Test_TC_LUNIT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_3_1", 0, credsIssuerConfig) + Test_TC_LUNIT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_3_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -89533,6 +91150,54 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand switch (mTestIndex - 1) { + case 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::TempUnit 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::TempUnit 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::TempUnit 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::TempUnit 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)); } @@ -89548,6 +91213,73 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads 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, "TH writes 0 (Fahrenheit) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit 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, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH writes 1 (Celsius) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit 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, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH writes 2 (Kelvin) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit 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, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH writes 5 to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit 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; } @@ -90969,7 +92701,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -90982,7 +92713,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -91067,6 +92797,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -91139,6 +92870,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -91189,6 +92921,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -91233,8 +92966,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -91259,7 +92990,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -91325,8 +93055,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -91334,8 +93062,8 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -91412,6 +93140,8 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -91434,7 +93164,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), 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 56662a014f3e9c..bf587ab668726f 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -319,9 +319,7 @@ class SubscribeAttributeIdentifyIdentifyTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -387,9 +385,7 @@ class SubscribeAttributeIdentifyIdentifyType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -455,9 +451,7 @@ class SubscribeAttributeIdentifyGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -523,9 +517,7 @@ class SubscribeAttributeIdentifyAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -591,9 +583,7 @@ class SubscribeAttributeIdentifyAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -659,9 +649,7 @@ class SubscribeAttributeIdentifyFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -727,9 +715,7 @@ class SubscribeAttributeIdentifyClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -1114,9 +1100,7 @@ class SubscribeAttributeGroupsNameSupport : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.NameSupport response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -1182,9 +1166,7 @@ class SubscribeAttributeGroupsGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -1250,9 +1232,7 @@ class SubscribeAttributeGroupsAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -1318,9 +1298,7 @@ class SubscribeAttributeGroupsAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -1386,9 +1364,7 @@ class SubscribeAttributeGroupsFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -1454,9 +1430,7 @@ class SubscribeAttributeGroupsClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -2146,9 +2120,7 @@ class SubscribeAttributeScenesSceneCount : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -2214,9 +2186,7 @@ class SubscribeAttributeScenesCurrentScene : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentScene response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -2282,9 +2252,7 @@ class SubscribeAttributeScenesCurrentGroup : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentGroup response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -2350,9 +2318,7 @@ class SubscribeAttributeScenesSceneValid : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneValid response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -2418,9 +2384,7 @@ class SubscribeAttributeScenesNameSupport : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.NameSupport response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -2486,9 +2450,7 @@ class SubscribeAttributeScenesLastConfiguredBy : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.LastConfiguredBy response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -2554,9 +2516,7 @@ class SubscribeAttributeScenesGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -2622,9 +2582,7 @@ class SubscribeAttributeScenesAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -2690,9 +2648,7 @@ class SubscribeAttributeScenesAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -2758,9 +2714,7 @@ class SubscribeAttributeScenesFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -2826,9 +2780,7 @@ class SubscribeAttributeScenesClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -3174,9 +3126,7 @@ class SubscribeAttributeOnOffOnOff : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnOff response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -3238,9 +3188,7 @@ class SubscribeAttributeOnOffGlobalSceneControl : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GlobalSceneControl response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -3340,9 +3288,7 @@ class SubscribeAttributeOnOffOnTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -3442,9 +3388,7 @@ class SubscribeAttributeOnOffOffWaitTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OffWaitTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -3544,9 +3488,7 @@ class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.StartUpOnOff response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -3608,9 +3550,7 @@ class SubscribeAttributeOnOffGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -3672,9 +3612,7 @@ class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -3736,9 +3674,7 @@ class SubscribeAttributeOnOffAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -3800,9 +3736,7 @@ class SubscribeAttributeOnOffFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -3864,9 +3798,7 @@ class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -3947,9 +3879,7 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchType : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -4052,9 +3982,7 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchActions : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -4118,9 +4046,7 @@ class SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -4184,9 +4110,7 @@ class SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList : public Sub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -4250,9 +4174,7 @@ class SubscribeAttributeOnOffSwitchConfigurationAttributeList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -4316,9 +4238,7 @@ class SubscribeAttributeOnOffSwitchConfigurationFeatureMap : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -4382,9 +4302,7 @@ class SubscribeAttributeOnOffSwitchConfigurationClusterRevision : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -4439,8 +4357,8 @@ class LevelControlMoveToLevel : public ClusterCommand { { AddArgument("Level", 0, UINT8_MAX, &mRequest.level); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4457,8 +4375,8 @@ class LevelControlMoveToLevel : public ClusterCommand { = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.level = [NSNumber numberWithUnsignedChar:mRequest.level]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionMask = [NSNumber numberWithUnsignedChar:mRequest.optionMask]; - params.optionOverride = [NSNumber numberWithUnsignedChar:mRequest.optionOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4491,8 +4409,8 @@ class LevelControlMove : public ClusterCommand { { AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4509,8 +4427,8 @@ class LevelControlMove : public ClusterCommand { = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; - params.optionMask = [NSNumber numberWithUnsignedChar:mRequest.optionMask]; - params.optionOverride = [NSNumber numberWithUnsignedChar:mRequest.optionOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4544,8 +4462,8 @@ class LevelControlStep : public ClusterCommand { AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4563,8 +4481,8 @@ class LevelControlStep : public ClusterCommand { params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionMask = [NSNumber numberWithUnsignedChar:mRequest.optionMask]; - params.optionOverride = [NSNumber numberWithUnsignedChar:mRequest.optionOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4595,8 +4513,8 @@ class LevelControlStop : public ClusterCommand { LevelControlStop() : ClusterCommand("stop") { - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4611,8 +4529,8 @@ class LevelControlStop : public ClusterCommand { __auto_type * params = [[MTRLevelControlClusterStopParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.optionMask = [NSNumber numberWithUnsignedChar:mRequest.optionMask]; - params.optionOverride = [NSNumber numberWithUnsignedChar:mRequest.optionOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4645,6 +4563,8 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand { { AddArgument("Level", 0, UINT8_MAX, &mRequest.level); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4661,6 +4581,8 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand { = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.level = [NSNumber numberWithUnsignedChar:mRequest.level]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4693,6 +4615,8 @@ class LevelControlMoveWithOnOff : public ClusterCommand { { AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4709,6 +4633,8 @@ class LevelControlMoveWithOnOff : public ClusterCommand { = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4742,6 +4668,8 @@ class LevelControlStepWithOnOff : public ClusterCommand { AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4759,6 +4687,8 @@ class LevelControlStepWithOnOff : public ClusterCommand { params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4789,6 +4719,8 @@ class LevelControlStopWithOnOff : public ClusterCommand { LevelControlStopWithOnOff() : ClusterCommand("stop-with-on-off") { + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4803,6 +4735,8 @@ class LevelControlStopWithOnOff : public ClusterCommand { __auto_type * params = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4822,6 +4756,7 @@ class LevelControlStopWithOnOff : public ClusterCommand { } private: + chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type mRequest; }; /* @@ -4929,9 +4864,7 @@ class SubscribeAttributeLevelControlCurrentLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentLevel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -4997,9 +4930,7 @@ class SubscribeAttributeLevelControlRemainingTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.RemainingTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -5065,9 +4996,7 @@ class SubscribeAttributeLevelControlMinLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinLevel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -5133,9 +5062,7 @@ class SubscribeAttributeLevelControlMaxLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxLevel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -5201,9 +5128,7 @@ class SubscribeAttributeLevelControlCurrentFrequency : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentFrequency response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -5269,9 +5194,7 @@ class SubscribeAttributeLevelControlMinFrequency : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinFrequency response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -5337,9 +5260,7 @@ class SubscribeAttributeLevelControlMaxFrequency : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxFrequency response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -5445,9 +5366,7 @@ class SubscribeAttributeLevelControlOptions : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.Options response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -5553,9 +5472,7 @@ class SubscribeAttributeLevelControlOnOffTransitionTime : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnOffTransitionTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -5661,9 +5578,7 @@ class SubscribeAttributeLevelControlOnLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnLevel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -5769,9 +5684,7 @@ class SubscribeAttributeLevelControlOnTransitionTime : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnTransitionTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -5877,9 +5790,7 @@ class SubscribeAttributeLevelControlOffTransitionTime : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OffTransitionTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -5985,9 +5896,7 @@ class SubscribeAttributeLevelControlDefaultMoveRate : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.DefaultMoveRate response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -6093,9 +6002,7 @@ class SubscribeAttributeLevelControlStartUpCurrentLevel : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.StartUpCurrentLevel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -6161,9 +6068,7 @@ class SubscribeAttributeLevelControlGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -6229,9 +6134,7 @@ class SubscribeAttributeLevelControlAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -6297,9 +6200,7 @@ class SubscribeAttributeLevelControlAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -6365,9 +6266,7 @@ class SubscribeAttributeLevelControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -6433,9 +6332,7 @@ class SubscribeAttributeLevelControlClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -6567,9 +6464,7 @@ class SubscribeAttributeBinaryInputBasicActiveText : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ActiveText response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -6677,9 +6572,7 @@ class SubscribeAttributeBinaryInputBasicDescription : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Description response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -6787,9 +6680,7 @@ class SubscribeAttributeBinaryInputBasicInactiveText : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.InactiveText response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -6895,9 +6786,7 @@ class SubscribeAttributeBinaryInputBasicOutOfService : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.OutOfService response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -6963,9 +6852,7 @@ class SubscribeAttributeBinaryInputBasicPolarity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Polarity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7071,9 +6958,7 @@ class SubscribeAttributeBinaryInputBasicPresentValue : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.PresentValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7179,9 +7064,7 @@ class SubscribeAttributeBinaryInputBasicReliability : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Reliability response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7247,9 +7130,7 @@ class SubscribeAttributeBinaryInputBasicStatusFlags : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.StatusFlags response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7315,9 +7196,7 @@ class SubscribeAttributeBinaryInputBasicApplicationType : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ApplicationType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7383,9 +7262,7 @@ class SubscribeAttributeBinaryInputBasicGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7451,9 +7328,7 @@ class SubscribeAttributeBinaryInputBasicAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7519,9 +7394,7 @@ class SubscribeAttributeBinaryInputBasicAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7587,9 +7460,7 @@ class SubscribeAttributeBinaryInputBasicFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7655,9 +7526,7 @@ class SubscribeAttributeBinaryInputBasicClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7742,9 +7611,7 @@ class SubscribeAttributeDescriptorDeviceList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.DeviceList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7810,9 +7677,7 @@ class SubscribeAttributeDescriptorServerList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ServerList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7878,9 +7743,7 @@ class SubscribeAttributeDescriptorClientList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClientList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -7946,9 +7809,7 @@ class SubscribeAttributeDescriptorPartsList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.PartsList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -8014,9 +7875,7 @@ class SubscribeAttributeDescriptorGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -8082,9 +7941,7 @@ class SubscribeAttributeDescriptorAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -8150,9 +8007,7 @@ class SubscribeAttributeDescriptorAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -8218,9 +8073,7 @@ class SubscribeAttributeDescriptorFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -8286,9 +8139,7 @@ class SubscribeAttributeDescriptorClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -8445,9 +8296,7 @@ class SubscribeAttributeBindingBinding : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.Binding response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -8513,9 +8362,7 @@ class SubscribeAttributeBindingGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -8581,9 +8428,7 @@ class SubscribeAttributeBindingAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -8649,9 +8494,7 @@ class SubscribeAttributeBindingAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -8717,9 +8560,7 @@ class SubscribeAttributeBindingFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -8785,9 +8626,7 @@ class SubscribeAttributeBindingClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -8974,9 +8813,7 @@ class SubscribeAttributeAccessControlAcl : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.Acl response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -9099,9 +8936,7 @@ class SubscribeAttributeAccessControlExtension : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.Extension response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -9168,9 +9003,7 @@ class SubscribeAttributeAccessControlSubjectsPerAccessControlEntry : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.SubjectsPerAccessControlEntry response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -9237,9 +9070,7 @@ class SubscribeAttributeAccessControlTargetsPerAccessControlEntry : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.TargetsPerAccessControlEntry response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -9306,9 +9137,7 @@ class SubscribeAttributeAccessControlAccessControlEntriesPerFabric : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AccessControlEntriesPerFabric response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -9374,9 +9203,7 @@ class SubscribeAttributeAccessControlGeneratedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -9442,9 +9269,7 @@ class SubscribeAttributeAccessControlAcceptedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -9510,9 +9335,7 @@ class SubscribeAttributeAccessControlAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -9578,9 +9401,7 @@ class SubscribeAttributeAccessControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -9646,9 +9467,7 @@ class SubscribeAttributeAccessControlClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -10380,9 +10199,7 @@ class SubscribeAttributeBridgedActionsActionList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.ActionList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -10448,9 +10265,7 @@ class SubscribeAttributeBridgedActionsEndpointList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.EndpointList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -10516,9 +10331,7 @@ class SubscribeAttributeBridgedActionsSetupUrl : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.SetupUrl response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -10584,9 +10397,7 @@ class SubscribeAttributeBridgedActionsGeneratedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -10652,9 +10463,7 @@ class SubscribeAttributeBridgedActionsAcceptedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -10720,9 +10529,7 @@ class SubscribeAttributeBridgedActionsAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -10788,9 +10595,7 @@ class SubscribeAttributeBridgedActionsFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -10856,9 +10661,7 @@ class SubscribeAttributeBridgedActionsClusterRevision : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11001,9 +10804,7 @@ class SubscribeAttributeBasicDataModelRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.DataModelRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11065,9 +10866,7 @@ class SubscribeAttributeBasicVendorName : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.VendorName response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11129,9 +10928,7 @@ class SubscribeAttributeBasicVendorID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.VendorID response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11193,9 +10990,7 @@ class SubscribeAttributeBasicProductName : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductName response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11257,9 +11052,7 @@ class SubscribeAttributeBasicProductID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductID response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11361,9 +11154,7 @@ class SubscribeAttributeBasicNodeLabel : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.NodeLabel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11465,9 +11256,7 @@ class SubscribeAttributeBasicLocation : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.Location response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11529,9 +11318,7 @@ class SubscribeAttributeBasicHardwareVersion : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.HardwareVersion response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11593,9 +11380,7 @@ class SubscribeAttributeBasicHardwareVersionString : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.HardwareVersionString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11657,9 +11442,7 @@ class SubscribeAttributeBasicSoftwareVersion : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.SoftwareVersion response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11721,9 +11504,7 @@ class SubscribeAttributeBasicSoftwareVersionString : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.SoftwareVersionString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11785,9 +11566,7 @@ class SubscribeAttributeBasicManufacturingDate : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ManufacturingDate response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11849,9 +11628,7 @@ class SubscribeAttributeBasicPartNumber : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.PartNumber response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11913,9 +11690,7 @@ class SubscribeAttributeBasicProductURL : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductURL response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -11977,9 +11752,7 @@ class SubscribeAttributeBasicProductLabel : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductLabel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -12041,9 +11814,7 @@ class SubscribeAttributeBasicSerialNumber : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.SerialNumber response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -12143,9 +11914,7 @@ class SubscribeAttributeBasicLocalConfigDisabled : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.LocalConfigDisabled response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -12207,9 +11976,7 @@ class SubscribeAttributeBasicReachable : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.Reachable response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -12271,9 +12038,7 @@ class SubscribeAttributeBasicUniqueID : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.UniqueID response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -12336,9 +12101,7 @@ class SubscribeAttributeBasicCapabilityMinima : public SubscribeAttribute { } reportHandler:^(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.CapabilityMinima response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -12400,9 +12163,7 @@ class SubscribeAttributeBasicGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -12464,9 +12225,7 @@ class SubscribeAttributeBasicAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -12528,9 +12287,7 @@ class SubscribeAttributeBasicAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -12592,9 +12349,7 @@ class SubscribeAttributeBasicFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -12656,9 +12411,7 @@ class SubscribeAttributeBasicClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -12927,9 +12680,7 @@ class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -12993,9 +12744,7 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -13059,9 +12808,7 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateProvider.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -13125,9 +12872,7 @@ class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateProvider.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -13191,9 +12936,7 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateProvider.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -13397,9 +13140,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOtaProviders : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.DefaultOtaProviders response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -13463,9 +13204,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.UpdatePossible response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -13529,9 +13268,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.UpdateState response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -13595,9 +13332,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -13661,9 +13396,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -13727,9 +13460,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -13793,9 +13524,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -13859,9 +13588,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -13925,9 +13652,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14049,9 +13774,7 @@ class SubscribeAttributeLocalizationConfigurationActiveLocale : public Subscribe } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14115,9 +13838,7 @@ class SubscribeAttributeLocalizationConfigurationSupportedLocales : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14181,9 +13902,7 @@ class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14247,9 +13966,7 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14313,9 +14030,7 @@ class SubscribeAttributeLocalizationConfigurationAttributeList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14379,9 +14094,7 @@ class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14445,9 +14158,7 @@ class SubscribeAttributeLocalizationConfigurationClusterRevision : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14568,9 +14279,7 @@ class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14673,9 +14382,7 @@ class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14739,9 +14446,7 @@ class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14805,9 +14510,7 @@ class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14871,9 +14574,7 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -14937,9 +14638,7 @@ class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15003,9 +14702,7 @@ class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15069,9 +14766,7 @@ class SubscribeAttributeTimeFormatLocalizationClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15193,9 +14888,7 @@ class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15261,9 +14954,7 @@ class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15329,9 +15020,7 @@ class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15397,9 +15086,7 @@ class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15465,9 +15152,7 @@ class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15533,9 +15218,7 @@ class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15615,9 +15298,7 @@ class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15681,9 +15362,7 @@ class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15747,9 +15426,7 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Sub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15813,9 +15490,7 @@ class SubscribeAttributePowerSourceConfigurationAttributeList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15879,9 +15554,7 @@ class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -15945,9 +15618,7 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16059,9 +15730,7 @@ class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Status response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16127,9 +15796,7 @@ class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Order response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16195,9 +15862,7 @@ class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Description response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16264,9 +15929,7 @@ class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16333,9 +15996,7 @@ class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16401,9 +16062,7 @@ class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16469,9 +16128,7 @@ class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16537,9 +16194,7 @@ class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16605,9 +16260,7 @@ class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16673,9 +16326,7 @@ class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredPresent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16741,9 +16392,7 @@ class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16809,9 +16458,7 @@ class SubscribeAttributePowerSourceBatVoltage : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatVoltage response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16877,9 +16524,7 @@ class SubscribeAttributePowerSourceBatPercentRemaining : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -16945,9 +16590,7 @@ class SubscribeAttributePowerSourceBatTimeRemaining : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17013,9 +16656,7 @@ class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17081,9 +16722,7 @@ class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17149,9 +16788,7 @@ class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplaceability response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17217,9 +16854,7 @@ class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPresent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17285,9 +16920,7 @@ class SubscribeAttributePowerSourceActiveBatFaults : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17354,9 +16987,7 @@ class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeA } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17422,9 +17053,7 @@ class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17490,9 +17119,7 @@ class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribut } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17558,9 +17185,7 @@ class SubscribeAttributePowerSourceBatIECDesignation : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17626,9 +17251,7 @@ class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17694,9 +17317,7 @@ class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCapacity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17762,9 +17383,7 @@ class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatQuantity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17830,9 +17449,7 @@ class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeState response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17898,9 +17515,7 @@ class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -17967,9 +17582,7 @@ class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -18035,9 +17648,7 @@ class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -18103,9 +17714,7 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -18171,9 +17780,7 @@ class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -18239,9 +17846,7 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -18307,9 +17912,7 @@ class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -18375,9 +17978,7 @@ class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -18443,9 +18044,7 @@ class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -18725,9 +18324,7 @@ class SubscribeAttributeGeneralCommissioningBreadcrumb : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -18794,9 +18391,7 @@ class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public Subs } reportHandler:^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -18862,9 +18457,7 @@ class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -18930,9 +18523,7 @@ class SubscribeAttributeGeneralCommissioningLocationCapability : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -18999,9 +18590,7 @@ class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -19067,9 +18656,7 @@ class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -19135,9 +18722,7 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -19203,9 +18788,7 @@ class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -19271,9 +18854,7 @@ class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -19339,9 +18920,7 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -19776,9 +19355,7 @@ class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -19844,9 +19421,7 @@ class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.Networks response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -19912,9 +19487,7 @@ class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -19980,9 +19553,7 @@ class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20088,9 +19659,7 @@ class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20156,9 +19725,7 @@ class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20224,9 +19791,7 @@ class SubscribeAttributeNetworkCommissioningLastNetworkID : public SubscribeAttr } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20292,9 +19857,7 @@ class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20360,9 +19923,7 @@ class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20428,9 +19989,7 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20496,9 +20055,7 @@ class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20564,9 +20121,7 @@ class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20632,9 +20187,7 @@ class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20769,9 +20322,7 @@ class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20837,9 +20388,7 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20905,9 +20454,7 @@ class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -20973,9 +20520,7 @@ class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21041,9 +20586,7 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21186,9 +20729,7 @@ class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21254,9 +20795,7 @@ class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21322,9 +20861,7 @@ class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21390,9 +20927,7 @@ class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21458,9 +20993,7 @@ class SubscribeAttributeGeneralDiagnosticsBootReasons : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.BootReasons response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21526,9 +21059,7 @@ class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21594,9 +21125,7 @@ class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21662,9 +21191,7 @@ class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21731,9 +21258,7 @@ class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21799,9 +21324,7 @@ class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21867,9 +21390,7 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -21935,9 +21456,7 @@ class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -22003,9 +21522,7 @@ class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -22071,9 +21588,7 @@ class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -22203,9 +21718,7 @@ class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -22271,9 +21784,7 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -22339,9 +21850,7 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -22408,9 +21917,7 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -22476,9 +21983,7 @@ class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -22544,9 +22049,7 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -22612,9 +22115,7 @@ class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -22680,9 +22181,7 @@ class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -22748,9 +22247,7 @@ class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -22936,9 +22433,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23002,9 +22497,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23068,9 +22561,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAt } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23134,9 +22625,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23200,9 +22689,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23266,9 +22753,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public Subscri } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23332,9 +22817,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23398,9 +22881,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsNeighborTableList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NeighborTableList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23464,9 +22945,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouteTableList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouteTableList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23530,9 +23009,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23596,9 +23073,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23662,9 +23137,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23728,9 +23201,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23794,9 +23265,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23860,9 +23329,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23926,9 +23393,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -23992,9 +23457,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24058,9 +23521,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24124,9 +23585,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24190,9 +23649,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24257,9 +23714,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCoun } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24323,9 +23778,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24389,9 +23842,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24455,9 +23906,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24521,9 +23970,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24587,9 +24034,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24653,9 +24098,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24719,9 +24162,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24785,9 +24226,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24851,9 +24290,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24917,9 +24354,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -24983,9 +24418,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25049,9 +24482,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25115,9 +24546,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25182,9 +24611,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25249,9 +24676,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25315,9 +24740,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25381,9 +24804,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25447,9 +24868,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25513,9 +24932,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25579,9 +24996,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25645,9 +25060,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25711,9 +25124,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25777,9 +25188,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25843,9 +25252,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25909,9 +25316,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -25975,9 +25380,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26041,9 +25444,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26108,9 +25509,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26174,9 +25573,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26240,9 +25637,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26307,9 +25702,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26374,9 +25767,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26440,9 +25831,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26506,9 +25895,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26572,9 +25959,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26638,9 +26023,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26704,9 +26087,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26770,9 +26151,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26837,9 +26216,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public Subscrib } reportHandler:^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26903,9 +26280,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannelMask : public SubscribeAt } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChannelMask response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -26971,9 +26346,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : p reportHandler:^( MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27037,9 +26410,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27103,9 +26474,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27169,9 +26538,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Sub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27235,9 +26602,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27301,9 +26666,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27367,9 +26730,7 @@ class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27507,9 +26868,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.Bssid response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27573,9 +26932,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27639,9 +26996,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27705,9 +27060,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27771,9 +27124,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.Rssi response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27837,9 +27188,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27903,9 +27252,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -27969,9 +27316,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28035,9 +27380,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28101,9 +27444,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28167,9 +27508,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28233,9 +27572,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28299,9 +27636,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28365,9 +27700,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28431,9 +27764,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28497,9 +27828,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28563,9 +27892,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28629,9 +27956,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28762,9 +28087,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28828,9 +28151,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28894,9 +28215,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -28960,9 +28279,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29026,9 +28343,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29092,9 +28407,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29158,9 +28471,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29224,9 +28535,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29290,9 +28599,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29356,9 +28663,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29422,9 +28727,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29488,9 +28791,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29554,9 +28855,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29620,9 +28919,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29722,9 +29019,7 @@ class SubscribeAttributeBridgedDeviceBasicVendorName : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.VendorName response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29790,9 +29085,7 @@ class SubscribeAttributeBridgedDeviceBasicVendorID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.VendorID response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29858,9 +29151,7 @@ class SubscribeAttributeBridgedDeviceBasicProductName : public SubscribeAttribut } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ProductName response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -29968,9 +29259,7 @@ class SubscribeAttributeBridgedDeviceBasicNodeLabel : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.NodeLabel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30036,9 +29325,7 @@ class SubscribeAttributeBridgedDeviceBasicHardwareVersion : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.HardwareVersion response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30104,9 +29391,7 @@ class SubscribeAttributeBridgedDeviceBasicHardwareVersionString : public Subscri } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.HardwareVersionString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30172,9 +29457,7 @@ class SubscribeAttributeBridgedDeviceBasicSoftwareVersion : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.SoftwareVersion response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30240,9 +29523,7 @@ class SubscribeAttributeBridgedDeviceBasicSoftwareVersionString : public Subscri } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.SoftwareVersionString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30308,9 +29589,7 @@ class SubscribeAttributeBridgedDeviceBasicManufacturingDate : public SubscribeAt } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ManufacturingDate response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30376,9 +29655,7 @@ class SubscribeAttributeBridgedDeviceBasicPartNumber : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.PartNumber response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30444,9 +29721,7 @@ class SubscribeAttributeBridgedDeviceBasicProductURL : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ProductURL response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30512,9 +29787,7 @@ class SubscribeAttributeBridgedDeviceBasicProductLabel : public SubscribeAttribu } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ProductLabel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30580,9 +29853,7 @@ class SubscribeAttributeBridgedDeviceBasicSerialNumber : public SubscribeAttribu } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.SerialNumber response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30648,9 +29919,7 @@ class SubscribeAttributeBridgedDeviceBasicReachable : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.Reachable response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30716,9 +29985,7 @@ class SubscribeAttributeBridgedDeviceBasicUniqueID : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.UniqueID response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30784,9 +30051,7 @@ class SubscribeAttributeBridgedDeviceBasicGeneratedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30852,9 +30117,7 @@ class SubscribeAttributeBridgedDeviceBasicAcceptedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30920,9 +30183,7 @@ class SubscribeAttributeBridgedDeviceBasicAttributeList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -30988,9 +30249,7 @@ class SubscribeAttributeBridgedDeviceBasicFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -31056,9 +30315,7 @@ class SubscribeAttributeBridgedDeviceBasicClusterRevision : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -31149,9 +30406,7 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.NumberOfPositions response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -31217,9 +30472,7 @@ class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.CurrentPosition response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -31285,9 +30538,7 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.MultiPressMax response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -31353,9 +30604,7 @@ class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -31421,9 +30670,7 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -31489,9 +30736,7 @@ class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -31557,9 +30802,7 @@ class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -31625,9 +30868,7 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -31852,9 +31093,7 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -31918,9 +31157,7 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -31984,9 +31221,7 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -32050,9 +31285,7 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -32116,9 +31349,7 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -32182,9 +31413,7 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -32248,9 +31477,7 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -32314,9 +31541,7 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -32813,9 +32038,7 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.NOCs response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -32882,9 +32105,7 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -32948,9 +32169,7 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -33014,9 +32233,7 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -33080,9 +32297,7 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -33146,9 +32361,7 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -33212,9 +32425,7 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -33278,9 +32489,7 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -33344,9 +32553,7 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -33410,9 +32617,7 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -33476,9 +32681,7 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -33863,9 +33066,7 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -33934,9 +33135,7 @@ class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34002,9 +33201,7 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34070,9 +33267,7 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34138,9 +33333,7 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34206,9 +33399,7 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34274,9 +33465,7 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34342,9 +33531,7 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34410,9 +33597,7 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34494,9 +33679,7 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.LabelList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34562,9 +33745,7 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34630,9 +33811,7 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34698,9 +33877,7 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34766,9 +33943,7 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34834,9 +34009,7 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -34975,9 +34148,7 @@ class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.LabelList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35043,9 +34214,7 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35111,9 +34280,7 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35179,9 +34346,7 @@ class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35247,9 +34412,7 @@ class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35315,9 +34478,7 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35400,9 +34561,7 @@ class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.StateValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35468,9 +34627,7 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35536,9 +34693,7 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35604,9 +34759,7 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35672,9 +34825,7 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35740,9 +34891,7 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35876,9 +35025,7 @@ class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.Description response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -35944,9 +35091,7 @@ class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -36012,9 +35157,7 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.SupportedModes response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -36080,9 +35223,7 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.CurrentMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -36188,9 +35329,7 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StartUpMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -36296,9 +35435,7 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.OnMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -36364,9 +35501,7 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -36432,9 +35567,7 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -36500,9 +35633,7 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -36568,9 +35699,7 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -36636,9 +35765,7 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -37739,9 +36866,7 @@ class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockState response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -37807,9 +36932,7 @@ class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -37875,9 +36998,7 @@ class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -37943,9 +37064,7 @@ class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorState response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38051,9 +37170,7 @@ class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38159,9 +37276,7 @@ class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38267,9 +37382,7 @@ class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OpenPeriod response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38336,9 +37449,7 @@ class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38405,9 +37516,7 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38474,9 +37583,7 @@ class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38544,9 +37651,7 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38614,9 +37719,7 @@ class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38683,9 +37786,7 @@ class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38751,9 +37852,7 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38819,9 +37918,7 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38887,9 +37984,7 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -38955,9 +38050,7 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -39023,9 +38116,7 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -39092,9 +38183,7 @@ class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -39202,9 +38291,7 @@ class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.Language response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -39310,9 +38397,7 @@ class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LEDSettings response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -39418,9 +38503,7 @@ class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -39526,9 +38609,7 @@ class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SoundVolume response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -39634,9 +38715,7 @@ class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OperatingMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -39703,9 +38782,7 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -39772,9 +38849,7 @@ class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -39880,9 +38955,7 @@ class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -39988,9 +39061,7 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -40096,9 +39167,7 @@ class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -40205,9 +39274,7 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -40314,9 +39381,7 @@ class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -40422,9 +39487,7 @@ class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -40531,9 +39594,7 @@ class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -40639,9 +39700,7 @@ class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -40748,9 +39807,7 @@ class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -40856,9 +39913,7 @@ class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -40924,9 +39979,7 @@ class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -40992,9 +40045,7 @@ class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -41060,9 +40111,7 @@ class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -41128,9 +40177,7 @@ class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -41196,9 +40243,7 @@ class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -41621,9 +40666,7 @@ class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Type response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -41690,9 +40733,7 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -41759,9 +40800,7 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -41827,9 +40866,7 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -41895,9 +40932,7 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -41963,9 +40998,7 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42031,9 +41064,7 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42099,9 +41130,7 @@ class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42168,9 +41197,7 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42237,9 +41264,7 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42305,9 +41330,7 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42374,9 +41397,7 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42443,9 +41464,7 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42511,9 +41530,7 @@ class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.EndProductType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42580,9 +41597,7 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42649,9 +41664,7 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42717,9 +41730,7 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42786,9 +41797,7 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42854,9 +41863,7 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -42923,9 +41930,7 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -43031,9 +42036,7 @@ class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Mode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -43099,9 +42102,7 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -43167,9 +42168,7 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -43235,9 +42234,7 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -43303,9 +42300,7 @@ class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -43371,9 +42366,7 @@ class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -43439,9 +42432,7 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -43623,9 +42614,7 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -43691,9 +42680,7 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -43759,9 +42746,7 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -43867,9 +42852,7 @@ class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -43975,9 +42958,7 @@ class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -44084,9 +43065,7 @@ class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -44193,9 +43172,7 @@ class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -44301,9 +43278,7 @@ class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -44409,9 +43384,7 @@ class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -44477,9 +43450,7 @@ class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -44545,9 +43516,7 @@ class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -44613,9 +43582,7 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -44681,9 +43648,7 @@ class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -44749,9 +43714,7 @@ class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -44817,9 +43780,7 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -44938,9 +43899,7 @@ class SubscribeAttributePumpConfigurationAndControlMaxPressure : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45004,9 +43963,7 @@ class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45070,9 +44027,7 @@ class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45136,9 +44091,7 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45202,9 +44155,7 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45268,9 +44219,7 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45334,9 +44283,7 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45400,9 +44347,7 @@ class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45466,9 +44411,7 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45532,9 +44475,7 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45598,9 +44539,7 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45664,9 +44603,7 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45730,9 +44667,7 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45796,9 +44731,7 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45862,9 +44795,7 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45928,9 +44859,7 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -45994,9 +44923,7 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -46060,9 +44987,7 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -46166,9 +45091,7 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -46232,9 +45155,7 @@ class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -46338,9 +45259,7 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -46443,9 +45362,7 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -46548,9 +45465,7 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -46614,9 +45529,7 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -46680,9 +45593,7 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -46746,9 +45657,7 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -46812,9 +45721,7 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -46878,9 +45785,7 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -47230,9 +46135,7 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperature response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -47298,9 +46201,7 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -47366,9 +46267,7 @@ class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.Occupancy response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -47435,9 +46334,7 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -47504,9 +46401,7 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -47573,9 +46468,7 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -47642,9 +46535,7 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -47710,9 +46601,7 @@ class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -47778,9 +46667,7 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -47887,9 +46774,7 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -47996,9 +46881,7 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -48105,9 +46988,7 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -48214,9 +47095,7 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -48323,9 +47202,7 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -48432,9 +47309,7 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -48540,9 +47415,7 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -48648,9 +47521,7 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -48756,9 +47627,7 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -48864,9 +47733,7 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -48972,9 +47839,7 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -49080,9 +47945,7 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.RemoteSensing response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -49189,9 +48052,7 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -49297,9 +48158,7 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SystemMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -49365,9 +48224,7 @@ class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -49433,9 +48290,7 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.StartOfWeek response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -49502,9 +48357,7 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -49571,9 +48424,7 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -49680,9 +48531,7 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -49790,9 +48639,7 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -49901,9 +48748,7 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -49969,9 +48814,7 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -50037,9 +48880,7 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -50105,9 +48946,7 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -50174,9 +49013,7 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -50282,9 +49119,7 @@ class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -50350,9 +49185,7 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -50418,9 +49251,7 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -50526,9 +49357,7 @@ class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -50594,9 +49423,7 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -50662,9 +49489,7 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -50770,9 +49595,7 @@ class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -50878,9 +49701,7 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -50986,9 +49807,7 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -51094,9 +49913,7 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -51202,9 +50019,7 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCompressorType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -51310,9 +50125,7 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACErrorCode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -51418,9 +50231,7 @@ class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -51486,9 +50297,7 @@ class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -51594,9 +50403,7 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -51662,9 +50469,7 @@ class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -51730,9 +50535,7 @@ class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -51798,9 +50601,7 @@ class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -51866,9 +50667,7 @@ class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -51934,9 +50733,7 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -52068,9 +50865,7 @@ class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -52176,9 +50971,7 @@ class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanModeSequence response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -52284,9 +51077,7 @@ class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentSetting response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -52352,9 +51143,7 @@ class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -52420,9 +51209,7 @@ class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedMax response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -52528,9 +51315,7 @@ class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedSetting response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -52596,9 +51381,7 @@ class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -52664,9 +51447,7 @@ class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSupport response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -52772,9 +51553,7 @@ class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSetting response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -52840,9 +51619,7 @@ class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSupport response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -52948,9 +51725,7 @@ class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSetting response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53016,9 +51791,7 @@ class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53084,9 +51857,7 @@ class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53152,9 +51923,7 @@ class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53220,9 +51989,7 @@ class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53288,9 +52055,7 @@ class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53419,9 +52184,7 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMo } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53530,9 +52293,7 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53644,9 +52405,7 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingV } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53714,9 +52473,7 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53784,9 +52541,7 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53854,9 +52609,7 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : publ } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53924,9 +52677,7 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -53994,9 +52745,7 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -55166,9 +53915,7 @@ class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentHue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -55234,9 +53981,7 @@ class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -55302,9 +54047,7 @@ class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.RemainingTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -55370,9 +54113,7 @@ class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentX response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -55438,9 +54179,7 @@ class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentY response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -55506,9 +54245,7 @@ class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.DriftCompensation response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -55574,9 +54311,7 @@ class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CompensationText response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -55642,9 +54377,7 @@ class SubscribeAttributeColorControlColorTemperature : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTemperature response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -55710,9 +54443,7 @@ class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -55818,9 +54549,7 @@ class SubscribeAttributeColorControlOptions : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Options response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -55886,9 +54615,7 @@ class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -55954,9 +54681,7 @@ class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1X response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56022,9 +54747,7 @@ class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Y response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56090,9 +54813,7 @@ class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56158,9 +54879,7 @@ class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2X response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56226,9 +54945,7 @@ class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Y response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56294,9 +55011,7 @@ class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56362,9 +55077,7 @@ class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3X response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56430,9 +55143,7 @@ class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Y response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56498,9 +55209,7 @@ class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56566,9 +55275,7 @@ class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4X response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56634,9 +55341,7 @@ class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Y response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56702,9 +55407,7 @@ class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56770,9 +55473,7 @@ class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5X response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56838,9 +55539,7 @@ class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Y response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56906,9 +55605,7 @@ class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -56974,9 +55671,7 @@ class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6X response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -57042,9 +55737,7 @@ class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Y response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -57110,9 +55803,7 @@ class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -57218,9 +55909,7 @@ class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointX response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -57326,9 +56015,7 @@ class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointY response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -57434,9 +56121,7 @@ class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRX response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -57542,9 +56227,7 @@ class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRY response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -57650,9 +56333,7 @@ class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -57758,9 +56439,7 @@ class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGX response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -57866,9 +56545,7 @@ class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGY response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -57974,9 +56651,7 @@ class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58082,9 +56757,7 @@ class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBX response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58190,9 +56863,7 @@ class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBY response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58298,9 +56969,7 @@ class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58366,9 +57035,7 @@ class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58434,9 +57101,7 @@ class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58502,9 +57167,7 @@ class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58570,9 +57233,7 @@ class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58638,9 +57299,7 @@ class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58707,9 +57366,7 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58776,9 +57433,7 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58844,9 +57499,7 @@ class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58913,9 +57566,7 @@ class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -58982,9 +57633,7 @@ class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -59051,9 +57700,7 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -59161,9 +57808,7 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -59229,9 +57874,7 @@ class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -59297,9 +57940,7 @@ class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -59365,9 +58006,7 @@ class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -59433,9 +58072,7 @@ class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -59501,9 +58138,7 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -59598,9 +58233,7 @@ class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -59666,9 +58299,7 @@ class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -59734,9 +58365,7 @@ class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -59842,9 +58471,7 @@ class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -59950,9 +58577,7 @@ class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -60058,9 +58683,7 @@ class SubscribeAttributeBallastConfigurationIntrinsicBalanceFactor : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.IntrinsicBalanceFactor response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -60167,9 +58790,7 @@ class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -60235,9 +58856,7 @@ class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -60345,9 +58964,7 @@ class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -60455,9 +59072,7 @@ class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeA } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -60563,9 +59178,7 @@ class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -60671,9 +59284,7 @@ class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -60779,9 +59390,7 @@ class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -60887,9 +59496,7 @@ class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -60955,9 +59562,7 @@ class SubscribeAttributeBallastConfigurationGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61023,9 +59628,7 @@ class SubscribeAttributeBallastConfigurationAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61091,9 +59694,7 @@ class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61159,9 +59760,7 @@ class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61227,9 +59826,7 @@ class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61313,9 +59910,7 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61379,9 +59974,7 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61445,9 +60038,7 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61511,9 +60102,7 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61577,9 +60166,7 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61643,9 +60230,7 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61709,9 +60294,7 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61775,9 +60358,7 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61841,9 +60422,7 @@ class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61907,9 +60486,7 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -61992,9 +60569,7 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62058,9 +60633,7 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62124,9 +60697,7 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62190,9 +60761,7 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62256,9 +60825,7 @@ class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62322,9 +60889,7 @@ class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62388,9 +60953,7 @@ class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62454,9 +61017,7 @@ class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62520,9 +61081,7 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62612,9 +61171,7 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62680,9 +61237,7 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62748,9 +61303,7 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62816,9 +61369,7 @@ class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62884,9 +61435,7 @@ class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -62952,9 +61501,7 @@ class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63020,9 +61567,7 @@ class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63088,9 +61633,7 @@ class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63156,9 +61699,7 @@ class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Scale response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63224,9 +61765,7 @@ class SubscribeAttributePressureMeasurementGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63292,9 +61831,7 @@ class SubscribeAttributePressureMeasurementAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63360,9 +61897,7 @@ class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63428,9 +61963,7 @@ class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63496,9 +62029,7 @@ class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63583,9 +62114,7 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63651,9 +62180,7 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63719,9 +62246,7 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63787,9 +62312,7 @@ class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63855,9 +62378,7 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63923,9 +62444,7 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -63991,9 +62510,7 @@ class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64059,9 +62576,7 @@ class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64127,9 +62642,7 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64212,9 +62725,7 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64278,9 +62789,7 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64344,9 +62853,7 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64410,9 +62917,7 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64476,9 +62981,7 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64542,9 +63045,7 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64608,9 +63109,7 @@ class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64674,9 +63173,7 @@ class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64740,9 +63237,7 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64835,9 +63330,7 @@ class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.Occupancy response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64903,9 +63396,7 @@ class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -64972,9 +63463,7 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -65082,9 +63571,7 @@ class SubscribeAttributeOccupancySensingPirOccupiedToUnoccupiedDelay : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PirOccupiedToUnoccupiedDelay response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -65192,9 +63679,7 @@ class SubscribeAttributeOccupancySensingPirUnoccupiedToOccupiedDelay : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PirUnoccupiedToOccupiedDelay response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -65303,9 +63788,7 @@ class SubscribeAttributeOccupancySensingPirUnoccupiedToOccupiedThreshold : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PirUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -65415,9 +63898,7 @@ class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -65527,9 +64008,7 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -65640,9 +64119,7 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -65753,9 +64230,7 @@ class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -65866,9 +64341,7 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -65980,9 +64453,7 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThres } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -66048,9 +64519,7 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -66116,9 +64585,7 @@ class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -66184,9 +64651,7 @@ class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -66252,9 +64717,7 @@ class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -66320,9 +64783,7 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -66404,9 +64865,7 @@ class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.MACAddress response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -66472,9 +64931,7 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -66540,9 +64997,7 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -66608,9 +65063,7 @@ class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -66676,9 +65129,7 @@ class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -66744,9 +65195,7 @@ class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -66977,9 +65426,7 @@ class SubscribeAttributeChannelChannelList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ChannelList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67046,9 +65493,7 @@ class SubscribeAttributeChannelLineup : public SubscribeAttribute { } reportHandler:^(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.Lineup response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67115,9 +65560,7 @@ class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { } reportHandler:^(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.CurrentChannel response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67183,9 +65626,7 @@ class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67251,9 +65692,7 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67319,9 +65758,7 @@ class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67387,9 +65824,7 @@ class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67455,9 +65890,7 @@ class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67597,9 +66030,7 @@ class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.TargetList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67665,9 +66096,7 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67733,9 +66162,7 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67801,9 +66228,7 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67869,9 +66294,7 @@ class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -67937,9 +66360,7 @@ class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -68005,9 +66426,7 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -68607,9 +67026,7 @@ class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.CurrentState response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -68675,9 +67092,7 @@ class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.StartTime response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -68743,9 +67158,7 @@ class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.Duration response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -68812,9 +67225,7 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute } reportHandler:^(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -68880,9 +67291,7 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -68948,9 +67357,7 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -69016,9 +67423,7 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -69084,9 +67489,7 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -69152,9 +67555,7 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -69220,9 +67621,7 @@ class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -69288,9 +67687,7 @@ class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -69356,9 +67753,7 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -69627,9 +68022,7 @@ class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.InputList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -69695,9 +68088,7 @@ class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.CurrentInput response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -69763,9 +68154,7 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -69831,9 +68220,7 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -69899,9 +68286,7 @@ class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -69967,9 +68352,7 @@ class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -70035,9 +68418,7 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -70162,9 +68543,7 @@ class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -70230,9 +68609,7 @@ class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -70298,9 +68675,7 @@ class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -70366,9 +68741,7 @@ class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -70434,9 +68807,7 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -70565,9 +68936,7 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -70633,9 +69002,7 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -70701,9 +69068,7 @@ class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -70769,9 +69134,7 @@ class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -70837,9 +69200,7 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -71252,9 +69613,7 @@ class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -71362,9 +69721,7 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -71430,9 +69787,7 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -71498,9 +69853,7 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -71566,9 +69919,7 @@ class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -71634,9 +69985,7 @@ class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -71702,9 +70051,7 @@ class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -71885,9 +70232,7 @@ class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.OutputList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -71953,9 +70298,7 @@ class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -72021,9 +70364,7 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -72089,9 +70430,7 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -72157,9 +70496,7 @@ class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -72225,9 +70562,7 @@ class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -72293,9 +70628,7 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -72549,9 +70882,7 @@ class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -72676,9 +71007,7 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribut } reportHandler:^(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -72744,9 +71073,7 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -72812,9 +71139,7 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -72880,9 +71205,7 @@ class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -72948,9 +71271,7 @@ class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73016,9 +71337,7 @@ class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73107,9 +71426,7 @@ class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorName response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73175,9 +71492,7 @@ class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorID response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73243,9 +71558,7 @@ class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttrib } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73311,9 +71624,7 @@ class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ProductID response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73380,9 +71691,7 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute } reportHandler:^(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Application response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73448,9 +71757,7 @@ class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Status response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73516,9 +71823,7 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAtt } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73584,9 +71889,7 @@ class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73652,9 +71955,7 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73720,9 +72021,7 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73788,9 +72087,7 @@ class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73856,9 +72153,7 @@ class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -73924,9 +72219,7 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -74155,9 +72448,7 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -74223,9 +72514,7 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -74291,9 +72580,7 @@ class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -74359,9 +72646,7 @@ class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -74427,9 +72712,7 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -74733,9 +73016,7 @@ class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -74801,9 +73082,7 @@ class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -74869,9 +73148,7 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -74937,9 +73214,7 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75005,9 +73280,7 @@ class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75073,9 +73346,7 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75141,9 +73412,7 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75209,9 +73478,7 @@ class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75277,9 +73544,7 @@ class SubscribeAttributeElectricalMeasurementDcPowerMin : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75345,9 +73610,7 @@ class SubscribeAttributeElectricalMeasurementDcPowerMax : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75413,9 +73676,7 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75481,9 +73742,7 @@ class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75549,9 +73808,7 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75617,9 +73874,7 @@ class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75685,9 +73940,7 @@ class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75753,9 +74006,7 @@ class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75821,9 +74072,7 @@ class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75889,9 +74138,7 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -75957,9 +74204,7 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76025,9 +74270,7 @@ class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76093,9 +74336,7 @@ class SubscribeAttributeElectricalMeasurementTotalActivePower : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76161,9 +74402,7 @@ class SubscribeAttributeElectricalMeasurementTotalReactivePower : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76229,9 +74468,7 @@ class SubscribeAttributeElectricalMeasurementTotalApparentPower : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76298,9 +74535,7 @@ class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76367,9 +74602,7 @@ class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76436,9 +74669,7 @@ class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76505,9 +74736,7 @@ class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76574,9 +74803,7 @@ class SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76643,9 +74870,7 @@ class SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76712,9 +74937,7 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76781,9 +75004,7 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76850,9 +75071,7 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76919,9 +75138,7 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -76988,9 +75205,7 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77057,9 +75272,7 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77125,9 +75338,7 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77193,9 +75404,7 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77261,9 +75470,7 @@ class SubscribeAttributeElectricalMeasurementPowerMultiplier : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77329,9 +75536,7 @@ class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77398,9 +75603,7 @@ class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77467,9 +75670,7 @@ class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77535,9 +75736,7 @@ class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77604,9 +75803,7 @@ class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77673,9 +75870,7 @@ class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77742,9 +75937,7 @@ class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77810,9 +76003,7 @@ class SubscribeAttributeElectricalMeasurementInstantaneousPower : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77878,9 +76069,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltage : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -77946,9 +76135,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78014,9 +76201,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78082,9 +76267,7 @@ class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78150,9 +76333,7 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMin : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78218,9 +76399,7 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78286,9 +76465,7 @@ class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78354,9 +76531,7 @@ class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78422,9 +76597,7 @@ class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78490,9 +76663,7 @@ class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78558,9 +76729,7 @@ class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78626,9 +76795,7 @@ class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78737,9 +76904,7 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78848,9 +77013,7 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : pub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -78959,9 +77122,7 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -79070,9 +77231,7 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -79178,9 +77337,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -79286,9 +77443,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -79354,9 +77509,7 @@ class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -79422,9 +77575,7 @@ class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -79490,9 +77641,7 @@ class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -79558,9 +77707,7 @@ class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -79626,9 +77773,7 @@ class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -79694,9 +77839,7 @@ class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -79802,9 +77945,7 @@ class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -79870,9 +78011,7 @@ class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -79938,9 +78077,7 @@ class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80046,9 +78183,7 @@ class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80114,9 +78249,7 @@ class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80182,9 +78315,7 @@ class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80250,9 +78381,7 @@ class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80319,9 +78448,7 @@ class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80387,9 +78514,7 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80455,9 +78580,7 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80523,9 +78646,7 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80591,9 +78712,7 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80659,9 +78778,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80727,9 +78844,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80795,9 +78910,7 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80863,9 +78976,7 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80931,9 +79042,7 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -80999,9 +79108,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81067,9 +79174,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81135,9 +79240,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81203,9 +79306,7 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81271,9 +79372,7 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81339,9 +79438,7 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81407,9 +79504,7 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81475,9 +79570,7 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81543,9 +79636,7 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81611,9 +79702,7 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81679,9 +79768,7 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81747,9 +79834,7 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81817,9 +79902,7 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81886,9 +79969,7 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -81955,9 +80036,7 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82024,9 +80103,7 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82093,9 +80170,7 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82162,9 +80237,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82231,9 +80304,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82299,9 +80370,7 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82367,9 +80436,7 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82435,9 +80502,7 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82503,9 +80568,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82571,9 +80634,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82639,9 +80700,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82707,9 +80766,7 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82775,9 +80832,7 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82843,9 +80898,7 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82911,9 +80964,7 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -82979,9 +81030,7 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83047,9 +81096,7 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83115,9 +81162,7 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83183,9 +81228,7 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83251,9 +81294,7 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83321,9 +81362,7 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83390,9 +81429,7 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83459,9 +81496,7 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83528,9 +81563,7 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83597,9 +81630,7 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83666,9 +81697,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83735,9 +81764,7 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83803,9 +81830,7 @@ class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83871,9 +81896,7 @@ class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -83939,9 +81962,7 @@ class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -84007,9 +82028,7 @@ class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -84075,9 +82094,7 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -85868,9 +83885,7 @@ class SubscribeAttributeTestClusterBoolean : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Boolean response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -85976,9 +83991,7 @@ class SubscribeAttributeTestClusterBitmap8 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap8 response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -86084,9 +84097,7 @@ class SubscribeAttributeTestClusterBitmap16 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap16 response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -86192,9 +84203,7 @@ class SubscribeAttributeTestClusterBitmap32 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap32 response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -86300,9 +84309,7 @@ class SubscribeAttributeTestClusterBitmap64 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap64 response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -86408,9 +84415,7 @@ class SubscribeAttributeTestClusterInt8u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int8u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -86516,9 +84521,7 @@ class SubscribeAttributeTestClusterInt16u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int16u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -86624,9 +84627,7 @@ class SubscribeAttributeTestClusterInt24u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int24u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -86732,9 +84733,7 @@ class SubscribeAttributeTestClusterInt32u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int32u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -86840,9 +84839,7 @@ class SubscribeAttributeTestClusterInt40u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int40u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -86948,9 +84945,7 @@ class SubscribeAttributeTestClusterInt48u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int48u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -87056,9 +85051,7 @@ class SubscribeAttributeTestClusterInt56u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int56u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -87164,9 +85157,7 @@ class SubscribeAttributeTestClusterInt64u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int64u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -87272,9 +85263,7 @@ class SubscribeAttributeTestClusterInt8s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int8s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -87380,9 +85369,7 @@ class SubscribeAttributeTestClusterInt16s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int16s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -87488,9 +85475,7 @@ class SubscribeAttributeTestClusterInt24s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int24s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -87596,9 +85581,7 @@ class SubscribeAttributeTestClusterInt32s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int32s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -87704,9 +85687,7 @@ class SubscribeAttributeTestClusterInt40s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int40s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -87812,9 +85793,7 @@ class SubscribeAttributeTestClusterInt48s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int48s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -87920,9 +85899,7 @@ class SubscribeAttributeTestClusterInt56s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int56s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -88028,9 +86005,7 @@ class SubscribeAttributeTestClusterInt64s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int64s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -88136,9 +86111,7 @@ class SubscribeAttributeTestClusterEnum8 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Enum8 response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -88244,9 +86217,7 @@ class SubscribeAttributeTestClusterEnum16 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Enum16 response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -88352,9 +86323,7 @@ class SubscribeAttributeTestClusterFloatSingle : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.FloatSingle response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -88460,9 +86429,7 @@ class SubscribeAttributeTestClusterFloatDouble : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.FloatDouble response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -88568,9 +86535,7 @@ class SubscribeAttributeTestClusterOctetString : public SubscribeAttribute { } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.OctetString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -88687,9 +86652,7 @@ class SubscribeAttributeTestClusterListInt8u : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListInt8u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -88806,9 +86769,7 @@ class SubscribeAttributeTestClusterListOctetString : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListOctetString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -88928,9 +86889,7 @@ class SubscribeAttributeTestClusterListStructOctetString : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListStructOctetString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -89036,9 +86995,7 @@ class SubscribeAttributeTestClusterLongOctetString : public SubscribeAttribute { } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.LongOctetString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -89146,9 +87103,7 @@ class SubscribeAttributeTestClusterCharString : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.CharString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -89256,9 +87211,7 @@ class SubscribeAttributeTestClusterLongCharString : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.LongCharString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -89364,9 +87317,7 @@ class SubscribeAttributeTestClusterEpochUs : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.EpochUs response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -89472,9 +87423,7 @@ class SubscribeAttributeTestClusterEpochS : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.EpochS response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -89580,9 +87529,7 @@ class SubscribeAttributeTestClusterVendorId : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.VendorId response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -89854,9 +87801,7 @@ class SubscribeAttributeTestClusterListNullablesAndOptionalsStruct : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListNullablesAndOptionalsStruct response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -89962,9 +87907,7 @@ class SubscribeAttributeTestClusterEnumAttr : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.EnumAttr response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -90082,9 +88025,7 @@ class SubscribeAttributeTestClusterStructAttr : public SubscribeAttribute { } reportHandler:^(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.StructAttr response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -90190,9 +88131,7 @@ class SubscribeAttributeTestClusterRangeRestrictedInt8u : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt8u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -90298,9 +88237,7 @@ class SubscribeAttributeTestClusterRangeRestrictedInt8s : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt8s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -90406,9 +88343,7 @@ class SubscribeAttributeTestClusterRangeRestrictedInt16u : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt16u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -90514,9 +88449,7 @@ class SubscribeAttributeTestClusterRangeRestrictedInt16s : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt16s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -90633,9 +88566,7 @@ class SubscribeAttributeTestClusterListLongOctetString : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListLongOctetString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -90805,9 +88736,7 @@ class SubscribeAttributeTestClusterListFabricScoped : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListFabricScoped response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -90913,9 +88842,7 @@ class SubscribeAttributeTestClusterTimedWriteBoolean : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.TimedWriteBoolean response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -91021,9 +88948,7 @@ class SubscribeAttributeTestClusterGeneralErrorBoolean : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.GeneralErrorBoolean response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -91129,9 +89054,7 @@ class SubscribeAttributeTestClusterClusterErrorBoolean : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ClusterErrorBoolean response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -91237,9 +89160,7 @@ class SubscribeAttributeTestClusterUnsupported : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Unsupported response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -91345,9 +89266,7 @@ class SubscribeAttributeTestClusterNullableBoolean : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBoolean response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -91453,9 +89372,7 @@ class SubscribeAttributeTestClusterNullableBitmap8 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap8 response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -91561,9 +89478,7 @@ class SubscribeAttributeTestClusterNullableBitmap16 : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap16 response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -91669,9 +89584,7 @@ class SubscribeAttributeTestClusterNullableBitmap32 : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap32 response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -91777,9 +89690,7 @@ class SubscribeAttributeTestClusterNullableBitmap64 : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap64 response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -91885,9 +89796,7 @@ class SubscribeAttributeTestClusterNullableInt8u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt8u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -91993,9 +89902,7 @@ class SubscribeAttributeTestClusterNullableInt16u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt16u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -92101,9 +90008,7 @@ class SubscribeAttributeTestClusterNullableInt24u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt24u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -92209,9 +90114,7 @@ class SubscribeAttributeTestClusterNullableInt32u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt32u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -92317,9 +90220,7 @@ class SubscribeAttributeTestClusterNullableInt40u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt40u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -92425,9 +90326,7 @@ class SubscribeAttributeTestClusterNullableInt48u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt48u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -92533,9 +90432,7 @@ class SubscribeAttributeTestClusterNullableInt56u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt56u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -92641,9 +90538,7 @@ class SubscribeAttributeTestClusterNullableInt64u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt64u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -92749,9 +90644,7 @@ class SubscribeAttributeTestClusterNullableInt8s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt8s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -92857,9 +90750,7 @@ class SubscribeAttributeTestClusterNullableInt16s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt16s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -92965,9 +90856,7 @@ class SubscribeAttributeTestClusterNullableInt24s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt24s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -93073,9 +90962,7 @@ class SubscribeAttributeTestClusterNullableInt32s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt32s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -93181,9 +91068,7 @@ class SubscribeAttributeTestClusterNullableInt40s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt40s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -93289,9 +91174,7 @@ class SubscribeAttributeTestClusterNullableInt48s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt48s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -93397,9 +91280,7 @@ class SubscribeAttributeTestClusterNullableInt56s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt56s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -93505,9 +91386,7 @@ class SubscribeAttributeTestClusterNullableInt64s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt64s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -93613,9 +91492,7 @@ class SubscribeAttributeTestClusterNullableEnum8 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableEnum8 response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -93721,9 +91598,7 @@ class SubscribeAttributeTestClusterNullableEnum16 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableEnum16 response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -93829,9 +91704,7 @@ class SubscribeAttributeTestClusterNullableFloatSingle : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableFloatSingle response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -93937,9 +91810,7 @@ class SubscribeAttributeTestClusterNullableFloatDouble : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableFloatDouble response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -94045,9 +91916,7 @@ class SubscribeAttributeTestClusterNullableOctetString : public SubscribeAttribu } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableOctetString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -94155,9 +92024,7 @@ class SubscribeAttributeTestClusterNullableCharString : public SubscribeAttribut } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableCharString response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -94263,9 +92130,7 @@ class SubscribeAttributeTestClusterNullableEnumAttr : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableEnumAttr response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -94389,9 +92254,7 @@ class SubscribeAttributeTestClusterNullableStruct : public SubscribeAttribute { } reportHandler:^(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableStruct response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -94499,9 +92362,7 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt8u : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt8u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -94609,9 +92470,7 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt8s : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt8s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -94719,9 +92578,7 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt16u : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt16u response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -94829,9 +92686,7 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt16s : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt16s response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -94897,9 +92752,7 @@ class SubscribeAttributeTestClusterGeneratedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.GeneratedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -94965,9 +92818,7 @@ class SubscribeAttributeTestClusterAcceptedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.AcceptedCommandList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -95033,9 +92884,7 @@ class SubscribeAttributeTestClusterAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.AttributeList response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -95101,9 +92950,7 @@ class SubscribeAttributeTestClusterFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.FeatureMap response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; @@ -95169,9 +93016,7 @@ class SubscribeAttributeTestClusterClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ClusterRevision response %@", [value description]); - if (error || !mWait) { - SetCommandExitStatus(error); - } + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; 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 de697962af5a18..b2de0c17c387ae 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -39,7 +39,6 @@ class TestList : public Command { printf("Test_TC_ACT_1_1\n"); printf("Test_TC_CC_1_1\n"); printf("Test_TC_CC_2_1\n"); - printf("Test_TC_CC_3_1\n"); printf("Test_TC_CC_3_2\n"); printf("Test_TC_CC_3_3\n"); printf("Test_TC_CC_4_1\n"); @@ -52,7 +51,6 @@ class TestList : public Command { 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_7_1\n"); printf("Test_TC_CC_7_2\n"); printf("Test_TC_CC_7_3\n"); printf("Test_TC_CC_7_4\n"); @@ -132,6 +130,7 @@ class TestList : public Command { printf("Test_TC_PSCFG_1_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); + printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); @@ -197,6 +196,7 @@ class TestList : public Command { printf("TestArmFailSafe\n"); printf("TestFanControl\n"); printf("TestAccessControlConstraints\n"); + printf("TestLevelControlWithOnOffDependency\n"); printf("TestMultiAdmin\n"); printf("Test_TC_DGSW_2_1\n"); printf("Test_TC_DGSW_2_2\n"); @@ -2236,7 +2236,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -2261,7 +2261,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -2281,7 +2281,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); @@ -2313,7 +2313,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -2338,7 +2338,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -2462,7 +2462,7 @@ class Test_TC_BOOL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("stateValue", "", "bool")); + VerifyOrReturn(CheckConstraintType("stateValue", "boolean", "boolean")); NextTest(); }]; @@ -2522,19 +2522,15 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("ACT.S.A0002")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - if (ShouldSkip(" !ACT.S.A0002 ")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(SetupURL) in AttributeList\n"); + if (ShouldSkip("ACT.S.A0002")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_4(); + err = TestReadTheOptionalAttributeSetupURLInAttributeList_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); @@ -2634,7 +2630,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -2659,7 +2655,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -2679,10 +2675,9 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); }]; @@ -2690,7 +2685,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeSetupURLInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterBridgedActions * cluster = [[MTRBaseClusterBridgedActions alloc] initWithDevice:device @@ -2699,13 +2694,14 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(SetupURL) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); }]; @@ -2726,12 +2722,8 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("acceptedCommandList", value, 11)); NextTest(); }]; @@ -2756,7 +2748,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -2832,87 +2824,22 @@ class Test_TC_CC_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the feature dependent attribute(CC.S.F00) in AttributeList\n"); - if (ShouldSkip("CC.S.F00")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentAttributeCCSF00InAttributeList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the feature dependent attribute(CC.S.F03) in AttributeList\n"); - if (ShouldSkip("CC.S.F03")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentAttributeCCSF03InAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the feature dependent attribute(CC.S.F04) in AttributeList\n"); - if (ShouldSkip("CC.S.F04")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentAttributeCCSF04InAttributeList_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read the feature dependent attribute(CC.S.F04) or ColorTemperatureMireds in AttributeList\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A4010")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentAttributeCCSF04OrColorTemperatureMiredsInAttributeList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the feature dependent attribute(CC.S.F01) in AttributeList\n"); - if (ShouldSkip("CC.S.F01")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentAttributeCCSF01InAttributeList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the feature dependent attribute(CC.S.F02) in AttributeList\n"); - if (ShouldSkip("CC.S.F02")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentAttributeCCSF02InAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the feature dependent attribute(CC.S.F00) in AttributeList\n"); - if (ShouldSkip("CC.S.F00")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentAttributeCCSF00InAttributeList_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the feature dependent attribute(CC.S.F00) in AttributeList\n"); - if (ShouldSkip("CC.S.F00")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentAttributeCCSF00InAttributeList_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_13(); - break; - case 14: ChipLogProgress(chipTool, - " ***** Test Step 14 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_14(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -2946,30 +2873,6 @@ class Test_TC_CC_1_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. @@ -2983,7 +2886,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 15; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -3015,7 +2918,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -3035,7 +2938,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 31UL)); @@ -3058,7 +2961,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 16385UL)); @@ -3075,188 +2978,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentAttributeCCSF00InAttributeList_4() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent attribute(CC.S.F00) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentAttributeCCSF03InAttributeList_5() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent attribute(CC.S.F03) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentAttributeCCSF04InAttributeList_6() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent attribute(CC.S.F04) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16395UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16396UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentAttributeCCSF04OrColorTemperatureMiredsInAttributeList_7() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent attribute(CC.S.F04) or ColorTemperatureMireds in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16397UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16400UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentAttributeCCSF01InAttributeList_8() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent attribute(CC.S.F01) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentAttributeCCSF02InAttributeList_9() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent attribute(CC.S.F02) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16386UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16387UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16388UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16389UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16390UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentAttributeCCSF00InAttributeList_10() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent attribute(CC.S.F00) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentAttributeCCSF00InAttributeList_11() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent attribute(CC.S.F00) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_12() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -3269,14 +2991,14 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_13() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -3294,14 +3016,14 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_14() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -3355,7 +3077,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000 && CC.S.F00")) { + if (ShouldSkip("CC.S.A0000")) { NextTest(); return; } @@ -3363,7 +3085,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.A0001 && CC.S.F00")) { + if (ShouldSkip("CC.S.A0001")) { NextTest(); return; } @@ -3379,7 +3101,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.A0003 && CC.S.F03")) { + if (ShouldSkip("CC.S.A0003")) { NextTest(); return; } @@ -3387,7 +3109,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.A0004 && CC.S.F04")) { + if (ShouldSkip("CC.S.A0004")) { NextTest(); return; } @@ -3411,7 +3133,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads ColorTemperatureMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.A0007 && CC.S.F04")) { + if (ShouldSkip("CC.S.A0007")) { NextTest(); return; } @@ -3435,7 +3157,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4000 && CC.S.F01")) { + if (ShouldSkip("CC.S.A4000")) { NextTest(); return; } @@ -3443,7 +3165,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads EnhancedColorMode attribute from DUT\n"); - if (ShouldSkip("CC.S.F02 && CC.S.A4001")) { + if (ShouldSkip("CC.S.F02")) { NextTest(); return; } @@ -3451,7 +3173,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("CC.S.A4002 && CC.S.F02")) { + if (ShouldSkip("CC.S.A4002")) { NextTest(); return; } @@ -3459,7 +3181,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads ColorLoopDirection attribute from DUT\n"); - if (ShouldSkip("CC.S.A4003 && CC.S.F02")) { + if (ShouldSkip("CC.S.A4003")) { NextTest(); return; } @@ -3467,7 +3189,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads ColorLoopTime attribute from DUT\n"); - if (ShouldSkip("CC.S.A4004 && CC.S.F02")) { + if (ShouldSkip("CC.S.A4004")) { NextTest(); return; } @@ -3475,7 +3197,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads ColorLoopStartEnhancedHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4005 && CC.S.F02")) { + if (ShouldSkip("CC.S.A4005")) { NextTest(); return; } @@ -3483,7 +3205,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads ColorLoopStoredEnhancedHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4006 && CC.S.F02")) { + if (ShouldSkip("CC.S.A4006")) { NextTest(); return; } @@ -3503,7 +3225,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.A400b && CC.S.F04")) { + if (ShouldSkip("CC.S.A400b")) { NextTest(); return; } @@ -3511,7 +3233,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 21: ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads ColorTempPhysicalMaxMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.A400c && CC.S.F04")) { + if (ShouldSkip("CC.S.A400c")) { NextTest(); return; } @@ -3519,7 +3241,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 22: ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads CoupleColorTempToLevelMinMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.A400d && CC.S.F04")) { + if (ShouldSkip("CC.S.A400d")) { NextTest(); return; } @@ -3527,7 +3249,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 23: ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads StartUpColorTemperatureMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.A4010 && CC.S.F04")) { + if (ShouldSkip("CC.S.A4010")) { NextTest(); return; } @@ -3542,148 +3264,184 @@ class Test_TC_CC_2_1 : public TestCommandBridge { err = TestThReadsNumberOfPrimariesAttributeFromDut_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads Primary1X attribute from DUT\n"); - if (ShouldSkip("CC.S.A0011")) { + ChipLogProgress(chipTool, + " ***** Test 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\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0011")) { NextTest(); return; } - err = TestThReadsPrimary1XAttributeFromDut_25(); + err = TestThReadsPrimary1XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs1OrMore_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads Primary1Y attribute from DUT\n"); - if (ShouldSkip("CC.S.A0012")) { + ChipLogProgress(chipTool, + " ***** Test 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\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0012")) { NextTest(); return; } - err = TestThReadsPrimary1YAttributeFromDut_26(); + err = TestThReadsPrimary1YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs1OrMore_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads Primary1Intensity attribute from DUT\n"); - if (ShouldSkip("CC.S.A0013")) { + ChipLogProgress(chipTool, + " ***** Test Step 27 : TH reads Primary1Intensity attribute from DUT and Verify that the DUT response contains an " + "uint8 if NumberOfPrimaries is 1 or more\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0013")) { NextTest(); return; } - err = TestThReadsPrimary1IntensityAttributeFromDut_27(); + err = TestThReadsPrimary1IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs1OrMore_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads Primary2X attribute from DUT\n"); - if (ShouldSkip("CC.S.A0015")) { + ChipLogProgress(chipTool, + " ***** Test 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\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0015")) { NextTest(); return; } - err = TestThReadsPrimary2XAttributeFromDut_28(); + err = TestThReadsPrimary2XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs2OrMore_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH reads Primary2Y attribute from DUT\n"); - if (ShouldSkip("CC.S.A0016")) { + ChipLogProgress(chipTool, + " ***** Test 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\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0016")) { NextTest(); return; } - err = TestThReadsPrimary2YAttributeFromDut_29(); + err = TestThReadsPrimary2YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs2OrMore_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads Primary2Intensity attribute from DUT\n"); - if (ShouldSkip("CC.S.A0017")) { + ChipLogProgress(chipTool, + " ***** Test Step 30 : TH reads Primary2Intensity attribute from DUT and Verify that the DUT response contains an " + "uint8 if NumberOfPrimaries is 2 or more\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0017")) { NextTest(); return; } - err = TestThReadsPrimary2IntensityAttributeFromDut_30(); + err = TestThReadsPrimary2IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs2OrMore_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads Primary3X attribute from DUT\n"); - if (ShouldSkip("CC.S.A0019")) { + ChipLogProgress(chipTool, + " ***** Test 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\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0019")) { NextTest(); return; } - err = TestThReadsPrimary3XAttributeFromDut_31(); + err = TestThReadsPrimary3XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs3OrMore_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : TH reads Primary3Y attribute from DUT\n"); - if (ShouldSkip("CC.S.A001a")) { + ChipLogProgress(chipTool, + " ***** Test 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\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A001a")) { NextTest(); return; } - err = TestThReadsPrimary3YAttributeFromDut_32(); + err = TestThReadsPrimary3YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs3OrMore_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : TH reads Primary3Intensity attribute from DUT\n"); - if (ShouldSkip("CC.S.A001b")) { + ChipLogProgress(chipTool, + " ***** Test Step 33 : TH reads Primary3Intensity attribute from DUT and Verify that the DUT response contains an " + "uint8 if NumberOfPrimaries is 3 or more\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A001b")) { NextTest(); return; } - err = TestThReadsPrimary3IntensityAttributeFromDut_33(); + err = TestThReadsPrimary3IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs3OrMore_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads Primary4X attribute from DUT\n"); - if (ShouldSkip("CC.S.A0020")) { + ChipLogProgress(chipTool, + " ***** Test 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\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0020")) { NextTest(); return; } - err = TestThReadsPrimary4XAttributeFromDut_34(); + err = TestThReadsPrimary4XAttributeFromDutVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs4OrMore_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : TH reads Primary4Y attribute from DUT\n"); - if (ShouldSkip("CC.S.A0021")) { + ChipLogProgress(chipTool, + " ***** Test 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\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0021")) { NextTest(); return; } - err = TestThReadsPrimary4YAttributeFromDut_35(); + err = TestThReadsPrimary4YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs4OrMore_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads Primary4Intensity attribute from DUT\n"); - if (ShouldSkip("CC.S.A0022")) { + ChipLogProgress(chipTool, + " ***** Test Step 36 : TH reads Primary4Intensity attribute from DUT and Verify that the DUT response contains an " + "uint8 if NumberOfPrimaries is 4 or more\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0022")) { NextTest(); return; } - err = TestThReadsPrimary4IntensityAttributeFromDut_36(); + err = TestThReadsPrimary4IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs4OrMore_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : TH reads Primary5X attribute from DUT\n"); - if (ShouldSkip("CC.S.A0024")) { + ChipLogProgress(chipTool, + " ***** Test 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\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0024")) { NextTest(); return; } - err = TestThReadsPrimary5XAttributeFromDut_37(); + err = TestThReadsPrimary5XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs5OrMore_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : TH reads Primary5Y attribute from DUT\n"); - if (ShouldSkip("CC.S.A0025")) { + ChipLogProgress(chipTool, + " ***** Test 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\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0025")) { NextTest(); return; } - err = TestThReadsPrimary5YAttributeFromDut_38(); + err = TestThReadsPrimary5YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs5OrMore_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : TH reads Primary5Intensity attribute from DUT\n"); - if (ShouldSkip("CC.S.A0026")) { + ChipLogProgress(chipTool, + " ***** Test Step 39 : TH reads Primary5Intensity attribute from DUT and Verify that the DUT response contains an " + "uint8 if NumberOfPrimaries is 5 or more\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0026")) { NextTest(); return; } - err = TestThReadsPrimary5IntensityAttributeFromDut_39(); + err = TestThReadsPrimary5IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs5OrMore_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : TH reads Primary6X attribute from DUT\n"); - if (ShouldSkip("CC.S.A0028")) { + ChipLogProgress(chipTool, + " ***** Test 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\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0028")) { NextTest(); return; } - err = TestThReadsPrimary6XAttributeFromDut_40(); + err = TestThReadsPrimary6XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs6OrMore_40(); break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : TH reads Primary6Y attribute from DUT\n"); - if (ShouldSkip("CC.S.A0029")) { + ChipLogProgress(chipTool, + " ***** Test 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\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A0029")) { NextTest(); return; } - err = TestThReadsPrimary6YAttributeFromDut_41(); + err = TestThReadsPrimary6YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs6OrMore_41(); break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : TH reads Primary6Intensity attribute from DUT\n"); - if (ShouldSkip("CC.S.A002a")) { + ChipLogProgress(chipTool, + " ***** Test Step 42 : TH reads Primary6Intensity attribute from DUT and Verify that the DUT response contains an " + "uint8 if NumberOfPrimaries is 6 or more\n"); + if (ShouldSkip("PICS_USER_PROMPT && CC.S.A002a")) { NextTest(); return; } - err = TestThReadsPrimary6IntensityAttributeFromDut_42(); + err = TestThReadsPrimary6IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs6OrMore_42(); break; case 43: ChipLogProgress(chipTool, " ***** Test Step 43 : TH reads WhitePointX attribute from DUT\n"); @@ -3986,7 +3744,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 255U)); @@ -4009,7 +3767,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 255U)); @@ -4032,7 +3790,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("remainingTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("remainingTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("remainingTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("remainingTime", [value unsignedShortValue], 65535U)); @@ -4055,7 +3813,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); @@ -4078,7 +3836,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); @@ -4101,7 +3859,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("driftCompensation", "", "enum8")); + VerifyOrReturn(CheckConstraintType("driftCompensation", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("driftCompensation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("driftCompensation", [value unsignedCharValue], 4U)); @@ -4124,8 +3882,8 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("compensationText", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("compensationText", [value length], 254)); + VerifyOrReturn(CheckConstraintType("compensationText", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("compensationText", value, 254)); NextTest(); }]; @@ -4145,7 +3903,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); @@ -4168,7 +3926,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("colorMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); @@ -4191,7 +3949,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("options", "", "bitmap8")); + VerifyOrReturn(CheckConstraintType("options", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("options", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("options", [value unsignedCharValue], 4U)); @@ -4214,7 +3972,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -4237,7 +3995,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedColorMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("enhancedColorMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("enhancedColorMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedColorMode", [value unsignedCharValue], 3U)); @@ -4260,7 +4018,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopActive", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorLoopActive", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("colorLoopActive", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorLoopActive", [value unsignedCharValue], 255U)); @@ -4283,7 +4041,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopDirection", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorLoopDirection", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("colorLoopDirection", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorLoopDirection", [value unsignedCharValue], 255U)); @@ -4306,7 +4064,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorLoopTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorLoopTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorLoopTime", [value unsignedShortValue], 65535U)); @@ -4330,7 +4088,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopStartEnhancedHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorLoopStartEnhancedHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorLoopStartEnhancedHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorLoopStartEnhancedHue", [value unsignedShortValue], 65535U)); @@ -4354,7 +4112,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorLoopStoredEnhancedHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorLoopStoredEnhancedHue", [value unsignedShortValue], 65535U)); @@ -4406,7 +4164,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ColorCapabilities", actualValue, FeatureMapValue)); } - VerifyOrReturn(CheckConstraintType("colorCapabilities", "", "map16")); + VerifyOrReturn(CheckConstraintType("colorCapabilities", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("colorCapabilities", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorCapabilities", [value unsignedShortValue], 31U)); @@ -4430,7 +4188,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); @@ -4454,7 +4212,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); @@ -4478,7 +4236,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("coupleColorTempToLevelMinMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("coupleColorTempToLevelMinMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("coupleColorTempToLevelMinMireds", [value unsignedShortValue], 0U)); VerifyOrReturn( CheckConstraintMaxValue("coupleColorTempToLevelMinMireds", [value unsignedShortValue], 65279U)); @@ -4503,7 +4261,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("startUpColorTemperatureMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("startUpColorTemperatureMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("startUpColorTemperatureMireds", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("startUpColorTemperatureMireds", [value unsignedShortValue], 65279U)); @@ -4528,7 +4286,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("numberOfPrimaries", "", "uint8")); + VerifyOrReturn(CheckConstraintType("numberOfPrimaries", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("numberOfPrimaries", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("numberOfPrimaries", [value unsignedCharValue], 6U)); } @@ -4539,436 +4297,184 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsPrimary1XAttributeFromDut_25() + CHIP_ERROR + TestThReadsPrimary1XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs1OrMore_25() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary1XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary1X attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("primary1X", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("primary1X", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary1X", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary1YAttributeFromDut_26() + CHIP_ERROR + TestThReadsPrimary1YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs1OrMore_26() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary1YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary1Y attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("primary1Y", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("primary1Y", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary1Y", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary1IntensityAttributeFromDut_27() + CHIP_ERROR + TestThReadsPrimary1IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs1OrMore_27() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary1IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary1Intensity attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("primary1Intensity", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("primary1Intensity", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary1Intensity", [value unsignedCharValue], 255U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary2XAttributeFromDut_28() + CHIP_ERROR + TestThReadsPrimary2XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs2OrMore_28() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary2XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary2X attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("primary2X", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("primary2X", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary2X", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary2YAttributeFromDut_29() + CHIP_ERROR + TestThReadsPrimary2YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs2OrMore_29() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary2YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary2Y attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("primary2Y", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("primary2Y", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary2Y", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary2IntensityAttributeFromDut_30() + CHIP_ERROR + TestThReadsPrimary2IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs2OrMore_30() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary2IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary2Intensity attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("primary2Intensity", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("primary2Intensity", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary2Intensity", [value unsignedCharValue], 255U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary3XAttributeFromDut_31() + CHIP_ERROR + TestThReadsPrimary3XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs3OrMore_31() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary3XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary3X attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("primary3X", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("primary3X", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary3X", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary3YAttributeFromDut_32() + CHIP_ERROR + TestThReadsPrimary3YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs3OrMore_32() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary3YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary3Y attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("primary3Y", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("primary3Y", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary3Y", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary3IntensityAttributeFromDut_33() + CHIP_ERROR + TestThReadsPrimary3IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs3OrMore_33() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary3IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary3Intensity attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("primary3Intensity", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("primary3Intensity", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary3Intensity", [value unsignedCharValue], 255U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary4XAttributeFromDut_34() + CHIP_ERROR + TestThReadsPrimary4XAttributeFromDutVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs4OrMore_34() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary4XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary4X attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("primary4X", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("primary4X", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary4X", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary4YAttributeFromDut_35() + CHIP_ERROR + TestThReadsPrimary4YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs4OrMore_35() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary4YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary4Y attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("primary4Y", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("primary4Y", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary4Y", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary4IntensityAttributeFromDut_36() + CHIP_ERROR + TestThReadsPrimary4IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs4OrMore_36() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary4IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary4Intensity attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("primary4Intensity", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("primary4Intensity", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary4Intensity", [value unsignedCharValue], 255U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary5XAttributeFromDut_37() + CHIP_ERROR + TestThReadsPrimary5XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs5OrMore_37() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary5XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary5X attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("primary5X", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("primary5X", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary5X", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary5YAttributeFromDut_38() + CHIP_ERROR + TestThReadsPrimary5YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs5OrMore_38() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary5YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary5Y attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("primary5Y", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("primary5Y", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary5Y", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary5IntensityAttributeFromDut_39() + CHIP_ERROR + TestThReadsPrimary5IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs5OrMore_39() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary5IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary5Intensity attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("primary5Intensity", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("primary5Intensity", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary5Intensity", [value unsignedCharValue], 255U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary6XAttributeFromDut_40() + CHIP_ERROR + TestThReadsPrimary6XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs6OrMore_40() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary6XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary6X attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("primary6X", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("primary6X", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary6X", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary6YAttributeFromDut_41() + CHIP_ERROR + TestThReadsPrimary6YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs6OrMore_41() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary6YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary6Y attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("primary6Y", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("primary6Y", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary6Y", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsPrimary6IntensityAttributeFromDut_42() + CHIP_ERROR + TestThReadsPrimary6IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs6OrMore_42() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePrimary6IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Primary6Intensity attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("primary6Intensity", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("primary6Intensity", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("primary6Intensity", [value unsignedCharValue], 255U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } CHIP_ERROR TestThReadsWhitePointXAttributeFromDut_43() @@ -4984,7 +4490,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("whitePointX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("whitePointX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("whitePointX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("whitePointX", [value unsignedShortValue], 65279U)); @@ -5007,7 +4513,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("whitePointY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("whitePointY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("whitePointY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("whitePointY", [value unsignedShortValue], 65279U)); @@ -5030,7 +4536,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorPointRX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorPointRX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorPointRX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointRX", [value unsignedShortValue], 65279U)); @@ -5053,7 +4559,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorPointRY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorPointRY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorPointRY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointRY", [value unsignedShortValue], 65279U)); @@ -5078,7 +4584,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("colorPointRIntensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorPointRIntensity", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("colorPointRIntensity", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointRIntensity", [value unsignedCharValue], 255U)); } @@ -5102,7 +4608,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorPointGX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorPointGX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorPointGX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointGX", [value unsignedShortValue], 65279U)); @@ -5125,7 +4631,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorPointGY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorPointGY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorPointGY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointGY", [value unsignedShortValue], 65279U)); @@ -5150,7 +4656,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("colorPointGIntensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorPointGIntensity", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("colorPointGIntensity", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointGIntensity", [value unsignedCharValue], 255U)); } @@ -5174,7 +4680,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorPointBX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorPointBX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorPointBX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointBX", [value unsignedShortValue], 65279U)); @@ -5197,7 +4703,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorPointBY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorPointBY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorPointBY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointBY", [value unsignedShortValue], 65279U)); @@ -5222,7 +4728,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("colorPointBIntensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorPointBIntensity", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("colorPointBIntensity", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointBIntensity", [value unsignedCharValue], 255U)); } @@ -5234,21 +4740,22 @@ class Test_TC_CC_2_1 : public TestCommandBridge { } }; -class Test_TC_CC_3_1 : public TestCommandBridge { +class Test_TC_CC_3_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_3_1() - : TestCommandBridge("Test_TC_CC_3_1") + Test_TC_CC_3_2() + : TestCommandBridge("Test_TC_CC_3_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_3_1() {} + ~Test_TC_CC_3_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -5256,11 +4763,11 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_3_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_3_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_3_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_3_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -5285,208 +4792,180 @@ class Test_TC_CC_3_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestReadsCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Move to hue shortest distance command\n"); - if (ShouldSkip("CC.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestMoveToHueShortestDistanceCommand_4(); + err = TestThReadsCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 290ms\n"); - err = TestWait290ms_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveHue command to DUT with MoveMode Up\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6(); + err = TestThSendsMoveHueCommandToDutWithMoveModeUp_5(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 295ms\n"); - err = TestWait295ms_7(); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 3000ms\n"); + err = TestWait3000ms_6(); break; - case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_7(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 300ms\n"); - err = TestWait300ms_9(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 2000\n"); + err = TestWait2000_8(); break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 3000\n"); + err = TestWait3000_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Move to hue longest distance command\n"); - if (ShouldSkip("CC.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestMoveToHueLongestDistanceCommand_11(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 290ms\n"); - err = TestWait290ms_12(); - break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends MoveHue command to DUT with MoveMode Stop\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_13(); + err = TestThSendsMoveHueCommandToDutWithMoveModeStop_12(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 295ms\n"); - err = TestWait295ms_14(); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 1000ms\n"); + err = TestWait1000ms_13(); break; - case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_15(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); + err = TestWait1000ms_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 300ms\n"); - err = TestWait300ms_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_16(); break; case 17: - ChipLogProgress( - chipTool, " ***** Test Step 17 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends MoveHue command to DUT with MoveMode Down\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_17(); + err = TestThSendsMoveHueCommandToDutWithMoveModeDown_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Move to hue up command\n"); - if (ShouldSkip("CC.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 1000ms\n"); + err = TestWait1000ms_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestMoveToHueUpCommand_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 290ms\n"); - err = TestWait290ms_19(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_19(); break; case 20: - ChipLogProgress( - chipTool, " ***** Test Step 20 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 1000ms\n"); + err = TestWait1000ms_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 295ms\n"); - err = TestWait295ms_21(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_21(); break; case 22: - ChipLogProgress( - chipTool, " ***** Test Step 22 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 1000ms\n"); + err = TestWait1000ms_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 300ms\n"); - err = TestWait300ms_23(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_23(); break; case 24: - ChipLogProgress( - chipTool, " ***** Test Step 24 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : TH sends MoveHue command to DUT with MoveMode Stop\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_24(); + err = TestThSendsMoveHueCommandToDutWithMoveModeStop_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Move to hue down command\n"); - if (ShouldSkip("CC.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestMoveToHueDownCommand_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); + err = TestWait1000ms_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Wait 290ms\n"); - err = TestWait290ms_26(); - break; - case 27: - ChipLogProgress( - chipTool, " ***** Test Step 27 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { - NextTest(); - return; - } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Wait 295ms\n"); - err = TestWait295ms_28(); - break; - case 29: - ChipLogProgress( - chipTool, " ***** Test Step 29 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_29(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_26(); break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 300ms\n"); - err = TestWait300ms_30(); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); + err = TestWait1000ms_27(); break; - case 31: - ChipLogProgress( - chipTool, " ***** Test Step 31 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_31(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_28(); break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_32(); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_29(); break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_33(); + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30(); break; } @@ -5592,15 +5071,6 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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. @@ -5614,11 +5084,12 @@ class Test_TC_CC_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 34; + const uint16_t mTestCount = 31; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -5667,7 +5138,29 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5676,11 +5169,11 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentHue attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5690,7 +5183,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveToHueShortestDistanceCommand_4() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5698,32 +5191,32 @@ class Test_TC_CC_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; - params.hue = [NSNumber numberWithUnsignedChar:150U]; - params.direction = [NSNumber numberWithUnsignedChar:0U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; + __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move to hue shortest distance command Error: %@", err); + [cluster moveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveHue command to DUT with MoveMode Up 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 TestWait290ms_5() + CHIP_ERROR TestWait3000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; + value.ms = 3000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5732,11 +5225,11 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5746,14 +5239,14 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait295ms_7() + CHIP_ERROR TestWait2000_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; + value.ms = 2000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5762,11 +5255,11 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5776,14 +5269,14 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait300ms_9() + CHIP_ERROR TestWait3000_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 3000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5792,11 +5285,11 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5806,7 +5299,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveToHueLongestDistanceCommand_11() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeStop_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5814,62 +5307,33 @@ class Test_TC_CC_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; - params.hue = [NSNumber numberWithUnsignedChar:200U]; - params.direction = [NSNumber numberWithUnsignedChar:1U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; + __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move to hue longest distance command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait290ms_12() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_13() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster moveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveHue command to DUT with MoveMode Stop Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait295ms_14() + CHIP_ERROR TestWait1000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } + NSNumber * _Nonnull CurrentHueValue; - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_15() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5878,13 +5342,16 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + { + CurrentHueValue = value; + } NextTest(); }]; @@ -5892,14 +5359,14 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait300ms_16() + CHIP_ERROR TestWait1000ms_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_17() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5908,13 +5375,14 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentHue", actualValue, CurrentHueValue)); + } NextTest(); }]; @@ -5922,7 +5390,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveToHueUpCommand_18() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeDown_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5930,32 +5398,32 @@ class Test_TC_CC_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; - params.hue = [NSNumber numberWithUnsignedChar:250U]; - params.direction = [NSNumber numberWithUnsignedChar:2U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; + __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:3U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move to hue up command Error: %@", err); + [cluster moveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveHue command to DUT with MoveMode Down 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 TestWait290ms_19() + CHIP_ERROR TestWait1000ms_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_20() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5964,11 +5432,11 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5978,14 +5446,14 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait295ms_21() + CHIP_ERROR TestWait1000ms_20() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_22() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5994,11 +5462,11 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -6008,14 +5476,14 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait300ms_23() + CHIP_ERROR TestWait1000ms_22() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_24() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6024,11 +5492,11 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -6038,7 +5506,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveToHueDownCommand_25() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeStop_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6046,62 +5514,33 @@ class Test_TC_CC_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; - params.hue = [NSNumber numberWithUnsignedChar:225U]; - params.direction = [NSNumber numberWithUnsignedChar:3U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; + __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move to hue down command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait290ms_26() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_27() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster moveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveHue command to DUT with MoveMode Stop Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait295ms_28() + CHIP_ERROR TestWait1000ms_25() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } + NSNumber * _Nonnull CurrentHueValueAfterStopmode; - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_29() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6110,13 +5549,16 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + { + CurrentHueValueAfterStopmode = value; + } NextTest(); }]; @@ -6124,14 +5566,14 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait300ms_30() + CHIP_ERROR TestWait1000ms_27() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_31() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6140,13 +5582,14 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentHue", actualValue, CurrentHueValueAfterStopmode)); + } NextTest(); }]; @@ -6154,7 +5597,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_32() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -6171,7 +5614,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_33() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -6194,21 +5637,22 @@ class Test_TC_CC_3_1 : public TestCommandBridge { } }; -class Test_TC_CC_3_2 : public TestCommandBridge { +class Test_TC_CC_3_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_3_2() - : TestCommandBridge("Test_TC_CC_3_2") + Test_TC_CC_3_3() + : TestCommandBridge("Test_TC_CC_3_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_3_2() {} + ~Test_TC_CC_3_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -6216,11 +5660,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_3_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_3_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_3_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_3_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -6245,208 +5689,68 @@ class Test_TC_CC_3_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestReadsCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Move hue up command\n"); - if (ShouldSkip("CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestMoveHueUpCommand_4(); + err = TestThReadsCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 140ms\n"); - err = TestWait140ms_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends StepHue command to DUT with StepMode Up\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C02.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6(); + err = TestThSendsStepHueCommandToDutWithStepModeUp_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 145ms\n"); - err = TestWait145ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends StepHue command to DUT with StepMode Down\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C02.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8(); + err = TestThSendsStepHueCommandToDutWithStepModeDown_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 150ms\n"); - err = TestWait150ms_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); + err = TestWait1000ms_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10(); + err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Move hue stop command\n"); - if (ShouldSkip("CC.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestMoveHueStopCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 140ms\n"); - err = TestWait140ms_12(); - break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { - NextTest(); - return; - } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 145ms\n"); - err = TestWait145ms_14(); - break; - case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { - NextTest(); - return; - } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 150ms\n"); - err = TestWait150ms_16(); - break; - case 17: - ChipLogProgress( - chipTool, " ***** Test Step 17 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { - NextTest(); - return; - } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Move hue down command\n"); - if (ShouldSkip("CC.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestMoveHueDownCommand_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 140ms\n"); - err = TestWait140ms_19(); - break; - case 20: - ChipLogProgress( - chipTool, " ***** Test Step 20 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { - NextTest(); - return; - } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 145ms\n"); - err = TestWait145ms_21(); - break; - case 22: - ChipLogProgress( - chipTool, " ***** Test Step 22 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { - NextTest(); - return; - } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 150ms\n"); - err = TestWait150ms_23(); - break; - case 24: - ChipLogProgress( - chipTool, " ***** Test Step 24 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { - NextTest(); - return; - } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Move hue stop command\n"); - if (ShouldSkip("CC.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestMoveHueStopCommand_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Wait 140ms\n"); - err = TestWait140ms_26(); - break; - case 27: - ChipLogProgress( - chipTool, " ***** Test Step 27 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { - NextTest(); - return; - } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Wait 145ms\n"); - err = TestWait145ms_28(); - break; - case 29: - ChipLogProgress( - chipTool, " ***** Test Step 29 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { - NextTest(); - return; - } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 150ms\n"); - err = TestWait150ms_30(); - break; - case 31: - ChipLogProgress( - chipTool, " ***** Test Step 31 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { - NextTest(); - return; - } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_33(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); break; } @@ -6498,69 +5802,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 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; } // Go on to the next test. @@ -6574,11 +5815,12 @@ class Test_TC_CC_3_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 34; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -6627,30 +5869,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentHueAttributeFromDut_3() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMoveHueUpCommand_4() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6658,31 +5877,21 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move hue up command Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait140ms_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 140UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6691,11 +5900,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -6705,14 +5914,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait145ms_7() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 145UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8() + CHIP_ERROR TestThSendsStepHueCommandToDutWithStepModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6720,29 +5922,33 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:5U]; + params.transitionTime = [NSNumber numberWithUnsignedChar:5U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StepHue command to DUT with StepMode Up Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait150ms_9() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 150UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6751,12 +5957,12 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"Over TransitionTime, TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 5U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); @@ -6765,7 +5971,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveHueStopCommand_11() + CHIP_ERROR TestThSendsStepHueCommandToDutWithStepModeDown_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6773,14 +5979,16 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:3U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:5U]; + params.transitionTime = [NSNumber numberWithUnsignedChar:5U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveHueWithParams:params + [cluster stepHueWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move hue stop command Error: %@", err); + NSLog(@"TH sends StepHue command to DUT with StepMode Down Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6790,14 +5998,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait140ms_12() + CHIP_ERROR TestWait1000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 140UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_13() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6806,13 +6014,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"Over TransitionTime, TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 249U)); NextTest(); }]; @@ -6820,174 +6028,242 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait145ms_14() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 145UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_15() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait150ms_16() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 150UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_17() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestMoveHueDownCommand_18() +class Test_TC_CC_4_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CC_4_1() + : TestCommandBridge("Test_TC_CC_4_1") + , mTestIndex(0) { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move hue down command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestWait140ms_19() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 140UL; - return WaitForMs("alpha", value); - } + ~Test_TC_CC_4_1() {} - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_20() + /////////// TestCommand Interface ///////// + void NextTest() override { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + CHIP_ERROR err = CHIP_NO_ERROR; - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_1\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + Wait(); - NextTest(); - }]; + // 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 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { + NextTest(); + return; + } + err = TestThWrites0ToTheOptionsAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveToSaturation command to DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveToSaturationCommandToDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1500ms\n"); + err = TestWait1500ms_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentSaturation attribute from DUT.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestWait145ms_21() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 145UL; - return WaitForMs("alpha", value); - } + 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; + } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_22() + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 10; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mSaturationConfigValue; + 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 TestTurnOnLightForColorControlTests_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Turn on light for color control tests Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait150ms_23() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 150UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_24() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + } NextTest(); }]; @@ -6995,7 +6271,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveHueStopCommand_25() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7003,31 +6279,21 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move hue stop command Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait140ms_26() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 140UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_27() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7035,14 +6301,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7050,14 +6316,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait145ms_28() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 145UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_29() + CHIP_ERROR TestThSendsMoveToSaturationCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7065,29 +6324,32 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.saturation = mSaturationConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mSaturationConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:90U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait150ms_30() + CHIP_ERROR TestWait1500ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 150UL; + value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_31() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7095,14 +6357,20 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Over TransitionTime, TH reads CurrentSaturation attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue( + "CurrentSaturation", actualValue, mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U)); + } + + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7110,7 +6378,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_32() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -7127,7 +6395,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_33() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -7150,21 +6418,22 @@ class Test_TC_CC_3_2 : public TestCommandBridge { } }; -class Test_TC_CC_3_3 : public TestCommandBridge { +class Test_TC_CC_4_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_3_3() - : TestCommandBridge("Test_TC_CC_3_3") + Test_TC_CC_4_2() + : TestCommandBridge("Test_TC_CC_4_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_3_3() {} + ~Test_TC_CC_4_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -7172,11 +6441,11 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_3_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_3_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -7201,60 +6470,240 @@ class Test_TC_CC_3_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestReadsCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step hue up command\n"); - if (ShouldSkip("CC.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestStepHueUpCommand_4(); + err = TestThReadsCurrentSaturationAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); - err = TestWait1000ms_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Over TransitionTime,Read CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveSaturation command to DUT with MoveMode Up\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeReadCurrentHueAttributeFromDut_6(); + err = TestThSendsMoveSaturationCommandToDutWithMoveModeUp_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step hue down command\n"); - if (ShouldSkip("CC.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentSaturation attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestStepHueDownCommand_7(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); err = TestWait1000ms_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime,Read CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentSaturation attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeReadCurrentHueAttributeFromDut_9(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); + err = TestWait1000ms_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentSaturation attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends MoveSaturation command to DUT with MoveMode Down\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveSaturationCommandToDutWithMoveModeDown_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 1000ms\n"); + err = TestWait1000ms_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentSaturation attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); + err = TestWait1000ms_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentSaturation attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); + err = TestWait1000ms_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentSaturation attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_18(); + break; + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed " + "Saturation\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveSaturationCommandToDutWithMoveModeUpToTheMaximumAllowedSaturation_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 1000ms\n"); + err = TestWait1000ms_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_21(); + break; + case 22: + ChipLogProgress(chipTool, + " ***** Test Step 22 : TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " + "Maximum allowed.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMaximumAllowed_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 1000ms\n"); + err = TestWait1000ms_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads CurrentSaturation attribute from DUT.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); + err = TestWait1000ms_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : CurrentSaturation value Stops incrementing\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestCurrentSaturationValueStopsIncrementing_26(); + break; + case 27: + ChipLogProgress(chipTool, + " ***** Test Step 27 : TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed " + "Saturation\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveSaturationCommandToDutWithMoveModeDownToTheMinimumAllowedSaturation_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Wait 1000ms\n"); + err = TestWait1000ms_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : TH reads CurrentSaturation attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 1000ms\n"); + err = TestWait1000ms_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads CurrentSaturation attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_31(); + break; + case 32: + ChipLogProgress(chipTool, + " ***** Test Step 32 : TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " + "Minimum allowed\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMinimumAllowed_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Wait 1000ms\n"); + err = TestWait1000ms_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Wait 1000ms\n"); + err = TestWait1000ms_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : CurrentSaturation value Stops decrementing\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestCurrentSaturationValueStopsDecrementing_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38(); break; } @@ -7303,6 +6752,87 @@ class Test_TC_CC_3_3 : 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; + 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. @@ -7316,11 +6846,12 @@ class Test_TC_CC_3_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 39; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -7369,7 +6900,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7377,14 +6908,36 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentHue attribute from DUT Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7392,7 +6945,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStepHueUpCommand_4() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7400,32 +6953,32 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = [NSNumber numberWithUnsignedChar:5U]; - params.transitionTime = [NSNumber numberWithUnsignedChar:5U]; + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Step hue up command Error: %@", err); + [cluster moveSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveSaturation command to DUT with MoveMode Up 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 TestWait1000ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeReadCurrentHueAttributeFromDut_6() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7433,14 +6986,14 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime,Read CurrentHue attribute from DUT Error: %@", err); + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 5U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7448,7 +7001,14 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStepHueDownCommand_7() + CHIP_ERROR TestWait1000ms_8() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7456,32 +7016,29 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = [NSNumber numberWithUnsignedChar:5U]; - params.transitionTime = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Step hue down command Error: %@", err); + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT several times Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_8() + CHIP_ERROR TestWait1000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeReadCurrentHueAttributeFromDut_9() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7489,14 +7046,14 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime,Read CurrentHue attribute from DUT Error: %@", err); + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 249U)); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7504,81 +7061,536 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeDown_12() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:3U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveSaturation command to DUT with MoveMode Down 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 TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() + CHIP_ERROR TestWait1000ms_13() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_14() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT several times. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_CC_4_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_4_1() - : TestCommandBridge("Test_TC_CC_4_1") - , mTestIndex(0) + CHIP_ERROR TestWait1000ms_15() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_CC_4_1() {} - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_16() { - CHIP_ERROR err = CHIP_NO_ERROR; + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_1\n"); - } + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT several times. Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_17() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT several times. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeUpToTheMaximumAllowedSaturation_19() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + moveSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed Saturation Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_20() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_21() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMaximumAllowed_22() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " + @"Maximum allowed. Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_23() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + NSNumber * _Nonnull CurrentSaturationStep4d; + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_24() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + { + CurrentSaturationStep4d = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_25() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestCurrentSaturationValueStopsIncrementing_26() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"CurrentSaturation value Stops incrementing Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, CurrentSaturationStep4d)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeDownToTheMinimumAllowedSaturation_27() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:3U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + moveSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed Saturation Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_28() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + NSNumber * _Nonnull CurrentSaturationStep5b; + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_29() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT several times. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + { + CurrentSaturationStep5b = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_30() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_31() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT several times. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], CurrentSaturationStep5b)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMinimumAllowed_32() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " + @"Minimum allowed Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_33() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + NSNumber * _Nonnull CurrentSaturationStep5d; + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_34() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + { + CurrentSaturationStep5d = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_35() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestCurrentSaturationValueStopsDecrementing_36() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"CurrentSaturation value Stops decrementing Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, CurrentSaturationStep5d)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_37() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Turn off light that we turned on Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CC_4_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CC_4_3() + : TestCommandBridge("Test_TC_CC_4_3") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_CC_4_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_3\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++) { @@ -7595,59 +7607,60 @@ class Test_TC_CC_4_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Check Saturation attribute value matched before any change\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestCheckSaturationAttributeValueMatchedBeforeAnyChange_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Move to saturation command\n"); - if (ShouldSkip("CC.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestMoveToSaturationCommand_4(); + err = TestThReadsCurrentSaturationAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 6ms\n"); - err = TestWait6ms_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends StepSaturation command to DUT with StepMode Up\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { NextTest(); return; } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_6(); + err = TestThSendsStepSaturationCommandToDutWithStepModeUp_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 8ms\n"); - err = TestWait8ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime,TH read CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeTHReadCurrentSaturationAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends StepSaturation command to DUT with StepMode Down\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { NextTest(); return; } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8(); + err = TestThSendsStepSaturationCommandToDutWithStepModeDown_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 10ms\n"); - err = TestWait10ms_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); + err = TestWait1000ms_9(); break; case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Over TransitionTime,TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp")) { NextTest(); return; } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10(); + err = TestOverTransitionTimeTHReadsCurrentSaturationAttributeFromDut_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); @@ -7725,6 +7738,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -7773,7 +7787,29 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckSaturationAttributeValueMatchedBeforeAnyChange_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7782,11 +7818,11 @@ class Test_TC_CC_4_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Saturation attribute value matched before any change Error: %@", err); + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -7796,7 +7832,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveToSaturationCommand_4() + CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7804,31 +7840,33 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; - params.saturation = [NSNumber numberWithUnsignedChar:90U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; + __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:15U]; + params.transitionTime = [NSNumber numberWithUnsignedChar:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move to saturation command Error: %@", err); + [cluster stepSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StepSaturation command to DUT with StepMode Up 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 TestWait6ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 6UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_6() + CHIP_ERROR TestOverTransitionTimeTHReadCurrentSaturationAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7837,11 +7875,11 @@ class Test_TC_CC_4_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"Over TransitionTime,TH read CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -7851,14 +7889,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait8ms_7() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 8UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8() + CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepModeDown_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7866,29 +7897,33 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:3U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:15U]; + params.transitionTime = [NSNumber numberWithUnsignedChar:10U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StepSaturation command to DUT with StepMode Down Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10ms_9() + CHIP_ERROR TestWait1000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10() + CHIP_ERROR TestOverTransitionTimeTHReadsCurrentSaturationAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7897,11 +7932,11 @@ class Test_TC_CC_4_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"Over TransitionTime,TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -7951,21 +7986,23 @@ class Test_TC_CC_4_1 : public TestCommandBridge { } }; -class Test_TC_CC_4_2 : public TestCommandBridge { +class Test_TC_CC_4_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_4_2() - : TestCommandBridge("Test_TC_CC_4_2") + Test_TC_CC_4_4() + : TestCommandBridge("Test_TC_CC_4_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("hueConfigValue", 0, UINT8_MAX, &mHueConfigValue); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_4_2() {} + ~Test_TC_CC_4_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -7973,11 +8010,11 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -8002,320 +8039,81 @@ class Test_TC_CC_4_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Check Saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestCheckSaturationAttributeValueMatchedTheValueSentByTheLastCommand_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Move saturation up command\n"); - if (ShouldSkip("CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentHue attribute from DUT.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0000")) { NextTest(); return; } - err = TestMoveSaturationUpCommand_4(); + err = TestThReadsCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 40ms\n"); - err = TestWait40ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveToHueAndSaturation command to DUT.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C06.Rsp")) { NextTest(); return; } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_6(); + err = TestThSendsMoveToHueAndSaturationCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 45ms\n"); - err = TestWait45ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); + err = TestWait1500ms_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp")) { NextTest(); return; } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8(); + err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 50ms\n"); - err = TestWait50ms_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime, TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0001 && CC.S.C06.Rsp")) { NextTest(); return; } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10(); + err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Move saturation down command\n"); - if (ShouldSkip("CC.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestMoveSaturationDownCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 40ms\n"); - err = TestWait40ms_12(); + } + + 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 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 45ms\n"); - err = TestWait45ms_14(); - break; - case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 50ms\n"); - err = TestWait50ms_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Move saturation up command\n"); - if (ShouldSkip("CC.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestMoveSaturationUpCommand_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 40ms\n"); - err = TestWait40ms_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 45ms\n"); - err = TestWait45ms_21(); - break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 50ms\n"); - err = TestWait50ms_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Move saturation stop command\n"); - if (ShouldSkip("CC.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestMoveSaturationStopCommand_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Wait 40ms\n"); - err = TestWait40ms_26(); - break; - case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Wait 45ms\n"); - err = TestWait45ms_28(); - break; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 50ms\n"); - err = TestWait50ms_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Move saturation down command\n"); - if (ShouldSkip("CC.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestMoveSaturationDownCommand_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Wait 40ms\n"); - err = TestWait40ms_33(); - break; - case 34: - ChipLogProgress(chipTool, - " ***** Test Step 34 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Wait 45ms\n"); - err = TestWait45ms_35(); - break; - case 36: - ChipLogProgress(chipTool, - " ***** Test Step 36 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Wait 50ms\n"); - err = TestWait50ms_37(); - break; - case 38: - ChipLogProgress(chipTool, - " ***** Test Step 38 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Move saturation stop command\n"); - if (ShouldSkip("CC.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestMoveSaturationStopCommand_39(); - break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Wait 40ms\n"); - err = TestWait40ms_40(); - break; - case 41: - ChipLogProgress(chipTool, - " ***** Test Step 41 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Wait 45ms\n"); - err = TestWait45ms_42(); - break; - case 43: - ChipLogProgress(chipTool, - " ***** Test Step 43 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_43(); - break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Wait 50ms\n"); - err = TestWait50ms_44(); - break; - case 45: - ChipLogProgress(chipTool, - " ***** Test Step 45 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_46(); - break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_47(); - 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)); + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -8347,114 +8145,6 @@ class Test_TC_CC_4_2 : 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; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -8468,11 +8158,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 48; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mHueConfigValue; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -8521,62 +8213,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckSaturationAttributeValueMatchedTheValueSentByTheLastCommand_3() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Saturation attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMoveSaturationUpCommand_4() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move saturation up command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait40ms_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_6() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8584,29 +8221,21 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait45ms_7() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8614,14 +8243,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentHue attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -8629,14 +8258,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait50ms_9() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8645,11 +8267,11 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -8659,7 +8281,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveSaturationDownCommand_11() + CHIP_ERROR TestThSendsMoveToHueAndSaturationCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8667,31 +8289,34 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; + __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; + params.hue = mHueConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mHueConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:40U]; + params.saturation = mSaturationConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mSaturationConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:160U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move saturation down command Error: %@", err); + [cluster moveToHueAndSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToHueAndSaturation command to DUT. Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait40ms_12() + CHIP_ERROR TestWait1500ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; + value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_13() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8699,44 +8324,19 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Over TransitionTime, TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait45ms_14() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_15() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentHue", actualValue, mHueConfigValue.HasValue() ? mHueConfigValue.Value() : 40U)); + } - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -8744,14 +8344,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait50ms_16() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_17() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8760,11 +8353,17 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"Over TransitionTime, TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue( + "CurrentSaturation", actualValue, mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 160U)); + } + + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -8774,229 +8373,266 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveSaturationUpCommand_18() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move saturation up command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait40ms_19() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_20() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait45ms_21() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_22() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestWait50ms_23() +class Test_TC_CC_5_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CC_5_1() + : TestCommandBridge("Test_TC_CC_5_1") + , mTestIndex(0) { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; - return WaitForMs("alpha", value); + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("colorXConfigValue", 0, UINT16_MAX, &mColorXConfigValue); + AddArgument("colorYConfigValue", 0, UINT16_MAX, &mColorYConfigValue); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_24() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + ~Test_TC_CC_5_1() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_5_1\n"); + } - NextTest(); - }]; + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_5_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - return CHIP_NO_ERROR; - } + Wait(); - CHIP_ERROR TestMoveSaturationStopCommand_25() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move saturation stop command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; + // 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 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { + NextTest(); + return; + } + err = TestThWrites0ToTheOptionsAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsCurrentXAttributeFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsCurrentYAttributeFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveToColor command to DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveToColorCommandToDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); + err = TestWait1500ms_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestWait40ms_26() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; - return WaitForMs("alpha", value); + 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_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_27() + chip::System::Clock::Timeout GetWaitDuration() const override { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - NextTest(); - }]; +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 12; - return CHIP_NO_ERROR; - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mColorXConfigValue; + chip::Optional mColorYConfigValue; + chip::Optional mTimeout; - CHIP_ERROR TestWait45ms_28() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; - return WaitForMs("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_29() + CHIP_ERROR TestTurnOnLightForColorControlTests_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Turn on light for color control tests Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait50ms_30() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_31() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + } NextTest(); }]; @@ -9004,39 +8640,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveSaturationDownCommand_32() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move saturation down command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait40ms_33() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_34() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9044,29 +8648,21 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait45ms_35() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_36() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9074,14 +8670,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); NextTest(); }]; @@ -9089,14 +8685,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait50ms_37() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_38() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9104,14 +8693,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); NextTest(); }]; @@ -9119,7 +8708,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveSaturationStopCommand_39() + CHIP_ERROR TestThSendsMoveToColorCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9127,31 +8716,34 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; + __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; + params.colorX = mColorXConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mColorXConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:400U]; + params.colorY = mColorYConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mColorYConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:500U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move saturation stop command Error: %@", err); + [cluster moveToColorWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait40ms_40() + CHIP_ERROR TestWait1500ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; + value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_41() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9159,44 +8751,20 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Over TransitionTime, TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait45ms_42() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_43() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn( + CheckValue("CurrentX", actualValue, mColorXConfigValue.HasValue() ? mColorXConfigValue.Value() : 400U)); + } - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); NextTest(); }]; @@ -9204,14 +8772,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait50ms_44() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_45() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9219,14 +8780,20 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Over TransitionTime, TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + { + id actualValue = value; + VerifyOrReturn( + CheckValue("CurrentY", actualValue, mColorYConfigValue.HasValue() ? mColorYConfigValue.Value() : 500U)); + } + + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); NextTest(); }]; @@ -9234,7 +8801,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_46() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9251,7 +8818,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_47() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9274,21 +8841,23 @@ class Test_TC_CC_4_2 : public TestCommandBridge { } }; -class Test_TC_CC_4_3 : public TestCommandBridge { +class Test_TC_CC_5_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_4_3() - : TestCommandBridge("Test_TC_CC_4_3") + Test_TC_CC_5_2() + : TestCommandBridge("Test_TC_CC_5_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateXValue", INT16_MIN, INT16_MAX, &mRateXValue); + AddArgument("RateYValue", INT16_MIN, INT16_MAX, &mRateYValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_4_3() {} + ~Test_TC_CC_5_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -9296,11 +8865,11 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_5_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_5_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -9325,60 +8894,88 @@ class Test_TC_CC_4_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { NextTest(); return; } - err = TestReadsCurrentSaturationAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step saturation up command\n"); - if (ShouldSkip("CC.S.C05.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { NextTest(); return; } - err = TestStepSaturationUpCommand_4(); + err = TestThReadsCurrentXAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 10ms\n"); - err = TestWait10ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsCurrentYAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Over TransitionTime,Read CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveColor command to DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeReadCurrentSaturationAttributeFromDut_6(); + err = TestThSendsMoveColorCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step saturation down command\n"); - if (ShouldSkip("CC.S.C05.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1000ms\n"); + err = TestWait1000ms_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestStepSaturationDownCommand_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 10ms\n"); - err = TestWait10ms_8(); + err = TestThReadsCurrentXAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime,Reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeReadsCurrentSaturationAttributeFromDut_9(); + err = TestThReadsCurrentYAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C47.Rsp")) { + NextTest(); + return; + } + err = TestThSendsStopMoveStepCommandToDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C47.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentXAttributeFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C47.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentYAttributeFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_14(); break; } @@ -9427,6 +9024,15 @@ class Test_TC_CC_4_3 : 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. @@ -9440,11 +9046,13 @@ class Test_TC_CC_4_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 15; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateXValue; + chip::Optional mRateYValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -9493,7 +9101,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentSaturationAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9501,22 +9109,22 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentSaturation attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentXValue; - CHIP_ERROR TestStepSaturationUpCommand_4() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9524,32 +9132,26 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = [NSNumber numberWithUnsignedChar:15U]; - params.transitionTime = [NSNumber numberWithUnsignedChar:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Step saturation up command Error: %@", err); + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + { + CurrentXValue = value; + } - return CHIP_NO_ERROR; - } + NextTest(); + }]; - CHIP_ERROR TestWait10ms_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; - return WaitForMs("alpha", value); + return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentYValue; - CHIP_ERROR TestOverTransitionTimeReadCurrentSaturationAttributeFromDut_6() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9557,14 +9159,17 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime,Read CurrentSaturation attribute from DUT Error: %@", err); + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + CurrentYValue = value; + } NextTest(); }]; @@ -9572,7 +9177,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStepSaturationDownCommand_7() + CHIP_ERROR TestThSendsMoveColorCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9580,32 +9185,32 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = [NSNumber numberWithUnsignedChar:20U]; - params.transitionTime = [NSNumber numberWithUnsignedChar:10U]; + __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; + params.rateX = mRateXValue.HasValue() ? [NSNumber numberWithShort:mRateXValue.Value()] : [NSNumber numberWithShort:50]; + params.rateY = mRateYValue.HasValue() ? [NSNumber numberWithShort:mRateYValue.Value()] : [NSNumber numberWithShort:50]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Step saturation down command Error: %@", err); + [cluster moveColorWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveColor command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10ms_8() + CHIP_ERROR TestWait1000ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } + NSNumber * _Nonnull CurrentXBeforeStopCommand; - CHIP_ERROR TestOverTransitionTimeReadsCurrentSaturationAttributeFromDut_9() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9613,88 +9218,189 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime,Reads CurrentSaturation attribute from DUT Error: %@", err); + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], CurrentXValue)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + { + CurrentXBeforeStopCommand = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentYBeforeStopCommand; - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], CurrentYValue)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + CurrentYBeforeStopCommand = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stopMoveStepWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StopMoveStep command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], CurrentXBeforeStopCommand)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_CC_4_4 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_4_4() - : TestCommandBridge("Test_TC_CC_4_4") - , mTestIndex(0) + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_12() { - 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_CC_4_4() {} - + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], CurrentYBeforeStopCommand)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_13() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Turn off light that we turned on Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_14() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CC_5_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CC_5_3() + : TestCommandBridge("Test_TC_CC_5_3") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepXConfigValue", INT16_MIN, INT16_MAX, &mStepXConfigValue); + AddArgument("StepYConfigValue", INT16_MIN, INT16_MAX, &mStepYConfigValue); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_CC_5_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_5_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_5_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -9719,58 +9425,64 @@ class Test_TC_CC_4_4 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Check current hue attribute value matched before any change\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedBeforeAnyChange_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Check Saturation attribute value matched before any change\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { NextTest(); return; } - err = TestCheckSaturationAttributeValueMatchedBeforeAnyChange_4(); + err = TestThReadsCurrentXAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Move To current hue and saturation command\n"); - if (ShouldSkip("CC.S.C06.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { NextTest(); return; } - err = TestMoveToCurrentHueAndSaturationCommand_5(); + err = TestThReadsCurrentYAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 10ms\n"); - err = TestWait10ms_6(); - break; - case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends StepColor command to DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C09.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_7(); + err = TestThSendsStepColorCommandToDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); + err = TestWait1500ms_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C09.Rsp")) { NextTest(); return; } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8(); + err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C09.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); break; } @@ -9816,6 +9528,9 @@ class Test_TC_CC_4_4 : 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; } // Go on to the next test. @@ -9829,11 +9544,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepXConfigValue; + chip::Optional mStepYConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -9882,7 +9599,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedBeforeAnyChange_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9890,22 +9607,49 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched before any change Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull CurrentXValue; + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + { + CurrentXValue = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentYValue; - CHIP_ERROR TestCheckSaturationAttributeValueMatchedBeforeAnyChange_4() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9913,14 +9657,17 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Saturation attribute value matched before any change Error: %@", err); + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + CurrentYValue = value; + } NextTest(); }]; @@ -9928,7 +9675,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveToCurrentHueAndSaturationCommand_5() + CHIP_ERROR TestThSendsStepColorCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9936,32 +9683,34 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; - params.hue = [NSNumber numberWithUnsignedChar:40U]; - params.saturation = [NSNumber numberWithUnsignedChar:160U]; + __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; + params.stepX + = mStepXConfigValue.HasValue() ? [NSNumber numberWithShort:mStepXConfigValue.Value()] : [NSNumber numberWithShort:100]; + params.stepY + = mStepYConfigValue.HasValue() ? [NSNumber numberWithShort:mStepYConfigValue.Value()] : [NSNumber numberWithShort:100]; params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToHueAndSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move To current hue and saturation command Error: %@", err); + [cluster stepColorWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StepColor command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10ms_6() + CHIP_ERROR TestWait1500ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; + value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_7() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9969,14 +9718,14 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Over TransitionTime, TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], CurrentXValue)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); NextTest(); }]; @@ -9984,7 +9733,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9992,14 +9741,14 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Over TransitionTime, TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], CurrentYValue)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); NextTest(); }]; @@ -10007,7 +9756,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -10024,7 +9773,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -10047,11 +9796,11 @@ class Test_TC_CC_4_4 : public TestCommandBridge { } }; -class Test_TC_CC_5_1 : public TestCommandBridge { +class Test_TC_CC_6_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_5_1() - : TestCommandBridge("Test_TC_CC_5_1") + Test_TC_CC_6_1() + : TestCommandBridge("Test_TC_CC_6_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -10061,7 +9810,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_5_1() {} + ~Test_TC_CC_6_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -10069,11 +9818,11 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_5_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_6_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_5_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_6_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -10098,58 +9847,64 @@ class Test_TC_CC_5_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Check current x attribute value matched before any change\n"); - if (ShouldSkip("CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A000f")) { NextTest(); return; } - err = TestCheckCurrentXAttributeValueMatchedBeforeAnyChange_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Check current y attribute value matched before any change\n"); - if (ShouldSkip("CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestCheckCurrentYAttributeValueMatchedBeforeAnyChange_4(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Move to Color command\n"); - if (ShouldSkip("CC.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { NextTest(); return; } - err = TestMoveToColorCommand_5(); + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 20ms\n"); - err = TestWait20ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Check current x attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Move To Color Temperature command\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C0A.Rsp")) { NextTest(); return; } - err = TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_7(); + err = TestMoveToColorTemperatureCommand_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Check current y attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1500ms\n"); + err = TestWait1500ms_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read current color temprature\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_9(); + err = TestReadCurrentColorTemprature_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); break; } @@ -10195,6 +9950,9 @@ class Test_TC_CC_5_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; } // Go on to the next test. @@ -10208,7 +9966,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -10261,7 +10019,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckCurrentXAttributeValueMatchedBeforeAnyChange_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10269,22 +10027,22 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current x attribute value matched before any change Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull ColorTempPhysicalMinMiredsValue; - CHIP_ERROR TestCheckCurrentYAttributeValueMatchedBeforeAnyChange_4() + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10292,22 +10050,27 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current y attribute value matched before any change Error: %@", err); + [cluster + readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); + { + ColorTempPhysicalMinMiredsValue = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestMoveToColorCommand_5() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10315,32 +10078,26 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; - params.colorX = [NSNumber numberWithUnsignedShort:200U]; - params.colorY = [NSNumber numberWithUnsignedShort:300U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move to Color command Error: %@", err); + [cluster + readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT. Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); + { + ColorTempPhysicalMaxMiredsValue = value; + } - return CHIP_NO_ERROR; - } + NextTest(); + }]; - CHIP_ERROR TestWait20ms_6() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 20UL; - return WaitForMs("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_7() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10348,14 +10105,16 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current x attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -10363,7 +10122,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_8() + CHIP_ERROR TestMoveToColorTemperatureCommand_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10371,14 +10130,53 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current y attribute value matched the value sent by the last command Error: %@", err); + __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; + params.colorTemperature = [ColorTempPhysicalMaxMiredsValue copy]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToColorTemperatureWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Move To Color Temperature command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1500ms_8() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1500UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadCurrentColorTemprature_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTempPhysicalMaxMiredsValue)); + } + + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -10386,7 +10184,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -10403,7 +10201,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -10426,11 +10224,11 @@ class Test_TC_CC_5_1 : public TestCommandBridge { } }; -class Test_TC_CC_5_2 : public TestCommandBridge { +class Test_TC_CC_6_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_5_2() - : TestCommandBridge("Test_TC_CC_5_2") + Test_TC_CC_6_2() + : TestCommandBridge("Test_TC_CC_6_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -10440,7 +10238,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_5_2() {} + ~Test_TC_CC_6_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -10448,11 +10246,11 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_5_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_6_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_5_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_6_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -10477,84 +10275,236 @@ class Test_TC_CC_5_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Check current x attribute value matched before any change\n"); - if (ShouldSkip("CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A000f")) { NextTest(); return; } - err = TestCheckCurrentXAttributeValueMatchedBeforeAnyChange_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Check current y attribute value matched before any change\n"); - if (ShouldSkip("CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestCheckCurrentYAttributeValueMatchedBeforeAnyChange_4(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Move Color command\n"); - if (ShouldSkip("CC.S.C08.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { NextTest(); return; } - err = TestMoveColorCommand_5(); + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 150ms\n"); - err = TestWait150ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Check current x attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_7(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Check current y attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); + err = TestWait1000ms_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_8(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Stop Move Step command\n"); - if (ShouldSkip("CC.S.C47.Rsp")) { + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); + err = TestWait1000ms_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestStopMoveStepCommand_9(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_11(); break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Check current x attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0003")) { + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); + err = TestWait1000ms_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_10(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_13(); break; - case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : Check current y attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0004")) { + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_11(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_14(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_12(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); + err = TestWait1000ms_15(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_13(); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); + err = TestWait1000ms_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 1000ms\n"); + err = TestWait1000ms_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 1000ms\n"); + err = TestWait1000ms_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); + err = TestWait1000ms_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); + err = TestWait1000ms_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Wait 1000ms\n"); + err = TestWait1000ms_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Wait 1000ms\n"); + err = TestWait1000ms_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Wait 1000ms\n"); + err = TestWait1000ms_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38(); break; } @@ -10609,6 +10559,81 @@ class Test_TC_CC_5_2 : 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; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 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. @@ -10622,7 +10647,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 39; chip::Optional mNodeId; chip::Optional mCluster; @@ -10675,7 +10700,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckCurrentXAttributeValueMatchedBeforeAnyChange_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10683,22 +10708,50 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current x attribute value matched before any change Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + NextTest(); + }]; - NextTest(); - }]; + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull ColorTempPhysicalMinMiredsValue; + + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); + { + ColorTempPhysicalMinMiredsValue = value; + } + + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestCheckCurrentYAttributeValueMatchedBeforeAnyChange_4() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10706,14 +10759,43 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current y attribute value matched before any change Error: %@", err); + [cluster + readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); + { + ColorTempPhysicalMaxMiredsValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -10721,7 +10803,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveColorCommand_5() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10729,31 +10811,33 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; - params.rateX = [NSNumber numberWithShort:15]; - params.rateY = [NSNumber numberWithShort:20]; + __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; + params.rate = [NSNumber numberWithUnsignedShort:20U]; + params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; + params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move Color command Error: %@", err); + [cluster moveColorTemperatureWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveColorTemperature command to DUT with MoveMode = Up 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 TestWait150ms_6() + CHIP_ERROR TestWait1000ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 150UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_7() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10761,14 +10845,16 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current x attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -10776,7 +10862,14 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_8() + CHIP_ERROR TestWait1000ms_10() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10784,14 +10877,16 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current y attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -10799,7 +10894,14 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStopMoveStepCommand_9() + CHIP_ERROR TestWait1000ms_12() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10807,22 +10909,58 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_14() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:3U]; + params.rate = [NSNumber numberWithUnsignedShort:20U]; + params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; + params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stopMoveStepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Stop Move Step command Error: %@", err); + [cluster moveColorTemperatureWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveColorTemperature command to DUT with MoveMode = Down 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 TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_10() + CHIP_ERROR TestWait1000ms_15() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10830,14 +10968,16 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current x attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -10845,7 +10985,14 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_11() + CHIP_ERROR TestWait1000ms_17() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10853,14 +11000,16 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current y attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -10868,37 +11017,120 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_12() + CHIP_ERROR TestWait1000ms_19() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_20() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_13() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_21() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; + params.rate = [NSNumber numberWithUnsignedShort:20U]; + params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; + params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveColorTemperatureWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveColorTemperature command to DUT with MoveMode = Up Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_22() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedShort:20U]; + params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; + params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveColorTemperatureWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveColorTemperature command to DUT with MoveMode = Stop Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_23() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + NSNumber * _Nonnull ColorTemperatureValue; + + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_24() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + ColorTemperatureValue = value; } NextTest(); @@ -10906,193 +11138,37 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } -}; -class Test_TC_CC_5_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_5_3() - : TestCommandBridge("Test_TC_CC_5_3") - , mTestIndex(0) + CHIP_ERROR TestWait1000ms_25() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_5_3() {} - - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_26() { - CHIP_ERROR err = CHIP_NO_ERROR; + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_5_3\n"); - } + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_5_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureValue)); + } - // 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 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Check current x attribute value matched before any change\n"); - if (ShouldSkip("CC.S.A0003")) { - NextTest(); - return; - } - err = TestCheckCurrentXAttributeValueMatchedBeforeAnyChange_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Check current y attribute value matched before any change\n"); - if (ShouldSkip("CC.S.A0004")) { - NextTest(); - return; - } - err = TestCheckCurrentYAttributeValueMatchedBeforeAnyChange_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step Color command\n"); - if (ShouldSkip("CC.S.C09.Rsp")) { - NextTest(); - return; - } - err = TestStepColorCommand_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 50ms\n"); - err = TestWait50ms_6(); - break; - case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Check current x attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0003")) { - NextTest(); - return; - } - err = TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_7(); - break; - case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Check current y attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0004")) { - NextTest(); - return; - } - err = TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -11100,29 +11176,44 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestWait1000ms_27() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_28() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureValue)); } + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckCurrentXAttributeValueMatchedBeforeAnyChange_3() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11130,22 +11221,26 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current x attribute value matched before any change Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:3U]; + params.rate = [NSNumber numberWithUnsignedShort:20U]; + params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; + params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveColorTemperatureWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveColorTemperature command to DUT with MoveMode = Down Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckCurrentYAttributeValueMatchedBeforeAnyChange_4() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11153,22 +11248,34 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current y attribute value matched before any change Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedShort:20U]; + params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; + params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveColorTemperatureWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveColorTemperature command to DUT with MoveMode = Stop Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStepColorCommand_5() + CHIP_ERROR TestWait1000ms_31() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + NSNumber * _Nonnull ColorTemperatureMoveModeStop; + + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11176,32 +11283,34 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; - params.stepX = [NSNumber numberWithShort:15]; - params.stepY = [NSNumber numberWithShort:20]; - params.transitionTime = [NSNumber numberWithUnsignedShort:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Step Color command Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); + { + ColorTemperatureMoveModeStop = value; + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait50ms_6() + CHIP_ERROR TestWait1000ms_33() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_7() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11209,14 +11318,21 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current x attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureMoveModeStop)); + } + + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -11224,7 +11340,14 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_8() + CHIP_ERROR TestWait1000ms_35() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11232,14 +11355,21 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current y attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureValue)); + } + + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -11247,7 +11377,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11264,7 +11394,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11287,11 +11417,11 @@ class Test_TC_CC_5_3 : public TestCommandBridge { } }; -class Test_TC_CC_6_1 : public TestCommandBridge { +class Test_TC_CC_6_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_6_1() - : TestCommandBridge("Test_TC_CC_6_1") + Test_TC_CC_6_3() + : TestCommandBridge("Test_TC_CC_6_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -11301,7 +11431,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_6_1() {} + ~Test_TC_CC_6_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -11309,11 +11439,11 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_6_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_6_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_6_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_6_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -11338,40 +11468,132 @@ class Test_TC_CC_6_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read current color temprature\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A000f")) { NextTest(); return; } - err = TestReadCurrentColorTemprature_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Move To Color Temperature command\n"); - if (ShouldSkip("CC.S.C0A.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestMoveToColorTemperatureCommand_4(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 700ms\n"); - err = TestWait700ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { + NextTest(); + return; + } + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read current color temprature\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestReadCurrentColorTemprature_6(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends StepColorTemperature command to DUT with MoveMode = Up\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp")) { + NextTest(); + return; + } + err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 500ms\n"); + err = TestWait500ms_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 500ms\n"); + err = TestWait500ms_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 700ms\n"); + err = TestWait700ms_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends StepColorTemperature command to DUT with MoveMode = Down\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp")) { + NextTest(); + return; + } + err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 500ms\n"); + err = TestWait500ms_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); + err = TestWait500ms_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 500ms\n"); + err = TestWait500ms_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); break; } @@ -11411,6 +11633,48 @@ class Test_TC_CC_6_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -11424,7 +11688,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -11477,7 +11741,85 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadCurrentColorTemprature_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull ColorTempPhysicalMinMiredsValue; + + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); + { + ColorTempPhysicalMinMiredsValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; + + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); + { + ColorTempPhysicalMaxMiredsValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11486,13 +11828,15 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature Error: %@", err); + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -11500,7 +11844,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveToColorTemperatureCommand_4() + CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11508,31 +11852,34 @@ class Test_TC_CC_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; - params.colorTemperature = [NSNumber numberWithUnsignedShort:100U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:5U]; + __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = [NSNumber numberWithUnsignedShort:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:15U]; + params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; + params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move To Color Temperature command Error: %@", err); + [cluster stepColorTemperatureWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StepColorTemperature command to DUT with MoveMode = Up 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 TestWait700ms_5() + CHIP_ERROR TestWait500ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 700UL; + value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTemprature_6() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11541,16 +11888,11 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature Error: %@", err); + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorTemperature", actualValue, 100U)); - } - - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); @@ -11560,73 +11902,252 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_7() + CHIP_ERROR TestWait500ms_10() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() + CHIP_ERROR TestWait700ms_12() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 700UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_13() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_CC_6_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_6_2() - : TestCommandBridge("Test_TC_CC_6_2") - , mTestIndex(0) + CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_14() { - 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"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - ~Test_TC_CC_6_2() {} + __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:3U]; + params.stepSize = [NSNumber numberWithUnsignedShort:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; + params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; + params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepColorTemperatureWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StepColorTemperature command to DUT with MoveMode = Down 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_CC_6_2\n"); - } + NextTest(); + }]; - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_6_2\n"); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait500ms_15() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait500ms_17() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait500ms_19() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_20() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_21() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Turn off light that we turned on Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CC_7_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CC_7_2() + : TestCommandBridge("Test_TC_CC_7_2") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT16_MAX, &mRateConfigValue); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_CC_7_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -11651,212 +12172,172 @@ class Test_TC_CC_6_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read current color temprature\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A000f")) { NextTest(); return; } - err = TestReadCurrentColorTemprature_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Move up color temperature command\n"); - if (ShouldSkip("CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { NextTest(); return; } - err = TestMoveUpColorTemperatureCommand_4(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 90ms\n"); - err = TestWait90ms_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends EnhancedMoveHue command to DUT with MoveMode Up\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_6(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_5(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 95ms\n"); - err = TestWait95ms_7(); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_6(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.A0007")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_8(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_7(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 100ms\n"); - err = TestWait100ms_9(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); + err = TestWait1000ms_8(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.A0007")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_10(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); + err = TestWait1000ms_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Move down color temperature command\n"); - if (ShouldSkip("CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestMoveDownColorTemperatureCommand_11(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 190ms\n"); - err = TestWait190ms_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_13(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 195ms\n"); - err = TestWait195ms_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); + err = TestWait1000ms_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_15(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 200ms\n"); - err = TestWait200ms_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends EnhancedMoveHue command to DUT with MoveMode Down\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_17(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); + err = TestWait500ms_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Move up color temperature command\n"); - if (ShouldSkip("CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestMoveUpColorTemperatureCommand_18(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Stop Color Temperature command\n"); - if (ShouldSkip("CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 500ms\n"); + err = TestWait500ms_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestStopColorTemperatureCommand_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 90ms\n"); - err = TestWait90ms_20(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 500ms\n"); + err = TestWait500ms_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 95ms\n"); - err = TestWait95ms_22(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 23 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_23(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Wait 100ms\n"); - err = TestWait100ms_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_25(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); + err = TestWait1000ms_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Move down color temperature command\n"); - if (ShouldSkip("CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestMoveDownColorTemperatureCommand_26(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Stop Color Temperature command\n"); - if (ShouldSkip("CC.S.C4B.Rsp")) { - NextTest(); - return; - } - err = TestStopColorTemperatureCommand_27(); + ChipLogProgress(chipTool, " ***** Test Step 27 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Wait 140ms\n"); - err = TestWait140ms_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.A0007")) { - NextTest(); - return; - } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 145ms\n"); - err = TestWait145ms_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.A0007")) { - NextTest(); - return; - } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Wait 150ms\n"); - err = TestWait150ms_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.A0007")) { - NextTest(); - return; - } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_35(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28(); break; } @@ -11956,27 +12437,6 @@ class Test_TC_CC_6_2 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - 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; } // Go on to the next test. @@ -11990,11 +12450,12 @@ class Test_TC_CC_6_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 36; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -12043,7 +12504,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadCurrentColorTemprature_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12051,14 +12512,36 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -12066,7 +12549,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveUpColorTemperatureCommand_4() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12074,33 +12557,32 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move up color temperature command Error: %@", err); + [cluster enhancedMoveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveHue command to DUT with MoveMode Up 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 TestWait90ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 90UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_6() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12108,14 +12590,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -12123,14 +12605,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait95ms_7() + CHIP_ERROR TestWait1000ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 95UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_8() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12138,14 +12620,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -12153,14 +12635,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_9() + CHIP_ERROR TestWait1000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_10() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12168,14 +12650,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -12183,7 +12665,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveDownColorTemperatureCommand_11() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12191,33 +12673,25 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedShort:20U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move down color temperature command Error: %@", err); + [cluster enhancedMoveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveHue command to DUT with MoveMode Stop Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull EnhancedCurrentHueStep3b; - CHIP_ERROR TestWait190ms_12() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 190UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_13() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12225,14 +12699,17 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + { + EnhancedCurrentHueStep3b = value; + } NextTest(); }]; @@ -12240,14 +12717,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait195ms_14() + CHIP_ERROR TestWait1000ms_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 195UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_15() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12255,44 +12732,19 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait200ms_16() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 200UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_17() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueStep3b)); + } - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -12300,34 +12752,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveUpColorTemperatureCommand_18() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move up color temperature command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStopColorTemperatureCommand_19() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12335,33 +12760,32 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:3U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Stop Color Temperature command Error: %@", err); + [cluster enhancedMoveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveHue command to DUT with MoveMode Down 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 TestWait90ms_20() + CHIP_ERROR TestWait500ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 90UL; + value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_21() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12369,14 +12793,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -12384,14 +12808,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait95ms_22() + CHIP_ERROR TestWait500ms_19() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 95UL; + value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_23() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12399,14 +12823,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -12414,14 +12838,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_24() + CHIP_ERROR TestWait500ms_21() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_25() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12429,14 +12853,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -12444,34 +12868,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveDownColorTemperatureCommand_26() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedShort:20U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move down color temperature command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStopColorTemperatureCommand_27() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12479,33 +12876,25 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; + params.rate = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Stop Color Temperature command Error: %@", err); + [cluster enhancedMoveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveHue command to DUT with MoveMode Stop Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull EnhancedCurrentHueStep5b; - CHIP_ERROR TestWait140ms_28() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 140UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_29() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12513,14 +12902,17 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + { + EnhancedCurrentHueStep5b = value; + } NextTest(); }]; @@ -12528,14 +12920,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait145ms_30() + CHIP_ERROR TestWait1000ms_25() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 145UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_31() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12543,14 +12935,19 @@ class Test_TC_CC_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueStep5b)); + } + + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -12558,54 +12955,24 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait150ms_32() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 150UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_33() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_27() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_34() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_35() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -12628,21 +12995,22 @@ class Test_TC_CC_6_2 : public TestCommandBridge { } }; -class Test_TC_CC_6_3 : public TestCommandBridge { +class Test_TC_CC_7_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_6_3() - : TestCommandBridge("Test_TC_CC_6_3") + Test_TC_CC_7_3() + : TestCommandBridge("Test_TC_CC_7_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT16_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_6_3() {} + ~Test_TC_CC_7_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -12650,11 +13018,11 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_6_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_6_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -12679,108 +13047,68 @@ class Test_TC_CC_6_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read current color temprature\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A000f")) { NextTest(); return; } - err = TestReadCurrentColorTemprature_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step up color temperature command\n"); - if (ShouldSkip("CC.S.C4C.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { NextTest(); return; } - err = TestStepUpColorTemperatureCommand_4(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 40ms\n"); - err = TestWait40ms_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read current color temprature\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends EnhancedStepHue command to DUT with StepMode Up\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C42.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTemprature_6(); + err = TestThSendsEnhancedStepHueCommandToDutWithStepModeUp_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 45ms\n"); - err = TestWait45ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read current color temprature\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends EnhancedStepHue command to DUT with StepMode Down\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C42.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTemprature_8(); + err = TestThSendsEnhancedStepHueCommandToDutWithStepModeDown_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 50ms\n"); - err = TestWait50ms_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); + err = TestWait1000ms_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read current color temprature\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTemprature_10(); + err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step down color temperature command\n"); - if (ShouldSkip("CC.S.C4C.Rsp")) { - NextTest(); - return; - } - err = TestStepDownColorTemperatureCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 40ms\n"); - err = TestWait40ms_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read current color temprature\n"); - if (ShouldSkip("CC.S.A0007")) { - NextTest(); - return; - } - err = TestReadCurrentColorTemprature_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 45ms\n"); - err = TestWait45ms_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read current color temprature\n"); - if (ShouldSkip("CC.S.A0007")) { - NextTest(); - return; - } - err = TestReadCurrentColorTemprature_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 50ms\n"); - err = TestWait50ms_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read current color temprature\n"); - if (ShouldSkip("CC.S.A0007")) { - NextTest(); - return; - } - err = TestReadCurrentColorTemprature_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); break; } @@ -12832,27 +13160,6 @@ class Test_TC_CC_6_3 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - 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. @@ -12866,11 +13173,12 @@ class Test_TC_CC_6_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -12919,30 +13227,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadCurrentColorTemprature_3() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStepUpColorTemperatureCommand_4() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12950,17 +13235,11 @@ class Test_TC_CC_6_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = [NSNumber numberWithUnsignedShort:5U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:50U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:5U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:100U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepColorTemperatureWithParams:params + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Step up color temperature command Error: %@", err); + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12970,74 +13249,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait40ms_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTemprature_6() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait45ms_7() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTemprature_8() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait50ms_9() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTemprature_10() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13045,14 +13257,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -13060,7 +13272,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStepDownColorTemperatureCommand_11() + CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13068,34 +13280,33 @@ class Test_TC_CC_6_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = [NSNumber numberWithUnsignedShort:5U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:50U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:5U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:100U]; + __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:0U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Step down color temperature command Error: %@", err); + [cluster enhancedStepHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedStepHue command to DUT with StepMode Up 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 TestWait40ms_12() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTemprature_13() + CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13103,14 +13314,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Over TransitionTime,Read EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -13118,14 +13329,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait45ms_14() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTemprature_15() + CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepModeDown_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13133,29 +13337,33 @@ class Test_TC_CC_6_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster enhancedStepHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedStepHue command to DUT with StepMode Down Error: %@", err); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait50ms_16() + CHIP_ERROR TestWait1000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTemprature_17() + CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13163,14 +13371,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Over TransitionTime,Read EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -13178,7 +13386,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_18() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -13195,7 +13403,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -13218,21 +13426,23 @@ class Test_TC_CC_6_3 : public TestCommandBridge { } }; -class Test_TC_CC_7_1 : public TestCommandBridge { +class Test_TC_CC_7_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_7_1() - : TestCommandBridge("Test_TC_CC_7_1") + Test_TC_CC_7_4() + : TestCommandBridge("Test_TC_CC_7_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("EnhancedHueConfigValue", 0, UINT16_MAX, &mEnhancedHueConfigValue); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_7_1() {} + ~Test_TC_CC_7_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -13240,11 +13450,11 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -13269,217 +13479,49 @@ class Test_TC_CC_7_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Enhanced Move To Hue command\n"); - if (ShouldSkip("CC.S.C40.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A000f")) { NextTest(); return; } - err = TestEnhancedMoveToHueCommand_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_4(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Enhanced Move To Hue command\n"); - if (ShouldSkip("CC.S.C40.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends EnhancedMoveToHueAndSaturation command to DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C43.Rsp")) { NextTest(); return; } - err = TestEnhancedMoveToHueCommand_5(); + err = TestThSendsEnhancedMoveToHueAndSaturationCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 290ms\n"); - err = TestWait290ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1500ms\n"); + err = TestWait1500ms_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C43.Rsp")) { NextTest(); return; } err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 295ms\n"); - err = TestWait295ms_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 300ms\n"); - err = TestWait300ms_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Enhanced Move To Hue command\n"); - if (ShouldSkip("CC.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestEnhancedMoveToHueCommand_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 290ms\n"); - err = TestWait290ms_13(); - break; - case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 295ms\n"); - err = TestWait295ms_15(); - break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 300ms\n"); - err = TestWait300ms_17(); - break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Enhanced Move To Hue command\n"); - if (ShouldSkip("CC.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestEnhancedMoveToHueCommand_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 290ms\n"); - err = TestWait290ms_20(); - break; - case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 295ms\n"); - err = TestWait295ms_22(); - break; - case 23: - ChipLogProgress(chipTool, - " ***** Test Step 23 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Wait 300ms\n"); - err = TestWait300ms_24(); - break; - case 25: - ChipLogProgress(chipTool, - " ***** Test Step 25 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Enhanced Move To Hue command\n"); - if (ShouldSkip("CC.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestEnhancedMoveToHueCommand_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 290ms\n"); - err = TestWait290ms_27(); - break; - case 28: - ChipLogProgress(chipTool, - " ***** Test Step 28 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Wait 295ms\n"); - err = TestWait295ms_29(); - break; - case 30: - ChipLogProgress(chipTool, - " ***** Test Step 30 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Wait 300ms\n"); - err = TestWait300ms_31(); - break; - case 32: - ChipLogProgress(chipTool, - " ***** Test Step 32 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_34(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9(); break; } @@ -13522,81 +13564,6 @@ class Test_TC_CC_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; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - 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; } // Go on to the next test. @@ -13610,11 +13577,13 @@ class Test_TC_CC_7_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 35; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mEnhancedHueConfigValue; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -13663,7 +13632,7 @@ class Test_TC_CC_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestEnhancedMoveToHueCommand_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13671,25 +13640,21 @@ class Test_TC_CC_7_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; - params.enhancedHue = [NSNumber numberWithUnsignedShort:1025U]; - params.direction = [NSNumber numberWithUnsignedChar:0U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:1U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced Move To Hue command Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_4() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13698,11 +13663,11 @@ class Test_TC_CC_7_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -13712,7 +13677,7 @@ class Test_TC_CC_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestEnhancedMoveToHueCommand_5() + CHIP_ERROR TestThSendsEnhancedMoveToHueAndSaturationCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13720,28 +13685,30 @@ class Test_TC_CC_7_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; - params.enhancedHue = [NSNumber numberWithUnsignedShort:1100U]; - params.direction = [NSNumber numberWithUnsignedChar:0U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; + params.enhancedHue = mEnhancedHueConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mEnhancedHueConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:1200U]; + params.saturation = mSaturationConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mSaturationConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:90U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced Move To Hue command Error: %@", err); + [cluster enhancedMoveToHueAndSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveToHueAndSaturation command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait290ms_6() + CHIP_ERROR TestWait1500ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; + value.ms = 1500UL; return WaitForMs("alpha", value); } @@ -13758,7 +13725,13 @@ class Test_TC_CC_7_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, + mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1200U)); + } + + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -13768,469 +13741,66 @@ class Test_TC_CC_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait295ms_8() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_9() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_8() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait300ms_10() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_11() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestEnhancedMoveToHueCommand_12() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; - params.enhancedHue = [NSNumber numberWithUnsignedShort:1150U]; - params.direction = [NSNumber numberWithUnsignedChar:1U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced Move To Hue command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait290ms_13() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_14() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait295ms_15() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_16() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait300ms_17() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_18() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestEnhancedMoveToHueCommand_19() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; - params.enhancedHue = [NSNumber numberWithUnsignedShort:1200U]; - params.direction = [NSNumber numberWithUnsignedChar:2U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced Move To Hue command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait290ms_20() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_21() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait295ms_22() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_23() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait300ms_24() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_25() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestEnhancedMoveToHueCommand_26() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; - params.enhancedHue = [NSNumber numberWithUnsignedShort:1300U]; - params.direction = [NSNumber numberWithUnsignedChar:3U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced Move To Hue command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait290ms_27() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_28() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait295ms_29() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_30() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait300ms_31() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_32() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_33() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_34() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_7_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_7_2() - : TestCommandBridge("Test_TC_CC_7_2") - , mTestIndex(0) +class Test_TC_CC_8_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CC_8_1() + : TestCommandBridge("Test_TC_CC_8_1") + , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); + AddArgument("RateXConfigValue", INT16_MIN, INT16_MAX, &mRateXConfigValue); + AddArgument("RateYConfigValue", INT16_MIN, INT16_MAX, &mRateYConfigValue); + AddArgument("ColorTemperatureMinMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMinMiredsConfigValue); + AddArgument("ColorTemperatureMaxMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMaxMiredsConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_7_2() {} + ~Test_TC_CC_8_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -14238,11 +13808,11 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_8_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_8_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -14267,148 +13837,273 @@ class Test_TC_CC_7_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Check EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.A000f")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Enhanced Move Hue Up command\n"); - if (ShouldSkip("CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends MoveHue command to DUT\n"); + if (ShouldSkip("CC.S.C01.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestEnhancedMoveHueUpCommand_4(); + err = TestThSendsMoveHueCommandToDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 290ms\n"); - err = TestWait290ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00")) { + NextTest(); + return; + } + err = TestThReadsCurrentHueAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6(); + err = TestThSendsStopMoveStepCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 295ms\n"); - err = TestWait295ms_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8(); + err = TestThReadsCurrentHueAttributeFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 100ms\n"); + err = TestWait100ms_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 300ms\n"); - err = TestWait300ms_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00")) { + NextTest(); + return; + } + err = TestThReadsCurrentHueAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends MoveSaturation command to DUT\n"); + if (ShouldSkip("CC.S.C04.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10(); + err = TestThSendsMoveSaturationCommandToDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Enhanced Move Hue Stop command\n"); - if (ShouldSkip("CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.A0001 && CC.S.C04.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestEnhancedMoveHueStopCommand_11(); + err = TestThReadsCurrentSaturationAttributeFromDut_11(); break; case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_12(); + err = TestThSendsStopMoveStepCommandToDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Enhanced Move Hue Down command\n"); - if (ShouldSkip("CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestEnhancedMoveHueDownCommand_13(); + err = TestThReadsCurrentSaturationAttributeFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 40ms\n"); - err = TestWait40ms_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 100ms\n"); + err = TestWait100ms_14(); break; case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_15(); + err = TestThReadsCurrentSaturationAttributeFromDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 45ms\n"); - err = TestWait45ms_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends MoveColor command to DUT\n"); + if (ShouldSkip("CC.S.C08.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_17(); + err = TestThSendsMoveColorCommandToDut_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); + err = TestWait500ms_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 50ms\n"); - err = TestWait50ms_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.A0003 && CC.S.C08.Rsp && CC.S.F03")) { + NextTest(); + return; + } + err = TestThReadsCurrentXAttributeFromDut_18(); break; case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.A0004 && CC.S.C08.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_19(); + err = TestThReadsCurrentYAttributeFromDut_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Enhanced Move Hue Stop command\n"); - if (ShouldSkip("CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestEnhancedMoveHueStopCommand_20(); + err = TestThSendsStopMoveStepCommandToDut_20(); break; case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_21(); + err = TestThReadsCurrentXAttributeFromDut_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03")) { + NextTest(); + return; + } + err = TestThReadsCurrentYAttributeFromDut_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 1000ms\n"); + err = TestWait1000ms_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03")) { + NextTest(); + return; + } + err = TestThReadsCurrentYAttributeFromDut_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03")) { + NextTest(); + return; + } + err = TestThReadsCurrentYAttributeFromDut_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends MoveColorTemperature command to DUT\n"); + if (ShouldSkip("CC.S.C4B.Rsp && CC.S.F04")) { + NextTest(); + return; + } + err = TestThSendsMoveColorTemperatureCommandToDut_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); + err = TestWait1000ms_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads ColorTemperatureMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDut_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F04")) { + NextTest(); + return; + } + err = TestThSendsStopMoveStepCommandToDut_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads ColorTemperatureMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDut_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Wait 500ms\n"); + err = TestWait500ms_31(); + break; + case 32: + ChipLogProgress(chipTool, + " ***** Test Step 32 : Reads current color attribute value matched the value sent by the last attribute\n"); + if (ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04")) { + NextTest(); + return; + } + err = TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : TH sends EnhancedMoveHue command to DUT.\n"); + if (ShouldSkip("CC.S.C41.Rsp && CC.S.F01")) { + NextTest(); + return; + } + err = TestThSendsEnhancedMoveHueCommandToDut_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A4000 && CC.S.C41.Rsp && CC.S.F01")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F01")) { + NextTest(); + return; + } + err = TestThSendsStopMoveStepCommandToDut_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Wait 500ms\n"); + err = TestWait500ms_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_39(); + break; + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_40(); break; } @@ -14493,6 +14188,57 @@ class Test_TC_CC_7_2 : 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; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -14506,11 +14252,16 @@ class Test_TC_CC_7_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 24; + const uint16_t mTestCount = 41; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; + chip::Optional mRateXConfigValue; + chip::Optional mRateYConfigValue; + chip::Optional mColorTemperatureMinMiredsConfigValue; + chip::Optional mColorTemperatureMaxMiredsConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -14559,7 +14310,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14567,22 +14318,21 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestEnhancedMoveHueUpCommand_4() + CHIP_ERROR TestThSendsMoveHueCommandToDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14590,31 +14340,25 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced Move Hue Up command Error: %@", err); + [cluster moveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveHue command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait290ms_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 290UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14622,14 +14366,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -14637,14 +14381,31 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait295ms_7() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 295UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stopMoveStepWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StopMoveStep command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentHueValue; - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14652,14 +14413,17 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + { + CurrentHueValue = value; + } NextTest(); }]; @@ -14667,14 +14431,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait300ms_9() + CHIP_ERROR TestWait100ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 300UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14682,14 +14446,19 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentHue", actualValue, CurrentHueValue)); + } + + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -14697,7 +14466,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestEnhancedMoveHueStopCommand_11() + CHIP_ERROR TestThSendsMoveSaturationCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14705,24 +14474,25 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:0U]; + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced Move Hue Stop command Error: %@", err); + [cluster moveSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveSaturation command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_12() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14730,14 +14500,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -14745,7 +14515,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestEnhancedMoveHueDownCommand_13() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14753,31 +14523,23 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedShort:5U]; + __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced Move Hue Down command Error: %@", err); + [cluster stopMoveStepWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StopMoveStep command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentSaturationValue; - CHIP_ERROR TestWait40ms_14() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_15() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14785,14 +14547,17 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + { + CurrentSaturationValue = value; + } NextTest(); }]; @@ -14800,14 +14565,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait45ms_16() + CHIP_ERROR TestWait100ms_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 45UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_17() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14815,14 +14580,19 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, CurrentSaturationValue)); + } + + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -14830,14 +14600,41 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait50ms_18() + CHIP_ERROR TestThSendsMoveColorCommandToDut_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; + params.rateX + = mRateXConfigValue.HasValue() ? [NSNumber numberWithShort:mRateXConfigValue.Value()] : [NSNumber numberWithShort:50]; + params.rateY + = mRateYConfigValue.HasValue() ? [NSNumber numberWithShort:mRateYConfigValue.Value()] : [NSNumber numberWithShort:50]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveColorWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveColor command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait500ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 50UL; + value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_19() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14845,14 +14642,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); NextTest(); }]; @@ -14860,7 +14657,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestEnhancedMoveHueStopCommand_20() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14868,24 +14665,22 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced Move Hue Stop command Error: %@", err); + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_21() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14893,52 +14688,67 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stopMoveStepWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StopMoveStep command to DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentXValue; - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_22() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + { + CurrentXValue = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentYValue; - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_23() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + CurrentYValue = value; } NextTest(); @@ -14946,220 +14756,125 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } -}; -class Test_TC_CC_7_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_7_3() - : TestCommandBridge("Test_TC_CC_7_3") - , mTestIndex(0) + CHIP_ERROR TestWait1000ms_23() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_7_3() {} - - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_24() { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_3\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestReadsEnhancedCurrentHueAttributeFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Enhanced Step Hue Up command\n"); - if (ShouldSkip("CC.S.C42.Rsp")) { - NextTest(); - return; - } - err = TestEnhancedStepHueUpCommand_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 10ms\n"); - err = TestWait10ms_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Enhanced Step Hue Down command\n"); - if (ShouldSkip("CC.S.C42.Rsp")) { - NextTest(); - return; - } - err = TestEnhancedStepHueDownCommand_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 10ms\n"); - err = TestWait10ms_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentX", actualValue, CurrentXValue)); } - err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); - break; - } - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); - 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; - } + NextTest(); + }]; - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_25() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentY", actualValue, CurrentYValue)); + } + + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDut_26() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; + params.colorTemperatureMinimumMireds = mColorTemperatureMinMiredsConfigValue.HasValue() + ? [NSNumber numberWithUnsignedShort:mColorTemperatureMinMiredsConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:1U]; + params.colorTemperatureMaximumMireds = mColorTemperatureMaxMiredsConfigValue.HasValue() + ? [NSNumber numberWithUnsignedShort:mColorTemperatureMaxMiredsConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:255U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveColorTemperatureWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveColorTemperature command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestWait1000ms_27() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_28() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); NextTest(); }]; @@ -15167,7 +14882,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsEnhancedCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -15175,22 +14890,23 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads EnhancedCurrentHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stopMoveStepWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StopMoveStep command to DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull ColorTemperatureMiredsValue; - CHIP_ERROR TestEnhancedStepHueUpCommand_4() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -15198,32 +14914,32 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:0U]; - params.stepSize = [NSNumber numberWithUnsignedShort:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:1U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedStepHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced Step Hue Up command Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + { + ColorTemperatureMiredsValue = value; + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10ms_5() + CHIP_ERROR TestWait500ms_31() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; + value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_6() + CHIP_ERROR TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -15231,14 +14947,19 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime,Read EnhancedCurrentHue attribute from DUT Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads current color attribute value matched the value sent by the last attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureMiredsValue)); + } + + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); NextTest(); }]; @@ -15246,7 +14967,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestEnhancedStepHueDownCommand_7() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDut_33() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -15254,15 +14975,15 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = [NSNumber numberWithUnsignedShort:75U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:1U]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedStepHueWithParams:params + [cluster enhancedMoveHueWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced Step Hue Down command Error: %@", err); + NSLog(@"TH sends EnhancedMoveHue command to DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15272,14 +14993,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10ms_8() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_9() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -15288,11 +15002,11 @@ class Test_TC_CC_7_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime,Read EnhancedCurrentHue attribute from DUT Error: %@", err); + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -15302,24 +15016,109 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_35() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); - + __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stopMoveStepWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StopMoveStep command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull EnhancedCurrentHueValue; + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_36() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + { + EnhancedCurrentHueValue = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() + CHIP_ERROR TestWait500ms_37() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_38() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueValue)); + } + + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_39() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Turn off light that we turned on Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_40() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -15342,11 +15141,11 @@ class Test_TC_CC_7_3 : public TestCommandBridge { } }; -class Test_TC_CC_7_4 : public TestCommandBridge { +class Test_TC_DESC_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_7_4() - : TestCommandBridge("Test_TC_CC_7_4") + Test_TC_DESC_1_1() + : TestCommandBridge("Test_TC_DESC_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -15356,7 +15155,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_7_4() {} + ~Test_TC_DESC_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -15364,11 +15163,11 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DESC_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DESC_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -15385,49 +15184,34 @@ class Test_TC_CC_7_4 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestReadsEnhancedCurrentHueAttributeFromDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Enhanced move to hue and saturation command\n"); - if (ShouldSkip("CC.S.C43.Rsp")) { - NextTest(); - return; - } - err = TestEnhancedMoveToHueAndSaturationCommand_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 10ms\n"); - err = TestWait10ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: ChipLogProgress(chipTool, - " ***** Test Step 6 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A4000")) { + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -15461,12 +15245,6 @@ class Test_TC_CC_7_4 : 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; } // Go on to the next test. @@ -15480,7 +15258,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -15494,117 +15272,79 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsEnhancedCurrentHueAttributeFromDut_3() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads EnhancedCurrentHue attribute from DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestEnhancedMoveToHueAndSaturationCommand_4() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; - params.enhancedHue = [NSNumber numberWithUnsignedShort:1200U]; - params.saturation = [NSNumber numberWithUnsignedChar:90U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveToHueAndSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced move to hue and saturation command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait10ms_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + 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(); }]; @@ -15612,51 +15352,71 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_7() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"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(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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); + } }; -class Test_TC_CC_8_1 : public TestCommandBridge { +class Test_TC_DGETH_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_8_1() - : TestCommandBridge("Test_TC_CC_8_1") + Test_TC_DGETH_2_1() + : TestCommandBridge("Test_TC_DGETH_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -15666,7 +15426,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_8_1() {} + ~Test_TC_DGETH_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -15674,11 +15434,11 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_8_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_8_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -15695,271 +15455,146 @@ class Test_TC_CC_8_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read PHYRate attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestReadPHYRateAttributeConstraints_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read FullDuplex attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0001")) { + NextTest(); + return; + } + err = TestReadFullDuplexAttributeConstraints_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Move hue up command\n"); - if (ShouldSkip("CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read PacketRxCount attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0002")) { NextTest(); return; } - err = TestMoveHueUpCommand_3(); + err = TestReadPacketRxCountAttributeConstraints_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Read PacketRxCount value from DUT and verify the number of packets received on ethernet " + "network interface\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0002")) { NextTest(); return; } - err = TestReadsCurrentHueAttributeFromDut_4(); + err = TestReadPacketRxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Stop Move Step command\n"); - if (ShouldSkip("CC.S.C47.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Read PacketTxCount attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0003")) { NextTest(); return; } - err = TestStopMoveStepCommand_5(); + err = TestReadPacketTxCountAttributeConstraints_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read PacketTxCount value from DUT and verify the number of packets received on ethernet " + "network interface\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0003")) { NextTest(); return; } - err = TestReadsCurrentHueAttributeFromDut_6(); + err = TestReadPacketTxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100ms\n"); - err = TestWait100ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read TxErrCount attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0004")) { + NextTest(); + return; + } + err = TestReadTxErrCountAttributeConstraints_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Check current hue attribute value matched the value sent by the last attribute\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Read TxErrCount value from DUT and verify value indicates the number of failed packet " + "transmission on ethernet network interface\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0004")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastAttribute_8(); + err = TestReadTxErrCountValueFromDutAndVerifyValueIndicatesTheNumberOfFailedPacketTransmissionOnEthernetNetworkInterface_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Move saturation up command\n"); - if (ShouldSkip("CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Read CollisionCount attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0005")) { NextTest(); return; } - err = TestMoveSaturationUpCommand_9(); + err = TestReadCollisionCountAttributeConstraints_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Check Saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Read CollisionCount value from DUT and verify value indicates the number of collision " + "occurred while transmitting packets on ethernet network interface\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0005")) { NextTest(); return; } - err = TestCheckSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10(); + err = TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Stop Move Step command\n"); - if (ShouldSkip("CC.S.C47.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Read OverrunCount attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0006")) { NextTest(); return; } - err = TestStopMoveStepCommand_11(); + err = TestReadOverrunCountAttributeConstraints_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads CurrentSaturation attribute from DUT.\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Read OverrunCount value from DUT and verify value indicates the number of packets dropped " + "due to lack of buffer memory on ethernet network interface\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0006")) { NextTest(); return; } - err = TestReadsCurrentSaturationAttributeFromDut_12(); + err = TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 100ms\n"); - err = TestWait100ms_13(); - break; - case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : Check Saturation attribute value matched the value sent by the last attribute\n"); - if (ShouldSkip("CC.S.A0001")) { - NextTest(); - return; - } - err = TestCheckSaturationAttributeValueMatchedTheValueSentByTheLastAttribute_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Move Color command\n"); - if (ShouldSkip("CC.S.C08.Rsp")) { - NextTest(); - return; - } - err = TestMoveColorCommand_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.A0003")) { - NextTest(); - return; - } - err = TestReadsCurrentXAttributeFromDut_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.A0004")) { - NextTest(); - return; - } - err = TestReadsCurrentYAttributeFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Stop Move Step command\n"); - if (ShouldSkip("CC.S.C47.Rsp")) { - NextTest(); - return; - } - err = TestStopMoveStepCommand_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.A0003")) { - NextTest(); - return; - } - err = TestReadsCurrentXAttributeFromDut_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.A0004")) { - NextTest(); - return; - } - err = TestReadsCurrentYAttributeFromDut_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 100ms\n"); - err = TestWait100ms_21(); - break; - case 22: - ChipLogProgress( - chipTool, " ***** Test Step 22 : Check current x attribute value matched the value sent by the last attribute\n"); - if (ShouldSkip("CC.S.A0003")) { - NextTest(); - return; - } - err = TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastAttribute_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Check current y attribute value matched the value sent by the last attribute\n"); - if (ShouldSkip("CC.S.A0004")) { - NextTest(); - return; - } - err = TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastAttribute_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Move up color temperature command\n"); - if (ShouldSkip("CC.S.C4B.Rsp")) { - NextTest(); - return; - } - err = TestMoveUpColorTemperatureCommand_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Reads current color temprature from DUT\n"); - if (ShouldSkip("CC.S.A0007")) { - NextTest(); - return; - } - err = TestReadsCurrentColorTempratureFromDut_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Stop Move Step command\n"); - if (ShouldSkip("CC.S.C47.Rsp")) { - NextTest(); - return; - } - err = TestStopMoveStepCommand_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Reads current color temprature from DUT\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Read CarrierDetect attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0007")) { NextTest(); return; } - err = TestReadsCurrentColorTempratureFromDut_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Wait 100ms\n"); - err = TestWait100ms_28(); + err = TestReadCarrierDetectAttributeConstraints_13(); break; - case 29: + case 14: ChipLogProgress(chipTool, - " ***** Test Step 29 : Reads current color attribute value matched the value sent by the last attribute\n"); - if (ShouldSkip("CC.S.A0007")) { - NextTest(); - return; - } - err = TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Enhanced Move Hue Up command\n"); - if (ShouldSkip("CC.S.C41.Rsp")) { - NextTest(); - return; - } - err = TestEnhancedMoveHueUpCommand_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Reads EnhancedCurrentHue attribute value from DUT\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestReadsEnhancedCurrentHueAttributeValueFromDut_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Stop Move Step command\n"); - if (ShouldSkip("CC.S.C47.Rsp")) { + " ***** Test Step 14 : Read CarrierDetect value from DUT and verify value indicates the presence of carrier detect " + "control signal on ethernet network interface\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0007")) { NextTest(); return; } - err = TestStopMoveStepCommand_32(); + err = TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_14(); break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Reads EnhancedCurrentHue attribute value from DUT\n"); - if (ShouldSkip("CC.S.A4000")) { + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read TimeSinceReset attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0008")) { NextTest(); return; } - err = TestReadsEnhancedCurrentHueAttributeValueFromDut_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Wait 100ms\n"); - err = TestWait100ms_34(); + err = TestReadTimeSinceResetAttributeConstraints_15(); break; - case 35: + case 16: ChipLogProgress(chipTool, - " ***** Test Step 35 : Check EnhancedCurrentHue attribute value matched the value sent by the last attribute\n"); - if (ShouldSkip("CC.S.A4000")) { + " ***** Test Step 16 : Read TimeSinceReset value from DUT and verify the value indicates the duration of time, in " + "minutes\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0008")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastAttribute_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37(); + err = TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16(); break; } @@ -16023,69 +15658,6 @@ class Test_TC_CC_8_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; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - 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; } // Go on to the next test. @@ -16099,7 +15671,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 38; + const uint16_t mTestCount = 17; chip::Optional mNodeId; chip::Optional mCluster; @@ -16113,37 +15685,23 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestReadPHYRateAttributeConstraints_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read PHYRate attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); } NextTest(); @@ -16152,93 +15710,22 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveHueUpCommand_3() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move hue up command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsCurrentHueAttributeFromDut_4() + CHIP_ERROR TestReadFullDuplexAttributeConstraints_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentHue attribute from DUT Error: %@", err); + [cluster readAttributeFullDuplexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read FullDuplex attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStopMoveStepCommand_5() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stopMoveStepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Stop Move Step command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsCurrentHueAttributeFromDut_6() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintType("fullDuplex", "boolean", "boolean")); + } NextTest(); }]; @@ -16246,293 +15733,165 @@ class Test_TC_CC_8_1 : public TestCommandBridge { 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 TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastAttribute_8() + CHIP_ERROR TestReadPacketRxCountAttributeConstraints_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last attribute Error: %@", err); + [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read PacketRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); - + VerifyOrReturn(CheckConstraintType("packetRxCount", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveSaturationUpCommand_9() + CHIP_ERROR TestReadPacketRxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_4() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move saturation up command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestCheckSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10() + CHIP_ERROR TestReadPacketTxCountAttributeConstraints_5() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Saturation attribute value matched the value sent by the last command Error: %@", err); + [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read PacketTxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - + VerifyOrReturn(CheckConstraintType("packetTxCount", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStopMoveStepCommand_11() + CHIP_ERROR TestReadPacketTxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_6() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stopMoveStepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Stop Move Step command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsCurrentSaturationAttributeFromDut_12() + CHIP_ERROR TestReadTxErrCountAttributeConstraints_7() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentSaturation attribute from DUT. Error: %@", err); + [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read TxErrCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - + VerifyOrReturn(CheckConstraintType("txErrCount", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_13() + CHIP_ERROR + TestReadTxErrCountValueFromDutAndVerifyValueIndicatesTheNumberOfFailedPacketTransmissionOnEthernetNetworkInterface_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestCheckSaturationAttributeValueMatchedTheValueSentByTheLastAttribute_14() + CHIP_ERROR TestReadCollisionCountAttributeConstraints_9() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Saturation attribute value matched the value sent by the last attribute Error: %@", err); + [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read CollisionCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - + VerifyOrReturn(CheckConstraintType("collisionCount", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveColorCommand_15() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; - params.rateX = [NSNumber numberWithShort:15]; - params.rateY = [NSNumber numberWithShort:20]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move Color command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsCurrentXAttributeFromDut_16() + CHIP_ERROR + TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentX attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsCurrentYAttributeFromDut_17() + CHIP_ERROR TestReadOverrunCountAttributeConstraints_11() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentY attribute from DUT Error: %@", err); + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read OverrunCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); - + VerifyOrReturn(CheckConstraintType("overrunCount", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStopMoveStepCommand_18() + CHIP_ERROR + TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stopMoveStepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Stop Move Step command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsCurrentXAttributeFromDut_19() + CHIP_ERROR TestReadCarrierDetectAttributeConstraints_13() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentX attribute from DUT Error: %@", err); + [cluster readAttributeCarrierDetectWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read CarrierDetect attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsCurrentYAttributeFromDut_20() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentY attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("carrierDetect", "boolean", "boolean")); + } NextTest(); }]; @@ -16540,381 +15899,77 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_21() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastAttribute_22() + CHIP_ERROR + TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_14() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current x attribute value matched the value sent by the last attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastAttribute_23() + CHIP_ERROR TestReadTimeSinceResetAttributeConstraints_15() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current y attribute value matched the value sent by the last attribute Error: %@", err); + [cluster readAttributeTimeSinceResetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read TimeSinceReset attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); - + VerifyOrReturn(CheckConstraintType("timeSinceReset", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveUpColorTemperatureCommand_24() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move up color temperature command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsCurrentColorTempratureFromDut_25() + CHIP_ERROR TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads current color temprature from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } +}; - CHIP_ERROR TestStopMoveStepCommand_26() +class Test_TC_DGETH_2_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DGETH_2_2() + : TestCommandBridge("Test_TC_DGETH_2_2") + , mTestIndex(0) { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stopMoveStepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Stop Move Step command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestReadsCurrentColorTempratureFromDut_27() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads current color temprature from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } + ~Test_TC_DGETH_2_2() {} - CHIP_ERROR TestWait100ms_28() + /////////// TestCommand Interface ///////// + void NextTest() override { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } + CHIP_ERROR err = CHIP_NO_ERROR; - CHIP_ERROR TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_29() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_2_2\n"); + } - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads current color attribute value matched the value sent by the last attribute Error: %@", err); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestEnhancedMoveHueUpCommand_30() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Enhanced Move Hue Up command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsEnhancedCurrentHueAttributeValueFromDut_31() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads EnhancedCurrentHue attribute value from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStopMoveStepCommand_32() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stopMoveStepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Stop Move Step command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsEnhancedCurrentHueAttributeValueFromDut_33() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads EnhancedCurrentHue attribute value from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait100ms_34() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastAttribute_35() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_36() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DESC_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DESC_1_1() - : TestCommandBridge("Test_TC_DESC_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_DESC_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DESC_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DESC_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); + Wait(); // Ensure we increment mTestIndex before we start running the relevant // command. That way if we lose the timeslice after we send the message @@ -16926,34 +15981,172 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); + err = TestThReadsPHYRateAttributeFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads PacketRxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsPacketRxCountAttributeValueFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads PacketTxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsPacketTxCountAttributeValueFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads TxErrCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsTxErrCountAttributeValueFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CollisionCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsCollisionCountAttributeValueFromDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads OverrunCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0006")) { + NextTest(); + return; + } + err = TestThReadsOverrunCountAttributeValueFromDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Sends ResetCounts command\n"); + if (ShouldSkip("DGETH.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestSendsResetCountsCommand_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads PacketRxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsPacketRxCountAttributeValueFromDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads PacketTxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsPacketTxCountAttributeValueFromDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads TxErrCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsTxErrCountAttributeValueFromDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CollisionCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsCollisionCountAttributeValueFromDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads OverrunCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0006")) { + NextTest(); + return; + } + err = TestThReadsOverrunCountAttributeValueFromDut_21(); break; } @@ -16987,6 +16180,51 @@ class Test_TC_DESC_1_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; + 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; } // Go on to the next test. @@ -17000,7 +16238,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 22; chip::Optional mNodeId; chip::Optional mCluster; @@ -17014,79 +16252,74 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "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)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } NextTest(); }]; @@ -17094,340 +16327,132 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_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"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } -}; -class Test_TC_DGETH_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGETH_2_1() - : TestCommandBridge("Test_TC_DGETH_2_1") - , mTestIndex(0) + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_7() { - 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"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - ~Test_TC_DGETH_2_1() {} + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_2_1\n"); - } + if (value != nil) { - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } - Wait(); + NextTest(); + }]; - // 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 : Read PHYRate attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0000")) { - NextTest(); - return; - } - err = TestReadPHYRateAttributeConstraints_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read FullDuplex attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0001")) { - NextTest(); - return; - } - err = TestReadFullDuplexAttributeConstraints_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read PacketRxCount attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0002")) { - NextTest(); - return; - } - err = TestReadPacketRxCountAttributeConstraints_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read PacketRxCount value from DUT and verify the number of packets received on ethernet " - "network interface\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0002")) { - NextTest(); - return; - } - err = TestReadPacketRxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read PacketTxCount attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0003")) { - NextTest(); - return; - } - err = TestReadPacketTxCountAttributeConstraints_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read PacketTxCount value from DUT and verify the number of packets received on ethernet " - "network interface\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0003")) { - NextTest(); - return; - } - err = TestReadPacketTxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read TxErrCount attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0004")) { - NextTest(); - return; - } - err = TestReadTxErrCountAttributeConstraints_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Read TxErrCount value from DUT and verify value indicates the number of failed packet " - "transmission on ethernet network interface\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0004")) { - NextTest(); - return; - } - err = TestReadTxErrCountValueFromDutAndVerifyValueIndicatesTheNumberOfFailedPacketTransmissionOnEthernetNetworkInterface_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read CollisionCount attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0005")) { - NextTest(); - return; - } - err = TestReadCollisionCountAttributeConstraints_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Read CollisionCount value from DUT and verify value indicates the number of collision " - "occurred while transmitting packets on ethernet network interface\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0005")) { - NextTest(); - return; - } - err = TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read OverrunCount attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0006")) { - NextTest(); - return; - } - err = TestReadOverrunCountAttributeConstraints_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Read OverrunCount value from DUT and verify value indicates the number of packets dropped " - "due to lack of buffer memory on ethernet network interface\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0006")) { - NextTest(); - return; - } - err = TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read CarrierDetect attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0007")) { - NextTest(); - return; - } - err = TestReadCarrierDetectAttributeConstraints_13(); - break; - case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : Read CarrierDetect value from DUT and verify value indicates the presence of carrier detect " - "control signal on ethernet network interface\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0007")) { - NextTest(); - return; - } - err = TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read TimeSinceReset attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0008")) { - NextTest(); - return; - } - err = TestReadTimeSinceResetAttributeConstraints_15(); - break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Read TimeSinceReset value from DUT and verify the value indicates the duration of time, in " - "minutes\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0008")) { - NextTest(); - return; - } - err = TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_8() { - 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; - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT 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 = 17; + if (value != nil) { - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadPHYRateAttributeConstraints_1() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -17435,13 +16460,13 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PHYRate attribute constraints Error: %@", err); + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); } @@ -17452,21 +16477,23 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFullDuplexAttributeConstraints_2() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFullDuplexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read FullDuplex attribute constraints Error: %@", err); + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("fullDuplex", "", "bool")); + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); } NextTest(); @@ -17474,8 +16501,9 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull PacketRxCount; - CHIP_ERROR TestReadPacketRxCountAttributeConstraints_3() + CHIP_ERROR TestThReadsPacketRxCountAttributeValueFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -17483,27 +16511,22 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PacketRxCount attribute constraints Error: %@", err); + NSLog(@"TH reads PacketRxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetRxCount", "", "uint64")); + { + PacketRxCount = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull PacketTxCount; - CHIP_ERROR TestReadPacketRxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_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); - } - - CHIP_ERROR TestReadPacketTxCountAttributeConstraints_5() + CHIP_ERROR TestThReadsPacketTxCountAttributeValueFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -17511,27 +16534,22 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PacketTxCount attribute constraints Error: %@", err); + NSLog(@"TH reads PacketTxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetTxCount", "", "uint64")); + { + PacketTxCount = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull TxErrCount; - CHIP_ERROR TestReadPacketTxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_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 TestReadTxErrCountAttributeConstraints_7() + CHIP_ERROR TestThReadsTxErrCountAttributeValueFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -17539,28 +16557,22 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read TxErrCount attribute constraints Error: %@", err); + NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("txErrCount", "", "uint64")); + { + TxErrCount = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CollisionCount; - CHIP_ERROR - TestReadTxErrCountValueFromDutAndVerifyValueIndicatesTheNumberOfFailedPacketTransmissionOnEthernetNetworkInterface_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 TestReadCollisionCountAttributeConstraints_9() + CHIP_ERROR TestThReadsCollisionCountAttributeValueFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -17568,72 +16580,94 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read CollisionCount attribute constraints Error: %@", err); + NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("collisionCount", "", "uint64")); + { + CollisionCount = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull OverrunCount; - CHIP_ERROR - TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10() + CHIP_ERROR TestThReadsOverrunCountAttributeValueFromDut_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); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + OverrunCount = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOverrunCountAttributeConstraints_11() + CHIP_ERROR TestSendsResetCountsCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read OverrunCount attribute constraints Error: %@", err); + [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends ResetCounts command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("overrunCount", "", "uint64")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12() + CHIP_ERROR TestThReadsPacketRxCountAttributeValueFromDut_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"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PacketRxCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("packetRxCount", [value unsignedLongLongValue], PacketRxCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadCarrierDetectAttributeConstraints_13() + CHIP_ERROR TestThReadsPacketTxCountAttributeValueFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCarrierDetectWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read CarrierDetect attribute constraints Error: %@", err); + [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PacketTxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("carrierDetect", "", "bool")); - } + VerifyOrReturn(CheckConstraintMaxValue("packetTxCount", [value unsignedLongLongValue], PacketTxCount)); NextTest(); }]; @@ -17641,50 +16675,72 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_14() + CHIP_ERROR TestThReadsTxErrCountAttributeValueFromDut_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"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("txErrCount", [value unsignedLongLongValue], TxErrCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTimeSinceResetAttributeConstraints_15() + CHIP_ERROR TestThReadsCollisionCountAttributeValueFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTimeSinceResetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read TimeSinceReset attribute constraints Error: %@", err); + [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("timeSinceReset", "", "uint64")); + VerifyOrReturn(CheckConstraintMaxValue("collisionCount", [value unsignedLongLongValue], CollisionCount)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16() + CHIP_ERROR TestThReadsOverrunCountAttributeValueFromDut_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); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("overrunCount", [value unsignedLongLongValue], OverrunCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_DGETH_2_2 : public TestCommandBridge { +class Test_TC_FLW_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGETH_2_2() - : TestCommandBridge("Test_TC_DGETH_2_2") + Test_TC_FLW_1_1() + : TestCommandBridge("Test_TC_FLW_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -17694,7 +16750,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGETH_2_2() {} + ~Test_TC_FLW_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -17702,11 +16758,11 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -17723,52 +16779,42 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Sends ResetCounts command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestSendsResetCountsCommand_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the PacketRxCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0002")) { - NextTest(); - return; - } - err = TestReadThePacketRxCountAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the PacketTxCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0003")) { - NextTest(); - return; - } - err = TestReadThePacketTxCountAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the TxErrCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(Tolerance) in AttributeList\n"); + if (ShouldSkip("FLW.S.A0003")) { NextTest(); return; } - err = TestReadTheTxErrCountAttribute_4(); + err = TestReadTheOptionalAttributeToleranceInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the CollisionCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0005")) { - NextTest(); - return; - } - err = TestReadTheCollisionCountAttribute_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the OverrunCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0006")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTheOverrunCountAttribute_6(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7(); break; } @@ -17802,6 +16848,9 @@ class Test_TC_DGETH_2_2 : 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; } // Go on to the next test. @@ -17815,7 +16864,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -17829,63 +16878,78 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestSendsResetCountsCommand_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterEthernetNetworkDiagnostics * cluster = - [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ResetCounts command Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadThePacketRxCountAttribute_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterEthernetNetworkDiagnostics * cluster = - [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the PacketRxCount attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("PacketRxCount", actualValue, 0ULL)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadThePacketTxCountAttribute_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterEthernetNetworkDiagnostics * cluster = - [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the PacketTxCount attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("PacketTxCount", actualValue, 0ULL)); - } + 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(); }]; @@ -17893,22 +16957,21 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheTxErrCountAttribute_4() + CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterEthernetNetworkDiagnostics * cluster = - [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the TxErrCount attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("TxErrCount", actualValue, 0ULL)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -17916,309 +16979,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheCollisionCountAttribute_5() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterEthernetNetworkDiagnostics * cluster = - [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the CollisionCount attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("CollisionCount", actualValue, 0ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOverrunCountAttribute_6() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterEthernetNetworkDiagnostics * cluster = - [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the OverrunCount attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OverrunCount", actualValue, 0ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLW_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FLW_1_1() - : TestCommandBridge("Test_TC_FLW_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_FLW_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_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 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip(" !FLW.S.A0003 ")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("FLW.S.A0003")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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 TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "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 TestReadTheGlobalAttributeAttributeList_4() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "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 TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device @@ -18236,7 +16997,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -18261,7 +17022,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -18345,7 +17106,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { err = TestReadTheMandatoryAttributeMaxMeasuredValue_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read the optional attribute: Tolerance\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute: Tolerance\n"); if (ShouldSkip("FLW.S.A0003")) { NextTest(); return; @@ -18420,7 +17181,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65535U)); } @@ -18446,7 +17207,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65535U)); } @@ -18472,7 +17233,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65535U)); } @@ -18492,11 +17253,11 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the optional attribute: Tolerance Error: %@", err); + NSLog(@"Read the optional attribute: Tolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); @@ -18656,7 +17417,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -18681,7 +17442,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -18701,7 +17462,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -18732,7 +17493,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); @@ -18756,7 +17517,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 5UL)); @@ -18953,7 +17714,7 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("breadcrumb", "", "uint64")); + VerifyOrReturn(CheckConstraintType("breadcrumb", "int64u", "int64u")); NextTest(); }]; @@ -19088,7 +17849,7 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "", "bool")); + VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "boolean", "boolean")); NextTest(); }]; @@ -19232,7 +17993,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -19257,7 +18018,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -19277,7 +18038,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); @@ -19305,7 +18066,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -19332,7 +18093,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -19606,7 +18367,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("networkInterfaces", "", "list")); + VerifyOrReturn(CheckConstraintType("networkInterfaces", "list", "list")); NextTest(); }]; @@ -19626,7 +18387,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("rebootCount", "", "uint16")); + VerifyOrReturn(CheckConstraintType("rebootCount", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("rebootCount", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("rebootCount", [value unsignedShortValue], 65535U)); @@ -19690,7 +18451,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("upTime", "", "uint64")); + VerifyOrReturn(CheckConstraintType("upTime", "int64u", "int64u")); NextTest(); }]; @@ -19710,7 +18471,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("totalOperationalHours", "", "uint32")); + VerifyOrReturn(CheckConstraintType("totalOperationalHours", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("totalOperationalHours", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("totalOperationalHours", [value unsignedIntValue], 4294967294UL)); @@ -19861,19 +18622,15 @@ class Test_TC_I_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("I.C.C40.Tx")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip(" !I.C.C40.Tx ")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional command(TriggerEffect) in AcceptedCommandList\n"); + if (ShouldSkip("I.C.C40.Tx")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_6(); + err = TestReadTheOptionalCommandTriggerEffectInAcceptedCommandList_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(IdentifyQuery) in AcceptedCommandList\n"); @@ -19885,19 +18642,16 @@ class Test_TC_I_1_1 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("I.S.C00.Tx")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip(" !I.S.C00.Tx ")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Read the optional attribute(IdentifyQueryResponse) in GeneratedCommandList\n"); + if (ShouldSkip("I.S.C00.Tx")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_9(); + err = TestReadTheOptionalAttributeIdentifyQueryResponseInGeneratedCommandList_9(); break; case 10: ChipLogProgress(chipTool, @@ -19996,7 +18750,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -20019,7 +18773,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -20042,7 +18796,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -20060,7 +18814,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); @@ -20086,9 +18840,8 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); NextTest(); }]; @@ -20096,19 +18849,19 @@ class Test_TC_I_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_6() + CHIP_ERROR TestReadTheOptionalCommandTriggerEffectInAcceptedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Read the optional command(TriggerEffect) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); NextTest(); }]; @@ -20127,7 +18880,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); NextTest(); @@ -20149,34 +18902,34 @@ class Test_TC_I_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_9() + CHIP_ERROR TestReadTheOptionalAttributeIdentifyQueryResponseInGeneratedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Read the optional attribute(IdentifyQueryResponse) in GeneratedCommandList 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], 0UL)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -20301,7 +19054,7 @@ class Test_TC_I_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("identifyTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("identifyTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 65535U)); @@ -20322,7 +19075,7 @@ class Test_TC_I_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("identifyType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("identifyType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("identifyType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("identifyType", [value unsignedCharValue], 5U)); @@ -20385,12 +19138,12 @@ class Test_TC_I_2_2 : public TestCommandBridge { err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads immediately IdentifyTime attribute from DUT1\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads immediately IdentifyTime attribute from DUT\n"); if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut1_2(); + err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 10000ms\n"); @@ -20408,7 +19161,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 5 : 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")) { + if (ShouldSkip("PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx")) { NextTest(); return; } @@ -20425,16 +19178,16 @@ class Test_TC_I_2_2 : public TestCommandBridge { err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads immediately IdentifyTime attribute from DUT2\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads immediately IdentifyTime attribute from DUT\n"); if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut2_7(); + err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends IdentifyQuery command to DUT \n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx")) { NextTest(); return; } @@ -20554,19 +19307,19 @@ class Test_TC_I_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut1_2() + CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads immediately IdentifyTime attribute from DUT1 Error: %@", err); + NSLog(@"TH reads immediately IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 55U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 65U)); + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 51U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 69U)); NextTest(); }]; @@ -20592,8 +19345,8 @@ class Test_TC_I_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 45U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 55U)); + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 43U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 57U)); NextTest(); }]; @@ -20634,14 +19387,14 @@ class Test_TC_I_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut2_7() + CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads immediately IdentifyTime attribute from DUT2 Error: %@", err); + NSLog(@"TH reads immediately IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21537,7 +20290,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -21561,7 +20314,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -21580,7 +20333,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -21608,7 +20361,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); @@ -21629,7 +20382,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); NextTest(); @@ -21655,7 +20408,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -21679,7 +20432,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -21848,7 +20601,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65534U)); } @@ -21873,7 +20626,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65533U)); } @@ -21898,7 +20651,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 2U)); VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65534U)); } @@ -21921,7 +20674,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); @@ -21945,7 +20698,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("lightSensorType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("lightSensorType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("lightSensorType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("lightSensorType", [value unsignedCharValue], 254U)); } @@ -22043,12 +20796,12 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { err = TestReadTheOptonalAttributeMinLevelInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optonal attribute(MinLevel) in AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optonal attribute(MaxLevel) in AttributeList\n"); if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestReadTheOptonalAttributeMinLevelInAttributeList_7(); + err = TestReadTheOptonalAttributeMaxLevelInAttributeList_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optonal attribute(OnOffTransitionTime) in AttributeList\n"); @@ -22084,19 +20837,16 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("LVL.S.F02")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAcceptedCommandList_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip(" !LVL.S.F02 ")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList\n"); + if (ShouldSkip("LVL.S.F02")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_13(); + err = TestReadTheFeatureDependentLVLSF02AttributeInAcceptedCommandList_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: GeneratedCommandList\n"); @@ -22216,7 +20966,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -22236,7 +20986,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 7UL)); @@ -22259,7 +21009,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); @@ -22283,7 +21033,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); @@ -22306,7 +21056,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); @@ -22330,7 +21080,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); @@ -22339,7 +21089,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeMinLevelInAttributeList_7() + CHIP_ERROR TestReadTheOptonalAttributeMaxLevelInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22348,11 +21098,11 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(MinLevel) in AttributeList Error: %@", err); + NSLog(@"Read the optonal attribute(MaxLevel) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); @@ -22374,7 +21124,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); NextTest(); @@ -22396,7 +21146,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); NextTest(); @@ -22418,7 +21168,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); NextTest(); @@ -22440,7 +21190,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); NextTest(); @@ -22462,7 +21212,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); @@ -22471,7 +21221,6 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); NextTest(); }]; @@ -22479,7 +21228,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_13() + CHIP_ERROR TestReadTheFeatureDependentLVLSF02AttributeInAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22488,19 +21237,12 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); NextTest(); }]; @@ -22526,7 +21268,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -22586,188 +21328,164 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: Reset level to 254\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestPreconditionResetLevelTo254_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 100ms\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestWait100ms_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: Reads the CurrentLevel attribute\n"); - if (ShouldSkip("LVL.S.A0000")) { - NextTest(); - return; - } - err = TestPreconditionReadsTheCurrentLevelAttribute_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentLevel attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentLevel attribute\n"); if (ShouldSkip("LVL.S.A0000")) { NextTest(); return; } - err = TestReadsTheCurrentLevelAttribute_4(); + err = TestReadsTheCurrentLevelAttribute_1(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the RemainingTime attribute\n"); + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the RemainingTime attribute\n"); if (ShouldSkip("LVL.S.A0001")) { NextTest(); return; } - err = TestReadsTheRemainingTimeAttribute_5(); + err = TestReadsTheRemainingTimeAttribute_2(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the MinLevel attribute\n"); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the MinLevel attribute\n"); if (ShouldSkip("LVL.S.A0002 && LVL.S.F01")) { NextTest(); return; } - err = TestReadsTheMinLevelAttribute_6(); + err = TestReadsTheMinLevelAttribute_3(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the MinLevel attribute\n"); + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MinLevel attribute\n"); if (ShouldSkip("LVL.S.A0002 && !LVL.S.F01")) { NextTest(); return; } - err = TestReadsTheMinLevelAttribute_7(); + err = TestReadsTheMinLevelAttribute_4(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the MaxLevel attribute\n"); + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MaxLevel attribute\n"); if (ShouldSkip("LVL.S.A0003 && LVL.S.F01")) { NextTest(); return; } - err = TestReadsTheMaxLevelAttribute_8(); + err = TestReadsTheMaxLevelAttribute_5(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the MaxLevel attribute\n"); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the MaxLevel attribute\n"); if (ShouldSkip("LVL.S.A0003 && !LVL.S.F01")) { NextTest(); return; } - err = TestReadsTheMaxLevelAttribute_9(); + err = TestReadsTheMaxLevelAttribute_6(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4b & 4C Reads the CurrentLevel attribute\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4b & 4C Reads the CurrentLevel attribute\n"); if (ShouldSkip("LVL.S.F01 && LVL.S.A0002 && LVL.S.A0003")) { NextTest(); return; } - err = TestStep4b4cReadsTheCurrentLevelAttribute_10(); + err = TestStep4b4cReadsTheCurrentLevelAttribute_7(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4b & 4C Reads the CurrentLevel attribute\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4b & 4C Reads the CurrentLevel attribute\n"); if (ShouldSkip("LVL.S.A0002 && LVL.S.A0003 && !LVL.S.F01")) { NextTest(); return; } - err = TestStep4b4cReadsTheCurrentLevelAttribute_11(); + err = TestStep4b4cReadsTheCurrentLevelAttribute_8(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the CurrentFrequency attribute\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the CurrentFrequency attribute\n"); if (ShouldSkip("LVL.S.A0004")) { NextTest(); return; } - err = TestReadsTheCurrentFrequencyAttribute_12(); + err = TestReadsTheCurrentFrequencyAttribute_9(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the MinFrequency attribute\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the MinFrequency attribute\n"); if (ShouldSkip("LVL.S.A0005")) { NextTest(); return; } - err = TestReadsTheMinFrequencyAttribute_13(); + err = TestReadsTheMinFrequencyAttribute_10(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the MaxFrequency attribute\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the MaxFrequency attribute\n"); if (ShouldSkip("LVL.S.A0006")) { NextTest(); return; } - err = TestReadsTheMaxFrequencyAttribute_14(); + err = TestReadsTheMaxFrequencyAttribute_11(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7b & 7C Reads the CurrentFrequency attribute\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7b & 7C Reads the CurrentFrequency attribute\n"); if (ShouldSkip("LVL.S.A0004 && LVL.S.A0005 && LVL.S.A0006")) { NextTest(); return; } - err = TestStep7b7cReadsTheCurrentFrequencyAttribute_15(); + err = TestStep7b7cReadsTheCurrentFrequencyAttribute_12(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads the OnOffTransitionTime attribute\n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the OnOffTransitionTime attribute\n"); if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestReadsTheOnOffTransitionTimeAttribute_16(); + err = TestReadsTheOnOffTransitionTimeAttribute_13(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads the OnLevel attribute \n"); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the OnLevel attribute \n"); if (ShouldSkip("LVL.S.F01 && LVL.S.A0011")) { NextTest(); return; } - err = TestReadsTheOnLevelAttribute_17(); + err = TestReadsTheOnLevelAttribute_14(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads the OnLevel attribute \n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the OnLevel attribute \n"); if (ShouldSkip("LVL.S.A0011 && !LVL.S.F01")) { NextTest(); return; } - err = TestReadsTheOnLevelAttribute_18(); + err = TestReadsTheOnLevelAttribute_15(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Reads the OnTransitionTime attribute \n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads the OnTransitionTime attribute \n"); if (ShouldSkip("LVL.S.A0012")) { NextTest(); return; } - err = TestReadsTheOnTransitionTimeAttribute_19(); + err = TestReadsTheOnTransitionTimeAttribute_16(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Reads the OffTransitionTime attribute \n"); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads the OffTransitionTime attribute \n"); if (ShouldSkip("LVL.S.A0013")) { NextTest(); return; } - err = TestReadsTheOffTransitionTimeAttribute_20(); + err = TestReadsTheOffTransitionTimeAttribute_17(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Reads the DefaultMoveRate attribute \n"); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Reads the DefaultMoveRate attribute \n"); if (ShouldSkip("LVL.S.A0014")) { NextTest(); return; } - err = TestReadsTheDefaultMoveRateAttribute_21(); + err = TestReadsTheDefaultMoveRateAttribute_18(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Reads the Options attribute \n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Reads the Options attribute \n"); if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsTheOptionsAttribute_22(); + err = TestReadsTheOptionsAttribute_19(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Reads the StartUpCurrentLevel attribute \n"); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Reads the StartUpCurrentLevel attribute \n"); if (ShouldSkip("LVL.S.A4000")) { NextTest(); return; } - err = TestReadsTheStartUpCurrentLevelAttribute_23(); + err = TestReadsTheStartUpCurrentLevelAttribute_20(); break; } @@ -22843,15 +21561,6 @@ class Test_TC_LVL_2_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. @@ -22865,7 +21574,7 @@ class Test_TC_LVL_2_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; @@ -22878,65 +21587,9 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - - CHIP_ERROR TestPreconditionResetLevelTo254_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: Reset level to 254 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait100ms_2() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestPreconditionReadsTheCurrentLevelAttribute_3() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Precondition: Reads the CurrentLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 254U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } NSNumber * _Nonnull CurrentLevelValue; - CHIP_ERROR TestReadsTheCurrentLevelAttribute_4() + CHIP_ERROR TestReadsTheCurrentLevelAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22949,7 +21602,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 255U)); { @@ -22962,7 +21615,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheRemainingTimeAttribute_5() + CHIP_ERROR TestReadsTheRemainingTimeAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22975,7 +21628,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("remainingTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("remainingTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("remainingTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("remainingTime", [value unsignedShortValue], 65535U)); @@ -22986,7 +21639,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { } NSNumber * _Nonnull MinLevelValue; - CHIP_ERROR TestReadsTheMinLevelAttribute_6() + CHIP_ERROR TestReadsTheMinLevelAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23004,7 +21657,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("min level", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); { MinLevelValue = value; } @@ -23014,9 +21667,9 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull MinLevelValue1; + NSNumber * _Nonnull MinLevelFeatureMapNotSupportedValue; - CHIP_ERROR TestReadsTheMinLevelAttribute_7() + CHIP_ERROR TestReadsTheMinLevelAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23029,11 +21682,11 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 255U)); { - MinLevelValue1 = value; + MinLevelFeatureMapNotSupportedValue = value; } NextTest(); @@ -23043,7 +21696,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { } NSNumber * _Nonnull MaxLevelValue; - CHIP_ERROR TestReadsTheMaxLevelAttribute_8() + CHIP_ERROR TestReadsTheMaxLevelAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23061,7 +21714,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("max level", actualValue, 254U)); } - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelValue)); { MaxLevelValue = value; @@ -23072,9 +21725,9 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull MaxLevelValue1; + NSNumber * _Nonnull MaxLevelFeatureMapNotSupportedValue; - CHIP_ERROR TestReadsTheMaxLevelAttribute_9() + CHIP_ERROR TestReadsTheMaxLevelAttribute_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23087,11 +21740,12 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelValue1)); + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); + VerifyOrReturn( + CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); { - MaxLevelValue1 = value; + MaxLevelFeatureMapNotSupportedValue = value; } NextTest(); @@ -23100,7 +21754,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_10() + CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23113,7 +21767,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], MinLevelValue)); VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], MaxLevelValue)); @@ -23123,7 +21777,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_11() + CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23136,9 +21790,11 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], MinLevelValue1)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], MaxLevelValue1)); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); + VerifyOrReturn( + CheckConstraintMinValue("currentLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); + VerifyOrReturn( + CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], MaxLevelFeatureMapNotSupportedValue)); NextTest(); }]; @@ -23146,7 +21802,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_12() + CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23159,7 +21815,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFrequency", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], 65535U)); @@ -23170,7 +21826,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { } NSNumber * _Nonnull MinFrequencyValue; - CHIP_ERROR TestReadsTheMinFrequencyAttribute_13() + CHIP_ERROR TestReadsTheMinFrequencyAttribute_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23183,7 +21839,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minFrequency", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minFrequency", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("minFrequency", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minFrequency", [value unsignedShortValue], 65535U)); { @@ -23197,7 +21853,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { } NSNumber * _Nonnull MaxFrequencyValue; - CHIP_ERROR TestReadsTheMaxFrequencyAttribute_14() + CHIP_ERROR TestReadsTheMaxFrequencyAttribute_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23210,7 +21866,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxFrequency", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxFrequency", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxFrequency", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxFrequency", [value unsignedShortValue], 65535U)); { @@ -23223,7 +21879,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7b7cReadsTheCurrentFrequencyAttribute_15() + CHIP_ERROR TestStep7b7cReadsTheCurrentFrequencyAttribute_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23236,7 +21892,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFrequency", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], MinFrequencyValue)); VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], MaxFrequencyValue)); @@ -23246,7 +21902,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_16() + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23259,7 +21915,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); @@ -23269,7 +21925,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnLevelAttribute_17() + CHIP_ERROR TestReadsTheOnLevelAttribute_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23284,7 +21940,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelValue)); VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], MaxLevelValue)); } @@ -23295,7 +21951,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnLevelAttribute_18() + CHIP_ERROR TestReadsTheOnLevelAttribute_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23310,9 +21966,11 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelValue1)); - VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], MaxLevelValue1)); + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); + VerifyOrReturn( + CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); + VerifyOrReturn( + CheckConstraintMaxValue("onLevel", [value unsignedCharValue], MaxLevelFeatureMapNotSupportedValue)); } NextTest(); @@ -23321,7 +21979,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_19() + CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23336,7 +21994,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("onTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onTransitionTime", [value unsignedShortValue], 65535U)); } @@ -23347,7 +22005,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_20() + CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23362,7 +22020,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("offTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("offTransitionTime", [value unsignedShortValue], 65535U)); } @@ -23373,7 +22031,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_21() + CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23388,7 +22046,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); } @@ -23399,7 +22057,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOptionsAttribute_22() + CHIP_ERROR TestReadsTheOptionsAttribute_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23417,14 +22075,14 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("options", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("options", "", "map8")); + VerifyOrReturn(CheckConstraintType("options", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttribute_23() + CHIP_ERROR TestReadsTheStartUpCurrentLevelAttribute_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23439,7 +22097,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("startUpCurrentLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("startUpCurrentLevel", [value unsignedCharValue], 255U)); } @@ -23769,7 +22427,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); { @@ -23825,7 +22483,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { mOnOffTransitionTimeConfigValue.HasValue() ? mOnOffTransitionTimeConfigValue.Value() : 10U)); } - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintNotValue("onOffTransitionTime", value, OnOffTransitionTimeValue)); NextTest(); @@ -23850,7 +22508,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], 255U)); } @@ -23908,7 +22566,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { } if (value != nil) { - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); } VerifyOrReturn(CheckConstraintNotValue("onLevel", value, OnLevelValue)); @@ -23934,7 +22592,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("onTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onTransitionTime", [value unsignedShortValue], 65535U)); } @@ -23993,7 +22651,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { } if (value != nil) { - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); } VerifyOrReturn(CheckConstraintNotValue("onTransitionTime", value, OnTransitionTimeValue)); @@ -24019,7 +22677,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("offTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("offTransitionTime", [value unsignedShortValue], 65535U)); } @@ -24078,7 +22736,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { } if (value != nil) { - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); } VerifyOrReturn(CheckConstraintNotValue("offTransitionTime", value, OffTransitionTimeValue)); @@ -24104,7 +22762,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); } @@ -24163,7 +22821,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { } if (value != nil) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); } VerifyOrReturn(CheckConstraintNotValue("defaultMoveRate", value, DefaultMoveRatevalue)); @@ -24189,7 +22847,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("startUpCurrentLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("startUpCurrentLevel", [value unsignedCharValue], 255U)); } @@ -24248,7 +22906,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { } if (value != nil) { - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); } VerifyOrReturn(CheckConstraintNotValue("startUpCurrentLevel", value, StartUpCurrentLevelValue)); @@ -24340,136 +22998,132 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the MinLevel attribute\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsTheMinLevelAttribute_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MaxLevel attribute\n"); - if (ShouldSkip("LVL.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MinLevel attribute\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestReadsTheMaxLevelAttribute_4(); + err = TestReadsTheMinLevelAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : sends a MoveToLevelWithOnOff command\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MaxLevel attribute\n"); + if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestSendsAMoveToLevelWithOnOffCommand_5(); + err = TestReadsTheMaxLevelAttribute_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 100ms\n"); - err = TestWait100ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : sends a MoveToLevelWithOnOff command\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestSendsAMoveToLevelWithOnOffCommand_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100ms\n"); + err = TestWait100ms_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_7(); + err = TestReadsCurrentLevelAttributeFromDut_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : sends a Move to level command\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : sends a Move to level command\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestSendsAMoveToLevelCommand_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 100 ms\n"); - err = TestWait100Ms_9(); + err = TestSendsAMoveToLevelCommand_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 100 ms\n"); + err = TestWait100Ms_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_10(); + err = TestReadsCurrentLevelAttributeFromDut_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : sends a Move to level command\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : sends a Move to level command\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestSendsAMoveToLevelCommand_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 11000ms\n"); - err = TestWait11000ms_12(); + err = TestSendsAMoveToLevelCommand_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 11000ms\n"); + err = TestWait11000ms_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_13(); + err = TestReadsCurrentLevelAttributeFromDut_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the OnOffTransitionTime attribute from the DUT\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the OnOffTransitionTime attribute from the DUT\n"); if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_14(); + err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : sends a Move to level command\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : sends a Move to level command\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010")) { NextTest(); return; } - err = TestSendsAMoveToLevelCommand_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 1000ms\n"); - err = TestWait1000ms_16(); + err = TestSendsAMoveToLevelCommand_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestReadsCurrentLevelAttributeFromDut_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); + err = TestWait1000ms_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reset level to 254\n"); + ChipLogProgress(chipTool, " ***** Test Step 18 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000")) { NextTest(); return; } - err = TestResetLevelTo254_18(); + err = TestReadsCurrentLevelAttributeFromDut_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 100ms\n"); - err = TestWait100ms_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Precondition send Off Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 19 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_20(); + err = TestPreconditionSendOffCommand_19(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Check on/off attribute value is false after off command\n"); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20(); break; } @@ -24545,9 +23199,6 @@ class Test_TC_LVL_3_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; } // Go on to the next test. @@ -24561,7 +23212,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -24614,7 +23265,29 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheMinLevelAttribute_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheMinLevelAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24627,7 +23300,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 255U)); @@ -24637,7 +23310,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheMaxLevelAttribute_4() + CHIP_ERROR TestReadsTheMaxLevelAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24650,7 +23323,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 255U)); @@ -24660,7 +23333,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_5() + CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24671,6 +23344,8 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:64U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithOnOffWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a MoveToLevelWithOnOff command Error: %@", err); @@ -24683,14 +23358,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_6() + CHIP_ERROR TestWait100ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24714,7 +23389,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_8() + CHIP_ERROR TestSendsAMoveToLevelCommand_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24725,8 +23400,8 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:100U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a Move to level command Error: %@", err); @@ -24739,14 +23414,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100Ms_9() + CHIP_ERROR TestWait100Ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24770,7 +23445,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_11() + CHIP_ERROR TestSendsAMoveToLevelCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24781,8 +23456,8 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:128U]; params.transitionTime = [NSNumber numberWithUnsignedShort:100U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a Move to level command Error: %@", err); @@ -24795,14 +23470,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait11000ms_12() + CHIP_ERROR TestWait11000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 11000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24826,7 +23501,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_14() + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24839,7 +23514,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); @@ -24849,7 +23524,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_15() + CHIP_ERROR TestSendsAMoveToLevelCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24860,8 +23535,8 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:64U]; params.transitionTime = [NSNumber numberWithUnsignedShort:65535U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a Move to level command Error: %@", err); @@ -24874,14 +23549,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_16() + CHIP_ERROR TestWait1000ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_17() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24905,39 +23580,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestResetLevelTo254_18() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Reset level to 254 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait100ms_19() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestPreconditionSendOffCommand_20() + CHIP_ERROR TestPreconditionSendOffCommand_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24954,7 +23597,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25036,146 +23679,142 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads Minlevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsMinlevelAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : sends a MoveToLevelWithOnOff command\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads Minlevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestSendsAMoveToLevelWithOnOffCommand_4(); + err = TestReadsMinlevelAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : reads max level attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : sends a MoveToLevelWithOnOff command\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestReadsMaxLevelAttributeFromDut_5(); + err = TestSendsAMoveToLevelWithOnOffCommand_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : sends a Move up command\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : reads max level attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestSendsAMoveUpCommand_6(); + err = TestReadsMaxLevelAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Physically verify that the DUT moves at a rate of 32 units per second or as close as " - "possible to this rate and completes moving to its maximum level\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move up command\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDutMovesAtARateOf32UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompletesMovingToItsMaximumLevel_7(); + err = TestSendsAMoveUpCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 9000ms\n"); - err = TestWait9000ms_8(); + ChipLogProgress(chipTool, + " ***** Test Step 8 : Physically verify that the DUT moves at a rate of 32 units per second or as close as " + "possible to this rate and completes moving to its maximum level\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestPhysicallyVerifyThatTheDutMovesAtARateOf32UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompletesMovingToItsMaximumLevel_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 9000ms\n"); + err = TestWait9000ms_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000 && LVL.S.A0003")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_9(); + err = TestReadsCurrentLevelAttributeFromDut_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : sends a MoveWithOnOff command\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : sends a Move command\n"); if (ShouldSkip("LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestSendsAMoveWithOnOffCommand_10(); + err = TestSendsAMoveCommand_11(); break; - case 11: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Physically verify that the DUT moves at a rate of 64 units per second or as close as " + " ***** Test Step 12 : Physically verify that the DUT moves at a rate of 64 units per second or as close as " "possible to this rate and complete moving to its minimum level\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDutMovesAtARateOf64UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompleteMovingToItsMinimumLevel_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5000ms\n"); - err = TestWait5000ms_12(); + err = TestPhysicallyVerifyThatTheDutMovesAtARateOf64UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompleteMovingToItsMinimumLevel_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 5000ms\n"); + err = TestWait5000ms_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_13(); + err = TestReadsCurrentLevelAttributeFromDut_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : reads default move rate attribute from DUT\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : reads default move rate attribute from DUT\n"); if (ShouldSkip("LVL.S.A0014")) { NextTest(); return; } - err = TestReadsDefaultMoveRateAttributeFromDut_14(); + err = TestReadsDefaultMoveRateAttributeFromDut_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : sends a Move up command at default move rate\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : sends a Move up command at default move rate\n"); if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0014")) { NextTest(); return; } - err = TestSendsAMoveUpCommandAtDefaultMoveRate_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 100ms\n"); - err = TestWait100ms_16(); + err = TestSendsAMoveUpCommandAtDefaultMoveRate_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Physically verify that the device moves at the rate recorded in step 3a and completes " - "moving to its maximum level\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); + err = TestWait500ms_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reset level to 254\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000")) { + ChipLogProgress(chipTool, + " ***** Test Step 18 : Physically verify that the device moves at the rate recorded in step 3a and completes " + "moving to its maximum level\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C05.Rsp && LVL.S.A0014")) { NextTest(); return; } - err = TestResetLevelTo254_18(); + err = TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 100ms\n"); - err = TestWait100ms_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Precondition send Off Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 19 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_20(); + err = TestPreconditionSendOffCommand_19(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Check on/off attribute value is false after off command\n"); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20(); break; } @@ -25251,9 +23890,6 @@ class Test_TC_LVL_4_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; } // Go on to the next test. @@ -25267,7 +23903,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -25319,9 +23955,31 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestReadsMinlevelAttributeFromDut_3() + CHIP_ERROR TestReadsMinlevelAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25334,7 +23992,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 255U)); { @@ -25347,7 +24005,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_4() + CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25358,6 +24016,8 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:1U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithOnOffWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a MoveToLevelWithOnOff command Error: %@", err); @@ -25371,7 +24031,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } NSNumber * _Nonnull MaxlevelValue; - CHIP_ERROR TestReadsMaxLevelAttributeFromDut_5() + CHIP_ERROR TestReadsMaxLevelAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25384,7 +24044,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 255U)); { @@ -25397,7 +24057,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommand_6() + CHIP_ERROR TestSendsAMoveUpCommand_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25408,8 +24068,8 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; params.rate = [NSNumber numberWithUnsignedChar:32U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a Move up command Error: %@", err); @@ -25423,7 +24083,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } CHIP_ERROR - TestPhysicallyVerifyThatTheDutMovesAtARateOf32UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompletesMovingToItsMaximumLevel_7() + TestPhysicallyVerifyThatTheDutMovesAtARateOf32UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompletesMovingToItsMaximumLevel_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -25432,14 +24092,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWait9000ms_8() + CHIP_ERROR TestWait9000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25463,7 +24123,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveWithOnOffCommand_10() + CHIP_ERROR TestSendsAMoveCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25471,23 +24131,25 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; + __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; params.rate = [NSNumber numberWithUnsignedChar:64U]; - [cluster moveWithOnOffWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a MoveWithOnOff command Error: %@", err); + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"sends a Move command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR - TestPhysicallyVerifyThatTheDutMovesAtARateOf64UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompleteMovingToItsMinimumLevel_11() + TestPhysicallyVerifyThatTheDutMovesAtARateOf64UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompleteMovingToItsMinimumLevel_12() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -25496,14 +24158,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWait5000ms_12() + CHIP_ERROR TestWait5000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25531,7 +24193,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } NSNumber * _Nullable DefaultMoveRateValue; - CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_14() + CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25546,7 +24208,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); } @@ -25560,7 +24222,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_15() + CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25571,8 +24233,8 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; params.rate = [NSNumber numberWithUnsignedChar:255U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a Move up command at default move rate Error: %@", err); @@ -25585,14 +24247,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_16() + CHIP_ERROR TestWait500ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_17() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_18() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -25601,39 +24263,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestResetLevelTo254_18() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Reset level to 254 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait100ms_19() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestPreconditionSendOffCommand_20() + CHIP_ERROR TestPreconditionSendOffCommand_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25650,7 +24280,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25732,96 +24362,156 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads Minlevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsMinlevelAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Sends MoveToLevelWithOnOff command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads Minlevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestSendsMoveToLevelWithOnOffCommandToDut_4(); + err = TestReadsMinlevelAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads current level attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Sends MoveToLevelWithOnOff command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0002")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_5(); + err = TestSendsMoveToLevelWithOnOffCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Sends step up command to DUT\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.M.VarRate")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Sends MoveToLevelWithOnOff command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && !LVL.S.A0002")) { NextTest(); return; } - err = TestSendsStepUpCommandToDut_6(); + err = TestSendsMoveToLevelWithOnOffCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 4000ms\n"); - err = TestWait4000ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Reads current level attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp")) { + if (ShouldSkip("LVL.S.A0000 && !LVL.S.A0002 && LVL.S.C04.Rsp")) { NextTest(); return; } err = TestReadsCurrentLevelAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Sends a StepWithOnOff command\n"); - if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.M.VarRate")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends step up command to DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestSendsAStepWithOnOffCommand_9(); + err = TestSendsStepUpCommandToDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 4000ms\n"); - err = TestWait4000ms_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads current level attribute from DUT\n"); - if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Sends step up command to DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && !LVL.S.M.VarRate")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_11(); + err = TestSendsStepUpCommandToDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 2500ms\n"); + err = TestWait2500ms_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reset level to 254\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestResetLevelTo254_12(); + err = TestReadsCurrentLevelAttributeFromDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 100ms\n"); - err = TestWait100ms_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp && !LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Precondition send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Sends a StepWithOnOff command\n"); + if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_14(); + err = TestSendsAStepWithOnOffCommand_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Check on/off attribute value is false after off command\n"); + ChipLogProgress(chipTool, " ***** Test Step 15 : Sends a StepWithOnOff command\n"); + if (ShouldSkip("LVL.S.C06.Rsp && !LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestSendsAStepWithOnOffCommand_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 2500ms\n"); + err = TestWait2500ms_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && !LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Precondition send Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestPreconditionSendOffCommand_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_15(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); break; } @@ -25882,6 +24572,27 @@ class Test_TC_LVL_5_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; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -25895,7 +24606,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -25947,9 +24658,31 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestReadsMinlevelAttributeFromDut_3() + CHIP_ERROR TestReadsMinlevelAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25962,9 +24695,9 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 255U)); + VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 254U)); { MinlevelValue = value; } @@ -25975,7 +24708,32 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_4() + CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:[MinlevelValue unsignedCharValue] + 1U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithOnOffWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends MoveToLevelWithOnOff command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25984,8 +24742,10 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; - params.level = [MinlevelValue copy]; + params.level = [NSNumber numberWithUnsignedChar:2U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithOnOffWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends MoveToLevelWithOnOff command to DUT Error: %@", err); @@ -25999,7 +24759,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentlevelValue; - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_5() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26014,12 +24774,12 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, MinlevelValue)); + VerifyOrReturn(CheckValue("current level", actualValue, [MinlevelValue unsignedCharValue] + 1U)); } - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 255U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); { CurrentlevelValue = value; } @@ -26030,7 +24790,35 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsStepUpCommandToDut_6() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads current level attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 2U)); + } + + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsStepUpCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26042,8 +24830,8 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { params.stepMode = [NSNumber numberWithUnsignedChar:0U]; params.stepSize = [NSNumber numberWithUnsignedChar:64U]; params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends step up command to DUT Error: %@", err); @@ -26056,14 +24844,40 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait4000ms_7() + CHIP_ERROR TestSendsStepUpCommandToDut_10() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRLevelControlClusterStepParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:0U]; + params.stepSize = [NSNumber numberWithUnsignedChar:64U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends step up command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait2500ms_11() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 4000UL; + value.ms = 2500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26076,17 +24890,70 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 60U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 68U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 66U)); + } + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAStepWithOnOffCommand_9() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads current level attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 66U)); + } + + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsAStepWithOnOffCommand_14() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = [NSNumber numberWithUnsignedChar:64U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepWithOnOffWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a StepWithOnOff command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsAStepWithOnOffCommand_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26098,6 +24965,8 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { params.stepMode = [NSNumber numberWithUnsignedChar:1U]; params.stepSize = [NSNumber numberWithUnsignedChar:64U]; params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepWithOnOffWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends a StepWithOnOff command Error: %@", err); @@ -26110,14 +24979,14 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait4000ms_10() + CHIP_ERROR TestWait2500ms_16() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 4000UL; + value.ms = 2500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_11() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26141,7 +25010,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestResetLevelTo254_12() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26149,31 +25018,71 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Reset level to 254 Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads current level attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, CurrentlevelValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_13() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_19() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads current level attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_14() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_20() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads current level attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestPreconditionSendOffCommand_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26190,7 +25099,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_15() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26272,124 +25181,124 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads Minlevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsMinlevelAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Sends MoveToLevelWithOnOff command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads Minlevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestSendsMoveToLevelWithOnOffCommandToDut_4(); + err = TestReadsMinlevelAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Sends MoveToLevelWithOnOff command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_5(); + err = TestSendsMoveToLevelWithOnOffCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Sends a move up command to DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestSendsAMoveUpCommandToDut_6(); + err = TestReadsCurrentLevelAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 5000ms\n"); - err = TestWait5000ms_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends stop command to DUT\n"); - if (ShouldSkip("LVL.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Sends a move up command to DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestSendsStopCommandToDut_8(); + err = TestSendsAMoveUpCommandToDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 5000ms\n"); + err = TestWait5000ms_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Physically verify that the device has stopped transitioning\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends stop command to DUT\n"); + if (ShouldSkip("LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9(); + err = TestSendsStopCommandToDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Physically verify that the device has stopped transitioning\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_10(); + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Sends a move up command to DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestSendsAMoveUpCommandToDut_11(); + err = TestReadsCurrentLevelAttributeFromDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5000ms\n"); - err = TestWait5000ms_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Sends a move up command to DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestSendsAMoveUpCommandToDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Sends stop command to DUT\n"); - err = TestSendsStopCommandToDut_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 5000ms\n"); + err = TestWait5000ms_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Physically verify that the device has stopped transitioning\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Sends StopWithOnOff command to DUT\n"); + if (ShouldSkip("LVL.S.C07.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14(); + err = TestSendsStopWithOnOffCommandToDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Physically verify that the device has stopped transitioning\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C07.Rsp")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_15(); + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reset level to 254\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestResetLevelTo254_16(); + err = TestReadsCurrentLevelAttributeFromDut_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 100ms\n"); - err = TestWait100ms_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Precondition send Off Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 17 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_18(); + err = TestPreconditionSendOffCommand_17(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Check on/off attribute value is false after off command\n"); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18(); break; } @@ -26459,9 +25368,6 @@ class Test_TC_LVL_6_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. @@ -26475,7 +25381,7 @@ class Test_TC_LVL_6_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; @@ -26527,9 +25433,31 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestReadsMinlevelAttributeFromDut_3() + CHIP_ERROR TestReadsMinlevelAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26542,7 +25470,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 255U)); { @@ -26555,7 +25483,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_4() + CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26566,6 +25494,8 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:1U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithOnOffWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends MoveToLevelWithOnOff command to DUT Error: %@", err); @@ -26579,7 +25509,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentLevelValue; - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_5() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26604,7 +25534,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandToDut_6() + CHIP_ERROR TestSendsAMoveUpCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26615,8 +25545,8 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends a move up command to DUT Error: %@", err); @@ -26629,14 +25559,14 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_7() + CHIP_ERROR TestWait5000ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestSendsStopCommandToDut_8() + CHIP_ERROR TestSendsStopCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26645,8 +25575,8 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterStopParams alloc] init]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster stopWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends stop command to DUT Error: %@", err); @@ -26659,7 +25589,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_10() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -26668,7 +25598,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26681,8 +25611,8 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 22U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 28U)); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 21U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 29U)); VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, CurrentLevelValue)); NextTest(); @@ -26691,7 +25621,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandToDut_11() + CHIP_ERROR TestSendsAMoveUpCommandToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26702,8 +25632,8 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends a move up command to DUT Error: %@", err); @@ -26716,14 +25646,14 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_12() + CHIP_ERROR TestWait5000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestSendsStopCommandToDut_13() + CHIP_ERROR TestSendsStopWithOnOffCommandToDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26731,22 +25661,22 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterStopParams alloc] init]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster stopWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends stop command to DUT Error: %@", err); + __auto_type * params = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster stopWithOnOffWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends StopWithOnOff command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_15() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -26755,7 +25685,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_15() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26768,8 +25698,8 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 45U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 55U)); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 43U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 57U)); VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, CurrentLevelValue)); NextTest(); @@ -26778,39 +25708,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestResetLevelTo254_16() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Reset level to 254 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait100ms_17() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestPreconditionSendOffCommand_18() + CHIP_ERROR TestPreconditionSendOffCommand_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26827,7 +25725,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26997,7 +25895,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -27020,7 +25918,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -27048,7 +25946,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); } - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); NextTest(); }]; @@ -27072,7 +25970,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -27095,7 +25993,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -27159,12 +26057,12 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); if (ShouldSkip("KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK")) { NextTest(); return; } - err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); @@ -27265,14 +26163,14 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device @@ -27281,11 +26179,11 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 7UL)); @@ -27308,7 +26206,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -27334,7 +26232,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -27356,7 +26254,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); NextTest(); @@ -27422,12 +26320,12 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); if (ShouldSkip("APPLAUNCHER.S.AP")) { NextTest(); return; } - err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap\n"); @@ -27439,10 +26337,6 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("APPLAUNCHER.S.A0000 && APPLAUNCHER.S.A0001")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_4(); break; case 5: @@ -27565,14 +26459,14 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device @@ -27581,7 +26475,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27590,7 +26484,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -27615,7 +26509,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -27635,7 +26529,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -27661,7 +26555,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); @@ -27683,7 +26577,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); @@ -27705,7 +26599,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); @@ -27729,7 +26623,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); NextTest(); @@ -27795,19 +26689,11 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); - if (ShouldSkip("MEDIAINPUT.S.NU")) { - NextTest(); - return; - } - err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("MEDIAINPUT.S.A0000 && MEDIAINPUT.S.A0001")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: @@ -27927,14 +26813,14 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -27943,16 +26829,14 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); - } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 1UL)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -27972,7 +26856,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -27998,7 +26882,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); @@ -28020,7 +26904,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); @@ -28042,7 +26926,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); @@ -28072,7 +26956,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -28236,7 +27120,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -28259,7 +27143,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -28277,7 +27161,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -28306,7 +27190,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -28329,7 +27213,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -28393,19 +27277,15 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); if (ShouldSkip("CHANNEL.S.CL || CHANNEL.S.LI")) { NextTest(); return; } - err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("CHANNEL.S.A0000 && CHANNEL.S.A0001 && CHANNEL.S.A0002")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: @@ -28433,22 +27313,55 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { err = TestReadTheOptionalAttributeCurrentChannelAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional command(ChangeChannel) in AcceptedCommandList\n"); + if (ShouldSkip("CHANNEL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandChangeChannelInAcceptedCommandList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_8(); + ChipLogProgress( + chipTool, " ***** Test Step 8 : Read the optional command(ChangeChannelByNumber) in AcceptedCommandList\n"); + if (ShouldSkip("CHANNEL.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_8(); break; case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional command(SkipChannel) in AcceptedCommandList\n"); + if (ShouldSkip("CHANNEL.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandSkipChannelInAcceptedCommandList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip(" !CHANNEL.S.C01.Tx ")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeGeneratedCommandList_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip("CHANNEL.S.C01.Tx")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeGeneratedCommandList_11(); + break; + case 12: ChipLogProgress(chipTool, - " ***** Test Step 9 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 12 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_12(); break; } @@ -28491,6 +27404,15 @@ class Test_TC_CHANNEL_1_6 : 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; } // Go on to the next test. @@ -28504,7 +27426,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; @@ -28534,25 +27456,25 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); @@ -28573,7 +27495,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -28597,7 +27519,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); @@ -28617,7 +27539,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); @@ -28637,7 +27559,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); @@ -28646,20 +27568,58 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestReadTheOptionalCommandChangeChannelInAcceptedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Read the optional command(ChangeChannel) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(ChangeChannelByNumber) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandSkipChannelInAcceptedCommandList_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(SkipChannel) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); NextTest(); @@ -28668,7 +27628,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -28679,14 +27639,39 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList 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; + } + + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_12() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -28743,12 +27728,12 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); if (ShouldSkip("MEDIAPLAYBACK.S.AS || MEDIAPLAYBACK.S.VS")) { NextTest(); return; } - err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); @@ -28807,18 +27792,82 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { err = TestReadTheGlobalAttributeAcceptedCommandList_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional command(StartOver) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandStartOverInAcceptedCommandList_11(); break; case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read the optional command(Previous) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandPreviousInAcceptedCommandList_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional command(Next) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C05.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandNextInAcceptedCommandList_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the optional command(Rewind) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandRewindInAcceptedCommandList_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional command(FastForward) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandFastForwardInAcceptedCommandList_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read the optional command(SkipForward) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandSkipForwardInAcceptedCommandList_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Read the optional command(SkipBackward) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandSkipBackwardInAcceptedCommandList_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read the optional command(Seek) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C0B.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandSeekInAcceptedCommandList_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_19(); + break; + case 20: ChipLogProgress(chipTool, - " ***** Test Step 12 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 20 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_12(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_20(); break; } @@ -28870,6 +27919,30 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -28883,7 +27956,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -28915,14 +27988,14 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -28931,11 +28004,11 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); @@ -28958,7 +28031,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); @@ -28985,7 +28058,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); @@ -29007,7 +28080,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); @@ -29029,7 +28102,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); @@ -29051,7 +28124,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); NextTest(); @@ -29073,7 +28146,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); NextTest(); @@ -29095,7 +28168,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); NextTest(); @@ -29117,7 +28190,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); @@ -29128,7 +28201,183 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_11() + CHIP_ERROR TestReadTheOptionalCommandStartOverInAcceptedCommandList_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(StartOver) in AcceptedCommandList 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 TestReadTheOptionalCommandPreviousInAcceptedCommandList_12() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(Previous) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandNextInAcceptedCommandList_13() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(Next) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandRewindInAcceptedCommandList_14() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(Rewind) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandFastForwardInAcceptedCommandList_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(FastForward) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandSkipForwardInAcceptedCommandList_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(SkipForward) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandSkipBackwardInAcceptedCommandList_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(SkipBackward) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 9UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandSeekInAcceptedCommandList_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(Seek) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 11UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -29141,7 +28390,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 10UL)); NextTest(); @@ -29150,7 +28399,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_12() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_20() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -29324,7 +28573,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -29344,7 +28593,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); @@ -29367,7 +28616,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); @@ -29395,7 +28644,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -29423,7 +28672,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -29448,7 +28697,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -29517,19 +28766,15 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("TGTNAV.S.A0001")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - if (ShouldSkip(" !TGTNAV.S.A0001 ")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(CurrentTarget) in AttributeList\n"); + if (ShouldSkip("TGTNAV.S.A0001")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_4(); + err = TestReadTheOptionalAttributeCurrentTargetInAttributeList_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); @@ -29629,7 +28874,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -29654,7 +28899,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -29674,9 +28919,8 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + 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)); @@ -29689,7 +28933,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeCurrentTargetInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device @@ -29698,17 +28942,12 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(CurrentTarget) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "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("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); }]; @@ -29729,7 +28968,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -29751,7 +28990,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); NextTest(); @@ -29822,29 +29061,49 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("APBSC.S.A0000 && APBSC.S.A0001 && APBSC.S.A0003")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(VendorName) in AttributeList\n"); + if (ShouldSkip("APBSC.S.A0000")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeVendorNameInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(VendorID) in AttributeList\n"); + if (ShouldSkip("APBSC.S.A0001")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeVendorIDInAttributeList_5(); break; case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(ProductID) in AttributeList\n"); + if (ShouldSkip("APBSC.S.A0003")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeProductIDInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_8(); + break; + case 9: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 9 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9(); break; } @@ -29878,6 +29137,15 @@ class Test_TC_APBSC_1_10 : 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; } // Go on to the next test. @@ -29891,7 +29159,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -29923,7 +29191,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -29948,7 +29216,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -29968,7 +29236,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); @@ -29986,7 +29254,73 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestReadTheOptionalAttributeVendorNameInAttributeList_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(VendorName) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeVendorIDInAttributeList_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(VendorID) in AttributeList 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 TestReadTheOptionalAttributeProductIDInAttributeList_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(ProductID) 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 TestReadTheGlobalAttributeAcceptedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -30004,14 +29338,14 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -30029,14 +29363,14 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30093,19 +29427,15 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); if (ShouldSkip("CONTENTLAUNCHER.S.CS || CONTENTLAUNCHER.S.UP")) { NextTest(); return; } - err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("CONTENTLAUNCHER.S.A0000 && CONTENTLAUNCHER.S.A0001")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: @@ -30243,14 +29573,14 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -30259,11 +29589,11 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); @@ -30286,7 +29616,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -30312,7 +29642,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); @@ -30334,7 +29664,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); @@ -30356,7 +29686,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -30378,7 +29708,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); NextTest(); @@ -30400,7 +29730,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 2UL)); NextTest(); @@ -30568,7 +29898,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -30593,7 +29923,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -30613,7 +29943,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -30639,7 +29969,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); @@ -30663,7 +29993,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); NextTest(); @@ -32176,7 +31506,7 @@ class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { case 3: ChipLogProgress( chipTool, " ***** Test Step 3 : TH reads the InputList attribute from the DUT to show list of Inputs available\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000 && MEDIAINPUT.S.C0003")) { NextTest(); return; } @@ -32463,7 +31793,7 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends a ChangeChannelByNumber command\n"); - if (ShouldSkip("CHANNEL.S.C0002")) { + if (ShouldSkip("CHANNEL.S.C02.Rsp")) { NextTest(); return; } @@ -32471,7 +31801,7 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Verify that the channel has changed on the device\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && CHANNEL.S.C02.Rsp")) { NextTest(); return; } @@ -32551,7 +31881,7 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + VerifyOrReturn(CheckConstraintType("channelList", "list", "list")); NextTest(); }]; @@ -32687,7 +32017,7 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Sends a SkipChannel command to the DUT\n"); - if (ShouldSkip("CHANNEL.S.C0003")) { + if (ShouldSkip("CHANNEL.S.C03.Rsp")) { NextTest(); return; } @@ -32695,7 +32025,7 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Verify that the channel has changed on the device\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && CHANNEL.S.C03.Rsp")) { NextTest(); return; } @@ -32802,7 +32132,7 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + VerifyOrReturn(CheckConstraintType("channelList", "list", "list")); NextTest(); }]; @@ -32880,7 +32210,7 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { } if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentChannel", "", "list")); + VerifyOrReturn(CheckConstraintType("currentChannel", "ChannelInfo", "ChannelInfo")); } NextTest(); @@ -32935,7 +32265,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { case 1: ChipLogProgress( chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0001")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -32943,7 +32273,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -32951,7 +32281,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a Play command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -32959,23 +32289,23 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Verify that the media state is playing\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } err = TestVerifyThatTheMediaStateIsPlaying_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the playback state attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentState attribute\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } - err = TestReadsThePlaybackStateAttribute_5(); + err = TestReadsTheCurrentStateAttribute_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : sends a Pause command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0001")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -32983,19 +32313,23 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Verify that the media is paused\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } err = TestVerifyThatTheMediaIsPaused_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the playback state attribute\n"); - err = TestReadsThePlaybackStateAttribute_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the CurrentState attribute\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp && MEDIAPLAYBACK.S.A0000")) { + NextTest(); + return; + } + err = TestReadsTheCurrentStateAttribute_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Sends a Stop command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0002")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C02.Rsp")) { NextTest(); return; } @@ -33003,19 +32337,19 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Verify that the media is stoped\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C02.Rsp")) { NextTest(); return; } err = TestVerifyThatTheMediaIsStoped_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the playback state attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the CurrentState attribute\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C02.Rsp")) { NextTest(); return; } - err = TestReadsThePlaybackStateAttribute_11(); + err = TestReadsTheCurrentStateAttribute_11(); break; } @@ -33174,7 +32508,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsThePlaybackStateAttribute_5() + CHIP_ERROR TestReadsTheCurrentStateAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -33183,7 +32517,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the playback state attribute Error: %@", err); + NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33232,7 +32566,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsThePlaybackStateAttribute_8() + CHIP_ERROR TestReadsTheCurrentStateAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -33241,7 +32575,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the playback state attribute Error: %@", err); + NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33290,7 +32624,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsThePlaybackStateAttribute_11() + CHIP_ERROR TestReadsTheCurrentStateAttribute_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -33299,7 +32633,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the playback state attribute Error: %@", err); + NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33360,7 +32694,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { case 1: ChipLogProgress( chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0001")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -33368,7 +32702,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -33376,7 +32710,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a Play command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -33384,7 +32718,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Verify that the media state is playing\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -33392,7 +32726,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -33400,7 +32734,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Sends a StartOver command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0003")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C03.Rsp")) { NextTest(); return; } @@ -33408,7 +32742,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Verify that the media is started over\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C03.Rsp")) { NextTest(); return; } @@ -33416,7 +32750,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Next command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0005")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C05.Rsp")) { NextTest(); return; } @@ -33424,7 +32758,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Verify that the next media item in the queue has been loaded\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C05.Rsp")) { NextTest(); return; } @@ -33432,7 +32766,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Sends a Previous command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0004")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C04.Rsp")) { NextTest(); return; } @@ -33440,7 +32774,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Verify that the previous media item in the queue has been loaded\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C04.Rsp")) { NextTest(); return; } @@ -33448,7 +32782,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Sends a SkipForward command to the DUT \n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0008")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp")) { NextTest(); return; } @@ -33456,7 +32790,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Verify that the media has skipped forward 10 seconds\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C08.Rsp")) { NextTest(); return; } @@ -33464,7 +32798,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the SampledPosition attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0003")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C08.Rsp")) { NextTest(); return; } @@ -33472,7 +32806,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Sends a SkipBackward command to the DUT \n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0009")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp")) { NextTest(); return; } @@ -33480,7 +32814,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Verify that the media has skipped backward 10 seconds\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C09.Rsp")) { NextTest(); return; } @@ -33488,7 +32822,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Reads the SampledPosition attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0003")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C09.Rsp")) { NextTest(); return; } @@ -33970,7 +33304,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { case 1: ChipLogProgress( chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0001")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -33978,7 +33312,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a Seek command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C000B")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C0B.Rsp")) { NextTest(); return; } @@ -33987,7 +33321,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { case 3: ChipLogProgress( chipTool, " ***** Test Step 3 : Verify that the media has moved to 10 seconds from the starting point\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0B.Rsp")) { NextTest(); return; } @@ -33995,7 +33329,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the SampledPosition attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0003")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C0B.Rsp")) { NextTest(); return; } @@ -34036,7 +33370,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { case 9: ChipLogProgress( chipTool, " ***** Test Step 9 : Sends a Seek command Position value beyond the furthest valid position\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C000B")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C0B.Rsp")) { NextTest(); return; } @@ -34308,7 +33642,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { case 1: ChipLogProgress( chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0001")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -34316,7 +33650,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -34332,7 +33666,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Sends a FastForward command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0007")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } @@ -34340,7 +33674,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } @@ -34348,7 +33682,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0004")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } @@ -34356,7 +33690,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Sends a FastForward command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0007")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } @@ -34364,7 +33698,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0004")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } @@ -34372,7 +33706,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Sends a Rewind command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0006")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } @@ -34380,7 +33714,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } @@ -34388,7 +33722,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0007")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0004")) { NextTest(); return; } @@ -34396,7 +33730,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Sends a Rewind command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0006")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } @@ -34412,7 +33746,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Sends a Play command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -34420,7 +33754,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0004")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -34428,7 +33762,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Sends consecutive FastForward commands\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0007")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } @@ -34436,7 +33770,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Sends consecutive Rewind commands\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0006")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } @@ -34782,7 +34116,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message - = chip::Span("Please enter 'y' if PlaybackSpeed value is -2garbage: not in length on purpose", 45); + = chip::Span("Please enter 'y' if PlaybackSpeed value is -1garbage: not in length on purpose", 45); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); @@ -35020,7 +34354,7 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("outputList", "", "OutPutInfo")); + VerifyOrReturn(CheckConstraintType("outputList", "list", "list")); NextTest(); }]; @@ -35206,7 +34540,7 @@ class Test_TC_AUDIOOUTPUT_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("outputList", "", "OutPutInfo")); + VerifyOrReturn(CheckConstraintType("outputList", "list", "list")); { audioOutputListValues = value; } @@ -35320,7 +34654,7 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentTarget attribute\n"); - if (ShouldSkip("TGTNAV.S.A0001")) { + if (ShouldSkip("TGTNAV.S.A0001 && TGTNAV.S.C0000")) { NextTest(); return; } @@ -35394,7 +34728,7 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentTarget", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentTarget", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentTarget", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentTarget", [value unsignedCharValue], 255U)); @@ -35418,7 +34752,7 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("targetList", "", "list")); + VerifyOrReturn(CheckConstraintType("targetList", "list", "list")); { TargetListValues = value; } @@ -35662,13 +34996,14 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("vendorName", [value length], 32)); + VerifyOrReturn(CheckConstraintType("vendorName", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("vendorName", value, 32)); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull vendorID; CHIP_ERROR TestReadsTheVendorIDAttribute_2() { @@ -35683,7 +35018,11 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("vendorID", "", "vendor-id")); + VerifyOrReturn(CheckConstraintType("vendorID", "vendor_id", "vendor_id")); + { + vendorID = value; + } + NextTest(); }]; @@ -35703,8 +35042,8 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("applicationName", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("applicationName", [value length], 256)); + VerifyOrReturn(CheckConstraintType("applicationName", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("applicationName", value, 256)); NextTest(); }]; @@ -35724,7 +35063,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("productID", "", "uint16")); + VerifyOrReturn(CheckConstraintType("productID", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("productID", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("productID", [value unsignedShortValue], 65535U)); @@ -35748,7 +35087,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("application", "", "struct")); + VerifyOrReturn(CheckConstraintType("application", "ApplicationBasicApplication", "ApplicationBasicApplication")); NextTest(); }]; @@ -35790,8 +35129,8 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("applicationVersion", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("applicationVersion", [value length], 32)); + VerifyOrReturn(CheckConstraintType("applicationVersion", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("applicationVersion", value, 32)); NextTest(); }]; @@ -35811,7 +35150,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("allowedVendorList", "", "list")); + VerifyOrReturn(CheckConstraintType("allowedVendorList", "list", "list")); NextTest(); }]; @@ -35937,7 +35276,7 @@ class Test_TC_CONTENTLAUNCHER_10_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptHeader", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptHeader", "list", "list")); NextTest(); }]; @@ -35958,7 +35297,7 @@ class Test_TC_CONTENTLAUNCHER_10_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportedStreamingProtocols", "", "map32")); + VerifyOrReturn(CheckConstraintType("supportedStreamingProtocols", "bitmap32", "bitmap32")); NextTest(); }]; @@ -36154,7 +35493,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -36179,7 +35518,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -36204,7 +35543,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -36224,7 +35563,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -36254,7 +35593,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); NextTest(); @@ -36276,7 +35615,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); NextTest(); @@ -36298,7 +35637,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -36325,7 +35664,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -36710,7 +36049,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: @@ -36807,7 +36146,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36816,7 +36155,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -36841,7 +36180,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -36861,7 +36200,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -36895,7 +36234,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -36920,7 +36259,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -37169,7 +36508,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); + VerifyOrReturn(CheckConstraintType("occupancy", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("occupancy", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("occupancy", [value unsignedCharValue], 1U)); @@ -37192,7 +36531,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("occupancySensorType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3U)); @@ -37216,7 +36555,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "", "map8")); + VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 273U)); @@ -37245,7 +36584,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("PIR occupied to unoccupied delay", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("pirOccupiedToUnoccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("pirOccupiedToUnoccupiedDelay", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("pirOccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("pirOccupiedToUnoccupiedDelay", [value unsignedShortValue], 65535U)); @@ -37274,7 +36613,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("PIR unoccupied to occupied delay", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedDelay", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("pirUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("pirUnoccupiedToOccupiedDelay", [value unsignedShortValue], 65535U)); @@ -37303,7 +36642,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("PIR unoccupied to occupied threshold", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedThreshold", "", "uint8")); + VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedThreshold", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("pirUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue("pirUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); @@ -37332,7 +36671,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ultrasonic occupied to unoccupied delay", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("ultrasonicOccupiedToUnoccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("ultrasonicOccupiedToUnoccupiedDelay", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("ultrasonicOccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); VerifyOrReturn( @@ -37363,7 +36702,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied delay", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedDelay", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); VerifyOrReturn( @@ -37394,7 +36733,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied threshold", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedThreshold", "", "uint16")); + VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedThreshold", "int8u", "int8u")); VerifyOrReturn( CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); VerifyOrReturn( @@ -37425,7 +36764,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("physical contact occupied to unoccupied delay", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("physicalContactOccupiedToUnoccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("physicalContactOccupiedToUnoccupiedDelay", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("physicalContactOccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); VerifyOrReturn( @@ -37456,7 +36795,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("physical contact unoccupied to occupied delay", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedDelay", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("physicalContactUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); VerifyOrReturn( @@ -37487,7 +36826,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("physical contact unoccupied to occupied threshold", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedThreshold", "", "uint8")); + VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedThreshold", "int8u", "int8u")); VerifyOrReturn( CheckConstraintMinValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); VerifyOrReturn( @@ -37564,35 +36903,28 @@ class Test_TC_OO_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("OO.S.F00")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - if (ShouldSkip(" !OO.S.F00 ")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the feature dependent(OO.S.F00) attribute in AttributeList\n"); + if (ShouldSkip("OO.S.F00")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_5(); + err = TestReadTheFeatureDependentOOSF00AttributeInAttributeList_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("OO.S.F00")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAcceptedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip(" !OO.S.F00 ")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Read the feature dependent(OO.S.F00) commands in AcceptedCommandList\n"); + if (ShouldSkip("OO.S.F00")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_7(); + err = TestReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); @@ -37692,7 +37024,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -37715,7 +37047,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -37738,7 +37070,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -37756,12 +37088,8 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16385UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16386UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16387UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -37774,24 +37102,22 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheFeatureDependentOOSF00AttributeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Read the feature dependent(OO.S.F00) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "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("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16385UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16386UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16387UL)); NextTest(); }]; @@ -37810,13 +37136,10 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 65UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 66UL)); NextTest(); }]; @@ -37824,21 +37147,21 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Read the feature dependent(OO.S.F00) commands in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 65UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 66UL)); NextTest(); }]; @@ -37862,7 +37185,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -37922,7 +37245,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: OnOff\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: OnOff\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; @@ -37930,7 +37253,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { err = TestReadTheMandatoryAttributeOnOff_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read LT attribute: GlobalSceneControl\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read LT attribute: GlobalSceneControl\n"); if (ShouldSkip("OO.S.A4000")) { NextTest(); return; @@ -37938,7 +37261,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { err = TestReadLtAttributeGlobalSceneControl_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : read LT attribute: OnTime\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read LT attribute: OnTime\n"); if (ShouldSkip("OO.S.A4001")) { NextTest(); return; @@ -37946,7 +37269,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { err = TestReadLtAttributeOnTime_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read LT attribute: OffWaitTime\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read LT attribute: OffWaitTime\n"); if (ShouldSkip("OO.S.A4002")) { NextTest(); return; @@ -37954,7 +37277,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { err = TestReadLtAttributeOffWaitTime_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : read LT attribute: StartUpOnOff\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read LT attribute: StartUpOnOff\n"); if (ShouldSkip("OO.S.A4003")) { NextTest(); return; @@ -38024,11 +37347,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: OnOff Error: %@", err); + NSLog(@"Read the mandatory attribute: OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOff", "", "bool")); + VerifyOrReturn(CheckConstraintType("onOff", "boolean", "boolean")); NextTest(); }]; @@ -38042,11 +37365,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGlobalSceneControlWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read LT attribute: GlobalSceneControl Error: %@", err); + NSLog(@"Read LT attribute: GlobalSceneControl Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("globalSceneControl", "", "bool")); + VerifyOrReturn(CheckConstraintType("globalSceneControl", "boolean", "boolean")); NextTest(); }]; @@ -38060,11 +37383,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read LT attribute: OnTime Error: %@", err); + NSLog(@"Read LT attribute: OnTime Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("onTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onTime", [value unsignedShortValue], 65535U)); @@ -38081,11 +37404,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read LT attribute: OffWaitTime Error: %@", err); + NSLog(@"Read LT attribute: OffWaitTime Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("offWaitTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("offWaitTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("offWaitTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("offWaitTime", [value unsignedShortValue], 65535U)); @@ -38102,13 +37425,13 @@ class Test_TC_OO_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeStartUpOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read LT attribute: StartUpOnOff Error: %@", err); + NSLog(@"Read LT attribute: StartUpOnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("startUpOnOff", "", "enum8")); + VerifyOrReturn(CheckConstraintType("startUpOnOff", "enum8", "enum8")); } NextTest(); @@ -38282,7 +37605,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Operate on device to set OnOff attribute manually to on\n"); - if (ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled")) { + if (ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000")) { NextTest(); return; } @@ -38290,7 +37613,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : Check on/off attribute value is true after on command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled")) { NextTest(); return; } @@ -38298,7 +37621,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { break; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Operate on device to set OnOff attribute manually to off\n"); - if (ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled")) { + if (ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000")) { NextTest(); return; } @@ -38306,7 +37629,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled")) { NextTest(); return; } @@ -39657,36 +38980,39 @@ class Test_TC_PS_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the Feature related(PS.S.F00-WIRED) attribute in AttributeList\n"); + ChipLogProgress( + chipTool, " ***** Test Step 4 : Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList\n"); if (ShouldSkip("PS.S.F00")) { NextTest(); return; } - err = TestReadTheFeatureRelatedPSSF00WiredAttributeInAttributeList_4(); + err = TestReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the Feature related(PS.S.F01-BAT) attribute in AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList\n"); if (ShouldSkip("PS.S.F01")) { NextTest(); return; } - err = TestReadTheFeatureRelatedPSSF01BatAttributeInAttributeList_5(); + err = TestReadTheFeatureDependentPSSF01BatAttributeInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the Feature related(PS.S.F02-RECHG) attribute in AttributeList\n"); + ChipLogProgress( + chipTool, " ***** Test Step 6 : Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList\n"); if (ShouldSkip("PS.S.F02")) { NextTest(); return; } - err = TestReadTheFeatureRelatedPSSF02RechgAttributeInAttributeList_6(); + err = TestReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the Feature related(PS.S.F03-REPLC) attribute in AttributeList\n"); + ChipLogProgress( + chipTool, " ***** Test Step 7 : Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList\n"); if (ShouldSkip("PS.S.F03")) { NextTest(); return; } - err = TestReadTheFeatureRelatedPSSF03ReplcAttributeInAttributeList_7(); + err = TestReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AcceptedCommandList\n"); @@ -39795,7 +39121,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -39815,9 +39141,9 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 7UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 15UL)); NextTest(); }]; @@ -39838,7 +39164,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -39854,7 +39180,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureRelatedPSSF00WiredAttributeInAttributeList_4() + CHIP_ERROR TestReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -39863,18 +39189,12 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature related(PS.S.F00-WIRED) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); NextTest(); }]; @@ -39882,7 +39202,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureRelatedPSSF01BatAttributeInAttributeList_5() + CHIP_ERROR TestReadTheFeatureDependentPSSF01BatAttributeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -39891,19 +39211,14 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature related(PS.S.F01-BAT) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 13UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); NextTest(); }]; @@ -39911,7 +39226,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureRelatedPSSF02RechgAttributeInAttributeList_6() + CHIP_ERROR TestReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -39920,16 +39235,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature related(PS.S.F02-RECHG) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 27UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 29UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 30UL)); NextTest(); }]; @@ -39937,7 +39249,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureRelatedPSSF03ReplcAttributeInAttributeList_7() + CHIP_ERROR TestReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -39946,17 +39258,12 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature related(PS.S.F03-REPLC) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 21UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 22UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 24UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); NextTest(); @@ -39983,7 +39290,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -40008,7 +39315,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -40468,7 +39775,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("status", "", "enum8")); + VerifyOrReturn(CheckConstraintType("status", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("status", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("status", [value unsignedCharValue], 3U)); @@ -40491,7 +39798,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("order", "", "uint8")); + VerifyOrReturn(CheckConstraintType("order", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("order", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("order", [value unsignedCharValue], 255U)); @@ -40514,7 +39821,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("description", "", "string")); + VerifyOrReturn(CheckConstraintType("description", "char_string", "char_string")); NextTest(); }]; @@ -40537,7 +39844,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiredAssessedInputVoltage", "", "uint32")); + VerifyOrReturn(CheckConstraintType("wiredAssessedInputVoltage", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("wiredAssessedInputVoltage", [value unsignedIntValue], 0UL)); VerifyOrReturn( CheckConstraintMaxValue("wiredAssessedInputVoltage", [value unsignedIntValue], 4294967295UL)); @@ -40565,7 +39872,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiredAssessedInputFrequency", "", "uint16")); + VerifyOrReturn(CheckConstraintType("wiredAssessedInputFrequency", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("wiredAssessedInputFrequency", [value unsignedShortValue], 0U)); VerifyOrReturn( CheckConstraintMaxValue("wiredAssessedInputFrequency", [value unsignedShortValue], 65535U)); @@ -40590,7 +39897,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("wiredCurrentType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("wiredCurrentType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("wiredCurrentType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("wiredCurrentType", [value unsignedCharValue], 1U)); @@ -40615,7 +39922,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiredAssessedCurrent", "", "uint32")); + VerifyOrReturn(CheckConstraintType("wiredAssessedCurrent", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("wiredAssessedCurrent", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("wiredAssessedCurrent", [value unsignedIntValue], 4294967295UL)); } @@ -40639,7 +39946,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("wiredNominalVoltage", "", "uint32")); + VerifyOrReturn(CheckConstraintType("wiredNominalVoltage", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("wiredNominalVoltage", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("wiredNominalVoltage", [value unsignedIntValue], 4294967295UL)); @@ -40662,7 +39969,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("wiredMaximumCurrent", "", "uint32")); + VerifyOrReturn(CheckConstraintType("wiredMaximumCurrent", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("wiredMaximumCurrent", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("wiredMaximumCurrent", [value unsignedIntValue], 4294967295UL)); @@ -40685,7 +39992,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("wiredPresent", "", "bool")); + VerifyOrReturn(CheckConstraintType("wiredPresent", "boolean", "boolean")); NextTest(); }]; @@ -40705,7 +40012,8 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("activeWiredFaults", "", "list")); + VerifyOrReturn(CheckConstraintType("activeWiredFaults", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("activeWiredFaults", value, 8)); NextTest(); }]; @@ -40727,7 +40035,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("batVoltage", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batVoltage", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batVoltage", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batVoltage", [value unsignedIntValue], 4294967295UL)); } @@ -40753,7 +40061,9 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("batPercentRemaining", "", "uint8")); + VerifyOrReturn(CheckConstraintType("batPercentRemaining", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("batPercentRemaining", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batPercentRemaining", [value unsignedCharValue], 200U)); } NextTest(); @@ -40777,7 +40087,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("batTimeRemaining", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batTimeRemaining", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batTimeRemaining", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batTimeRemaining", [value unsignedIntValue], 4294967295UL)); } @@ -40801,7 +40111,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batChargeLevel", "", "enum8")); + VerifyOrReturn(CheckConstraintType("batChargeLevel", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("batChargeLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("batChargeLevel", [value unsignedCharValue], 2U)); @@ -40824,7 +40134,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batReplacementNeeded", "", "bool")); + VerifyOrReturn(CheckConstraintType("batReplacementNeeded", "boolean", "boolean")); NextTest(); }]; @@ -40844,7 +40154,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batReplaceability", "", "enum8")); + VerifyOrReturn(CheckConstraintType("batReplaceability", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("batReplaceability", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("batReplaceability", [value unsignedCharValue], 3U)); @@ -40867,7 +40177,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batPresent", "", "bool")); + VerifyOrReturn(CheckConstraintType("batPresent", "boolean", "boolean")); NextTest(); }]; @@ -40887,7 +40197,8 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("activeBatFaults", "", "list")); + VerifyOrReturn(CheckConstraintType("activeBatFaults", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("activeBatFaults", value, 8)); NextTest(); }]; @@ -40908,8 +40219,8 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batReplacementDescription", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("batReplacementDescription", [value length], 60)); + VerifyOrReturn(CheckConstraintType("batReplacementDescription", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("batReplacementDescription", value, 60)); NextTest(); }]; @@ -40929,7 +40240,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batCommonDesignation", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batCommonDesignation", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batCommonDesignation", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batCommonDesignation", [value unsignedIntValue], 80UL)); @@ -40952,8 +40263,8 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batANSIDesignation", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("batANSIDesignation", [value length], 20)); + VerifyOrReturn(CheckConstraintType("batANSIDesignation", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("batANSIDesignation", value, 20)); NextTest(); }]; @@ -40973,8 +40284,8 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batIECDesignation", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("batIECDesignation", [value length], 20)); + VerifyOrReturn(CheckConstraintType("batIECDesignation", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("batIECDesignation", value, 20)); NextTest(); }]; @@ -40994,7 +40305,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batApprovedChemistry", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batApprovedChemistry", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batApprovedChemistry", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batApprovedChemistry", [value unsignedIntValue], 32UL)); @@ -41017,7 +40328,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batCapacity", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batCapacity", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batCapacity", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batCapacity", [value unsignedIntValue], 4294967295UL)); @@ -41040,7 +40351,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batQuantity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("batQuantity", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("batQuantity", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("batQuantity", [value unsignedCharValue], 255U)); @@ -41063,7 +40374,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batChargeState", "", "enum8")); + VerifyOrReturn(CheckConstraintType("batChargeState", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("batChargeState", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("batChargeState", [value unsignedCharValue], 3U)); @@ -41088,7 +40399,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("batTimeToFullCharge", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batTimeToFullCharge", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batTimeToFullCharge", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batTimeToFullCharge", [value unsignedIntValue], 4294967295UL)); } @@ -41113,7 +40424,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batFunctionalWhileCharging", "", "bool")); + VerifyOrReturn(CheckConstraintType("batFunctionalWhileCharging", "boolean", "boolean")); NextTest(); }]; @@ -41135,7 +40446,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("batChargingCurrent", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batChargingCurrent", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batChargingCurrent", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batChargingCurrent", [value unsignedIntValue], 4294967295UL)); } @@ -41159,7 +40470,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("activeBatChargeFaults", "", "list")); + VerifyOrReturn(CheckConstraintType("activeBatChargeFaults", "list", "list")); NextTest(); }]; @@ -41397,7 +40708,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -41422,7 +40733,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -41447,7 +40758,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -41467,7 +40778,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -41496,7 +40807,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); NextTest(); @@ -41518,7 +40829,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); NextTest(); @@ -41540,7 +40851,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); NextTest(); @@ -41562,7 +40873,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); NextTest(); @@ -41584,7 +40895,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); @@ -41606,7 +40917,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); NextTest(); @@ -41633,7 +40944,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -41658,7 +40969,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -41872,7 +41183,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value shortValue], 32767)); } @@ -41898,7 +41209,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value shortValue], 32767)); } @@ -41924,7 +41235,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value shortValue], 32767)); } @@ -41948,7 +41259,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "", "int16")); + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); @@ -41973,7 +41284,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("scaledValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("scaledValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("scaledValue", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("scaledValue", [value shortValue], 32767)); } @@ -41999,7 +41310,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("minScaledValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("minScaledValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minScaledValue", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("minScaledValue", [value shortValue], 32767)); } @@ -42025,7 +41336,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxScaledValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxScaledValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxScaledValue", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("maxScaledValue", [value shortValue], 32767)); } @@ -42049,7 +41360,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("scaledTolerance", "", "int16")); + VerifyOrReturn(CheckConstraintType("scaledTolerance", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("scaledTolerance", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("scaledTolerance", [value unsignedShortValue], 2048U)); @@ -42072,7 +41383,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("scale", "", "int8")); + VerifyOrReturn(CheckConstraintType("scale", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("scale", [value charValue], -127)); VerifyOrReturn(CheckConstraintMaxValue("scale", [value charValue], 127)); @@ -42138,20 +41449,166 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { err = TestThReadsTheAttributeListAttributeFromTheDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the AcceptedCommandList attribute from the DUT\n"); - err = TestThReadsTheAcceptedCommandListAttributeFromTheDut_4(); + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the GeneratedCommandList attribute from the DUT\n"); - err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_5(); + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the EventList attribute from the DUT\n"); + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0006")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0007")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_8(); + break; + case 9: + ChipLogProgress(chipTool, + " ***** Test Step 9 : TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0009")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000a")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000b")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000c")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0010")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_14(); + break; + case 15: + ChipLogProgress( + chipTool, " ***** Test Step 15 : TH reads optional attribute(Speed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0014")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_15(); + break; + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the " + "DUT\n"); + if (ShouldSkip("PCC.S.A0015")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_16(); + break; + case 17: + ChipLogProgress( + chipTool, " ***** Test Step 17 : TH reads optional attribute(Power) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0016")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_17(); + break; + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the " + "DUT\n"); + if (ShouldSkip("PCC.S.A0017")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_18(); + break; + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0021")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads the AcceptedCommandList attribute from the DUT\n"); + err = TestThReadsTheAcceptedCommandListAttributeFromTheDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads the GeneratedCommandList attribute from the DUT\n"); + err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads the EventList attribute from the DUT\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsTheEventListAttributeFromTheDut_6(); + err = TestThReadsTheEventListAttributeFromTheDut_22(); break; } @@ -42185,6 +41642,54 @@ class Test_TC_PCC_1_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; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -42198,7 +41703,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -42229,7 +41734,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -42253,7 +41758,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -42272,7 +41777,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -42292,7 +41797,343 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheAcceptedCommandListAttributeFromTheDut_4() + CHIP_ERROR TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinConstPressure) attribute 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 TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT 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 TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT 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 TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT 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 TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_10() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT 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 TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT 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 TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_12() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinConstTemp) attribute 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)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_13() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxConstTemp) attribute 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)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_14() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(Speed) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 21UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(Power) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 22UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_19() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 33UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheAcceptedCommandListAttributeFromTheDut_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -42309,14 +42150,14 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheGeneratedCommandListAttributeFromTheDut_5() + CHIP_ERROR TestThReadsTheGeneratedCommandListAttributeFromTheDut_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -42333,14 +42174,14 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheEventListAttributeFromTheDut_6() + CHIP_ERROR TestThReadsTheEventListAttributeFromTheDut_22() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -42700,7 +42541,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxPressure", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxPressure", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("maxPressure", [value shortValue], 32767)); } @@ -42725,7 +42566,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxSpeed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxSpeed", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxSpeed", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxSpeed", [value unsignedShortValue], 65535U)); } @@ -42750,7 +42591,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxFlow", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxFlow", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxFlow", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxFlow", [value unsignedShortValue], 65535U)); } @@ -42771,16 +42612,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMinConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstPressure Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minConstPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("minConstPressure", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minConstPressure", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("minConstPressure", [value shortValue], 32767)); } @@ -42801,16 +42637,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMaxConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstPressure Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxConstPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxConstPressure", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxConstPressure", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("maxConstPressure", [value shortValue], 32767)); } @@ -42831,16 +42662,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMinCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinCompPressure Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minCompPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("minCompPressure", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minCompPressure", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("minCompPressure", [value shortValue], 32767)); } @@ -42861,16 +42687,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMaxCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxCompPressure Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxCompPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxCompPressure", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxCompPressure", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("maxCompPressure", [value shortValue], 32767)); } @@ -42891,16 +42712,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMinConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstSpeed Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minConstSpeed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minConstSpeed", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("minConstSpeed", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minConstSpeed", [value unsignedShortValue], 65535U)); } @@ -42921,16 +42737,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMaxConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstSpeed Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxConstSpeed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxConstSpeed", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxConstSpeed", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxConstSpeed", [value unsignedShortValue], 65535U)); } @@ -42951,16 +42762,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMinConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstFlow Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minConstFlow", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minConstFlow", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("minConstFlow", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minConstFlow", [value unsignedShortValue], 65535U)); } @@ -42981,16 +42787,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMaxConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstFlow Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxConstFlow", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxConstFlow", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxConstFlow", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxConstFlow", [value unsignedShortValue], 65535U)); } @@ -43011,16 +42812,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMinConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstTemp Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minConstTemp", "", "int16")); + VerifyOrReturn(CheckConstraintType("minConstTemp", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minConstTemp", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("minConstTemp", [value shortValue], 32767)); } @@ -43041,16 +42837,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMaxConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstTemp Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxConstTemp", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxConstTemp", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("maxConstTemp", [value shortValue], 32767)); } @@ -43071,14 +42862,9 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributePumpStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: PumpStatus Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("pumpStatus", "", "map16")); + VerifyOrReturn(CheckConstraintType("pumpStatus", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("pumpStatus", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("pumpStatus", [value unsignedShortValue], 8U)); @@ -43100,7 +42886,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("effectiveOperationMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("effectiveOperationMode", [value unsignedCharValue], 3U)); @@ -43122,7 +42908,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("effectiveControlMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("effectiveControlMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("effectiveControlMode", [value unsignedCharValue], 7U)); @@ -43146,7 +42932,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("capacity", "", "int16")); + VerifyOrReturn(CheckConstraintType("capacity", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("capacity", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("capacity", [value shortValue], 32767)); } @@ -43167,16 +42953,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Speed Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("speed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("speed", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("speed", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("speed", [value unsignedShortValue], 65535U)); } @@ -43197,16 +42978,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: LifetimeRunningHours Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "", "uint24")); + VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "int24u", "int24u")); VerifyOrReturn(CheckConstraintMinValue("lifetimeRunningHours", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("lifetimeRunningHours", [value unsignedIntValue], 16777215UL)); } @@ -43227,16 +43003,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Power Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("power", "", "uint24")); + VerifyOrReturn(CheckConstraintType("power", "int24u", "int24u")); VerifyOrReturn(CheckConstraintMinValue("power", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("power", [value unsignedIntValue], 16777215UL)); } @@ -43257,16 +43028,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: LifetimeEnergyConsumed Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "", "uint32")); + VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("lifetimeEnergyConsumed", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("lifetimeEnergyConsumed", [value unsignedIntValue], 4294967295UL)); } @@ -43289,7 +43055,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("operationMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("operationMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("operationMode", [value unsignedCharValue], 3U)); @@ -43309,14 +43075,9 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute: ControlMode Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("controlMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("controlMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("controlMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("controlMode", [value unsignedCharValue], 7U)); @@ -43370,52 +43131,69 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write 1 to the OperationMode attribute to DUT: OperationMode\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH write 0 (Normal) to the OperationMode attribute to DUT\n"); if (ShouldSkip("PCC.S.A0020")) { NextTest(); return; } - err = TestWrite1ToTheOperationModeAttributeToDutOperationMode_1(); + err = TestThWrite0NormalToTheOperationModeAttributeToDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the attribute: EffectiveOperationMode\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the EffectiveOperationMode attribute\n"); if (ShouldSkip("PCC.S.A0011")) { NextTest(); return; } - err = TestReadsTheAttributeEffectiveOperationMode_2(); + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write 2 to the OperationMode attribute to DUT: OperationMode\n"); - if (ShouldSkip("PCC.S.A0020")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH write 1 (Minimum) to the OperationMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0020 && PCC.M.ControlModeConstSpeed")) { NextTest(); return; } - err = TestWrite2ToTheOperationModeAttributeToDutOperationMode_3(); + err = TestThWrite1MinimumToTheOperationModeAttributeToDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the attribute: EffectiveOperationMode\n"); - if (ShouldSkip("PCC.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the EffectiveOperationMode attribute\n"); + if (ShouldSkip("PCC.S.A0011 && PCC.M.ControlModeConstSpeed")) { NextTest(); return; } - err = TestReadsTheAttributeEffectiveOperationMode_4(); + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Write 3 to the OperationMode attribute to DUT: OperationMode\n"); - if (ShouldSkip("PCC.S.A0020")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time.\n"); + if (ShouldSkip("PCC.S.A0020 && PCC.M.ControlModeConstSpeed")) { NextTest(); return; } - err = TestWrite3ToTheOperationModeAttributeToDutOperationMode_5(); + err = TestThWrite2MaximumToTheOperationModeAttributeToDutOneAtATime_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the attribute: EffectiveOperationMode\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the EffectiveOperationMode attribute\n"); + if (ShouldSkip("PCC.S.A0011 && PCC.M.ControlModeConstSpeed")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH write 3 (Local) to the OperationMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0020")) { + NextTest(); + return; + } + err = TestThWrite3LocalToTheOperationModeAttributeToDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the EffectiveOperationMode attribute\n"); if (ShouldSkip("PCC.S.A0011")) { NextTest(); return; } - err = TestReadsTheAttributeEffectiveOperationMode_6(); + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_8(); break; } @@ -43449,6 +43227,12 @@ class Test_TC_PCC_2_2 : 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; } // Go on to the next test. @@ -43462,7 +43246,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -43476,7 +43260,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestWrite1ToTheOperationModeAttributeToDutOperationMode_1() + CHIP_ERROR TestThWrite0NormalToTheOperationModeAttributeToDut_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -43484,10 +43268,10 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:1U]; + operationModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 1 to the OperationMode attribute to DUT: OperationMode Error: %@", err); + NSLog(@"TH write 0 (Normal) to the OperationMode attribute to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43497,7 +43281,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_2() + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -43505,13 +43289,13 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 1U)); + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 0U)); } NextTest(); @@ -43520,7 +43304,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite2ToTheOperationModeAttributeToDutOperationMode_3() + CHIP_ERROR TestThWrite1MinimumToTheOperationModeAttributeToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -43528,10 +43312,10 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:2U]; + operationModeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 2 to the OperationMode attribute to DUT: OperationMode Error: %@", err); + NSLog(@"TH write 1 (Minimum) to the OperationMode attribute to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43541,7 +43325,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_4() + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -43549,7 +43333,53 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrite2MaximumToTheOperationModeAttributeToDutOneAtATime_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id operationModeArgument; + operationModeArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster + writeAttributeOperationModeWithValue:operationModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43564,7 +43394,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite3ToTheOperationModeAttributeToDutOperationMode_5() + CHIP_ERROR TestThWrite3LocalToTheOperationModeAttributeToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -43575,7 +43405,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { operationModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 3 to the OperationMode attribute to DUT: OperationMode Error: %@", err); + NSLog(@"TH write 3 (Local) to the OperationMode attribute to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43585,7 +43415,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_6() + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -43593,7 +43423,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44789,7 +44619,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -44813,7 +44643,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -44832,7 +44662,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); @@ -44863,7 +44693,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -44887,7 +44717,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -45052,7 +44882,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "list")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -45076,7 +44906,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -45095,7 +44925,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -45128,7 +44958,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -45152,7 +44982,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -45229,6 +45059,10 @@ class Test_TC_RH_2_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads constraints of attribute: MaxMeasuredValue\n"); + if (ShouldSkip("RH.S.A0002")) { + NextTest(); + return; + } err = TestReadsConstraintsOfAttributeMaxMeasuredValue_3(); break; case 4: @@ -45306,7 +45140,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 10000U)); } @@ -45331,7 +45165,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 9999U)); } @@ -45356,7 +45190,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 10000U)); } @@ -45379,7 +45213,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); @@ -45390,11 +45224,11 @@ class Test_TC_RH_2_1 : public TestCommandBridge { } }; -class Test_TC_SWTCH_2_1 : public TestCommandBridge { +class Test_TC_SWTCH_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_SWTCH_2_1() - : TestCommandBridge("Test_TC_SWTCH_2_1") + Test_TC_SWTCH_1_1() + : TestCommandBridge("Test_TC_SWTCH_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -45404,7 +45238,7 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_SWTCH_2_1() {} + ~Test_TC_SWTCH_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -45412,11 +45246,11 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWTCH_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWTCH_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWTCH_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWTCH_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -45433,232 +45267,87 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read NumberOfPositions attribute\n"); - err = TestReadNumberOfPositionsAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read CurrentPosition attribute\n"); - err = TestReadCurrentPositionAttribute_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read MultiPressMax attribute\n"); - if (ShouldSkip("SWTCH.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Read the FeatureMap value and verify LS is set to 1; MS, MSR, MSL, MSM are all set to 0\n"); + if (ShouldSkip("SWTCH.S.F00")) { NextTest(); return; } - err = TestReadMultiPressMaxAttribute_3(); - 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)); + err = TestReadTheFeatureMapValueAndVerifyLsIsSetTo1MsMsrMslMsmAreAllSetTo0_2(); break; case 3: - 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 = 4; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadNumberOfPositionsAttribute_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNumberOfPositionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read NumberOfPositions attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("number of positions", actualValue, 2U)); + ChipLogProgress(chipTool, " ***** Test Step 3 : Check values of flags in this FeatureMap\n"); + if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F01")) { + NextTest(); + return; } - - VerifyOrReturn(CheckConstraintType("numberOfPositions", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("numberOfPositions", [value unsignedCharValue], 2U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadCurrentPositionAttribute_2() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read CurrentPosition attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("current position", actualValue, 0U)); + err = TestCheckValuesOfFlagsInThisFeatureMap_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Check values of flags in this FeatureMap\n"); + if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F02")) { + NextTest(); + return; } - - VerifyOrReturn(CheckConstraintType("currentPosition", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentPosition", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentPosition", [value unsignedCharValue], 255U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadMultiPressMaxAttribute_3() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMultiPressMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read MultiPressMax attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("multi press max", actualValue, 2U)); + err = TestCheckValuesOfFlagsInThisFeatureMap_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Check values of flags in this FeatureMap\n"); + if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F03")) { + NextTest(); + return; } - - VerifyOrReturn(CheckConstraintType("multiPressMax", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("multiPressMax", [value unsignedCharValue], 2U)); - VerifyOrReturn(CheckConstraintMaxValue("multiPressMax", [value unsignedCharValue], 255U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TMP_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TMP_1_1() - : TestCommandBridge("Test_TC_TMP_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_TMP_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TMP_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TMP_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 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + err = TestCheckValuesOfFlagsInThisFeatureMap_5(); break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read ClusterRevision attribute from the DUT\n"); - err = TestReadClusterRevisionAttributeFromTheDut_1(); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Check values of flags in this FeatureMap\n"); + if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F04")) { + NextTest(); + return; + } + err = TestCheckValuesOfFlagsInThisFeatureMap_6(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read FeatureMap attribute from the DUT\n"); - err = TestReadFeatureMapAttributeFromTheDut_2(); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_7(); break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("TMP.S.A0003")) { + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("SWTCH.S.F04")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_3(); + err = TestReadTheGlobalAttributeAttributeList_8(); break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - if (ShouldSkip(" !TMP.S.A0003 ")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("!SWTCH.S.F04")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_4(); + err = TestReadTheGlobalAttributeAttributeList_9(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read AcceptedCommandList attribute from the DUT\n"); - err = TestReadAcceptedCommandListAttributeFromTheDut_5(); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_10(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read GeneratedCommandList attribute from the DUT\n"); - err = TestReadGeneratedCommandListAttributeFromTheDut_6(); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_11(); break; - case 7: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 12 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_12(); break; } @@ -45695,6 +45384,21 @@ class Test_TC_TMP_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; + 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. @@ -45708,7 +45412,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; @@ -45721,60 +45425,113 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nonnull FeatureMapValue; - CHIP_ERROR TestReadClusterRevisionAttributeFromTheDut_1() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTemperatureMeasurement * cluster = - [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ClusterRevision attribute from the DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); + FeatureMapValue = value; } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "unit16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() + CHIP_ERROR TestReadTheFeatureMapValueAndVerifyLsIsSetTo1MsMsrMslMsmAreAllSetTo0_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTemperatureMeasurement * cluster = - [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); + NSLog(@"Read the FeatureMap value and verify LS is set to 1; MS, MSR, MSL, MSM are all set to 0 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, FeatureMapValue)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_3() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_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); + } + + CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_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 TestCheckValuesOfFlagsInThisFeatureMap_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 TestReadTheGlobalAttributeClusterRevision_7() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTemperatureMeasurement * cluster = - [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -45782,11 +45539,10 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + 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)); @@ -45799,11 +45555,10 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTemperatureMeasurement * cluster = - [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -45811,10 +45566,9 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + 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)); @@ -45827,34 +45581,32 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAcceptedCommandListAttributeFromTheDut_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTemperatureMeasurement * cluster = - [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read AcceptedCommandList attribute from the DUT Error: %@", err); + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGeneratedCommandListAttributeFromTheDut_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTemperatureMeasurement * cluster = - [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GeneratedCommandList attribute from the DUT Error: %@", err); + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45863,14 +45615,14 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_12() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -45880,11 +45632,11 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { } }; -class Test_TC_TMP_2_1 : public TestCommandBridge { +class Test_TC_SWTCH_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TMP_2_1() - : TestCommandBridge("Test_TC_TMP_2_1") + Test_TC_SWTCH_2_1() + : TestCommandBridge("Test_TC_SWTCH_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -45894,7 +45646,7 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_TMP_2_1() {} + ~Test_TC_SWTCH_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -45902,11 +45654,11 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TMP_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWTCH_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TMP_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWTCH_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -45923,36 +45675,20 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MeasuredValue\n"); - if (ShouldSkip("TMP.S.A0000")) { - NextTest(); - return; - } - err = TestReadTheMandatoryAttributeMeasuredValue_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read NumberOfPositions attribute\n"); + err = TestReadNumberOfPositionsAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MinMeasuredValue\n"); - if (ShouldSkip("TMP.S.A0001")) { - NextTest(); - return; - } - err = TestReadTheMandatoryAttributeMinMeasuredValue_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read CurrentPosition attribute\n"); + err = TestReadCurrentPositionAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: MaxMeasuredValue\n"); - if (ShouldSkip("TMP.S.A0002")) { - NextTest(); - return; - } - err = TestReadTheMandatoryAttributeMaxMeasuredValue_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read the optional attribute: Tolerance\n"); - if (ShouldSkip("TMP.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read MultiPressMax attribute\n"); + if (ShouldSkip("SWTCH.S.F04")) { NextTest(); return; } - err = TestReadTheOptionalAttributeTolerance_4(); + err = TestReadMultiPressMaxAttribute_3(); break; } @@ -45977,9 +45713,6 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -45993,7 +45726,7 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -46007,96 +45740,76 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_1() + CHIP_ERROR TestReadNumberOfPositionsAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTemperatureMeasurement * cluster = - [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MeasuredValue Error: %@", err); + [cluster readAttributeNumberOfPositionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read NumberOfPositions attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value shortValue], 32767)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("number of positions", actualValue, 2U)); } + VerifyOrReturn(CheckConstraintType("numberOfPositions", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("numberOfPositions", [value unsignedCharValue], 2U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_2() + CHIP_ERROR TestReadCurrentPositionAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTemperatureMeasurement * cluster = - [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MinMeasuredValue Error: %@", err); + [cluster readAttributeCurrentPositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read CurrentPosition attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value shortValue], 32767)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("current position", actualValue, 0U)); } + VerifyOrReturn(CheckConstraintType("currentPosition", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentPosition", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentPosition", [value unsignedCharValue], 255U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_3() + CHIP_ERROR TestReadMultiPressMaxAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTemperatureMeasurement * cluster = - [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MaxMeasuredValue Error: %@", err); + [cluster readAttributeMultiPressMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read MultiPressMax attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value shortValue], -27314)); - VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value shortValue], 32767)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("multi press max", actualValue, 2U)); } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeTolerance_4() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTemperatureMeasurement * cluster = - [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the optional attribute: Tolerance Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); + VerifyOrReturn(CheckConstraintType("multiPressMax", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("multiPressMax", [value unsignedCharValue], 2U)); + VerifyOrReturn(CheckConstraintMaxValue("multiPressMax", [value unsignedCharValue], 255U)); NextTest(); }]; @@ -46105,11 +45818,11 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { } }; -class Test_TC_TSTAT_1_1 : public TestCommandBridge { +class Test_TC_TMP_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TSTAT_1_1() - : TestCommandBridge("Test_TC_TSTAT_1_1") + Test_TC_TMP_1_1() + : TestCommandBridge("Test_TC_TMP_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -46119,7 +45832,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_TSTAT_1_1() {} + ~Test_TC_TMP_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -46127,11 +45840,11 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TMP_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TMP_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -46148,132 +45861,42 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read ClusterRevision attribute from the DUT\n"); + err = TestReadClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01 || TSTAT.S.F02 || TSTAT.S.F03 || TSTAT.S.F04 || TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read FeatureMap attribute from the DUT\n"); + err = TestReadFeatureMapAttributeFromTheDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(Tolerance) in AttributeList\n"); + if (ShouldSkip("TMP.S.A0003")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_4(); + err = TestReadTheOptionalAttributeToleranceInAttributeList_4(); break; case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read AcceptedCommandList attribute from the DUT\n"); + err = TestReadAcceptedCommandListAttributeFromTheDut_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read GeneratedCommandList attribute from the DUT\n"); + err = TestReadGeneratedCommandListAttributeFromTheDut_6(); break; case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " - "AttributeList\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " - "AttributeList\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_8(); - break; - case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_9(); - break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F03")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_10(); - break; - case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F04")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in " - "AttributeList\n"); - if (ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("TSTAT.S.F03")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip(" !TSTAT.S.F03 ")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read the global attribute: EventList\n"); + " ***** Test Step 7 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTheGlobalAttributeEventList_16(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7(); break; } @@ -46310,33 +45933,6 @@ class Test_TC_TSTAT_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; - 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; } // Go on to the next test. @@ -46350,7 +45946,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -46364,48 +45960,48 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestReadClusterRevisionAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"Read ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 63UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -46415,9 +46011,8 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -46425,10 +46020,10 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 27UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); + 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)); @@ -46441,26 +46036,20 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 24UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -46468,187 +46057,209 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_5() + CHIP_ERROR TestReadAcceptedCommandListAttributeFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read AcceptedCommandList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_6() + CHIP_ERROR TestReadGeneratedCommandListAttributeFromTheDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read GeneratedCommandList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 21UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 22UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_7() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } +}; - CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_8() +class Test_TC_TMP_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_TMP_2_1() + : TestCommandBridge("Test_TC_TMP_2_1") + , mTestIndex(0) { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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) - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); + ~Test_TC_TMP_2_1() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TMP_2_1\n"); + } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_9() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TMP_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 30UL)); + Wait(); - NextTest(); - }]; + // 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 : Read the mandatory attribute: MeasuredValue\n"); + if (ShouldSkip("TMP.S.A0000")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMeasuredValue_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MinMeasuredValue\n"); + if (ShouldSkip("TMP.S.A0001")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMinMeasuredValue_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute: MaxMeasuredValue\n"); + if (ShouldSkip("TMP.S.A0002")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMaxMeasuredValue_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute: Tolerance\n"); + if (ShouldSkip("TMP.S.A0003")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeTolerance_4(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_10() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 32UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 33UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 34UL)); - - NextTest(); - }]; + 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; + } - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_11() + chip::System::Clock::Timeout GetWaitDuration() const override { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 52UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 53UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 54UL)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 5; - NextTest(); - }]; + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - return CHIP_NO_ERROR; + 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 TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_12() + CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 55UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 56UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 57UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("measuredValue", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value shortValue], -27315)); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value shortValue], 32767)); + } NextTest(); }]; @@ -46656,24 +46267,24 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_13() + CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MinMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value shortValue], -27315)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value shortValue], 32767)); + } NextTest(); }]; @@ -46681,21 +46292,24 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_14() + CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value shortValue], -27314)); + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value shortValue], 32767)); + } NextTest(); }]; @@ -46703,41 +46317,34 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_15() + CHIP_ERROR TestReadTheOptionalAttributeTolerance_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: Tolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); + NextTest(); }]; return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_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); - } }; -class Test_TC_TSTAT_2_1 : public TestCommandBridge { +class Test_TC_TSTAT_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TSTAT_2_1() - : TestCommandBridge("Test_TC_TSTAT_2_1") + Test_TC_TSTAT_1_1() + : TestCommandBridge("Test_TC_TSTAT_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -46747,7 +46354,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_TSTAT_2_1() {} + ~Test_TC_TSTAT_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -46755,11 +46362,11 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -46776,625 +46383,237 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attributes from DUT: LocalTemperature\n"); - if (ShouldSkip("TSTAT.S.A0000")) { - NextTest(); - return; - } - err = TestReadsMandatoryAttributesFromDutLocalTemperature_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read OutdoorTemperature attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01 || TSTAT.S.F02 || TSTAT.S.F03 || TSTAT.S.F04 || TSTAT.S.F05")) { NextTest(); return; } - err = TestReadOutdoorTemperatureAttributeFromTheDut_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read Occupancy attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0002")) { - NextTest(); - return; - } - err = TestReadOccupancyAttributeFromTheDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0003")) { + ChipLogProgress( + chipTool, " ***** Test Step 4 : Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_4(); + err = TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0004")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_5(); + err = TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads optional attributes from DUT: AbsMinCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0005")) { + ChipLogProgress( + chipTool, " ***** Test Step 6 : Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F02")) { NextTest(); return; } - err = TestReadsOptionalAttributesFromDutAbsMinCoolSetpointLimit_6(); + err = TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads optional attributes from DUT: AbsMaxCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0006")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { NextTest(); return; } - err = TestReadsOptionalAttributesFromDutAbsMaxCoolSetpointLimit_7(); + err = TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read PICoolingDemand attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0007")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02")) { NextTest(); return; } - err = TestReadPICoolingDemandAttributeFromTheDut_8(); + err = TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read PIHeatingDemand attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0008")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestReadPIHeatingDemandAttributeFromTheDut_9(); + err = TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read HVACSystemTypeConfiguration attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0009")) { + ChipLogProgress( + chipTool, " ***** Test Step 10 : Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestReadHVACSystemTypeConfigurationAttributeFromTheDut_10(); + err = TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read LocalTemperatureCalibration attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0010")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F04")) { NextTest(); return; } - err = TestReadLocalTemperatureCalibrationAttributeFromTheDut_11(); + err = TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads optional attributes from DUT: OccupiedCoolingSetpoint\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02")) { NextTest(); return; } - err = TestReadsOptionalAttributesFromDutOccupiedCoolingSetpoint_12(); + err = TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_13(); + err = TestReadTheGlobalAttributeAcceptedCommandList_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read UnoccupiedCoolingSetpoint attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip(" !TSTAT.S.F03 ")) { NextTest(); return; } - err = TestReadUnoccupiedCoolingSetpointAttributeFromTheDut_14(); + err = TestReadTheGlobalAttributeAcceptedCommandList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read UnoccupiedHeatingSetpoint attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0014")) { - NextTest(); - return; - } - err = TestReadUnoccupiedHeatingSetpointAttributeFromTheDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads mandatory attributes from DUT: MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0015")) { - NextTest(); - return; - } - err = TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_16(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_15(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads mandatory attributes from DUT: MaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0016")) { - NextTest(); - return; - } - err = TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_17(); + } + + 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 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads optional attributes from DUT: MinCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0017")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutMinCoolSetpointLimit_18(); + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Reads optional attributes from DUT: MaxCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0018")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutMaxCoolSetpointLimit_19(); + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Reads optional attributes from DUT: MinSetpointDeadBand\n"); - if (ShouldSkip("TSTAT.S.A0019")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutMinSetpointDeadBand_20(); + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read RemoteSensing attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A001a")) { - NextTest(); - return; - } - err = TestReadRemoteSensingAttributeFromTheDut_21(); + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Reads mandatory attributes from DUT: ControlSequenceOfOperation\n"); - if (ShouldSkip("TSTAT.S.A001b")) { - NextTest(); - return; - } - err = TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_22(); + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Reads mandatory attributes from DUT: SystemMode\n"); - if (ShouldSkip("TSTAT.S.A001c")) { - NextTest(); - return; - } - err = TestReadsMandatoryAttributesFromDutSystemMode_23(); + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Read AlarmMask attribute from the DUT and Verify that the DUT responds with a map8 " - "value.The value has to be in the range of 0x00 to 0x07.\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A001d")) { - NextTest(); - return; - } - err = TestReadAlarmMaskAttributeFromTheDutAndVerifyThatTheDutRespondsWithAMap8ValueTheValueHasToBeInTheRangeOf0x00To0x07_24(); + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read ThermostatRunningMode attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A001e")) { - NextTest(); - return; - } - err = TestReadThermostatRunningModeAttributeFromTheDut_25(); + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Reads constraints of optional attributes from DUT: StartOfWeek\n"); - if (ShouldSkip("TSTAT.S.A0020")) { - NextTest(); - return; - } - err = TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_26(); + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Reads optional attributes from DUT: NumberOfWeeklyTransitions\n"); - if (ShouldSkip("TSTAT.S.A0021")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutNumberOfWeeklyTransitions_27(); + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Reads optional attributes from DUT: NumberOfDailyTransitions\n"); - if (ShouldSkip("TSTAT.S.A0022")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutNumberOfDailyTransitions_28(); + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read TemperatureSetpointHold attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0023")) { - NextTest(); - return; - } - err = TestReadTemperatureSetpointHoldAttributeFromTheDut_29(); + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Read TemperatureSetpointHoldDuration attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0024")) { - NextTest(); - return; - } - err = TestReadTemperatureSetpointHoldDurationAttributeFromTheDut_30(); + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read ThermostatProgrammingOperationMode attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0025")) { - NextTest(); - return; - } - err = TestReadThermostatProgrammingOperationModeAttributeFromTheDut_31(); + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Read ThermostatRunningState attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0029")) { - NextTest(); - return; - } - err = TestReadThermostatRunningStateAttributeFromTheDut_32(); + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read SetpointChangeSource attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0030")) { - NextTest(); - return; - } - err = TestReadSetpointChangeSourceAttributeFromTheDut_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read SetpointChangeAmount attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0031")) { - NextTest(); - return; - } - err = TestReadSetpointChangeAmountAttributeFromTheDut_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read SetpointChangeSourceTimestamp attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0032")) { - NextTest(); - return; - } - err = TestReadSetpointChangeSourceTimestampAttributeFromTheDut_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Read OccupiedSetback attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0034")) { - NextTest(); - return; - } - err = TestReadOccupiedSetbackAttributeFromTheDut_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Read OccupiedSetbackMin attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0035")) { - NextTest(); - return; - } - err = TestReadOccupiedSetbackMinAttributeFromTheDut_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Read OccupiedSetbackMax attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0036")) { - NextTest(); - return; - } - err = TestReadOccupiedSetbackMaxAttributeFromTheDut_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Read UnoccupiedSetback attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0037")) { - NextTest(); - return; - } - err = TestReadUnoccupiedSetbackAttributeFromTheDut_39(); - break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Read UnoccupiedSetbackMin attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0038")) { - NextTest(); - return; - } - err = TestReadUnoccupiedSetbackMinAttributeFromTheDut_40(); - break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read UnoccupiedSetbackMax attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0039")) { - NextTest(); - return; - } - err = TestReadUnoccupiedSetbackMaxAttributeFromTheDut_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Read EmergencyHeatDelta attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A003a")) { - NextTest(); - return; - } - err = TestReadEmergencyHeatDeltaAttributeFromTheDut_42(); - break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Read ACType attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0040")) { - NextTest(); - return; - } - err = TestReadACTypeAttributeFromTheDut_43(); - break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Read ACCapacity attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0041")) { - NextTest(); - return; - } - err = TestReadACCapacityAttributeFromTheDut_44(); - break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Read ACRefrigerantType attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0042")) { - NextTest(); - return; - } - err = TestReadACRefrigerantTypeAttributeFromTheDut_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Read ACCompressorType attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0043")) { - NextTest(); - return; - } - err = TestReadACCompressorTypeAttributeFromTheDut_46(); - break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Read ACErrorCode attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0044")) { - NextTest(); - return; - } - err = TestReadACErrorCodeAttributeFromTheDut_47(); - break; - case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Read ACLouverPosition attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0045")) { - NextTest(); - return; - } - err = TestReadACLouverPositionAttributeFromTheDut_48(); - break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Read ACCoilTemperature attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0046")) { - NextTest(); - return; - } - err = TestReadACCoilTemperatureAttributeFromTheDut_49(); - break; - case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Read ACCapacityFormat attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0047")) { - NextTest(); - return; - } - err = TestReadACCapacityFormatAttributeFromTheDut_50(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - 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; - case 50: - 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 = 51; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutLocalTemperature_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLocalTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: LocalTemperature Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("localTemperature", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("localTemperature", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("localTemperature", [value shortValue], 32767)); + } + + // 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 = 16; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOutdoorTemperatureAttributeFromTheDut_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47402,17 +46621,14 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutdoorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read OutdoorTemperature attribute from the DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("outdoorTemperature", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("outdoorTemperature", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("outdoorTemperature", [value shortValue], 32767)); - } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 1UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 63UL)); NextTest(); }]; @@ -47420,7 +46636,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOccupancyAttributeFromTheDut_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47428,14 +46644,20 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Occupancy attribute from the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupancy", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("occupancy", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancy", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 27UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); + 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(); }]; @@ -47443,7 +46665,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_4() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47451,14 +46673,13 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("absMinHeatSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("absMinHeatSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("absMinHeatSetpointLimit", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); NextTest(); }]; @@ -47466,7 +46687,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_5() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47474,14 +46695,13 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("absMaxHeatSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("absMaxHeatSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("absMaxHeatSetpointLimit", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); NextTest(); }]; @@ -47489,7 +46709,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributesFromDutAbsMinCoolSetpointLimit_6() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47497,14 +46717,13 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("absMinCoolSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("absMinCoolSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("absMinCoolSetpointLimit", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); }]; @@ -47512,7 +46731,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributesFromDutAbsMaxCoolSetpointLimit_7() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47520,14 +46739,13 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("absMaxCoolSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("absMaxCoolSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("absMaxCoolSetpointLimit", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); NextTest(); }]; @@ -47535,7 +46753,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadPICoolingDemandAttributeFromTheDut_8() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47543,14 +46761,13 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePICoolingDemandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PICoolingDemand attribute from the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("PICoolingDemand", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("PICoolingDemand", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PICoolingDemand", [value unsignedCharValue], 100U)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); NextTest(); }]; @@ -47558,7 +46775,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadPIHeatingDemandAttributeFromTheDut_9() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47566,14 +46783,15 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePIHeatingDemandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PIHeatingDemand attribute from the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("PIHeatingDemand", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("PIHeatingDemand", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PIHeatingDemand", [value unsignedCharValue], 100U)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); NextTest(); }]; @@ -47581,55 +46799,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadHVACSystemTypeConfigurationAttributeFromTheDut_10() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeHVACSystemTypeConfigurationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read HVACSystemTypeConfiguration attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("HVACSystemTypeConfiguration", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("HVACSystemTypeConfiguration", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("HVACSystemTypeConfiguration", [value unsignedCharValue], 63U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadLocalTemperatureCalibrationAttributeFromTheDut_11() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeLocalTemperatureCalibrationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read LocalTemperatureCalibration attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("localTemperatureCalibration", "", "int8")); - VerifyOrReturn(CheckConstraintMinValue("localTemperatureCalibration", [value charValue], 25)); - VerifyOrReturn(CheckConstraintMaxValue("localTemperatureCalibration", [value charValue], -25)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributesFromDutOccupiedCoolingSetpoint_12() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47637,14 +46807,15 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 32UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 33UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 34UL)); NextTest(); }]; @@ -47652,7 +46823,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_13() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47660,14 +46831,15 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 52UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 53UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 54UL)); NextTest(); }]; @@ -47675,31 +46847,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadUnoccupiedCoolingSetpointAttributeFromTheDut_14() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read UnoccupiedCoolingSetpoint attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("unoccupiedCoolingSetpoint", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("unoccupiedCoolingSetpoint", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("unoccupiedCoolingSetpoint", [value shortValue], 32767)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadUnoccupiedHeatingSetpointAttributeFromTheDut_15() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47707,23 +46855,23 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read UnoccupiedHeatingSetpoint attribute from the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("unoccupiedHeatingSetpoint", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("unoccupiedHeatingSetpoint", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("unoccupiedHeatingSetpoint", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 55UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 56UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 57UL)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_16() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47731,14 +46879,16 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); NextTest(); }]; @@ -47746,7 +46896,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_17() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47754,14 +46904,13 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); }]; @@ -47769,7 +46918,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributesFromDutMinCoolSetpointLimit_18() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47777,22 +46926,1054 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: MinCoolSetpointLimit Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", [value shortValue], 32767)); - + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadsOptionalAttributesFromDutMaxCoolSetpointLimit_19() +class Test_TC_TSTAT_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_TSTAT_2_1() + : TestCommandBridge("Test_TC_TSTAT_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_TSTAT_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attributes from DUT: LocalTemperature\n"); + err = TestReadsMandatoryAttributesFromDutLocalTemperature_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read OutdoorTemperature attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0001")) { + NextTest(); + return; + } + err = TestReadOutdoorTemperatureAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read Occupancy attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02")) { + NextTest(); + return; + } + err = TestReadOccupancyAttributeFromTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.A0003")) { + NextTest(); + return; + } + err = TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.A0004")) { + NextTest(); + return; + } + err = TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads optional attributes from DUT: AbsMinCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.A0005")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributesFromDutAbsMinCoolSetpointLimit_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads optional attributes from DUT: AbsMaxCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.A0006")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributesFromDutAbsMaxCoolSetpointLimit_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read PICoolingDemand attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0007")) { + NextTest(); + return; + } + err = TestReadPICoolingDemandAttributeFromTheDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read PIHeatingDemand attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0008")) { + NextTest(); + return; + } + err = TestReadPIHeatingDemandAttributeFromTheDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read HVACSystemTypeConfiguration attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0009")) { + NextTest(); + return; + } + err = TestReadHVACSystemTypeConfigurationAttributeFromTheDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read LocalTemperatureCalibration attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0010")) { + NextTest(); + return; + } + err = TestReadLocalTemperatureCalibrationAttributeFromTheDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads optional attributes from DUT: OccupiedCoolingSetpoint\n"); + if (ShouldSkip("TSTAT.S.F01")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributesFromDutOccupiedCoolingSetpoint_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); + if (ShouldSkip("TSTAT.S.F00")) { + NextTest(); + return; + } + err = TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read UnoccupiedCoolingSetpoint attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02")) { + NextTest(); + return; + } + err = TestReadUnoccupiedCoolingSetpointAttributeFromTheDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read UnoccupiedHeatingSetpoint attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { + NextTest(); + return; + } + err = TestReadUnoccupiedHeatingSetpointAttributeFromTheDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads attribute from DUT: MinHeatSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.A0015")) { + NextTest(); + return; + } + err = TestReadsAttributeFromDutMinHeatSetpointLimit_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads attribute from DUT: MaxHeatSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.A0016")) { + NextTest(); + return; + } + err = TestReadsAttributeFromDutMaxHeatSetpointLimit_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Reads optional attributes from DUT: MinCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.A0017")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributesFromDutMinCoolSetpointLimit_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Reads optional attributes from DUT: MaxCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.A0018")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributesFromDutMaxCoolSetpointLimit_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Reads optional attributes from DUT: MinSetpointDeadBand\n"); + if (ShouldSkip("TSTAT.S.F05")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributesFromDutMinSetpointDeadBand_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Read RemoteSensing attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A001a")) { + NextTest(); + return; + } + err = TestReadRemoteSensingAttributeFromTheDut_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Reads mandatory attributes from DUT: ControlSequenceOfOperation\n"); + err = TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Reads mandatory attributes from DUT: SystemMode\n"); + err = TestReadsMandatoryAttributesFromDutSystemMode_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Read ThermostatRunningMode attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A001e")) { + NextTest(); + return; + } + err = TestReadThermostatRunningModeAttributeFromTheDut_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Reads constraints of optional attributes from DUT: StartOfWeek\n"); + if (ShouldSkip("TSTAT.S.F03")) { + NextTest(); + return; + } + err = TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Reads optional attributes from DUT: NumberOfWeeklyTransitions\n"); + if (ShouldSkip("TSTAT.S.F03")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributesFromDutNumberOfWeeklyTransitions_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Reads optional attributes from DUT: NumberOfDailyTransitions\n"); + if (ShouldSkip("TSTAT.S.F03")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributesFromDutNumberOfDailyTransitions_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Read TemperatureSetpointHold attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0023")) { + NextTest(); + return; + } + err = TestReadTemperatureSetpointHoldAttributeFromTheDut_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Read TemperatureSetpointHoldDuration attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0024")) { + NextTest(); + return; + } + err = TestReadTemperatureSetpointHoldDurationAttributeFromTheDut_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Read ThermostatProgrammingOperationMode attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0025")) { + NextTest(); + return; + } + err = TestReadThermostatProgrammingOperationModeAttributeFromTheDut_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Read ThermostatRunningState attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0029")) { + NextTest(); + return; + } + err = TestReadThermostatRunningStateAttributeFromTheDut_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Read SetpointChangeSource attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0030")) { + NextTest(); + return; + } + err = TestReadSetpointChangeSourceAttributeFromTheDut_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Read SetpointChangeAmount attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0031")) { + NextTest(); + return; + } + err = TestReadSetpointChangeAmountAttributeFromTheDut_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Read SetpointChangeSourceTimestamp attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0032")) { + NextTest(); + return; + } + err = TestReadSetpointChangeSourceTimestampAttributeFromTheDut_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Read OccupiedSetback attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02")) { + NextTest(); + return; + } + err = TestReadOccupiedSetbackAttributeFromTheDut_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Read OccupiedSetbackMin attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02")) { + NextTest(); + return; + } + err = TestReadOccupiedSetbackMinAttributeFromTheDut_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Read OccupiedSetbackMax attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02")) { + NextTest(); + return; + } + err = TestReadOccupiedSetbackMaxAttributeFromTheDut_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Read UnoccupiedSetback attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04")) { + NextTest(); + return; + } + err = TestReadUnoccupiedSetbackAttributeFromTheDut_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : Read UnoccupiedSetbackMin attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04")) { + NextTest(); + return; + } + err = TestReadUnoccupiedSetbackMinAttributeFromTheDut_39(); + break; + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : Read UnoccupiedSetbackMax attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04")) { + NextTest(); + return; + } + err = TestReadUnoccupiedSetbackMaxAttributeFromTheDut_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : Read EmergencyHeatDelta attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A003a")) { + NextTest(); + return; + } + err = TestReadEmergencyHeatDeltaAttributeFromTheDut_41(); + break; + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : Read ACType attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0040")) { + NextTest(); + return; + } + err = TestReadACTypeAttributeFromTheDut_42(); + break; + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : Read ACCapacity attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0041")) { + NextTest(); + return; + } + err = TestReadACCapacityAttributeFromTheDut_43(); + break; + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : Read ACRefrigerantType attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0042")) { + NextTest(); + return; + } + err = TestReadACRefrigerantTypeAttributeFromTheDut_44(); + break; + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : Read ACCompressorType attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0043")) { + NextTest(); + return; + } + err = TestReadACCompressorTypeAttributeFromTheDut_45(); + break; + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : Read ACErrorCode attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0044")) { + NextTest(); + return; + } + err = TestReadACErrorCodeAttributeFromTheDut_46(); + break; + case 47: + ChipLogProgress(chipTool, " ***** Test Step 47 : Read ACLouverPosition attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0045")) { + NextTest(); + return; + } + err = TestReadACLouverPositionAttributeFromTheDut_47(); + break; + case 48: + ChipLogProgress(chipTool, " ***** Test Step 48 : Read ACCoilTemperature attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0046")) { + NextTest(); + return; + } + err = TestReadACCoilTemperatureAttributeFromTheDut_48(); + break; + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : Read ACCapacityFormat attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0047")) { + NextTest(); + return; + } + err = TestReadACCapacityFormatAttributeFromTheDut_49(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + 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. + 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 = 50; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutLocalTemperature_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLocalTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attributes from DUT: LocalTemperature Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("localTemperature", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("localTemperature", [value shortValue], -27315)); + VerifyOrReturn(CheckConstraintMaxValue("localTemperature", [value shortValue], 32767)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadOutdoorTemperatureAttributeFromTheDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOutdoorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read OutdoorTemperature attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("outdoorTemperature", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("outdoorTemperature", [value shortValue], -27315)); + VerifyOrReturn(CheckConstraintMaxValue("outdoorTemperature", [value shortValue], 32767)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadOccupancyAttributeFromTheDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Occupancy attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("occupancy", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("occupancy", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancy", [value unsignedCharValue], 1U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("absMinHeatSetpointLimit", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("absMinHeatSetpointLimit", [value shortValue], -27315)); + VerifyOrReturn(CheckConstraintMaxValue("absMinHeatSetpointLimit", [value shortValue], 32767)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("absMaxHeatSetpointLimit", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("absMaxHeatSetpointLimit", [value shortValue], -27315)); + VerifyOrReturn(CheckConstraintMaxValue("absMaxHeatSetpointLimit", [value shortValue], 32767)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsOptionalAttributesFromDutAbsMinCoolSetpointLimit_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("absMinCoolSetpointLimit", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("absMinCoolSetpointLimit", [value shortValue], -27315)); + VerifyOrReturn(CheckConstraintMaxValue("absMinCoolSetpointLimit", [value shortValue], 32767)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsOptionalAttributesFromDutAbsMaxCoolSetpointLimit_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("absMaxCoolSetpointLimit", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("absMaxCoolSetpointLimit", [value shortValue], -27315)); + VerifyOrReturn(CheckConstraintMaxValue("absMaxCoolSetpointLimit", [value shortValue], 32767)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadPICoolingDemandAttributeFromTheDut_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePICoolingDemandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read PICoolingDemand attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("PICoolingDemand", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("PICoolingDemand", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PICoolingDemand", [value unsignedCharValue], 100U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadPIHeatingDemandAttributeFromTheDut_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePIHeatingDemandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read PIHeatingDemand attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("PIHeatingDemand", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("PIHeatingDemand", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PIHeatingDemand", [value unsignedCharValue], 100U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadHVACSystemTypeConfigurationAttributeFromTheDut_10() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeHVACSystemTypeConfigurationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read HVACSystemTypeConfiguration attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("HVACSystemTypeConfiguration", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("HVACSystemTypeConfiguration", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("HVACSystemTypeConfiguration", [value unsignedCharValue], 63U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadLocalTemperatureCalibrationAttributeFromTheDut_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeLocalTemperatureCalibrationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read LocalTemperatureCalibration attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("localTemperatureCalibration", "int8s", "int8s")); + VerifyOrReturn(CheckConstraintMinValue("localTemperatureCalibration", [value charValue], 25)); + VerifyOrReturn(CheckConstraintMaxValue("localTemperatureCalibration", [value charValue], -25)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsOptionalAttributesFromDutOccupiedCoolingSetpoint_12() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", [value shortValue], 1600)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", [value shortValue], 3200)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_13() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", [value shortValue], 700)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", [value shortValue], 3000)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadUnoccupiedCoolingSetpointAttributeFromTheDut_14() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read UnoccupiedCoolingSetpoint attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("unoccupiedCoolingSetpoint", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("unoccupiedCoolingSetpoint", [value shortValue], 1600)); + VerifyOrReturn(CheckConstraintMaxValue("unoccupiedCoolingSetpoint", [value shortValue], 3200)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadUnoccupiedHeatingSetpointAttributeFromTheDut_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read UnoccupiedHeatingSetpoint attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("unoccupiedHeatingSetpoint", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("unoccupiedHeatingSetpoint", [value shortValue], 700)); + VerifyOrReturn(CheckConstraintMaxValue("unoccupiedHeatingSetpoint", [value shortValue], 3000)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsAttributeFromDutMinHeatSetpointLimit_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads attribute from DUT: MinHeatSetpointLimit Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", [value shortValue], 700)); + VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", [value shortValue], 3000)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsAttributeFromDutMaxHeatSetpointLimit_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads attribute from DUT: MaxHeatSetpointLimit Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", [value shortValue], -27315)); + VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", [value shortValue], 32767)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsOptionalAttributesFromDutMinCoolSetpointLimit_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attributes from DUT: MinCoolSetpointLimit Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", [value shortValue], -27315)); + VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", [value shortValue], 32767)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsOptionalAttributesFromDutMaxCoolSetpointLimit_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47805,7 +47986,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", [value shortValue], 32767)); @@ -47828,7 +48009,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "", "int8")); + VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", [value charValue], 0)); VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", [value charValue], 25)); @@ -47851,7 +48032,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("remoteSensing", "", "map8")); + VerifyOrReturn(CheckConstraintType("remoteSensing", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("remoteSensing", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("remoteSensing", [value unsignedCharValue], 7U)); @@ -47875,7 +48056,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); + VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", [value unsignedCharValue], 5U)); @@ -47898,7 +48079,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("systemMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("systemMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("systemMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("systemMode", [value unsignedCharValue], 9U)); @@ -47908,17 +48089,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadAlarmMaskAttributeFromTheDutAndVerifyThatTheDutRespondsWithAMap8ValueTheValueHasToBeInTheRangeOf0x00To0x07_24() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not 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 TestReadThermostatRunningModeAttributeFromTheDut_25() + CHIP_ERROR TestReadThermostatRunningModeAttributeFromTheDut_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47931,9 +48102,9 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("thermostatRunningMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("thermostatRunningMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("thermostatRunningMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("thermostatRunningMode", [value unsignedCharValue], 4U)); + VerifyOrReturn(CheckConstraintMaxValue("thermostatRunningMode", [value unsignedCharValue], 9U)); NextTest(); }]; @@ -47941,7 +48112,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_26() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47954,7 +48125,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("startOfWeek", "", "enum8")); + VerifyOrReturn(CheckConstraintType("startOfWeek", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("startOfWeek", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("startOfWeek", [value unsignedCharValue], 6U)); @@ -47964,7 +48135,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributesFromDutNumberOfWeeklyTransitions_27() + CHIP_ERROR TestReadsOptionalAttributesFromDutNumberOfWeeklyTransitions_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47978,7 +48149,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("numberOfWeeklyTransitions", "", "uint8")); + VerifyOrReturn(CheckConstraintType("numberOfWeeklyTransitions", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("numberOfWeeklyTransitions", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("numberOfWeeklyTransitions", [value unsignedCharValue], 255U)); @@ -47988,7 +48159,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributesFromDutNumberOfDailyTransitions_28() + CHIP_ERROR TestReadsOptionalAttributesFromDutNumberOfDailyTransitions_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48001,7 +48172,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("numberOfDailyTransitions", "", "uint8")); + VerifyOrReturn(CheckConstraintType("numberOfDailyTransitions", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("numberOfDailyTransitions", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("numberOfDailyTransitions", [value unsignedCharValue], 255U)); @@ -48011,7 +48182,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTemperatureSetpointHoldAttributeFromTheDut_29() + CHIP_ERROR TestReadTemperatureSetpointHoldAttributeFromTheDut_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48024,7 +48195,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("temperatureSetpointHold", "", "enum8")); + VerifyOrReturn(CheckConstraintType("temperatureSetpointHold", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("temperatureSetpointHold", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("temperatureSetpointHold", [value unsignedCharValue], 1U)); @@ -48034,7 +48205,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTemperatureSetpointHoldDurationAttributeFromTheDut_30() + CHIP_ERROR TestReadTemperatureSetpointHoldDurationAttributeFromTheDut_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48050,7 +48221,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("temperatureSetpointHoldDuration", "", "uint16")); + VerifyOrReturn(CheckConstraintType("temperatureSetpointHoldDuration", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("temperatureSetpointHoldDuration", [value unsignedShortValue], 0U)); VerifyOrReturn( @@ -48063,7 +48234,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadThermostatProgrammingOperationModeAttributeFromTheDut_31() + CHIP_ERROR TestReadThermostatProgrammingOperationModeAttributeFromTheDut_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48077,7 +48248,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("thermostatProgrammingOperationMode", "", "map8")); + VerifyOrReturn(CheckConstraintType("thermostatProgrammingOperationMode", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("thermostatProgrammingOperationMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("thermostatProgrammingOperationMode", [value unsignedCharValue], 7U)); @@ -48087,7 +48258,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadThermostatRunningStateAttributeFromTheDut_32() + CHIP_ERROR TestReadThermostatRunningStateAttributeFromTheDut_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48100,7 +48271,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("thermostatRunningState", "", "map16")); + VerifyOrReturn(CheckConstraintType("thermostatRunningState", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("thermostatRunningState", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("thermostatRunningState", [value unsignedShortValue], 127U)); @@ -48110,7 +48281,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadSetpointChangeSourceAttributeFromTheDut_33() + CHIP_ERROR TestReadSetpointChangeSourceAttributeFromTheDut_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48123,7 +48294,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("setpointChangeSource", "", "enum8")); + VerifyOrReturn(CheckConstraintType("setpointChangeSource", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("setpointChangeSource", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("setpointChangeSource", [value unsignedCharValue], 2U)); @@ -48133,7 +48304,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadSetpointChangeAmountAttributeFromTheDut_34() + CHIP_ERROR TestReadSetpointChangeAmountAttributeFromTheDut_33() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48148,7 +48319,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("setpointChangeAmount", "", "int16")); + VerifyOrReturn(CheckConstraintType("setpointChangeAmount", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("setpointChangeAmount", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("setpointChangeAmount", [value shortValue], 32767)); } @@ -48159,7 +48330,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadSetpointChangeSourceTimestampAttributeFromTheDut_35() + CHIP_ERROR TestReadSetpointChangeSourceTimestampAttributeFromTheDut_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48173,14 +48344,14 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("setpointChangeSourceTimestamp", "", "utc")); + VerifyOrReturn(CheckConstraintType("setpointChangeSourceTimestamp", "utc", "utc")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOccupiedSetbackAttributeFromTheDut_36() + CHIP_ERROR TestReadOccupiedSetbackAttributeFromTheDut_35() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48195,7 +48366,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("occupiedSetback", "", "uint8")); + VerifyOrReturn(CheckConstraintType("occupiedSetback", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("occupiedSetback", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("occupiedSetback", [value unsignedCharValue], 255U)); } @@ -48206,7 +48377,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOccupiedSetbackMinAttributeFromTheDut_37() + CHIP_ERROR TestReadOccupiedSetbackMinAttributeFromTheDut_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48221,7 +48392,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("occupiedSetbackMin", "", "uint8")); + VerifyOrReturn(CheckConstraintType("occupiedSetbackMin", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("occupiedSetbackMin", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("occupiedSetbackMin", [value unsignedCharValue], 255U)); } @@ -48232,7 +48403,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOccupiedSetbackMaxAttributeFromTheDut_38() + CHIP_ERROR TestReadOccupiedSetbackMaxAttributeFromTheDut_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48247,7 +48418,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("occupiedSetbackMax", "", "uint8")); + VerifyOrReturn(CheckConstraintType("occupiedSetbackMax", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("occupiedSetbackMax", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("occupiedSetbackMax", [value unsignedCharValue], 255U)); } @@ -48258,7 +48429,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadUnoccupiedSetbackAttributeFromTheDut_39() + CHIP_ERROR TestReadUnoccupiedSetbackAttributeFromTheDut_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48273,7 +48444,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("unoccupiedSetback", "", "uint8")); + VerifyOrReturn(CheckConstraintType("unoccupiedSetback", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("unoccupiedSetback", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("unoccupiedSetback", [value unsignedCharValue], 255U)); } @@ -48284,7 +48455,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadUnoccupiedSetbackMinAttributeFromTheDut_40() + CHIP_ERROR TestReadUnoccupiedSetbackMinAttributeFromTheDut_39() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48299,7 +48470,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("unoccupiedSetbackMin", "", "uint8")); + VerifyOrReturn(CheckConstraintType("unoccupiedSetbackMin", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("unoccupiedSetbackMin", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("unoccupiedSetbackMin", [value unsignedCharValue], 255U)); } @@ -48310,7 +48481,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadUnoccupiedSetbackMaxAttributeFromTheDut_41() + CHIP_ERROR TestReadUnoccupiedSetbackMaxAttributeFromTheDut_40() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48325,7 +48496,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("unoccupiedSetbackMax", "", "uint8")); + VerifyOrReturn(CheckConstraintType("unoccupiedSetbackMax", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("unoccupiedSetbackMax", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("unoccupiedSetbackMax", [value unsignedCharValue], 255U)); } @@ -48336,7 +48507,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEmergencyHeatDeltaAttributeFromTheDut_42() + CHIP_ERROR TestReadEmergencyHeatDeltaAttributeFromTheDut_41() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48349,7 +48520,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("emergencyHeatDelta", "", "uint8")); + VerifyOrReturn(CheckConstraintType("emergencyHeatDelta", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("emergencyHeatDelta", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("emergencyHeatDelta", [value unsignedCharValue], 255U)); @@ -48359,7 +48530,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACTypeAttributeFromTheDut_43() + CHIP_ERROR TestReadACTypeAttributeFromTheDut_42() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48372,7 +48543,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ACType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("ACType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("ACType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("ACType", [value unsignedCharValue], 4U)); @@ -48382,7 +48553,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACCapacityAttributeFromTheDut_44() + CHIP_ERROR TestReadACCapacityAttributeFromTheDut_43() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48395,7 +48566,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ACCapacity", "", "uint16")); + VerifyOrReturn(CheckConstraintType("ACCapacity", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("ACCapacity", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("ACCapacity", [value unsignedShortValue], 65535U)); @@ -48405,7 +48576,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACRefrigerantTypeAttributeFromTheDut_45() + CHIP_ERROR TestReadACRefrigerantTypeAttributeFromTheDut_44() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48418,7 +48589,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ACRefrigerantType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("ACRefrigerantType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("ACRefrigerantType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("ACRefrigerantType", [value unsignedCharValue], 3U)); @@ -48428,7 +48599,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACCompressorTypeAttributeFromTheDut_46() + CHIP_ERROR TestReadACCompressorTypeAttributeFromTheDut_45() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48441,7 +48612,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ACCompressorType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("ACCompressorType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("ACCompressorType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("ACCompressorType", [value unsignedCharValue], 3U)); @@ -48451,7 +48622,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACErrorCodeAttributeFromTheDut_47() + CHIP_ERROR TestReadACErrorCodeAttributeFromTheDut_46() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48464,14 +48635,14 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ACErrorCode", "", "map32")); + VerifyOrReturn(CheckConstraintType("ACErrorCode", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACLouverPositionAttributeFromTheDut_48() + CHIP_ERROR TestReadACLouverPositionAttributeFromTheDut_47() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48484,7 +48655,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ACLouverPosition", "", "enum8")); + VerifyOrReturn(CheckConstraintType("ACLouverPosition", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("ACLouverPosition", [value unsignedCharValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue("ACLouverPosition", [value unsignedCharValue], 5U)); @@ -48494,7 +48665,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACCoilTemperatureAttributeFromTheDut_49() + CHIP_ERROR TestReadACCoilTemperatureAttributeFromTheDut_48() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48509,7 +48680,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("ACCoilTemperature", "", "int16")); + VerifyOrReturn(CheckConstraintType("ACCoilTemperature", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("ACCoilTemperature", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("ACCoilTemperature", [value shortValue], 32767)); } @@ -48520,7 +48691,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACCapacityFormatAttributeFromTheDut_50() + CHIP_ERROR TestReadACCapacityFormatAttributeFromTheDut_49() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48538,7 +48709,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ACCapacityformat", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("ACCapacityformat", "", "enum8")); + VerifyOrReturn(CheckConstraintType("ACCapacityformat", "enum8", "enum8")); NextTest(); }]; @@ -48592,7 +48763,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 1 : Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is " "within range\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -48601,7 +48772,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Writes a value back that is different but valid for OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -48610,7 +48781,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -48618,17 +48789,17 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 4: ChipLogProgress( - chipTool, " ***** Test Step 4 : Writes OccupiedCoolingSetpoint to value below the MinCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + chipTool, " ***** Test Step 4 : Writes OccupiedCoolingSetpoint to value below the ABSMinCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestWritesOccupiedCoolingSetpointToValueBelowTheMinCoolSetpointLimit_4(); + err = TestWritesOccupiedCoolingSetpointToValueBelowTheABSMinCoolSetpointLimit_4(); break; case 5: ChipLogProgress( chipTool, " ***** Test Step 5 : Writes OccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -48637,7 +48808,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 6: ChipLogProgress( chipTool, " ***** Test Step 6 : Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01 && !TSTAT.S.F05")) { NextTest(); return; } @@ -48655,7 +48826,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -48665,7 +48836,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 9 : Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is " "within range\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -48674,7 +48845,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Writes a value back that is different but valid for OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -48683,7 +48854,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -48692,7 +48863,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 12: ChipLogProgress( chipTool, " ***** Test Step 12 : Writes OccupiedHeatingSetpoint to value below the MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -48701,7 +48872,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 13: ChipLogProgress( chipTool, " ***** Test Step 13 : Writes OccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -48710,7 +48881,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 14: ChipLogProgress( chipTool, " ***** Test Step 14 : Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -48737,7 +48908,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 17: ChipLogProgress( chipTool, " ***** Test Step 17 : Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } @@ -48747,7 +48918,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 18 : Reads UnoccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is " "within range\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } @@ -48756,7 +48927,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Writes a value back that is different but valid for UnoccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } @@ -48766,7 +48937,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 20 : Reads it back again to confirm the successful write of UnoccupiedCoolingSetpoint " "attribute\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } @@ -48774,26 +48945,26 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 21: ChipLogProgress( - chipTool, " ***** Test Step 21 : Writes UnoccupiedCoolingSetpoint to value below the MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + chipTool, " ***** Test Step 21 : Writes UnoccupiedCoolingSetpoint to value below the MinCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } - err = TestWritesUnoccupiedCoolingSetpointToValueBelowTheMinHeatSetpointLimit_21(); + err = TestWritesUnoccupiedCoolingSetpointToValueBelowTheMinCoolSetpointLimit_21(); break; case 22: ChipLogProgress( - chipTool, " ***** Test Step 22 : Writes UnoccupiedCoolingSetpoint to value above the MaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + chipTool, " ***** Test Step 22 : Writes UnoccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } - err = TestWritesUnoccupiedCoolingSetpointToValueAboveTheMaxHeatSetpointLimit_22(); + err = TestWritesUnoccupiedCoolingSetpointToValueAboveTheMaxCoolSetpointLimit_22(); break; case 23: ChipLogProgress(chipTool, " ***** Test Step 23 : Writes the limit of MinCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } @@ -48802,7 +48973,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 24: ChipLogProgress(chipTool, " ***** Test Step 24 : Writes the limit of MaxCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } @@ -48812,7 +48983,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 25 : Reads UnoccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is " "within range\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -48821,7 +48992,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 26: ChipLogProgress(chipTool, " ***** Test Step 26 : Writes a value back that is different but valid for UnoccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -48831,7 +49002,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 27 : Reads it back again to confirm the successful write of UnoccupiedHeatingSetpoint " "attribute\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -48840,7 +49011,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 28: ChipLogProgress( chipTool, " ***** Test Step 28 : Writes UnoccupiedHeatingSetpoint to value below the MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -48849,7 +49020,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 29: ChipLogProgress( chipTool, " ***** Test Step 29 : Writes UnoccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -48858,7 +49029,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 30: ChipLogProgress(chipTool, " ***** Test Step 30 : Writes the limit of MinHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -48867,7 +49038,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 31: ChipLogProgress(chipTool, " ***** Test Step 31 : Writes the limit of MaxHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -48877,7 +49048,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 32 : Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within " "range\n"); - if (ShouldSkip("TSTAT.S.A0015")) { + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } @@ -48886,7 +49057,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 33: ChipLogProgress(chipTool, " ***** Test Step 33 : Writes a value back that is different but valid for MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0015")) { + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } @@ -48895,481 +49066,481 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 34: ChipLogProgress(chipTool, " ***** Test Step 34 : Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0015")) { + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_34(); break; case 35: - ChipLogProgress( - chipTool, " ***** Test Step 35 : Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0015")) { + ChipLogProgress(chipTool, " ***** Test Step 35 : Writes a value back that is different but violates the deadband\n"); + if (ShouldSkip("TSTAT.S.A0015 && TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesMinHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_35(); + err = TestWritesAValueBackThatIsDifferentButViolatesTheDeadband_35(); break; case 36: ChipLogProgress( - chipTool, " ***** Test Step 36 : Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0015")) { + chipTool, " ***** Test Step 36 : Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } - err = TestWritesMinHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_36(); + err = TestWritesMinHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_36(); break; case 37: ChipLogProgress( - chipTool, " ***** Test Step 37 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0015")) { + chipTool, " ***** Test Step 37 : Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_37(); + err = TestWritesMinHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_37(); break; case 38: ChipLogProgress( - chipTool, " ***** Test Step 38 : Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0015")) { + chipTool, " ***** Test Step 38 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_38(); + err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_38(); break; case 39: - ChipLogProgress(chipTool, - " ***** Test Step 39 : Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0016")) { + ChipLogProgress( + chipTool, " ***** Test Step 39 : Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.F05")) { NextTest(); return; } - err = TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_39(); + err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_39(); break; case 40: - ChipLogProgress( - chipTool, " ***** Test Step 40 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F00 && A_MINHEATSETPOINTLIMIT")) { + ChipLogProgress(chipTool, + " ***** Test Step 40 : Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within " + "range\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_40(); + err = TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_40(); break; case 41: ChipLogProgress( - chipTool, " ***** Test Step 41 : Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MINHEATSETPOINTLIMIT && TSTAT.S.F05")) { + chipTool, " ***** Test Step 41 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_41(); + err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_41(); break; case 42: - ChipLogProgress(chipTool, - " ***** Test Step 42 : Writes a value back that is different but valid for MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0016")) { + ChipLogProgress( + chipTool, " ***** Test Step 42 : Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.A0015 && TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_42(); + err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_42(); break; case 43: ChipLogProgress(chipTool, - " ***** Test Step 43 : Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0016")) { + " ***** Test Step 43 : Writes a value back that is different but valid for MaxHeatSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05")) { NextTest(); return; } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_43(); + err = TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_43(); break; case 44: - ChipLogProgress( - chipTool, " ***** Test Step 44 : Writes MaxHeatSetpointLimit to value below the AbsMinHeatSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0016")) { + ChipLogProgress(chipTool, + " ***** Test Step 44 : Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesMaxHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_44(); + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_44(); break; case 45: ChipLogProgress( - chipTool, " ***** Test Step 45 : Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0016")) { + chipTool, " ***** Test Step 45 : Writes MaxHeatSetpointLimit to value below the AbsMinHeatSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016")) { NextTest(); return; } - err = TestWritesMaxHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_45(); + err = TestWritesMaxHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_45(); break; case 46: ChipLogProgress( - chipTool, " ***** Test Step 46 : Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0016")) { + chipTool, " ***** Test Step 46 : Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_46(); + err = TestWritesMaxHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_46(); break; case 47: ChipLogProgress( - chipTool, " ***** Test Step 47 : Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0016")) { + chipTool, " ***** Test Step 47 : Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_47(); + err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_47(); break; case 48: - ChipLogProgress(chipTool, - " ***** Test Step 48 : Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("TSTAT.S.A0017")) { + ChipLogProgress( + chipTool, " ***** Test Step 48 : Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05")) { NextTest(); return; } - err = TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_48(); + err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_48(); break; case 49: ChipLogProgress(chipTool, - " ***** Test Step 49 : Writes a value back that is different but valid for MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0017")) { + " ***** Test Step 49 : Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within " + "range\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_49(); + err = TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_49(); break; case 50: ChipLogProgress(chipTool, - " ***** Test Step 50 : Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0017")) { + " ***** Test Step 50 : Writes a value back that is different but valid for MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_50(); + err = TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_50(); break; case 51: - ChipLogProgress( - chipTool, " ***** Test Step 51 : Writes MinCoolSetpointLimit to value below the AbsMinCoolSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0017")) { + ChipLogProgress(chipTool, + " ***** Test Step 51 : Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestWritesMinCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_51(); + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_51(); break; case 52: ChipLogProgress( - chipTool, " ***** Test Step 52 : Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0017")) { + chipTool, " ***** Test Step 52 : Writes MinCoolSetpointLimit to value below the AbsMinCoolSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestWritesMinCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_52(); + err = TestWritesMinCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_52(); break; case 53: ChipLogProgress( - chipTool, " ***** Test Step 53 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0017")) { + chipTool, " ***** Test Step 53 : Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_53(); + err = TestWritesMinCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_53(); break; case 54: ChipLogProgress( - chipTool, " ***** Test Step 54 : Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0017")) { + chipTool, " ***** Test Step 54 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_54(); + err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_54(); break; case 55: ChipLogProgress( - chipTool, " ***** Test Step 55 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F01 && A_MINCOOLSETPOINTLIMIT")) { + chipTool, " ***** Test Step 55 : Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_55(); + err = TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_55(); break; case 56: - ChipLogProgress(chipTool, - " ***** Test Step 56 : Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("TSTAT.S.A0018")) { + ChipLogProgress( + chipTool, " ***** Test Step 56 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_56(); + err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_56(); break; case 57: ChipLogProgress(chipTool, - " ***** Test Step 57 : Writes a value back that is different but valid for MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0018")) { + " ***** Test Step 57 : Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within " + "range\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { NextTest(); return; } - err = TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_57(); + err = TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_57(); break; case 58: ChipLogProgress(chipTool, - " ***** Test Step 58 : Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0018")) { + " ***** Test Step 58 : Writes a value back that is different but valid for MaxCoolSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05")) { NextTest(); return; } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_58(); + err = TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_58(); break; case 59: - ChipLogProgress( - chipTool, " ***** Test Step 59 : Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0018")) { + ChipLogProgress(chipTool, + " ***** Test Step 59 : Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesMaxCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_59(); + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_59(); break; case 60: ChipLogProgress( - chipTool, " ***** Test Step 60 : Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0018")) { + chipTool, " ***** Test Step 60 : Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { NextTest(); return; } - err = TestWritesMaxCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_60(); + err = TestWritesMaxCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_60(); break; case 61: ChipLogProgress( - chipTool, " ***** Test Step 61 : Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0018")) { + chipTool, " ***** Test Step 61 : Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_61(); + err = TestWritesMaxCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_61(); break; case 62: ChipLogProgress( - chipTool, " ***** Test Step 62 : Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0018")) { + chipTool, " ***** Test Step 62 : Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { NextTest(); return; } - err = TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_62(); + err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_62(); break; case 63: - ChipLogProgress(chipTool, " ***** Test Step 63 : Writes (sets back) default value of MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0015")) { + ChipLogProgress( + chipTool, " ***** Test Step 63 : Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { NextTest(); return; } - err = TestWritesSetsBackDefaultValueOfMinHeatSetpointLimit_63(); + err = TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_63(); break; case 64: - ChipLogProgress(chipTool, " ***** Test Step 64 : Writes (sets back)default value of MaxHeatSetpointLimit\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0016")) { + ChipLogProgress(chipTool, " ***** Test Step 64 : Writes (sets back) default value of MinHeatSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0015")) { NextTest(); return; } - err = TestWritesSetsBackdefaultValueOfMaxHeatSetpointLimit_64(); + err = TestWritesSetsBackDefaultValueOfMinHeatSetpointLimit_64(); break; case 65: - ChipLogProgress(chipTool, " ***** Test Step 65 : Writes MaxHeatSetpointLimit That meets the deadband of 2.5C\n"); - if (ShouldSkip("TSTAT.S.F01 && A_MAXHEATSETPOINTLIMIT &&!TSTAT.S.F05")) { + ChipLogProgress(chipTool, " ***** Test Step 65 : Writes (sets back)default value of MaxHeatSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0016 &&!TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesMaxHeatSetpointLimitThatMeetsTheDeadbandOf25c_65(); + err = TestWritesSetsBackdefaultValueOfMaxHeatSetpointLimit_65(); break; case 66: - ChipLogProgress(chipTool, " ***** Test Step 66 : Writes (sets back) default value of MinCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0017")) { + ChipLogProgress(chipTool, " ***** Test Step 66 : Writes MaxHeatSetpointLimit That meets the deadband of 2.5C\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0016 &&!TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesSetsBackDefaultValueOfMinCoolSetpointLimit_66(); + err = TestWritesMaxHeatSetpointLimitThatMeetsTheDeadbandOf25c_66(); break; case 67: - ChipLogProgress(chipTool, " ***** Test Step 67 : Writes (sets back) default value of MaxCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0018")) { + ChipLogProgress(chipTool, " ***** Test Step 67 : Writes (sets back) default value of MinCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestWritesSetsBackDefaultValueOfMaxCoolSetpointLimit_67(); + err = TestWritesSetsBackDefaultValueOfMinCoolSetpointLimit_67(); break; case 68: - ChipLogProgress(chipTool, - " ***** Test Step 68 : Reads MinSetpointDeadBand attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + ChipLogProgress(chipTool, " ***** Test Step 68 : Writes (sets back) default value of MaxCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { NextTest(); return; } - err = TestReadsMinSetpointDeadBandAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_68(); + err = TestWritesSetsBackDefaultValueOfMaxCoolSetpointLimit_68(); break; case 69: ChipLogProgress(chipTool, - " ***** Test Step 69 : Writes a value back that is different but valid for MinSetpointDeadBand attribute\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + " ***** Test Step 69 : Reads MinSetpointDeadBand attribute from Server DUT and verifies that the value is within " + "range\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesAValueBackThatIsDifferentButValidForMinSetpointDeadBandAttribute_69(); + err = TestReadsMinSetpointDeadBandAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_69(); break; case 70: ChipLogProgress(chipTool, - " ***** Test Step 70 : Reads it back again to confirm the successful write of MinSetpointDeadBand attribute\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + " ***** Test Step 70 : Writes a value back that is different but valid for MinSetpointDeadBand attribute\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinSetpointDeadBandAttribute_70(); + err = TestWritesAValueBackThatIsDifferentButValidForMinSetpointDeadBandAttribute_70(); break; case 71: - ChipLogProgress(chipTool, " ***** Test Step 71 : Writes the value below MinSetpointDeadBand\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + ChipLogProgress(chipTool, + " ***** Test Step 71 : Reads it back again to confirm the successful write of MinSetpointDeadBand attribute\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesTheValueBelowMinSetpointDeadBand_71(); + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinSetpointDeadBandAttribute_71(); break; case 72: - ChipLogProgress(chipTool, " ***** Test Step 72 : Writes the value above MinSetpointDeadBand \n"); - if (ShouldSkip("TSTAT.S.A0019")) { + ChipLogProgress(chipTool, " ***** Test Step 72 : Writes the value below MinSetpointDeadBand\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesTheValueAboveMinSetpointDeadBand_72(); + err = TestWritesTheValueBelowMinSetpointDeadBand_72(); break; case 73: - ChipLogProgress(chipTool, " ***** Test Step 73 : Writes the min limit of MinSetpointDeadBand\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + ChipLogProgress(chipTool, " ***** Test Step 73 : Writes the value above MinSetpointDeadBand \n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesTheMinLimitOfMinSetpointDeadBand_73(); + err = TestWritesTheValueAboveMinSetpointDeadBand_73(); break; case 74: - ChipLogProgress(chipTool, " ***** Test Step 74 : Writes the max limit of MinSetpointDeadBand\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + ChipLogProgress(chipTool, " ***** Test Step 74 : Writes the min limit of MinSetpointDeadBand\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesTheMaxLimitOfMinSetpointDeadBand_74(); + err = TestWritesTheMinLimitOfMinSetpointDeadBand_74(); break; case 75: - ChipLogProgress(chipTool, - " ***** Test Step 75 : Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid\n"); - if (ShouldSkip("TSTAT.S.A001b")) { + ChipLogProgress(chipTool, " ***** Test Step 75 : Writes the max limit of MinSetpointDeadBand\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_75(); + err = TestWritesTheMaxLimitOfMinSetpointDeadBand_75(); break; case 76: - ChipLogProgress( - chipTool, " ***** Test Step 76 : Write Attribute command for ControlSequenceOfOperation with a new valid value\n"); - if (ShouldSkip("TSTAT.S.A001b")) { + ChipLogProgress(chipTool, + " ***** Test Step 76 : Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid\n"); + if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01")) { NextTest(); return; } - err = TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_76(); + err = TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_76(); break; case 77: - ChipLogProgress(chipTool, " ***** Test Step 77 : Read it back again to confirm the successful write\n"); - if (ShouldSkip("TSTAT.S.A001b")) { + ChipLogProgress( + chipTool, " ***** Test Step 77 : Write Attribute command for ControlSequenceOfOperation with a new valid value\n"); + if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01")) { NextTest(); return; } - err = TestReadItBackAgainToConfirmTheSuccessfulWrite_77(); + err = TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_77(); break; case 78: - ChipLogProgress(chipTool, - " ***** Test Step 78 : Writes MaxHeatSetpointLimit attribute to default value of 2950 to meet deadband " - "constraint\n"); - if (ShouldSkip("TSTAT.S.F00 && A_MINHEATSETPOINTLIMIT && TSTAT.S.F05")) { + ChipLogProgress(chipTool, " ***** Test Step 78 : Read it back again to confirm the successful write\n"); + if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01")) { NextTest(); return; } - err = TestWritesMaxHeatSetpointLimitAttributeToDefaultValueOf2950ToMeetDeadbandConstraint_78(); + err = TestReadItBackAgainToConfirmTheSuccessfulWrite_78(); break; case 79: - ChipLogProgress(chipTool, " ***** Test Step 79 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 79 : Writes MaxHeatSetpointLimit attribute to default value of 2950 to meet deadband " + "constraint\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.F05")) { NextTest(); return; } - err = TestSetsOccupiedCoolingSetpointToDefaultValue_79(); + err = TestWritesMaxHeatSetpointLimitAttributeToDefaultValueOf2950ToMeetDeadbandConstraint_79(); break; case 80: - ChipLogProgress(chipTool, " ***** Test Step 80 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 80 : Sets OccupiedCoolingSetpoint to default value\n"); + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestSetsOccupiedHeatingSetpointToDefaultValue_80(); + err = TestSetsOccupiedCoolingSetpointToDefaultValue_80(); break; case 81: - ChipLogProgress(chipTool, " ***** Test Step 81 : Sends SetpointRaise Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 81 : Sets OccupiedHeatingSetpoint to default value\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestSendsSetpointRaiseCommand_81(); + err = TestSetsOccupiedHeatingSetpointToDefaultValue_81(); break; case 82: - ChipLogProgress( - chipTool, " ***** Test Step 82 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 82 : Sends SetpointRaise Command Heat Only\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_82(); + err = TestSendsSetpointRaiseCommandHeatOnly_82(); break; case 83: - ChipLogProgress(chipTool, " ***** Test Step 83 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012")) { + ChipLogProgress( + chipTool, " ***** Test Step 83 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestSetsOccupiedHeatingSetpointToDefaultValue_83(); + err = TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_83(); break; case 84: - ChipLogProgress(chipTool, " ***** Test Step 84 : Sends SetpointRaise Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 84 : Sets OccupiedHeatingSetpoint to default value\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestSendsSetpointRaiseCommand_84(); + err = TestSetsOccupiedHeatingSetpointToDefaultValue_84(); break; case 85: - ChipLogProgress( - chipTool, " ***** Test Step 85 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 85 : Sends SetpointRaise Command Heat Only\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_85(); + err = TestSendsSetpointRaiseCommandHeatOnly_85(); break; case 86: - ChipLogProgress(chipTool, " ***** Test Step 86 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + ChipLogProgress( + chipTool, " ***** Test Step 86 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestSetsOccupiedCoolingSetpointToDefaultValue_86(); + err = TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_86(); break; case 87: - ChipLogProgress(chipTool, " ***** Test Step 87 : Sends SetpointRaise Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 87 : Sends SetpointRaise Command Cool Only\n"); + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestSendsSetpointRaiseCommand_87(); + err = TestSendsSetpointRaiseCommandCoolOnly_87(); break; case 88: ChipLogProgress( chipTool, " ***** Test Step 88 : Reads back OccupiedCoolingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -49377,24 +49548,24 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 89: ChipLogProgress(chipTool, " ***** Test Step 89 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } err = TestSetsOccupiedCoolingSetpointToDefaultValue_89(); break; case 90: - ChipLogProgress(chipTool, " ***** Test Step 90 : Sends SetpointRaise Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 90 : Sends SetpointRaise Command Cool Only\n"); + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestSendsSetpointRaiseCommand_90(); + err = TestSendsSetpointRaiseCommandCoolOnly_90(); break; case 91: ChipLogProgress( chipTool, " ***** Test Step 91 : Reads back OccupiedCoolingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -49402,7 +49573,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 92: ChipLogProgress(chipTool, " ***** Test Step 92 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -49410,24 +49581,24 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 93: ChipLogProgress(chipTool, " ***** Test Step 93 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } err = TestSetsOccupiedHeatingSetpointToDefaultValue_93(); break; case 94: - ChipLogProgress(chipTool, " ***** Test Step 94 : Sends SetpointRaise Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 94 : Sends SetpointRaise Command Heat & Cool\n"); + if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01")) { NextTest(); return; } - err = TestSendsSetpointRaiseCommand_94(); + err = TestSendsSetpointRaiseCommandHeatCool_94(); break; case 95: ChipLogProgress( chipTool, " ***** Test Step 95 : Reads back OccupiedCoolingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -49436,7 +49607,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 96: ChipLogProgress( chipTool, " ***** Test Step 96 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -49444,7 +49615,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 97: ChipLogProgress(chipTool, " ***** Test Step 97 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -49452,24 +49623,24 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 98: ChipLogProgress(chipTool, " ***** Test Step 98 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } err = TestSetsOccupiedHeatingSetpointToDefaultValue_98(); break; case 99: - ChipLogProgress(chipTool, " ***** Test Step 99 : Sends SetpointRaise Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 99 : Sends SetpointRaise Command Heat & Cool\n"); + if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01")) { NextTest(); return; } - err = TestSendsSetpointRaiseCommand_99(); + err = TestSendsSetpointRaiseCommandHeatCool_99(); break; case 100: ChipLogProgress( chipTool, " ***** Test Step 100 : Reads back OccupiedCoolingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -49478,7 +49649,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 101: ChipLogProgress( chipTool, " ***** Test Step 101 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -49547,7 +49718,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -49607,7 +49778,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -49619,22 +49790,22 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -49649,13 +49820,13 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -49673,13 +49844,13 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -49709,13 +49880,13 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 72: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 73: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 74: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -49842,7 +50013,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", [value shortValue], 1600)); VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", [value shortValue], 3200)); @@ -49900,7 +50071,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesOccupiedCoolingSetpointToValueBelowTheMinCoolSetpointLimit_4() + CHIP_ERROR TestWritesOccupiedCoolingSetpointToValueBelowTheABSMinCoolSetpointLimit_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49912,8 +50083,8 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { occupiedCoolingSetpointArgument = [NSNumber numberWithShort:30]; [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes OccupiedCoolingSetpoint to value below the MinCoolSetpointLimit " - @"Error: %@", + NSLog(@"Writes OccupiedCoolingSetpoint to value below the " + @"ABSMinCoolSetpointLimit Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -49958,11 +50129,26 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_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"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id occupiedCoolingSetpointArgument; + occupiedCoolingSetpointArgument = [NSNumber numberWithShort:1600]; + [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint " + @"attribute Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestWritesTheCoolingSetpointBelowTheHeatingSetpointWhenAutoIsEnabled_7() @@ -50031,7 +50217,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", [value shortValue], 700)); VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", [value shortValue], 3000)); @@ -50219,11 +50405,30 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_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"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id occupiedHeatingSetpointArgument; + occupiedHeatingSetpointArgument = [NSNumber numberWithShort:3000]; + [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint " + @"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 TestReadsUnoccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_18() @@ -50247,7 +50452,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("UnoccupiedCoolingSetpoint", actualValue, 2600)); } - VerifyOrReturn(CheckConstraintType("unoccupiedCoolingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintType("unoccupiedCoolingSetpoint", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("unoccupiedCoolingSetpoint", [value shortValue], 1600)); VerifyOrReturn(CheckConstraintMaxValue("unoccupiedCoolingSetpoint", [value shortValue], 3200)); @@ -50306,7 +50511,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesUnoccupiedCoolingSetpointToValueBelowTheMinHeatSetpointLimit_21() + CHIP_ERROR TestWritesUnoccupiedCoolingSetpointToValueBelowTheMinCoolSetpointLimit_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50319,7 +50524,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:unoccupiedCoolingSetpointArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes UnoccupiedCoolingSetpoint to value below the " - @"MinHeatSetpointLimit Error: %@", + @"MinCoolSetpointLimit Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -50334,7 +50539,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesUnoccupiedCoolingSetpointToValueAboveTheMaxHeatSetpointLimit_22() + CHIP_ERROR TestWritesUnoccupiedCoolingSetpointToValueAboveTheMaxCoolSetpointLimit_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50347,7 +50552,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:unoccupiedCoolingSetpointArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes UnoccupiedCoolingSetpoint to value above the " - @"MaxHeatSetpointLimit Error: %@", + @"MaxCoolSetpointLimit Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -50431,7 +50636,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("UnoccupiedHeatingSetpoint", actualValue, 2000)); } - VerifyOrReturn(CheckConstraintType("unoccupiedHeatingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintType("unoccupiedHeatingSetpoint", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("unoccupiedHeatingSetpoint", [value shortValue], 700)); VerifyOrReturn(CheckConstraintMaxValue("unoccupiedHeatingSetpoint", [value shortValue], 3000)); @@ -50613,7 +50818,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("MinHeatSetpointLimit", actualValue, 700)); } - VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", [value shortValue], 700)); VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", [value shortValue], 3000)); @@ -50625,23 +50830,80 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_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); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id minHeatSetpointLimitArgument; + minHeatSetpointLimitArgument = [NSNumber numberWithShort:800]; + [cluster writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes a value back that is different but valid for MinHeatSetpointLimit " + @"attribute Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_34() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not 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"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("MinHeatSetpointLimit", actualValue, 800)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMinHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_35() + CHIP_ERROR TestWritesAValueBackThatIsDifferentButViolatesTheDeadband_35() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id minHeatSetpointLimitArgument; + minHeatSetpointLimitArgument = [NSNumber numberWithShort:2000]; + [cluster + writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes a value back that is different but violates the deadband 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 TestWritesMinHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50670,7 +50932,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMinHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_36() + CHIP_ERROR TestWritesMinHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50699,7 +50961,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_37() + CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50723,25 +50985,60 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_38() + CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_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); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id minHeatSetpointLimitArgument; + minHeatSetpointLimitArgument = [NSNumber numberWithShort:3000]; + [cluster writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit " + @"attribute Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_39() + CHIP_ERROR TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_40() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not 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"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog( + @"Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within range Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("MaxHeatSetpointLimit", actualValue, 3000)); + } + + VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", [value shortValue], 700)); + VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", [value shortValue], 3000)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_40() + CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_41() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50765,7 +51062,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_41() + CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_42() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50793,7 +51090,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_42() + CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_43() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50817,7 +51114,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_43() + CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_44() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50841,7 +51138,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMaxHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_44() + CHIP_ERROR TestWritesMaxHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_45() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50870,7 +51167,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMaxHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_45() + CHIP_ERROR TestWritesMaxHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_46() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50899,7 +51196,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_46() + CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_47() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50923,16 +51220,31 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_47() + CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_48() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not 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"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id maxHeatSetpointLimitArgument; + maxHeatSetpointLimitArgument = [NSNumber numberWithShort:3000]; + [cluster writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit " + @"attribute Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_48() + CHIP_ERROR TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_49() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50951,7 +51263,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("MinCoolSetpointLimit", actualValue, 1600)); } - VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", [value shortValue], 1600)); VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", [value shortValue], 3200)); @@ -50961,7 +51273,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_49() + CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_50() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -50985,7 +51297,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_50() + CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_51() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51009,7 +51321,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMinCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_51() + CHIP_ERROR TestWritesMinCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_52() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51038,7 +51350,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMinCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_52() + CHIP_ERROR TestWritesMinCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_53() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51066,7 +51378,55 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_53() + CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_54() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id minCoolSetpointLimitArgument; + minCoolSetpointLimitArgument = [NSNumber numberWithShort:1600]; + [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit " + @"attribute Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_55() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id minCoolSetpointLimitArgument; + minCoolSetpointLimitArgument = [NSNumber numberWithShort:3200]; + [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute " + @"Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_56() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51090,7 +51450,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_54() + CHIP_ERROR TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_57() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51098,23 +51458,28 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = [NSNumber numberWithShort:3200]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute " - @"Error: %@", - err); + [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog( + @"Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("MaxCoolSetpointLimit", actualValue, 3200)); + } + + VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", [value shortValue], 1600)); + VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", [value shortValue], 3200)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_55() + CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_58() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51122,11 +51487,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = [NSNumber numberWithShort:1600]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument + id maxCoolSetpointLimitArgument; + maxCoolSetpointLimitArgument = [NSNumber numberWithShort:2000]; + [cluster writeAttributeMaxCoolSetpointLimitWithValue:maxCoolSetpointLimitArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit " + NSLog(@"Writes a value back that is different but valid for MaxCoolSetpointLimit " @"attribute Error: %@", err); @@ -51138,7 +51503,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_56() + CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_59() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51147,45 +51512,22 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog( - @"Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range Error: %@", err); + NSLog(@"Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("MaxCoolSetpointLimit", actualValue, 3200)); + VerifyOrReturn(CheckValue("MaxCoolSetpointLimit", actualValue, 2000)); } - VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", [value shortValue], 1600)); - VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", [value shortValue], 3200)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_57() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not 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 TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_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); - } - - CHIP_ERROR TestWritesMaxCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_59() + CHIP_ERROR TestWritesMaxCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_60() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51214,7 +51556,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMaxCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_60() + CHIP_ERROR TestWritesMaxCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_61() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51242,16 +51584,31 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_61() + CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_62() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not 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"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id maxCoolSetpointLimitArgument; + maxCoolSetpointLimitArgument = [NSNumber numberWithShort:1600]; + [cluster writeAttributeMaxCoolSetpointLimitWithValue:maxCoolSetpointLimitArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit " + @"attribute Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_62() + CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_63() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51275,7 +51632,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesSetsBackDefaultValueOfMinHeatSetpointLimit_63() + CHIP_ERROR TestWritesSetsBackDefaultValueOfMinHeatSetpointLimit_64() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51297,16 +51654,29 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesSetsBackdefaultValueOfMaxHeatSetpointLimit_64() + CHIP_ERROR TestWritesSetsBackdefaultValueOfMaxHeatSetpointLimit_65() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not 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"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id maxHeatSetpointLimitArgument; + maxHeatSetpointLimitArgument = [NSNumber numberWithShort:3000]; + [cluster writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes (sets back)default value of MaxHeatSetpointLimit Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMaxHeatSetpointLimitThatMeetsTheDeadbandOf25c_65() + CHIP_ERROR TestWritesMaxHeatSetpointLimitThatMeetsTheDeadbandOf25c_66() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51328,7 +51698,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesSetsBackDefaultValueOfMinCoolSetpointLimit_66() + CHIP_ERROR TestWritesSetsBackDefaultValueOfMinCoolSetpointLimit_67() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51350,7 +51720,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesSetsBackDefaultValueOfMaxCoolSetpointLimit_67() + CHIP_ERROR TestWritesSetsBackDefaultValueOfMaxCoolSetpointLimit_68() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51372,7 +51742,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMinSetpointDeadBandAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_68() + CHIP_ERROR TestReadsMinSetpointDeadBandAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_69() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51391,7 +51761,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("MinSetpointDeadBand", actualValue, 25)); } - VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "", "temp-s8")); + VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", [value charValue], 0)); VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", [value charValue], 25)); @@ -51401,7 +51771,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinSetpointDeadBandAttribute_69() + CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinSetpointDeadBandAttribute_70() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51425,7 +51795,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinSetpointDeadBandAttribute_70() + CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinSetpointDeadBandAttribute_71() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51449,7 +51819,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheValueBelowMinSetpointDeadBand_71() + CHIP_ERROR TestWritesTheValueBelowMinSetpointDeadBand_72() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51475,7 +51845,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheValueAboveMinSetpointDeadBand_72() + CHIP_ERROR TestWritesTheValueAboveMinSetpointDeadBand_73() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51501,7 +51871,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheMinLimitOfMinSetpointDeadBand_73() + CHIP_ERROR TestWritesTheMinLimitOfMinSetpointDeadBand_74() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51523,7 +51893,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheMaxLimitOfMinSetpointDeadBand_74() + CHIP_ERROR TestWritesTheMaxLimitOfMinSetpointDeadBand_75() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51545,7 +51915,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_75() + CHIP_ERROR TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_76() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51564,7 +51934,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("ControlSequenceOfOperation", actualValue, 4U)); } - VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); + VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", [value unsignedCharValue], 5U)); @@ -51574,7 +51944,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_76() + CHIP_ERROR TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_77() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51598,7 +51968,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadItBackAgainToConfirmTheSuccessfulWrite_77() + CHIP_ERROR TestReadItBackAgainToConfirmTheSuccessfulWrite_78() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51623,7 +51993,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMaxHeatSetpointLimitAttributeToDefaultValueOf2950ToMeetDeadbandConstraint_78() + CHIP_ERROR TestWritesMaxHeatSetpointLimitAttributeToDefaultValueOf2950ToMeetDeadbandConstraint_79() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51647,7 +52017,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_79() + CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_80() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51669,16 +52039,29 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_80() + CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_81() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not 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"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id occupiedHeatingSetpointArgument; + occupiedHeatingSetpointArgument = [NSNumber numberWithShort:2000]; + [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sets OccupiedHeatingSetpoint to default value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsSetpointRaiseCommand_81() + CHIP_ERROR TestSendsSetpointRaiseCommandHeatOnly_82() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51691,7 +52074,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { params.amount = [NSNumber numberWithChar:-30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Error: %@", err); + NSLog(@"Sends SetpointRaise Command Heat Only Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51701,7 +52084,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_82() + CHIP_ERROR TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_83() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51725,16 +52108,29 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_83() + CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_84() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not 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"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id occupiedHeatingSetpointArgument; + occupiedHeatingSetpointArgument = [NSNumber numberWithShort:2000]; + [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sets OccupiedHeatingSetpoint to default value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsSetpointRaiseCommand_84() + CHIP_ERROR TestSendsSetpointRaiseCommandHeatOnly_85() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51747,7 +52143,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { params.amount = [NSNumber numberWithChar:30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Error: %@", err); + NSLog(@"Sends SetpointRaise Command Heat Only Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51757,7 +52153,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_85() + CHIP_ERROR TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_86() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51772,7 +52168,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedHeatingSetpoint", actualValue, 30)); + VerifyOrReturn(CheckValue("OccupiedHeatingSetpoint", actualValue, 2300)); } NextTest(); @@ -51781,29 +52177,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_86() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:2600]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsSetpointRaiseCommand_87() + CHIP_ERROR TestSendsSetpointRaiseCommandCoolOnly_87() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51816,7 +52190,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { params.amount = [NSNumber numberWithChar:-30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Error: %@", err); + NSLog(@"Sends SetpointRaise Command Cool Only Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51872,7 +52246,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsSetpointRaiseCommand_90() + CHIP_ERROR TestSendsSetpointRaiseCommandCoolOnly_90() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51885,7 +52259,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { params.amount = [NSNumber numberWithChar:30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Error: %@", err); + NSLog(@"Sends SetpointRaise Command Cool Only Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51943,14 +52317,27 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_93() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not 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"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id occupiedHeatingSetpointArgument; + occupiedHeatingSetpointArgument = [NSNumber numberWithShort:2000]; + [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sets OccupiedHeatingSetpoint to default value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsSetpointRaiseCommand_94() + CHIP_ERROR TestSendsSetpointRaiseCommandHeatCool_94() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51963,7 +52350,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { params.amount = [NSNumber numberWithChar:-30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Error: %@", err); + NSLog(@"Sends SetpointRaise Command Heat & Cool Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52045,14 +52432,27 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_98() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not 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"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id occupiedHeatingSetpointArgument; + occupiedHeatingSetpointArgument = [NSNumber numberWithShort:2000]; + [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sets OccupiedHeatingSetpoint to default value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsSetpointRaiseCommand_99() + CHIP_ERROR TestSendsSetpointRaiseCommandHeatCool_99() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -52065,7 +52465,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { params.amount = [NSNumber numberWithChar:30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Error: %@", err); + NSLog(@"Sends SetpointRaise Command Heat & Cool Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52272,7 +52672,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -52296,7 +52696,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -52315,7 +52715,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -52348,7 +52748,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -52372,7 +52772,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -52517,7 +52917,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("temperatureDisplayMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("temperatureDisplayMode", [value unsignedCharValue], 1U)); @@ -52539,7 +52939,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("keypadLockout", "", "enum8")); + VerifyOrReturn(CheckConstraintType("keypadLockout", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("keypadLockout", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("keypadLockout", [value unsignedCharValue], 5U)); @@ -52562,7 +52962,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "", "enum8")); + VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("scheduleProgrammingVisibility", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("scheduleProgrammingVisibility", [value unsignedCharValue], 1U)); @@ -52625,7 +53025,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Verify device temperature displayed in °C\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0000")) { NextTest(); return; } @@ -52649,7 +53049,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Verify device temperature displayed in °F\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0000")) { NextTest(); return; } @@ -52690,7 +53090,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Verify all device functionality available to the user\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } @@ -52714,7 +53114,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Verify device operates at Level 1 reduced functionality\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } @@ -52738,7 +53138,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Verify device operates at Level 2 reduced functionality\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } @@ -52762,7 +53162,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Verify device operates at Level 3 reduced functionality\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } @@ -52786,7 +53186,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 22: ChipLogProgress(chipTool, " ***** Test Step 22 : Verify device operates at Level 4 reduced functionality\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } @@ -52810,7 +53210,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 25: ChipLogProgress(chipTool, " ***** Test Step 25 : Verify device operates at least functionality level\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } @@ -52843,7 +53243,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { case 29: ChipLogProgress( chipTool, " ***** Test Step 29 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { + if (ShouldSkip("TSUIC.S.A0002")) { NextTest(); return; } @@ -52852,7 +53252,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { case 30: ChipLogProgress( chipTool, " ***** Test Step 30 : Verify local schedule programming functionality is enabled at the thermostat\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0002")) { NextTest(); return; } @@ -52878,7 +53278,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { case 33: ChipLogProgress( chipTool, " ***** Test Step 33 : Verify local schedule programming functionality is disabled at the thermostat\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0002")) { NextTest(); return; } @@ -53888,7 +54288,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -53911,7 +54311,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -53929,7 +54329,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); @@ -53959,7 +54359,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -53982,7 +54382,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -54169,6 +54569,8 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).value, @"bedroom")); } + VerifyOrReturn(CheckConstraintType("labelList", "list", "list")); + VerifyOrReturn(CheckConstraintMinLength("labelList", value, 4)); NextTest(); }]; @@ -54227,12 +54629,12 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { err = TestThWritesLabelListAttributeOfTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute of the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes LabelList attribute of the DUT\n"); if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestThReadsLabelListAttributeOfTheDut_2(); + err = TestThWritesLabelListAttributeOfTheDut_2(); break; } @@ -54311,7 +54713,7 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_2() + CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -54328,7 +54730,7 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { } [cluster writeAttributeLabelListWithValue:labelListArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); + NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code @@ -54537,6 +54939,10 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { id labelListArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @""; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @""; + labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument @@ -54564,7 +54970,9 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"")); + VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"")); } NextTest(); @@ -54617,12 +55025,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads NetworkInterface structure attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads BSSID attribute from DUT\n"); if (ShouldSkip("DGWIFI.S.A0000")) { NextTest(); return; } - err = TestReadsNetworkInterfaceStructureAttributeFromDut_1(); + err = TestThReadsBssidAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads SecurityType attribute constraints\n"); @@ -54800,20 +55208,23 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsNetworkInterfaceStructureAttributeFromDut_1() + CHIP_ERROR TestThReadsBssidAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNetworkInterfacesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads NetworkInterface structure attribute from DUT Error: %@", err); + [cluster readAttributeBssidWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads BSSID attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("networkInterfaces", "", "list")); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("bssid", "octet_string", "octet_string")); + } + NextTest(); }]; @@ -54834,7 +55245,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("securityType", "", "enum")); + VerifyOrReturn(CheckConstraintType("securityType", "enum8", "enum8")); } NextTest(); @@ -54857,7 +55268,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiFiVersion", "", "enum")); + VerifyOrReturn(CheckConstraintType("wiFiVersion", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("wiFiVersion", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("wiFiVersion", [value unsignedCharValue], 5U)); } @@ -54882,7 +55293,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("channelNumber", "", "uint16")); + VerifyOrReturn(CheckConstraintType("channelNumber", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("channelNumber", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("channelNumber", [value unsignedShortValue], 65535U)); } @@ -54907,7 +55318,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("rssi", "", "int8")); + VerifyOrReturn(CheckConstraintType("rssi", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("rssi", [value charValue], -120)); VerifyOrReturn(CheckConstraintMaxValue("rssi", [value charValue], 0)); } @@ -54930,7 +55341,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("beaconLostCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("beaconLostCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("beaconLostCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("beaconLostCount", [value unsignedIntValue], 4294967295UL)); @@ -54952,7 +55363,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("beaconRxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("beaconRxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("beaconRxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("beaconRxCount", [value unsignedIntValue], 4294967295UL)); @@ -54974,7 +55385,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetMulticastRxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("packetMulticastRxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("packetMulticastRxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("packetMulticastRxCount", [value unsignedIntValue], 4294967295UL)); @@ -54996,7 +55407,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetMulticastTxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("packetMulticastTxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("packetMulticastTxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("packetMulticastTxCount", [value unsignedIntValue], 4294967295UL)); @@ -55018,7 +55429,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetUnicastRxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("packetUnicastRxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("packetUnicastRxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("packetUnicastRxCount", [value unsignedIntValue], 4294967295UL)); @@ -55040,7 +55451,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetUnicastTxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("packetUnicastTxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("packetUnicastTxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("packetUnicastTxCount", [value unsignedIntValue], 4294967295UL)); @@ -55062,7 +55473,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentMaxRate", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentMaxRate", "int64u", "int64u")); NextTest(); }]; @@ -55081,7 +55492,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("overrunCount", "", "uint64")); + VerifyOrReturn(CheckConstraintType("overrunCount", "int64u", "int64u")); NextTest(); }]; @@ -55279,10 +55690,9 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("BeaconLostCount", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintType("beaconLostCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("beaconLostCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("beaconLostCount", [value unsignedIntValue], 4294967295UL)); NextTest(); }]; @@ -55302,10 +55712,9 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("BeaconRxCount", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintType("beaconRxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("beaconRxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("beaconRxCount", [value unsignedIntValue], 4294967295UL)); NextTest(); }]; @@ -55325,10 +55734,9 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("PacketMulticastRxCount", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintType("packetMulticastRxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("packetMulticastRxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("packetMulticastRxCount", [value unsignedIntValue], 4294967295UL)); NextTest(); }]; @@ -55348,10 +55756,9 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("PacketMulticastTxCount", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintType("packetMulticastTxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("packetMulticastTxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("packetMulticastTxCount", [value unsignedIntValue], 4294967295UL)); NextTest(); }]; @@ -55371,10 +55778,9 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("PacketUnicastRxCount", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintType("packetUnicastRxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("packetUnicastRxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("packetUnicastRxCount", [value unsignedIntValue], 4294967295UL)); NextTest(); }]; @@ -55394,10 +55800,9 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("PacketUnicastTxCount", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintType("packetUnicastTxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("packetUnicastTxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("packetUnicastTxCount", [value unsignedIntValue], 4294967295UL)); NextTest(); }]; @@ -55584,7 +55989,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("clusterRevision", [value unsignedShortValue], 5U)); VerifyOrReturn(CheckConstraintMaxValue("clusterRevision", [value unsignedShortValue], 200U)); @@ -55607,7 +56012,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "uint32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 32768UL)); @@ -55630,7 +56035,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); @@ -55661,7 +56066,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); NextTest(); @@ -55683,7 +56088,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); @@ -55712,7 +56117,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -56088,7 +56493,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("type", "", "enum8")); + VerifyOrReturn(CheckConstraintType("type", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("type", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("type", [value unsignedCharValue], 9U)); @@ -56111,7 +56516,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("configStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 63U)); @@ -56134,7 +56539,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 63U)); @@ -56157,7 +56562,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("endProductType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23U)); @@ -56180,7 +56585,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("mode", "", "map8")); + VerifyOrReturn(CheckConstraintType("mode", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("mode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("mode", [value unsignedCharValue], 15U)); @@ -56228,7 +56633,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "targetPositionLiftPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -56257,7 +56662,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "targetPositionTiltPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -56286,7 +56691,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -56315,7 +56720,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -56341,7 +56746,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", [value unsignedShortValue], 65535U)); @@ -56364,7 +56769,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", [value unsignedShortValue], 65535U)); @@ -56387,7 +56792,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", [value unsignedShortValue], 65535U)); @@ -56410,7 +56815,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", [value unsignedShortValue], 65535U)); @@ -56433,7 +56838,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("safetyStatus", "", "map16")); + VerifyOrReturn(CheckConstraintType("safetyStatus", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("safetyStatus", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("safetyStatus", [value unsignedShortValue], 2047U)); @@ -56456,7 +56861,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("physicalClosedLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintType("physicalClosedLimitLift", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("physicalClosedLimitLift", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("physicalClosedLimitLift", [value unsignedShortValue], 65535U)); @@ -56479,7 +56884,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("physicalClosedLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintType("physicalClosedLimitTilt", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("physicalClosedLimitTilt", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("physicalClosedLimitTilt", [value unsignedShortValue], 65535U)); @@ -56504,7 +56909,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionLift", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentPositionLift", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", [value unsignedShortValue], 65535U)); } @@ -56530,7 +56935,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionTilt", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentPositionTilt", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", [value unsignedShortValue], 65535U)); } @@ -56554,7 +56959,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("numberOfActuationsLift", "", "uint16")); + VerifyOrReturn(CheckConstraintType("numberOfActuationsLift", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("numberOfActuationsLift", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("numberOfActuationsLift", [value unsignedShortValue], 65535U)); @@ -56577,7 +56982,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("numberOfActuationsTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintType("numberOfActuationsTilt", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("numberOfActuationsTilt", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("numberOfActuationsTilt", [value unsignedShortValue], 65535U)); @@ -56603,7 +57008,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( @@ -56632,7 +57037,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( @@ -57607,7 +58012,7 @@ class Test_TC_WNCV_2_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("endProductType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23U)); @@ -58002,7 +58407,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -58031,7 +58436,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); VerifyOrReturn( @@ -58060,7 +58465,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -58089,7 +58494,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); VerifyOrReturn( @@ -58117,7 +58522,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled = true; }; @@ -58256,7 +58661,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 5U)); VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 21U)); @@ -58289,7 +58694,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -58318,7 +58723,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( @@ -58347,7 +58752,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -58376,7 +58781,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( @@ -58462,7 +58867,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "targetPositionLiftPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -58491,7 +58896,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "targetPositionTiltPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -58889,7 +59294,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -58918,7 +59323,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( @@ -58947,7 +59352,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -58976,7 +59381,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( @@ -59004,7 +59409,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled = true; }; @@ -59143,7 +59548,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 10U)); VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 42U)); @@ -59176,7 +59581,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -59205,7 +59610,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); VerifyOrReturn( @@ -59234,7 +59639,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -59263,7 +59668,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); VerifyOrReturn( @@ -59349,7 +59754,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "targetPositionLiftPercent100ths", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -59378,7 +59783,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "targetPositionTiltPercent100ths", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -59693,7 +60098,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); testSendClusterTest_TC_WNCV_3_3_5_WaitForReport_Fulfilled = true; }; @@ -83520,7 +83925,7 @@ class TestConstraints : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinLength("charString", [value length], 5)); + VerifyOrReturn(CheckConstraintMinLength("charString", value, 5)); NextTest(); }]; @@ -83540,7 +83945,7 @@ class TestConstraints : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMaxLength("charString", [value length], 20)); + VerifyOrReturn(CheckConstraintMaxLength("charString", value, 20)); NextTest(); }]; @@ -84860,33 +85265,473 @@ class TestSaveAs : public TestCommandBridge { break; } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + // 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 = 110; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + NSNumber * _Nonnull TestAddArgumentDefaultValue; + + CHIP_ERROR TestSendTestAddArgumentsCommand_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; + params.arg1 = [NSNumber numberWithUnsignedChar:3U]; + params.arg2 = [NSNumber numberWithUnsignedChar:17U]; + [cluster testAddArgumentsWithParams:params + completionHandler:^( + MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Test Add Arguments Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.returnValue; + VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); + } + { + TestAddArgumentDefaultValue = values.returnValue; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendTestAddArgumentsCommand_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; + params.arg1 = [NSNumber numberWithUnsignedChar:3U]; + params.arg2 = [NSNumber numberWithUnsignedChar:17U]; + [cluster testAddArgumentsWithParams:params + completionHandler:^( + MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Test Add Arguments Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.returnValue; + VerifyOrReturn(CheckValue("returnValue", actualValue, TestAddArgumentDefaultValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendTestAddArgumentsCommand_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; + params.arg1 = [NSNumber numberWithUnsignedChar:3U]; + params.arg2 = [TestAddArgumentDefaultValue copy]; + [cluster + testAddArgumentsWithParams:params + completionHandler:^( + MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Test Add Arguments Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintNotValue("returnValue", values.returnValue, TestAddArgumentDefaultValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull readAttributeBooleanDefaultValue; + + CHIP_ERROR TestReadAttributeBooleanDefaultValue_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BOOLEAN Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("boolean", actualValue, 0)); + } + { + readAttributeBooleanDefaultValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteAttributeBooleanNotDefaultValue_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id booleanArgument; + booleanArgument = [NSNumber numberWithBool:1]; + [cluster writeAttributeBooleanWithValue:booleanArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute BOOLEAN Not Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeBooleanNotDefaultValue_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BOOLEAN Not Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintNotValue("boolean", value, readAttributeBooleanDefaultValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteAttributeBooleanDefaultValue_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id booleanArgument; + booleanArgument = [readAttributeBooleanDefaultValue copy]; + [cluster writeAttributeBooleanWithValue:booleanArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute BOOLEAN DefaultValue Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeBooleanFalse_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BOOLEAN False Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("boolean", actualValue, readAttributeBooleanDefaultValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull readAttributeBitmap8DefaultValue; + + CHIP_ERROR TestReadAttributeBitmap8DefaultValue_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP8 Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap8", actualValue, 0U)); + } + { + readAttributeBitmap8DefaultValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteAttributeBitmap8NotDefaultValue_10() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id bitmap8Argument; + bitmap8Argument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeBitmap8WithValue:bitmap8Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP8 Not Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeBitmap8NotDefaultValue_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP8 Not Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintNotValue("bitmap8", value, readAttributeBitmap8DefaultValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteAttributeBitmap8DefaultValue_12() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id bitmap8Argument; + bitmap8Argument = [readAttributeBitmap8DefaultValue copy]; + [cluster writeAttributeBitmap8WithValue:bitmap8Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP8 Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeBitmap8DefaultValue_13() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP8 Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap8", actualValue, readAttributeBitmap8DefaultValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull readAttributeBitmap16DefaultValue; + + CHIP_ERROR TestReadAttributeBitmap16DefaultValue_14() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP16 Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap16", actualValue, 0U)); + } + { + readAttributeBitmap16DefaultValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteAttributeBitmap16NotDefaultValue_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id bitmap16Argument; + bitmap16Argument = [NSNumber numberWithUnsignedShort:1U]; + [cluster writeAttributeBitmap16WithValue:bitmap16Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP16 Not Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestReadAttributeBitmap16NotDefaultValue_16() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP16 Not Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintNotValue("bitmap16", value, readAttributeBitmap16DefaultValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 110; + CHIP_ERROR TestWriteAttributeBitmap16DefaultValue_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + id bitmap16Argument; + bitmap16Argument = [readAttributeBitmap16DefaultValue copy]; + [cluster writeAttributeBitmap16WithValue:bitmap16Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP16 Default Value Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeBitmap16DefaultValue_18() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP16 Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap16", actualValue, readAttributeBitmap16DefaultValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - NSNumber * _Nonnull TestAddArgumentDefaultValue; + NSNumber * _Nonnull readAttributeBitmap32DefaultValue; - CHIP_ERROR TestSendTestAddArgumentsCommand_1() + CHIP_ERROR TestReadAttributeBitmap32DefaultValue_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -84894,31 +85739,26 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; - params.arg1 = [NSNumber numberWithUnsignedChar:3U]; - params.arg2 = [NSNumber numberWithUnsignedChar:17U]; - [cluster testAddArgumentsWithParams:params - completionHandler:^( - MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); - } - { - TestAddArgumentDefaultValue = values.returnValue; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap32", actualValue, 0UL)); + } + { + readAttributeBitmap32DefaultValue = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestAddArgumentsCommand_2() + CHIP_ERROR TestWriteAttributeBitmap32NotDefaultValue_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -84926,28 +85766,42 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; - params.arg1 = [NSNumber numberWithUnsignedChar:3U]; - params.arg2 = [NSNumber numberWithUnsignedChar:17U]; - [cluster testAddArgumentsWithParams:params - completionHandler:^( - MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + id bitmap32Argument; + bitmap32Argument = [NSNumber numberWithUnsignedInt:1UL]; + [cluster writeAttributeBitmap32WithValue:bitmap32Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP32 Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, TestAddArgumentDefaultValue)); - } + NextTest(); + }]; - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeBitmap32NotDefaultValue_21() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP32 Not Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintNotValue("bitmap32", value, readAttributeBitmap32DefaultValue)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestAddArgumentsCommand_3() + CHIP_ERROR TestWriteAttributeBitmap32DefaultValue_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -84955,27 +85809,46 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; - params.arg1 = [NSNumber numberWithUnsignedChar:3U]; - params.arg2 = [TestAddArgumentDefaultValue copy]; - [cluster - testAddArgumentsWithParams:params - completionHandler:^( - MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + id bitmap32Argument; + bitmap32Argument = [readAttributeBitmap32DefaultValue copy]; + [cluster writeAttributeBitmap32WithValue:bitmap32Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP32 Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("returnValue", values.returnValue, TestAddArgumentDefaultValue)); + NextTest(); + }]; - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeBitmap32DefaultValue_23() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap32", actualValue, readAttributeBitmap32DefaultValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeBooleanDefaultValue; + NSNumber * _Nonnull readAttributeBitmap64DefaultValue; - CHIP_ERROR TestReadAttributeBooleanDefaultValue_4() + CHIP_ERROR TestReadAttributeBitmap64DefaultValue_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -84983,17 +85856,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BOOLEAN Default Value Error: %@", err); + [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("boolean", actualValue, 0)); + VerifyOrReturn(CheckValue("bitmap64", actualValue, 0ULL)); } { - readAttributeBooleanDefaultValue = value; + readAttributeBitmap64DefaultValue = value; } NextTest(); @@ -85002,7 +85875,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeBooleanNotDefaultValue_5() + CHIP_ERROR TestWriteAttributeBitmap64NotDefaultValue_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85010,21 +85883,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id booleanArgument; - booleanArgument = [NSNumber numberWithBool:1]; - [cluster writeAttributeBooleanWithValue:booleanArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BOOLEAN Not Default Value Error: %@", err); + id bitmap64Argument; + bitmap64Argument = [NSNumber numberWithUnsignedLongLong:1ULL]; + [cluster writeAttributeBitmap64WithValue:bitmap64Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP64 Not Default Value 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 TestReadAttributeBooleanNotDefaultValue_6() + CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85032,12 +85905,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BOOLEAN Not Default Value Error: %@", err); + [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("boolean", value, readAttributeBooleanDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("bitmap64", value, readAttributeBitmap64DefaultValue)); NextTest(); }]; @@ -85045,7 +85918,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeBooleanDefaultValue_7() + CHIP_ERROR TestWriteAttributeBitmap64DefaultValue_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85053,21 +85926,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id booleanArgument; - booleanArgument = [readAttributeBooleanDefaultValue copy]; - [cluster writeAttributeBooleanWithValue:booleanArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BOOLEAN DefaultValue Error: %@", err); + id bitmap64Argument; + bitmap64Argument = [readAttributeBitmap64DefaultValue copy]; + [cluster writeAttributeBitmap64WithValue:bitmap64Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP64 Default Value 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 TestReadAttributeBooleanFalse_8() + CHIP_ERROR TestReadAttributeBitmap64DefaultValue_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85075,14 +85948,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BOOLEAN False Error: %@", err); + [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("boolean", actualValue, readAttributeBooleanDefaultValue)); + VerifyOrReturn(CheckValue("bitmap64", actualValue, readAttributeBitmap64DefaultValue)); } NextTest(); @@ -85090,9 +85963,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeBitmap8DefaultValue; + NSNumber * _Nonnull readAttributeInt8uDefaultValue; - CHIP_ERROR TestReadAttributeBitmap8DefaultValue_9() + CHIP_ERROR TestReadAttributeInt8uDefaultValue_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85100,17 +85973,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BITMAP8 Default Value Error: %@", err); + [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT8U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("bitmap8", actualValue, 0U)); + VerifyOrReturn(CheckValue("int8u", actualValue, 0U)); } { - readAttributeBitmap8DefaultValue = value; + readAttributeInt8uDefaultValue = value; } NextTest(); @@ -85119,7 +85992,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeBitmap8NotDefaultValue_10() + CHIP_ERROR TestWriteAttributeInt8uNotDefaultValue_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85127,21 +86000,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id bitmap8Argument; - bitmap8Argument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeBitmap8WithValue:bitmap8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP8 Not Default Value Error: %@", err); + id int8uArgument; + int8uArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeInt8uWithValue:int8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8U Not Default Value 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 TestReadAttributeBitmap8NotDefaultValue_11() + CHIP_ERROR TestReadAttributeInt8uNotDefaultValue_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85149,12 +86022,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BITMAP8 Not Default Value Error: %@", err); + [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT8U Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("bitmap8", value, readAttributeBitmap8DefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int8u", value, readAttributeInt8uDefaultValue)); NextTest(); }]; @@ -85162,7 +86035,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeBitmap8DefaultValue_12() + CHIP_ERROR TestWriteAttributeInt8uDefaultValue_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85170,21 +86043,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id bitmap8Argument; - bitmap8Argument = [readAttributeBitmap8DefaultValue copy]; - [cluster writeAttributeBitmap8WithValue:bitmap8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP8 Default Value Error: %@", err); + id int8uArgument; + int8uArgument = [readAttributeInt8uDefaultValue copy]; + [cluster writeAttributeInt8uWithValue:int8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8U Default Value 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 TestReadAttributeBitmap8DefaultValue_13() + CHIP_ERROR TestReadAttributeInt8uDefaultValue_33() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85192,14 +86065,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BITMAP8 Default Value Error: %@", err); + [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT8U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("bitmap8", actualValue, readAttributeBitmap8DefaultValue)); + VerifyOrReturn(CheckValue("int8u", actualValue, readAttributeInt8uDefaultValue)); } NextTest(); @@ -85207,9 +86080,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeBitmap16DefaultValue; + NSNumber * _Nonnull readAttributeInt16uDefaultValue; - CHIP_ERROR TestReadAttributeBitmap16DefaultValue_14() + CHIP_ERROR TestReadAttributeInt16uDefaultValue_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85217,17 +86090,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BITMAP16 Default Value Error: %@", err); + [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT16U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("bitmap16", actualValue, 0U)); + VerifyOrReturn(CheckValue("int16u", actualValue, 0U)); } { - readAttributeBitmap16DefaultValue = value; + readAttributeInt16uDefaultValue = value; } NextTest(); @@ -85236,7 +86109,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeBitmap16NotDefaultValue_15() + CHIP_ERROR TestWriteAttributeInt16uNotDefaultValue_35() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85244,21 +86117,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id bitmap16Argument; - bitmap16Argument = [NSNumber numberWithUnsignedShort:1U]; - [cluster writeAttributeBitmap16WithValue:bitmap16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP16 Not Default Value Error: %@", err); + id int16uArgument; + int16uArgument = [NSNumber numberWithUnsignedShort:1U]; + [cluster writeAttributeInt16uWithValue:int16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16U Not Default Value 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 TestReadAttributeBitmap16NotDefaultValue_16() + CHIP_ERROR TestReadAttributeInt16uNotDefaultValue_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85266,12 +86139,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BITMAP16 Not Default Value Error: %@", err); + [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT16U Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("bitmap16", value, readAttributeBitmap16DefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int16u", value, readAttributeInt16uDefaultValue)); NextTest(); }]; @@ -85279,7 +86152,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeBitmap16DefaultValue_17() + CHIP_ERROR TestWriteAttributeInt16uDefaultValue_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85287,21 +86160,138 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id bitmap16Argument; - bitmap16Argument = [readAttributeBitmap16DefaultValue copy]; - [cluster writeAttributeBitmap16WithValue:bitmap16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP16 Default Value Error: %@", err); + id int16uArgument; + int16uArgument = [readAttributeInt16uDefaultValue copy]; + [cluster writeAttributeInt16uWithValue:int16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16U Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeInt16uDefaultValue_38() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT16U Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("int16u", actualValue, readAttributeInt16uDefaultValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull readAttributeInt32uDefaultValue; + + CHIP_ERROR TestReadAttributeInt32uDefaultValue_39() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT32U Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("int32u", actualValue, 0UL)); + } + { + readAttributeInt32uDefaultValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteAttributeInt32uNotDefaultValue_40() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id int32uArgument; + int32uArgument = [NSNumber numberWithUnsignedInt:1UL]; + [cluster writeAttributeInt32uWithValue:int32uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32U Not Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeInt32uNotDefaultValue_41() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT32U Not Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintNotValue("int32u", value, readAttributeInt32uDefaultValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteAttributeInt32uDefaultValue_42() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id int32uArgument; + int32uArgument = [readAttributeInt32uDefaultValue copy]; + [cluster writeAttributeInt32uWithValue:int32uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32U Default Value 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 TestReadAttributeBitmap16DefaultValue_18() + CHIP_ERROR TestReadAttributeInt32uDefaultValue_43() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85309,14 +86299,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BITMAP16 Default Value Error: %@", err); + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT32U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("bitmap16", actualValue, readAttributeBitmap16DefaultValue)); + VerifyOrReturn(CheckValue("int32u", actualValue, readAttributeInt32uDefaultValue)); } NextTest(); @@ -85324,9 +86314,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeBitmap32DefaultValue; + NSNumber * _Nonnull readAttributeInt64uDefaultValue; - CHIP_ERROR TestReadAttributeBitmap32DefaultValue_19() + CHIP_ERROR TestReadAttributeInt64uDefaultValue_44() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85334,17 +86324,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); + [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT64U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("bitmap32", actualValue, 0UL)); + VerifyOrReturn(CheckValue("int64u", actualValue, 0ULL)); } { - readAttributeBitmap32DefaultValue = value; + readAttributeInt64uDefaultValue = value; } NextTest(); @@ -85353,7 +86343,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeBitmap32NotDefaultValue_20() + CHIP_ERROR TestWriteAttributeInt64uNotDefaultValue_45() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85361,21 +86351,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id bitmap32Argument; - bitmap32Argument = [NSNumber numberWithUnsignedInt:1UL]; - [cluster writeAttributeBitmap32WithValue:bitmap32Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP32 Not Default Value Error: %@", err); + id int64uArgument; + int64uArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; + [cluster writeAttributeInt64uWithValue:int64uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT64U Not Default Value 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 TestReadAttributeBitmap32NotDefaultValue_21() + CHIP_ERROR TestReadAttributeInt64uNotDefaultValue_46() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85383,12 +86373,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BITMAP32 Not Default Value Error: %@", err); + [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT64U Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("bitmap32", value, readAttributeBitmap32DefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int64u", value, readAttributeInt64uDefaultValue)); NextTest(); }]; @@ -85396,7 +86386,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeBitmap32DefaultValue_22() + CHIP_ERROR TestWriteAttributeInt64uDefaultValue_47() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85404,21 +86394,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id bitmap32Argument; - bitmap32Argument = [readAttributeBitmap32DefaultValue copy]; - [cluster writeAttributeBitmap32WithValue:bitmap32Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP32 Default Value Error: %@", err); + id int64uArgument; + int64uArgument = [readAttributeInt64uDefaultValue copy]; + [cluster writeAttributeInt64uWithValue:int64uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT64U Default Value 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 TestReadAttributeBitmap32DefaultValue_23() + CHIP_ERROR TestReadAttributeInt64uDefaultValue_48() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85426,14 +86416,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); + [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT64U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("bitmap32", actualValue, readAttributeBitmap32DefaultValue)); + VerifyOrReturn(CheckValue("int64u", actualValue, readAttributeInt64uDefaultValue)); } NextTest(); @@ -85441,9 +86431,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeBitmap64DefaultValue; + NSNumber * _Nonnull readAttributeInt8sDefaultValue; - CHIP_ERROR TestReadAttributeBitmap64DefaultValue_24() + CHIP_ERROR TestReadAttributeInt8sDefaultValue_49() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85451,17 +86441,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); + [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT8S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("bitmap64", actualValue, 0ULL)); + VerifyOrReturn(CheckValue("int8s", actualValue, 0)); } { - readAttributeBitmap64DefaultValue = value; + readAttributeInt8sDefaultValue = value; } NextTest(); @@ -85470,7 +86460,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeBitmap64NotDefaultValue_25() + CHIP_ERROR TestWriteAttributeInt8sNotDefaultValue_50() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85478,21 +86468,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id bitmap64Argument; - bitmap64Argument = [NSNumber numberWithUnsignedLongLong:1ULL]; - [cluster writeAttributeBitmap64WithValue:bitmap64Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP64 Not Default Value Error: %@", err); + id int8sArgument; + int8sArgument = [NSNumber numberWithChar:1]; + [cluster writeAttributeInt8sWithValue:int8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8S Not Default Value 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 TestReadAttributeBitmap64DefaultValue_26() + CHIP_ERROR TestReadAttributeInt8sNotDefaultValue_51() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85500,12 +86490,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); + [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT8S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("bitmap64", value, readAttributeBitmap64DefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int8s", value, readAttributeInt8sDefaultValue)); NextTest(); }]; @@ -85513,7 +86503,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeBitmap64DefaultValue_27() + CHIP_ERROR TestWriteAttributeInt8sDefaultValue_52() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85521,21 +86511,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id bitmap64Argument; - bitmap64Argument = [readAttributeBitmap64DefaultValue copy]; - [cluster writeAttributeBitmap64WithValue:bitmap64Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP64 Default Value Error: %@", err); + id int8sArgument; + int8sArgument = [readAttributeInt8sDefaultValue copy]; + [cluster writeAttributeInt8sWithValue:int8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8S Default Value 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 TestReadAttributeBitmap64DefaultValue_28() + CHIP_ERROR TestReadAttributeInt8sDefaultValue_53() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85543,14 +86533,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); + [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT8S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("bitmap64", actualValue, readAttributeBitmap64DefaultValue)); + VerifyOrReturn(CheckValue("int8s", actualValue, readAttributeInt8sDefaultValue)); } NextTest(); @@ -85558,9 +86548,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeInt8uDefaultValue; + NSNumber * _Nonnull readAttributeInt16sDefaultValue; - CHIP_ERROR TestReadAttributeInt8uDefaultValue_29() + CHIP_ERROR TestReadAttributeInt16sDefaultValue_54() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85568,17 +86558,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT8U Default Value Error: %@", err); + [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT16S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int8u", actualValue, 0U)); + VerifyOrReturn(CheckValue("int16s", actualValue, 0)); } { - readAttributeInt8uDefaultValue = value; + readAttributeInt16sDefaultValue = value; } NextTest(); @@ -85587,7 +86577,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt8uNotDefaultValue_30() + CHIP_ERROR TestWriteAttributeInt16sNotDefaultValue_55() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85595,21 +86585,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int8uArgument; - int8uArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeInt8uWithValue:int8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8U Not Default Value Error: %@", err); + id int16sArgument; + int16sArgument = [NSNumber numberWithShort:1]; + [cluster writeAttributeInt16sWithValue:int16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16S Not Default Value 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 TestReadAttributeInt8uNotDefaultValue_31() + CHIP_ERROR TestReadAttributeInt16sNotDefaultValue_56() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85617,12 +86607,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT8U Not Default Value Error: %@", err); + [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT16S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("int8u", value, readAttributeInt8uDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int16s", value, readAttributeInt16sDefaultValue)); NextTest(); }]; @@ -85630,7 +86620,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt8uDefaultValue_32() + CHIP_ERROR TestWriteAttributeInt16sDefaultValue_57() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85638,21 +86628,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int8uArgument; - int8uArgument = [readAttributeInt8uDefaultValue copy]; - [cluster writeAttributeInt8uWithValue:int8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8U Default Value Error: %@", err); + id int16sArgument; + int16sArgument = [readAttributeInt16sDefaultValue copy]; + [cluster writeAttributeInt16sWithValue:int16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16S Default Value 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 TestReadAttributeInt8uDefaultValue_33() + CHIP_ERROR TestReadAttributeInt16sDefaultValue_58() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85660,14 +86650,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT8U Default Value Error: %@", err); + [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT16S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int8u", actualValue, readAttributeInt8uDefaultValue)); + VerifyOrReturn(CheckValue("int16s", actualValue, readAttributeInt16sDefaultValue)); } NextTest(); @@ -85675,9 +86665,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeInt16uDefaultValue; + NSNumber * _Nonnull readAttributeInt32sDefaultValue; - CHIP_ERROR TestReadAttributeInt16uDefaultValue_34() + CHIP_ERROR TestReadAttributeInt32sDefaultValue_59() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85685,17 +86675,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT16U Default Value Error: %@", err); + [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT32S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int16u", actualValue, 0U)); + VerifyOrReturn(CheckValue("int32s", actualValue, 0L)); } { - readAttributeInt16uDefaultValue = value; + readAttributeInt32sDefaultValue = value; } NextTest(); @@ -85704,7 +86694,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt16uNotDefaultValue_35() + CHIP_ERROR TestWriteAttributeInt32sNotDefaultValue_60() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85712,11 +86702,11 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int16uArgument; - int16uArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster writeAttributeInt16uWithValue:int16uArgument + id int32sArgument; + int32sArgument = [NSNumber numberWithInt:1L]; + [cluster writeAttributeInt32sWithValue:int32sArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16U Not Default Value Error: %@", err); + NSLog(@"Write attribute INT32S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85726,7 +86716,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeInt16uNotDefaultValue_36() + CHIP_ERROR TestReadAttributeInt32sNotDefaultValue_61() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85734,12 +86724,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT16U Not Default Value Error: %@", err); + [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT32S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("int16u", value, readAttributeInt16uDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int32s", value, readAttributeInt32sDefaultValue)); NextTest(); }]; @@ -85747,7 +86737,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt16uDefaultValue_37() + CHIP_ERROR TestWriteAttributeInt32sDefaultValue_62() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85755,11 +86745,11 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int16uArgument; - int16uArgument = [readAttributeInt16uDefaultValue copy]; - [cluster writeAttributeInt16uWithValue:int16uArgument + id int32sArgument; + int32sArgument = [readAttributeInt32sDefaultValue copy]; + [cluster writeAttributeInt32sWithValue:int32sArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16U Default Value Error: %@", err); + NSLog(@"Write attribute INT32S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85769,7 +86759,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeInt16uDefaultValue_38() + CHIP_ERROR TestReadAttributeInt32sDefaultValue_63() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85777,14 +86767,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT16U Default Value Error: %@", err); + [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT32S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int16u", actualValue, readAttributeInt16uDefaultValue)); + VerifyOrReturn(CheckValue("int32s", actualValue, readAttributeInt32sDefaultValue)); } NextTest(); @@ -85792,9 +86782,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeInt32uDefaultValue; + NSNumber * _Nonnull readAttributeInt64sDefaultValue; - CHIP_ERROR TestReadAttributeInt32uDefaultValue_39() + CHIP_ERROR TestReadAttributeInt64sDefaultValue_64() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85802,17 +86792,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT32U Default Value Error: %@", err); + [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT64S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int32u", actualValue, 0UL)); + VerifyOrReturn(CheckValue("int64s", actualValue, 0LL)); } { - readAttributeInt32uDefaultValue = value; + readAttributeInt64sDefaultValue = value; } NextTest(); @@ -85821,7 +86811,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt32uNotDefaultValue_40() + CHIP_ERROR TestWriteAttributeIntsNotDefaultValue_65() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85829,11 +86819,11 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int32uArgument; - int32uArgument = [NSNumber numberWithUnsignedInt:1UL]; - [cluster writeAttributeInt32uWithValue:int32uArgument + id int64sArgument; + int64sArgument = [NSNumber numberWithLongLong:1LL]; + [cluster writeAttributeInt64sWithValue:int64sArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Not Default Value Error: %@", err); + NSLog(@"Write attribute INTS Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85843,7 +86833,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeInt32uNotDefaultValue_41() + CHIP_ERROR TestReadAttributeInt64sNotDefaultValue_66() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85851,12 +86841,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT32U Not Default Value Error: %@", err); + [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT64S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("int32u", value, readAttributeInt32uDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int64s", value, readAttributeInt64sDefaultValue)); NextTest(); }]; @@ -85864,7 +86854,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt32uDefaultValue_42() + CHIP_ERROR TestWriteAttributeInt64sDefaultValue_67() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85872,11 +86862,11 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int32uArgument; - int32uArgument = [readAttributeInt32uDefaultValue copy]; - [cluster writeAttributeInt32uWithValue:int32uArgument + id int64sArgument; + int64sArgument = [readAttributeInt64sDefaultValue copy]; + [cluster writeAttributeInt64sWithValue:int64sArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Default Value Error: %@", err); + NSLog(@"Write attribute INT64S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85886,7 +86876,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeInt32uDefaultValue_43() + CHIP_ERROR TestReadAttributeInt64sDefaultValue_68() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85894,14 +86884,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT32U Default Value Error: %@", err); + [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute INT64S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int32u", actualValue, readAttributeInt32uDefaultValue)); + VerifyOrReturn(CheckValue("int64s", actualValue, readAttributeInt64sDefaultValue)); } NextTest(); @@ -85909,9 +86899,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeInt64uDefaultValue; + NSNumber * _Nonnull readAttributeEnum8DefaultValue; - CHIP_ERROR TestReadAttributeInt64uDefaultValue_44() + CHIP_ERROR TestReadAttributeEnum8DefaultValue_69() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85919,17 +86909,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT64U Default Value Error: %@", err); + [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute ENUM8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int64u", actualValue, 0ULL)); + VerifyOrReturn(CheckValue("enum8", actualValue, 0U)); } { - readAttributeInt64uDefaultValue = value; + readAttributeEnum8DefaultValue = value; } NextTest(); @@ -85938,7 +86928,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt64uNotDefaultValue_45() + CHIP_ERROR TestWriteAttributeEnum8NotDefaultValue_70() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85946,21 +86936,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int64uArgument; - int64uArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; - [cluster writeAttributeInt64uWithValue:int64uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64U Not Default Value Error: %@", err); + id enum8Argument; + enum8Argument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeEnum8WithValue:enum8Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute ENUM8 Not Default Value 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 TestReadAttributeInt64uNotDefaultValue_46() + CHIP_ERROR TestReadAttributeEnum8NotDefaultValue_71() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85968,12 +86958,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT64U Not Default Value Error: %@", err); + [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute ENUM8 Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("int64u", value, readAttributeInt64uDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("enum8", value, readAttributeEnum8DefaultValue)); NextTest(); }]; @@ -85981,7 +86971,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt64uDefaultValue_47() + CHIP_ERROR TestWriteAttributeEnum8DefaultValue_72() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -85989,21 +86979,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int64uArgument; - int64uArgument = [readAttributeInt64uDefaultValue copy]; - [cluster writeAttributeInt64uWithValue:int64uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64U Default Value Error: %@", err); + id enum8Argument; + enum8Argument = [readAttributeEnum8DefaultValue copy]; + [cluster writeAttributeEnum8WithValue:enum8Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute ENUM8 Default Value 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 TestReadAttributeInt64uDefaultValue_48() + CHIP_ERROR TestReadAttributeEnum8DefaultValue_73() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86011,14 +87001,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT64U Default Value Error: %@", err); + [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute ENUM8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int64u", actualValue, readAttributeInt64uDefaultValue)); + VerifyOrReturn(CheckValue("enum8", actualValue, readAttributeEnum8DefaultValue)); } NextTest(); @@ -86026,9 +87016,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeInt8sDefaultValue; + NSNumber * _Nonnull readAttributeEnum16DefaultValue; - CHIP_ERROR TestReadAttributeInt8sDefaultValue_49() + CHIP_ERROR TestReadAttributeEnum16DefaultValue_74() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86036,17 +87026,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT8S Default Value Error: %@", err); + [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute ENUM16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int8s", actualValue, 0)); + VerifyOrReturn(CheckValue("enum16", actualValue, 0U)); } { - readAttributeInt8sDefaultValue = value; + readAttributeEnum16DefaultValue = value; } NextTest(); @@ -86055,7 +87045,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt8sNotDefaultValue_50() + CHIP_ERROR TestWriteAttributeEnum16NotDefaultValue_75() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86063,21 +87053,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int8sArgument; - int8sArgument = [NSNumber numberWithChar:1]; - [cluster writeAttributeInt8sWithValue:int8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8S Not Default Value Error: %@", err); + id enum16Argument; + enum16Argument = [NSNumber numberWithUnsignedShort:1U]; + [cluster writeAttributeEnum16WithValue:enum16Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute ENUM16 Not Default Value 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 TestReadAttributeInt8sNotDefaultValue_51() + CHIP_ERROR TestReadAttributeEnum16NotDefaultValue_76() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86085,12 +87075,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT8S Not Default Value Error: %@", err); + [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute ENUM16 Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("int8s", value, readAttributeInt8sDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("enum16", value, readAttributeEnum16DefaultValue)); NextTest(); }]; @@ -86098,7 +87088,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt8sDefaultValue_52() + CHIP_ERROR TestWriteAttributeEnum16DefaultValue_77() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86106,21 +87096,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int8sArgument; - int8sArgument = [readAttributeInt8sDefaultValue copy]; - [cluster writeAttributeInt8sWithValue:int8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8S Default Value Error: %@", err); + id enum16Argument; + enum16Argument = [readAttributeEnum16DefaultValue copy]; + [cluster writeAttributeEnum16WithValue:enum16Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute ENUM16 Default Value 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 TestReadAttributeInt8sDefaultValue_53() + CHIP_ERROR TestReadAttributeEnum16DefaultValue_78() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86128,14 +87118,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT8S Default Value Error: %@", err); + [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute ENUM16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int8s", actualValue, readAttributeInt8sDefaultValue)); + VerifyOrReturn(CheckValue("enum16", actualValue, readAttributeEnum16DefaultValue)); } NextTest(); @@ -86143,9 +87133,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeInt16sDefaultValue; + NSNumber * _Nonnull readAttributeEpochUSDefaultValue; - CHIP_ERROR TestReadAttributeInt16sDefaultValue_54() + CHIP_ERROR TestReadAttributeEpochUsDefaultValue_79() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86153,17 +87143,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT16S Default Value Error: %@", err); + [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute EPOCH_US Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int16s", actualValue, 0)); + VerifyOrReturn(CheckValue("epoch_us", actualValue, 0ULL)); } { - readAttributeInt16sDefaultValue = value; + readAttributeEpochUSDefaultValue = value; } NextTest(); @@ -86172,7 +87162,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt16sNotDefaultValue_55() + CHIP_ERROR TestWriteAttributeEpochUsNotDefaultValue_80() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86180,21 +87170,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int16sArgument; - int16sArgument = [NSNumber numberWithShort:1]; - [cluster writeAttributeInt16sWithValue:int16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16S Not Default Value Error: %@", err); + id epochUsArgument; + epochUsArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; + [cluster writeAttributeEpochUsWithValue:epochUsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute EPOCH_US Not Default Value 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 TestReadAttributeInt16sNotDefaultValue_56() + CHIP_ERROR TestReadAttributeEpochUsNotDefaultValue_81() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86202,12 +87192,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT16S Not Default Value Error: %@", err); + [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute EPOCH_US Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("int16s", value, readAttributeInt16sDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("epochUs", value, readAttributeEpochUSDefaultValue)); NextTest(); }]; @@ -86215,7 +87205,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt16sDefaultValue_57() + CHIP_ERROR TestWriteAttributeEpochUsDefaultValue_82() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86223,21 +87213,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int16sArgument; - int16sArgument = [readAttributeInt16sDefaultValue copy]; - [cluster writeAttributeInt16sWithValue:int16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16S Default Value Error: %@", err); + id epochUsArgument; + epochUsArgument = [readAttributeEpochUSDefaultValue copy]; + [cluster writeAttributeEpochUsWithValue:epochUsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute EPOCH_US Default Value 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 TestReadAttributeInt16sDefaultValue_58() + CHIP_ERROR TestReadAttributeEpochUsDefaultValue_83() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86245,14 +87235,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT16S Default Value Error: %@", err); + [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute EPOCH_US Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int16s", actualValue, readAttributeInt16sDefaultValue)); + VerifyOrReturn(CheckValue("epoch_us", actualValue, readAttributeEpochUSDefaultValue)); } NextTest(); @@ -86260,9 +87250,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeInt32sDefaultValue; + NSNumber * _Nonnull readAttributeEpochSDefaultValue; - CHIP_ERROR TestReadAttributeInt32sDefaultValue_59() + CHIP_ERROR TestReadAttributeEpochSDefaultValue_84() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86270,17 +87260,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT32S Default Value Error: %@", err); + [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute EPOCH_S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int32s", actualValue, 0L)); + VerifyOrReturn(CheckValue("epoch_s", actualValue, 0UL)); } { - readAttributeInt32sDefaultValue = value; + readAttributeEpochSDefaultValue = value; } NextTest(); @@ -86289,7 +87279,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt32sNotDefaultValue_60() + CHIP_ERROR TestWriteAttributeEpochSNotDefaultValue_85() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86297,11 +87287,11 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int32sArgument; - int32sArgument = [NSNumber numberWithInt:1L]; - [cluster writeAttributeInt32sWithValue:int32sArgument + id epochSArgument; + epochSArgument = [NSNumber numberWithUnsignedInt:1UL]; + [cluster writeAttributeEpochSWithValue:epochSArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32S Not Default Value Error: %@", err); + NSLog(@"Write attribute EPOCH_S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -86311,7 +87301,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeInt32sNotDefaultValue_61() + CHIP_ERROR TestReadAttributeEpochSNotDefaultValue_86() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86319,12 +87309,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT32S Not Default Value Error: %@", err); + [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute EPOCH_S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("int32s", value, readAttributeInt32sDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("epochS", value, readAttributeEpochSDefaultValue)); NextTest(); }]; @@ -86332,7 +87322,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt32sDefaultValue_62() + CHIP_ERROR TestWriteAttributeEpochSDefaultValue_87() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86340,11 +87330,11 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int32sArgument; - int32sArgument = [readAttributeInt32sDefaultValue copy]; - [cluster writeAttributeInt32sWithValue:int32sArgument + id epochSArgument; + epochSArgument = [readAttributeEpochSDefaultValue copy]; + [cluster writeAttributeEpochSWithValue:epochSArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32S Default Value Error: %@", err); + NSLog(@"Write attribute EPOCH_S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -86354,7 +87344,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeInt32sDefaultValue_63() + CHIP_ERROR TestReadAttributeEpochSDefaultValue_88() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86362,14 +87352,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT32S Default Value Error: %@", err); + [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute EPOCH_S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int32s", actualValue, readAttributeInt32sDefaultValue)); + VerifyOrReturn(CheckValue("epoch_s", actualValue, readAttributeEpochSDefaultValue)); } NextTest(); @@ -86377,9 +87367,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeInt64sDefaultValue; + NSNumber * _Nonnull readAttributeVendorIdDefaultValue; - CHIP_ERROR TestReadAttributeInt64sDefaultValue_64() + CHIP_ERROR TestReadAttributeVendorIdDefaultValue_89() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86387,17 +87377,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT64S Default Value Error: %@", err); + [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute vendor_id Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int64s", actualValue, 0LL)); + VerifyOrReturn(CheckValue("vendor_id", actualValue, 0U)); } { - readAttributeInt64sDefaultValue = value; + readAttributeVendorIdDefaultValue = value; } NextTest(); @@ -86406,7 +87396,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeIntsNotDefaultValue_65() + CHIP_ERROR TestWriteAttributeVendorIdNotDefaultValue_90() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86414,21 +87404,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int64sArgument; - int64sArgument = [NSNumber numberWithLongLong:1LL]; - [cluster writeAttributeInt64sWithValue:int64sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INTS Not Default Value Error: %@", err); + id vendorIdArgument; + vendorIdArgument = [NSNumber numberWithUnsignedShort:1U]; + [cluster writeAttributeVendorIdWithValue:vendorIdArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute vendor_id Not Default Value 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 TestReadAttributeInt64sNotDefaultValue_66() + CHIP_ERROR TestReadAttributeVendorIdNotDefaultValue_91() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86436,12 +87426,12 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT64S Not Default Value Error: %@", err); + [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute vendor_id Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("int64s", value, readAttributeInt64sDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("vendorId", value, readAttributeVendorIdDefaultValue)); NextTest(); }]; @@ -86449,7 +87439,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt64sDefaultValue_67() + CHIP_ERROR TestWriteAttributeVendorIdDefaultValue_92() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86457,21 +87447,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id int64sArgument; - int64sArgument = [readAttributeInt64sDefaultValue copy]; - [cluster writeAttributeInt64sWithValue:int64sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64S Default Value Error: %@", err); + id vendorIdArgument; + vendorIdArgument = [readAttributeVendorIdDefaultValue copy]; + [cluster writeAttributeVendorIdWithValue:vendorIdArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute vendor_id Default Value 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 TestReadAttributeInt64sDefaultValue_68() + CHIP_ERROR TestReadAttributeVendorIdDefaultValue_93() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86479,14 +87469,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute INT64S Default Value Error: %@", err); + [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute vendor_id Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("int64s", actualValue, readAttributeInt64sDefaultValue)); + VerifyOrReturn(CheckValue("vendor_id", actualValue, readAttributeVendorIdDefaultValue)); } NextTest(); @@ -86494,9 +87484,9 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeEnum8DefaultValue; + NSString * _Nonnull readAttributeCharStringDefaultValue; - CHIP_ERROR TestReadAttributeEnum8DefaultValue_69() + CHIP_ERROR TestReadAttributeCharStringDefaultValue_94() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86504,17 +87494,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute ENUM8 Default Value Error: %@", err); + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute char_string Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("enum8", actualValue, 0U)); + VerifyOrReturn(CheckValueAsString("char_string", actualValue, @"")); } { - readAttributeEnum8DefaultValue = value; + readAttributeCharStringDefaultValue = value; } NextTest(); @@ -86523,29 +87513,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeEnum8NotDefaultValue_70() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id enum8Argument; - enum8Argument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeEnum8WithValue:enum8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM8 Not Default Value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeEnum8NotDefaultValue_71() + CHIP_ERROR TestReadAttributeCharStringDefaultValueAndCompareToSavedValue_95() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86553,12 +87521,15 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute ENUM8 Not Default Value Error: %@", err); + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute char_string Default Value and compare to saved value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("enum8", value, readAttributeEnum8DefaultValue)); + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("char_string", actualValue, readAttributeCharStringDefaultValue)); + } NextTest(); }]; @@ -86566,7 +87537,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeEnum8DefaultValue_72() + CHIP_ERROR TestWriteAttributeCharStringNotDefaultValue_96() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86574,21 +87545,22 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id enum8Argument; - enum8Argument = [readAttributeEnum8DefaultValue copy]; - [cluster writeAttributeEnum8WithValue:enum8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM8 Default Value Error: %@", err); + id charStringArgument; + charStringArgument = @"NotDefault"; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute char_string Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSString * _Nonnull readAttributeCharStringNotDefaultValue; - CHIP_ERROR TestReadAttributeEnum8DefaultValue_73() + CHIP_ERROR TestReadAttributeCharStringNotDefaultValue_97() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86596,14 +87568,19 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute ENUM8 Default Value Error: %@", err); + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute char_string Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("enum8", actualValue, readAttributeEnum8DefaultValue)); + VerifyOrReturn(CheckValueAsString("char_string", actualValue, @"NotDefault")); + } + + VerifyOrReturn(CheckConstraintNotValue("charString", value, readAttributeCharStringDefaultValue)); + { + readAttributeCharStringNotDefaultValue = value; } NextTest(); @@ -86611,9 +87588,8 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeEnum16DefaultValue; - CHIP_ERROR TestReadAttributeEnum16DefaultValue_74() + CHIP_ERROR TestReadAttributeCharStringNotDefaultValueAndCompareToSavedValue_98() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86621,26 +87597,25 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute ENUM16 Default Value Error: %@", err); + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute char_string Not Default Value and compare to saved value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("enum16", actualValue, 0U)); - } - { - readAttributeEnum16DefaultValue = value; + VerifyOrReturn(CheckValueAsString("char_string", actualValue, readAttributeCharStringNotDefaultValue)); } + VerifyOrReturn(CheckConstraintNotValue("charString", value, readAttributeCharStringDefaultValue)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeEnum16NotDefaultValue_75() + CHIP_ERROR TestWriteAttributeCharStringNotDefaultValueFromSavedValue_99() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86648,21 +87623,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id enum16Argument; - enum16Argument = [NSNumber numberWithUnsignedShort:1U]; - [cluster writeAttributeEnum16WithValue:enum16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM16 Not Default Value Error: %@", err); + id charStringArgument; + charStringArgument = [readAttributeCharStringNotDefaultValue copy]; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute char_string Not Default Value from saved value 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 TestReadAttributeEnum16NotDefaultValue_76() + CHIP_ERROR TestReadAttributeCharStringNotDefaultValueAndCompareToExpectedValue_100() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86670,12 +87645,15 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute ENUM16 Not Default Value Error: %@", err); + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute char_string Not Default Value and compare to expected value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("enum16", value, readAttributeEnum16DefaultValue)); + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("char_string", actualValue, @"NotDefault")); + } NextTest(); }]; @@ -86683,7 +87661,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeEnum16DefaultValue_77() + CHIP_ERROR TestWriteAttributeCharStringDefaultValue_101() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86691,21 +87669,22 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id enum16Argument; - enum16Argument = [readAttributeEnum16DefaultValue copy]; - [cluster writeAttributeEnum16WithValue:enum16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM16 Default Value Error: %@", err); + id charStringArgument; + charStringArgument = [readAttributeCharStringDefaultValue copy]; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute char_string Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSData * _Nonnull readAttributeOctetStringDefaultValue; - CHIP_ERROR TestReadAttributeEnum16DefaultValue_78() + CHIP_ERROR TestReadAttributeOctetStringDefaultValue_102() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86713,14 +87692,17 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute ENUM16 Default Value Error: %@", err); + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute octet_string Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("enum16", actualValue, readAttributeEnum16DefaultValue)); + VerifyOrReturn(CheckValueAsString("octet_string", actualValue, [[NSData alloc] initWithBytes:"" length:0])); + } + { + readAttributeOctetStringDefaultValue = value; } NextTest(); @@ -86728,9 +87710,8 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeEpochUSDefaultValue; - CHIP_ERROR TestReadAttributeEpochUsDefaultValue_79() + CHIP_ERROR TestReadAttributeOctetStringDefaultValueAndCompareToSavedValue_103() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86738,17 +87719,14 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute EPOCH_US Default Value Error: %@", err); + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute octet_string Default Value and compare to saved value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("epoch_us", actualValue, 0ULL)); - } - { - readAttributeEpochUSDefaultValue = value; + VerifyOrReturn(CheckValueAsString("octet_string", actualValue, readAttributeOctetStringDefaultValue)); } NextTest(); @@ -86757,7 +87735,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeEpochUsNotDefaultValue_80() + CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValue_104() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86765,21 +87743,22 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id epochUsArgument; - epochUsArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; - [cluster writeAttributeEpochUsWithValue:epochUsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_US Not Default Value Error: %@", err); + id octetStringArgument; + octetStringArgument = [[NSData alloc] initWithBytes:"NotDefault" length:10]; + [cluster writeAttributeOctetStringWithValue:octetStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute octet_string Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSData * _Nonnull readAttributeOctetStringNotDefaultValue; - CHIP_ERROR TestReadAttributeEpochUsNotDefaultValue_81() + CHIP_ERROR TestReadAttributeOctetStringNotDefaultValue_105() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86787,12 +87766,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute EPOCH_US Not Default Value Error: %@", err); + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute octet_string Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("epochUs", value, readAttributeEpochUSDefaultValue)); + { + id actualValue = value; + VerifyOrReturn( + CheckValueAsString("octet_string", actualValue, [[NSData alloc] initWithBytes:"NotDefault" length:10])); + } + + VerifyOrReturn(CheckConstraintNotValue("octetString", value, readAttributeOctetStringDefaultValue)); + { + readAttributeOctetStringNotDefaultValue = value; + } NextTest(); }]; @@ -86800,7 +87788,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeEpochUsDefaultValue_82() + CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToSavedValue_106() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86808,21 +87796,25 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id epochUsArgument; - epochUsArgument = [readAttributeEpochUSDefaultValue copy]; - [cluster writeAttributeEpochUsWithValue:epochUsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_US Default Value Error: %@", err); + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute octet_string Not Default Value and compare to saved value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("octet_string", actualValue, readAttributeOctetStringNotDefaultValue)); + } + + VerifyOrReturn(CheckConstraintNotValue("octetString", value, readAttributeOctetStringDefaultValue)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeEpochUsDefaultValue_83() + CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValueFromSavedValue_107() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86830,24 +87822,21 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute EPOCH_US Default Value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id octetStringArgument; + octetStringArgument = [readAttributeOctetStringNotDefaultValue copy]; + [cluster writeAttributeOctetStringWithValue:octetStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute octet_string Not Default Value from saved value Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("epoch_us", actualValue, readAttributeEpochUSDefaultValue)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeEpochSDefaultValue; - CHIP_ERROR TestReadAttributeEpochSDefaultValue_84() + CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToExpectedValue_108() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86855,17 +87844,15 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute EPOCH_S Default Value Error: %@", err); + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute octet_string Not Default Value and compare to expected value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("epoch_s", actualValue, 0UL)); - } - { - readAttributeEpochSDefaultValue = value; + VerifyOrReturn( + CheckValueAsString("octet_string", actualValue, [[NSData alloc] initWithBytes:"NotDefault" length:10])); } NextTest(); @@ -86874,7 +87861,7 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeEpochSNotDefaultValue_85() + CHIP_ERROR TestWriteAttributeOctetStringDefaultValue_109() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86882,64 +87869,124 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id epochSArgument; - epochSArgument = [NSNumber numberWithUnsignedInt:1UL]; - [cluster writeAttributeEpochSWithValue:epochSArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_S Not Default Value Error: %@", err); + id octetStringArgument; + octetStringArgument = [readAttributeOctetStringDefaultValue copy]; + [cluster writeAttributeOctetStringWithValue:octetStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute octet_string Default Value 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 TestReadAttributeEpochSNotDefaultValue_86() +class TestConfigVariables : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestConfigVariables() + : TestCommandBridge("TestConfigVariables") + , mTestIndex(0) { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute EPOCH_S Not Default Value Error: %@", err); + ~TestConfigVariables() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrReturn(CheckConstraintNotValue("epochS", value, readAttributeEpochSDefaultValue)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestConfigVariables\n"); + } - NextTest(); - }]; + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestConfigVariables\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - return CHIP_NO_ERROR; + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Test Add Arguments Command\n"); + err = TestSendTestAddArgumentsCommand_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Send Test Add Arguments Command\n"); + err = TestSendTestAddArgumentsCommand_2(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestWriteAttributeEpochSDefaultValue_87() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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; + } - id epochSArgument; - epochSArgument = [readAttributeEpochSDefaultValue copy]; - [cluster writeAttributeEpochSWithValue:epochSArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_S Default Value Error: %@", err); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - NextTest(); - }]; +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; - return CHIP_NO_ERROR; + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mArg1; + chip::Optional mReturnValueWithArg1; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } + NSNumber * _Nonnull TestAddArgumentDefaultValue; - CHIP_ERROR TestReadAttributeEpochSDefaultValue_88() + CHIP_ERROR TestSendTestAddArgumentsCommand_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86947,24 +87994,31 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute EPOCH_S Default Value Error: %@", err); + __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; + params.arg1 = [NSNumber numberWithUnsignedChar:3U]; + params.arg2 = [NSNumber numberWithUnsignedChar:17U]; + [cluster testAddArgumentsWithParams:params + completionHandler:^( + MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Test Add Arguments Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("epoch_s", actualValue, readAttributeEpochSDefaultValue)); - } + { + id actualValue = values.returnValue; + VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); + } + { + TestAddArgumentDefaultValue = values.returnValue; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull readAttributeVendorIdDefaultValue; - CHIP_ERROR TestReadAttributeVendorIdDefaultValue_89() + CHIP_ERROR TestSendTestAddArgumentsCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device @@ -86972,106 +88026,208 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute vendor_id Default Value Error: %@", err); + __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; + params.arg1 = mArg1.HasValue() ? [NSNumber numberWithUnsignedChar:mArg1.Value()] : [NSNumber numberWithUnsignedChar:5U]; + params.arg2 = [TestAddArgumentDefaultValue copy]; + [cluster testAddArgumentsWithParams:params + completionHandler:^( + MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Test Add Arguments Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("vendor_id", actualValue, 0U)); - } - { - readAttributeVendorIdDefaultValue = value; - } + { + id actualValue = values.returnValue; + VerifyOrReturn(CheckValue("returnValue", actualValue, + mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestWriteAttributeVendorIdNotDefaultValue_90() +class TestDescriptorCluster : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestDescriptorCluster() + : TestCommandBridge("TestDescriptorCluster") + , mTestIndex(0) { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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) - id vendorIdArgument; - vendorIdArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster writeAttributeVendorIdWithValue:vendorIdArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute vendor_id Not Default Value Error: %@", err); + ~TestDescriptorCluster() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - NextTest(); - }]; + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestDescriptorCluster\n"); + } - return CHIP_NO_ERROR; + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestDescriptorCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Device list\n"); + err = TestReadAttributeDeviceList_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute Server list\n"); + err = TestReadAttributeServerList_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute Client list\n"); + err = TestReadAttributeClientList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute Parts list\n"); + err = TestReadAttributePartsList_4(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestReadAttributeVendorIdNotDefaultValue_91() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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; + } - [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute vendor_id Not Default Value Error: %@", err); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - VerifyOrReturn(CheckConstraintNotValue("vendorId", value, readAttributeVendorIdDefaultValue)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 5; - NextTest(); - }]; + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - return CHIP_NO_ERROR; + 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 TestWriteAttributeVendorIdDefaultValue_92() + CHIP_ERROR TestReadAttributeDeviceList_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id vendorIdArgument; - vendorIdArgument = [readAttributeVendorIdDefaultValue copy]; - [cluster writeAttributeVendorIdWithValue:vendorIdArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute vendor_id Default Value Error: %@", err); + [cluster readAttributeDeviceListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute Device list Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("device list", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("type", ((MTRDescriptorClusterDeviceType *) actualValue[0]).type, 22UL)); + VerifyOrReturn(CheckValue("revision", ((MTRDescriptorClusterDeviceType *) actualValue[0]).revision, 1U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeVendorIdDefaultValue_93() + CHIP_ERROR TestReadAttributeServerList_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute vendor_id Default Value Error: %@", err); + [cluster readAttributeServerListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute Server list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("vendor_id", actualValue, readAttributeVendorIdDefaultValue)); + VerifyOrReturn(CheckValue("server list", [actualValue count], static_cast(26))); + VerifyOrReturn(CheckValue("", actualValue[0], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 4UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 29UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 30UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 31UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 40UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 42UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 43UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 44UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 45UL)); + 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], 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], 1029UL)); } NextTest(); @@ -87079,27 +88235,24 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - NSString * _Nonnull readAttributeCharStringDefaultValue; - CHIP_ERROR TestReadAttributeCharStringDefaultValue_94() + CHIP_ERROR TestReadAttributeClientList_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute char_string Default Value Error: %@", err); + [cluster readAttributeClientListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute Client list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueAsString("char_string", actualValue, @"")); - } - { - readAttributeCharStringDefaultValue = value; + VerifyOrReturn(CheckValue("client list", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 41UL)); } NextTest(); @@ -87108,22 +88261,24 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringDefaultValueAndCompareToSavedValue_95() + CHIP_ERROR TestReadAttributePartsList_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute char_string Default Value and compare to saved value Error: %@", err); + [cluster readAttributePartsListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute Parts list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueAsString("char_string", actualValue, readAttributeCharStringDefaultValue)); + VerifyOrReturn(CheckValue("parts list", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValue("", actualValue[0], 1U)); + VerifyOrReturn(CheckValue("", actualValue[1], 2U)); } NextTest(); @@ -87131,123 +88286,266 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestWriteAttributeCharStringNotDefaultValue_96() +class TestBasicInformation : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestBasicInformation() + : TestCommandBridge("TestBasicInformation") + , mTestIndex(0) { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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) - id charStringArgument; - charStringArgument = @"NotDefault"; - [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute char_string Not Default Value Error: %@", err); + ~TestBasicInformation() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - NextTest(); - }]; + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestBasicInformation\n"); + } - return CHIP_NO_ERROR; + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestBasicInformation\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read location\n"); + err = TestReadLocation_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Write location\n"); + err = TestWriteLocation_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read back location\n"); + err = TestReadBackLocation_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Restore initial location value\n"); + err = TestRestoreInitialLocationValue_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read AttributeList value\n"); + err = TestReadAttributeListValue_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read NodeLabel\n"); + err = TestReadNodeLabel_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Write NodeLabel\n"); + err = TestWriteNodeLabel_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read back NodeLabel\n"); + err = TestReadBackNodeLabel_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read LocalConfigDisabled\n"); + err = TestReadLocalConfigDisabled_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Write LocalConfigDisabled\n"); + err = TestWriteLocalConfigDisabled_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read back LocalConfigDisabled\n"); + err = TestReadBackLocalConfigDisabled_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Reboot the device\n"); + err = TestRebootTheDevice_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Connect to the device again\n"); + err = TestConnectToTheDeviceAgain_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read back NodeLabel after reboot\n"); + err = TestReadBackNodeLabelAfterReboot_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Restore initial NodeLabel value\n"); + err = TestRestoreInitialNodeLabelValue_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read back LocalConfigDisabled after reboot\n"); + err = TestReadBackLocalConfigDisabledAfterReboot_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Restore initial LocalConfigDisabled value\n"); + err = TestRestoreInitialLocalConfigDisabledValue_17(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - NSString * _Nonnull readAttributeCharStringNotDefaultValue; - CHIP_ERROR TestReadAttributeCharStringNotDefaultValue_97() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute char_string Not Default Value Error: %@", err); + 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; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("char_string", actualValue, @"NotDefault")); - } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - VerifyOrReturn(CheckConstraintNotValue("charString", value, readAttributeCharStringDefaultValue)); - { - readAttributeCharStringNotDefaultValue = value; - } +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 18; - NextTest(); - }]; + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - return CHIP_NO_ERROR; + 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 TestReadAttributeCharStringNotDefaultValueAndCompareToSavedValue_98() + CHIP_ERROR TestReadLocation_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute char_string Not Default Value and compare to saved value Error: %@", err); + [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read location Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueAsString("char_string", actualValue, readAttributeCharStringNotDefaultValue)); + VerifyOrReturn(CheckValueAsString("Location", actualValue, @"XX")); } - VerifyOrReturn(CheckConstraintNotValue("charString", value, readAttributeCharStringDefaultValue)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringNotDefaultValueFromSavedValue_99() + CHIP_ERROR TestWriteLocation_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id charStringArgument; - charStringArgument = [readAttributeCharStringNotDefaultValue copy]; - [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute char_string Not Default Value from saved value Error: %@", err); + id locationArgument; + locationArgument = @"US"; + [cluster writeAttributeLocationWithValue:locationArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write location 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 TestReadAttributeCharStringNotDefaultValueAndCompareToExpectedValue_100() + CHIP_ERROR TestReadBackLocation_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute char_string Not Default Value and compare to expected value Error: %@", err); + [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back location Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueAsString("char_string", actualValue, @"NotDefault")); + VerifyOrReturn(CheckValueAsString("Location", actualValue, @"US")); } NextTest(); @@ -87256,48 +88554,65 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringDefaultValue_101() + CHIP_ERROR TestRestoreInitialLocationValue_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id charStringArgument; - charStringArgument = [readAttributeCharStringDefaultValue copy]; - [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute char_string Default Value Error: %@", err); + id locationArgument; + locationArgument = @"XX"; + [cluster writeAttributeLocationWithValue:locationArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Restore initial location value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSData * _Nonnull readAttributeOctetStringDefaultValue; - CHIP_ERROR TestReadAttributeOctetStringDefaultValue_102() + CHIP_ERROR TestReadAttributeListValue_5() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute octet_string Default Value Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read AttributeList value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueAsString("octet_string", actualValue, [[NSData alloc] initWithBytes:"" length:0])); - } - { - readAttributeOctetStringDefaultValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(25))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 4UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 5UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 6UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 7UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 8UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 9UL)); + VerifyOrReturn(CheckValue("", actualValue[10], 10UL)); + VerifyOrReturn(CheckValue("", actualValue[11], 11UL)); + VerifyOrReturn(CheckValue("", actualValue[12], 12UL)); + VerifyOrReturn(CheckValue("", actualValue[13], 13UL)); + VerifyOrReturn(CheckValue("", actualValue[14], 14UL)); + VerifyOrReturn(CheckValue("", actualValue[15], 15UL)); + VerifyOrReturn(CheckValue("", actualValue[16], 16UL)); + VerifyOrReturn(CheckValue("", actualValue[17], 17UL)); + VerifyOrReturn(CheckValue("", actualValue[18], 18UL)); + VerifyOrReturn(CheckValue("", actualValue[19], 19UL)); + VerifyOrReturn(CheckValue("", actualValue[20], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[21], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[22], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[23], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[24], 65533UL)); } NextTest(); @@ -87306,22 +88621,20 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeOctetStringDefaultValueAndCompareToSavedValue_103() + CHIP_ERROR TestReadNodeLabel_6() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute octet_string Default Value and compare to saved value Error: %@", err); + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read NodeLabel Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueAsString("octet_string", actualValue, readAttributeOctetStringDefaultValue)); + VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"")); } NextTest(); @@ -87330,51 +88643,40 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValue_104() + CHIP_ERROR TestWriteNodeLabel_7() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id octetStringArgument; - octetStringArgument = [[NSData alloc] initWithBytes:"NotDefault" length:10]; - [cluster writeAttributeOctetStringWithValue:octetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute octet_string Not Default Value Error: %@", err); + id nodeLabelArgument; + nodeLabelArgument = @"My node"; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write NodeLabel Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSData * _Nonnull readAttributeOctetStringNotDefaultValue; - CHIP_ERROR TestReadAttributeOctetStringNotDefaultValue_105() + CHIP_ERROR TestReadBackNodeLabel_8() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute octet_string Not Default Value Error: %@", err); + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back NodeLabel Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn( - CheckValueAsString("octet_string", actualValue, [[NSData alloc] initWithBytes:"NotDefault" length:10])); - } - - VerifyOrReturn(CheckConstraintNotValue("octetString", value, readAttributeOctetStringDefaultValue)); - { - readAttributeOctetStringNotDefaultValue = value; + VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"My node")); } NextTest(); @@ -87383,71 +88685,62 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToSavedValue_106() + CHIP_ERROR TestReadLocalConfigDisabled_9() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute octet_string Not Default Value and compare to saved value Error: %@", err); + [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read LocalConfigDisabled Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueAsString("octet_string", actualValue, readAttributeOctetStringNotDefaultValue)); + VerifyOrReturn(CheckValue("LocalConfigDisabled", actualValue, false)); } - VerifyOrReturn(CheckConstraintNotValue("octetString", value, readAttributeOctetStringDefaultValue)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValueFromSavedValue_107() + CHIP_ERROR TestWriteLocalConfigDisabled_10() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id octetStringArgument; - octetStringArgument = [readAttributeOctetStringNotDefaultValue copy]; - [cluster writeAttributeOctetStringWithValue:octetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute octet_string Not Default Value from saved value Error: %@", err); + id localConfigDisabledArgument; + localConfigDisabledArgument = [NSNumber numberWithBool:true]; + [cluster writeAttributeLocalConfigDisabledWithValue:localConfigDisabledArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write LocalConfigDisabled 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 TestReadAttributeOctetStringNotDefaultValueAndCompareToExpectedValue_108() + CHIP_ERROR TestReadBackLocalConfigDisabled_11() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute octet_string Not Default Value and compare to expected value Error: %@", err); + [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back LocalConfigDisabled Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn( - CheckValueAsString("octet_string", actualValue, [[NSData alloc] initWithBytes:"NotDefault" length:10])); + VerifyOrReturn(CheckValue("LocalConfigDisabled", actualValue, true)); } NextTest(); @@ -87456,209 +88749,121 @@ class TestSaveAs : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeOctetStringDefaultValue_109() + CHIP_ERROR TestRebootTheDevice_12() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id octetStringArgument; - octetStringArgument = [readAttributeOctetStringDefaultValue copy]; - [cluster writeAttributeOctetStringWithValue:octetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute octet_string Default Value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); } -}; -class TestConfigVariables : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestConfigVariables() - : TestCommandBridge("TestConfigVariables") - , mTestIndex(0) + CHIP_ERROR TestConnectToTheDeviceAgain_13() { - 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); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~TestConfigVariables() {} - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestReadBackNodeLabelAfterReboot_14() { - CHIP_ERROR err = CHIP_NO_ERROR; + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestConfigVariables\n"); - } + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back NodeLabel after reboot Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestConfigVariables\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"My node")); + } - // 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 : Send Test Add Arguments Command\n"); - err = TestSendTestAddArgumentsCommand_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Send Test Add Arguments Command\n"); - err = TestSendTestAddArgumentsCommand_2(); - break; - } + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestRestoreInitialNodeLabelValue_15() { - 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; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + id nodeLabelArgument; + nodeLabelArgument = @""; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Restore initial NodeLabel value Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mArg1; - chip::Optional mReturnValueWithArg1; - chip::Optional mTimeout; + NextTest(); + }]; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - NSNumber * _Nonnull TestAddArgumentDefaultValue; - CHIP_ERROR TestSendTestAddArgumentsCommand_1() + CHIP_ERROR TestReadBackLocalConfigDisabledAfterReboot_16() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; - params.arg1 = [NSNumber numberWithUnsignedChar:3U]; - params.arg2 = [NSNumber numberWithUnsignedChar:17U]; - [cluster testAddArgumentsWithParams:params - completionHandler:^( - MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back LocalConfigDisabled after reboot Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); - } - { - TestAddArgumentDefaultValue = values.returnValue; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("LocalConfigDisabled", actualValue, true)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendTestAddArgumentsCommand_2() + CHIP_ERROR TestRestoreInitialLocalConfigDisabledValue_17() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; - params.arg1 = mArg1.HasValue() ? [NSNumber numberWithUnsignedChar:mArg1.Value()] : [NSNumber numberWithUnsignedChar:5U]; - params.arg2 = [TestAddArgumentDefaultValue copy]; - [cluster testAddArgumentsWithParams:params - completionHandler:^( - MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id localConfigDisabledArgument; + localConfigDisabledArgument = [NSNumber numberWithBool:false]; + [cluster writeAttributeLocalConfigDisabledWithValue:localConfigDisabledArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Restore initial LocalConfigDisabled value Error: %@", err); - { - id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, - mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class TestDescriptorCluster : public TestCommandBridge { +class TestFabricRemovalWhileSubscribed : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestDescriptorCluster() - : TestCommandBridge("TestDescriptorCluster") + TestFabricRemovalWhileSubscribed() + : TestCommandBridge("TestFabricRemovalWhileSubscribed") , mTestIndex(0) { 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); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~TestDescriptorCluster() {} + ~TestFabricRemovalWhileSubscribed() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -87666,11 +88871,11 @@ class TestDescriptorCluster : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestDescriptorCluster\n"); + ChipLogProgress(chipTool, " **** Test Start: TestFabricRemovalWhileSubscribed\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestDescriptorCluster\n"); + ChipLogProgress(chipTool, " **** Test Complete: TestFabricRemovalWhileSubscribed\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -87687,20 +88892,36 @@ class TestDescriptorCluster : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Device list\n"); - err = TestReadAttributeDeviceList_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read number of commissioned fabrics\n"); + err = TestReadNumberOfCommissionedFabrics_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute Server list\n"); - err = TestReadAttributeServerList_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read current fabric index\n"); + err = TestReadCurrentFabricIndex_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute Client list\n"); - err = TestReadAttributeClientList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Open commissioning window from alpha\n"); + err = TestOpenCommissioningWindowFromAlpha_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute Parts list\n"); - err = TestReadAttributePartsList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Commission from beta\n"); + err = TestCommissionFromBeta_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved for beta\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Report: Subscribe Fabrics Attribute from beta\n"); + err = TestReportSubscribeFabricsAttributeFromBeta_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Subscribe Fabrics Attribute from beta\n"); + err = TestSubscribeFabricsAttributeFromBeta_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Remove single own fabric\n"); + err = TestRemoveSingleOwnFabric_8(); break; } @@ -87728,6 +88949,18 @@ 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; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -87741,11 +88974,13 @@ class TestDescriptorCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -87755,99 +88990,47 @@ class TestDescriptorCluster : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadAttributeDeviceList_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeDeviceListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute Device list Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("device list", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("type", ((MTRDescriptorClusterDeviceType *) actualValue[0]).type, 22UL)); - VerifyOrReturn(CheckValue("revision", ((MTRDescriptorClusterDeviceType *) actualValue[0]).revision, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeServerList_2() + CHIP_ERROR TestReadNumberOfCommissionedFabrics_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeServerListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute Server list Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("server list", [actualValue count], static_cast(26))); - VerifyOrReturn(CheckValue("", actualValue[0], 3UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 4UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 29UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 30UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 31UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 40UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 42UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 43UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 44UL)); - VerifyOrReturn(CheckValue("", actualValue[9], 45UL)); - 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], 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], 1029UL)); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCommissionedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read number of commissioned fabrics Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CommissionedFabrics", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("commissionedFabrics", "int8u", "int8u")); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull ourFabricIndex; - CHIP_ERROR TestReadAttributeClientList_3() + CHIP_ERROR TestReadCurrentFabricIndex_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClientListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute Client list Error: %@", err); + [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current fabric index Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("currentFabricIndex", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); { - id actualValue = value; - VerifyOrReturn(CheckValue("client list", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 41UL)); + ourFabricIndex = value; } NextTest(); @@ -87856,48 +89039,136 @@ class TestDescriptorCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributePartsList_4() + CHIP_ERROR TestOpenCommissioningWindowFromAlpha_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePartsListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute Parts list Error: %@", err); + __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + [cluster openBasicCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Open commissioning window from alpha Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCommissionFromBeta_4() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = 74565ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode("beta", value); + } + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_5() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = 74565ULL; + return WaitForCommissionee("beta", value); + } + bool testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled = false; + ResponseHandler _Nullable test_TestFabricRemovalWhileSubscribed_Fabrics_Reported = nil; + + CHIP_ERROR TestReportSubscribeFabricsAttributeFromBeta_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_TestFabricRemovalWhileSubscribed_Fabrics_Reported = ^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Report: Subscribe Fabrics Attribute from beta Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("parts list", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValue("", actualValue[0], 1U)); - VerifyOrReturn(CheckValue("", actualValue[1], 2U)); + VerifyOrReturn(CheckConstraintType("fabrics", "list", "list")); + testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled = true; + }; + + NextTest(); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSubscribeFabricsAttributeFromBeta_7() + { + MTRBaseDevice * device = GetDevice("beta"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + uint16_t minIntervalArgument = 2U; + uint16_t maxIntervalArgument = 5U; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + [cluster subscribeAttributeFabricsWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] + maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] + params:params + subscriptionEstablished:^{ + VerifyOrReturn(testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled, + SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); + NextTest(); } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Subscribe Fabrics Attribute from beta Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (test_TestFabricRemovalWhileSubscribed_Fabrics_Reported != nil) { + ResponseHandler callback = test_TestFabricRemovalWhileSubscribed_Fabrics_Reported; + test_TestFabricRemovalWhileSubscribed_Fabrics_Reported = nil; + callback(value, err); + } + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRemoveSingleOwnFabric_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + params.fabricIndex = [ourFabricIndex copy]; + [cluster removeFabricWithParams:params + completionHandler:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Remove single own fabric Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class TestBasicInformation : public TestCommandBridge { +class TestGeneralCommissioning : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestBasicInformation() - : TestCommandBridge("TestBasicInformation") + TestGeneralCommissioning() + : TestCommandBridge("TestGeneralCommissioning") , mTestIndex(0) { 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); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~TestBasicInformation() {} + ~TestGeneralCommissioning() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -87905,11 +89176,11 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestBasicInformation\n"); + ChipLogProgress(chipTool, " **** Test Start: TestGeneralCommissioning\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestBasicInformation\n"); + ChipLogProgress(chipTool, " **** Test Complete: TestGeneralCommissioning\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -87926,72 +89197,127 @@ class TestBasicInformation : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read location\n"); - err = TestReadLocation_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Write Breadcrumb (1/2)\n"); + err = TestWriteBreadcrumb12_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Write location\n"); - err = TestWriteLocation_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read back Breadcrumb (1/2)\n"); + err = TestReadBackBreadcrumb12_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read back location\n"); - err = TestReadBackLocation_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Write Breadcrumb (2/2)\n"); + err = TestWriteBreadcrumb22_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Restore initial location value\n"); - err = TestRestoreInitialLocationValue_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read back Breadcrumb (2/2)\n"); + err = TestReadBackBreadcrumb22_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read AttributeList value\n"); - err = TestReadAttributeListValue_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Reboot to reset Breadcrumb\n"); + err = TestRebootToResetBreadcrumb_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read NodeLabel\n"); - err = TestReadNodeLabel_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Connect to the device again\n"); + err = TestConnectToTheDeviceAgain_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Write NodeLabel\n"); - err = TestWriteNodeLabel_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read back Breadcrumb after reboot and ensure it was not persisted\n"); + err = TestReadBackBreadcrumbAfterRebootAndEnsureItWasNotPersisted_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read back NodeLabel\n"); - err = TestReadBackNodeLabel_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Set Breadcrumb to nonzero value\n"); + err = TestSetBreadcrumbToNonzeroValue_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read LocalConfigDisabled\n"); - err = TestReadLocalConfigDisabled_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Check Breadcrumb set worked\n"); + err = TestCheckBreadcrumbSetWorked_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Write LocalConfigDisabled\n"); - err = TestWriteLocalConfigDisabled_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Send CommissioningComplete without armed fail-safe\n"); + err = TestSendCommissioningCompleteWithoutArmedFailSafe_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read back LocalConfigDisabled\n"); - err = TestReadBackLocalConfigDisabled_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Check Breadcrumb was not touched by invalid CommissioningComplete\n"); + err = TestCheckBreadcrumbWasNotTouchedByInvalidCommissioningComplete_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reboot the device\n"); - err = TestRebootTheDevice_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Open Commissioning Window from alpha\n"); + err = TestOpenCommissioningWindowFromAlpha_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Connect to the device again\n"); - err = TestConnectToTheDeviceAgain_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Try to arm fail-safe\n"); + err = TestTryToArmFailSafe_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read back NodeLabel after reboot\n"); - err = TestReadBackNodeLabelAfterReboot_14(); + ChipLogProgress( + chipTool, " ***** Test Step 14 : Check Breadcrumb was not touched by ArmFailSafe with commissioning window open\n"); + err = TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithCommissioningWindowOpen_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Restore initial NodeLabel value\n"); - err = TestRestoreInitialNodeLabelValue_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Reset Breadcrumb to 0 so we can commission\n"); + err = TestResetBreadcrumbTo0SoWeCanCommission_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read back LocalConfigDisabled after reboot\n"); - err = TestReadBackLocalConfigDisabledAfterReboot_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Commission from beta\n"); + err = TestCommissionFromBeta_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Restore initial LocalConfigDisabled value\n"); - err = TestRestoreInitialLocalConfigDisabledValue_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait for the commissioned device to be retrieved for beta\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Arm fail-safe\n"); + err = TestArmFailSafe_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Check Breadcrumb was properly set by ArmFailSafe\n"); + err = TestCheckBreadcrumbWasProperlySetByArmFailSafe_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Try to arm fail-safe from wrong fabric\n"); + err = TestTryToArmFailSafeFromWrongFabric_20(); + break; + case 21: + ChipLogProgress( + chipTool, " ***** Test Step 21 : Check Breadcrumb was not touched by ArmFailSafe with existing fail-safe armed\n"); + err = TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithExistingFailSafeArmed_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Send CommissioningComplete from wrong fabric\n"); + err = TestSendCommissioningCompleteFromWrongFabric_22(); + break; + case 23: + ChipLogProgress( + chipTool, " ***** Test Step 23 : Check Breadcrumb was not touched by CommissioningComplete from wrong fabric\n"); + err = TestCheckBreadcrumbWasNotTouchedByCommissioningCompleteFromWrongFabric_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Close out the fail-safe gracefully\n"); + err = TestCloseOutTheFailSafeGracefully_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Check Breadcrumb was reset to 0 by CommissioningComplete\n"); + err = TestCheckBreadcrumbWasResetTo0ByCommissioningComplete_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Arm fail-safe again\n"); + err = TestArmFailSafeAgain_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Check Breadcrumb was set by arming fail-safe again\n"); + err = TestCheckBreadcrumbWasSetByArmingFailSafeAgain_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Force-expire the fail-safe\n"); + err = TestForceExpireTheFailSafe_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Check Breadcrumb was reset by expiring the fail-safe\n"); + err = TestCheckBreadcrumbWasResetByExpiringTheFailSafe_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Validate presence of SupportsConcurrentConnection\n"); + err = TestValidatePresenceOfSupportsConcurrentConnection_30(); break; } @@ -88058,47 +89384,290 @@ class TestBasicInformation : 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; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + 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; } // Go on to the next test. ContinueOnChipMainThread(CHIP_NO_ERROR); } - chip::System::Clock::Timeout GetWaitDuration() const override + 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 = 31; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; + 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 TestWriteBreadcrumb12_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id breadcrumbArgument; + breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:137438953472ULL]; + [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write Breadcrumb (1/2) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadBackBreadcrumb12_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back Breadcrumb (1/2) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 137438953472ULL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteBreadcrumb22_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id breadcrumbArgument; + breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:81ULL]; + [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write Breadcrumb (2/2) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadBackBreadcrumb22_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back Breadcrumb (2/2) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 81ULL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRebootToResetBreadcrumb_5() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } + + CHIP_ERROR TestConnectToTheDeviceAgain_6() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadBackBreadcrumbAfterRebootAndEnsureItWasNotPersisted_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back Breadcrumb after reboot and ensure it was not persisted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 0ULL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSetBreadcrumbToNonzeroValue_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id breadcrumbArgument; + breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; + [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Set Breadcrumb to nonzero value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckBreadcrumbSetWorked_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check Breadcrumb set worked Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 1ULL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendCommissioningCompleteWithoutArmedFailSafe_10() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + [cluster commissioningCompleteWithCompletionHandler:^( + MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send CommissioningComplete without armed fail-safe Error: %@", err); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 3U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadLocation_1() + CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByInvalidCommissioningComplete_11() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read location Error: %@", err); + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check Breadcrumb was not touched by invalid CommissioningComplete Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueAsString("Location", actualValue, @"XX")); + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 1ULL)); } NextTest(); @@ -88107,40 +89676,72 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteLocation_2() + CHIP_ERROR TestOpenCommissioningWindowFromAlpha_12() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id locationArgument; - locationArgument = @"US"; - [cluster writeAttributeLocationWithValue:locationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write location Error: %@", err); + __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + [cluster openBasicCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Open Commissioning Window from alpha 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 TestReadBackLocation_3() + CHIP_ERROR TestTryToArmFailSafe_13() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back location Error: %@", err); + __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:10U]; + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:5000ULL]; + [cluster armFailSafeWithParams:params + completionHandler:^( + MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Try to arm fail-safe Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 4U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithCommissioningWindowOpen_14() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check Breadcrumb was not touched by ArmFailSafe with commissioning window open Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueAsString("Location", actualValue, @"US")); + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 1ULL)); } NextTest(); @@ -88149,65 +89750,88 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRestoreInitialLocationValue_4() + CHIP_ERROR TestResetBreadcrumbTo0SoWeCanCommission_15() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id locationArgument; - locationArgument = @"XX"; - [cluster writeAttributeLocationWithValue:locationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Restore initial location value Error: %@", err); + id breadcrumbArgument; + breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:0ULL]; + [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Reset Breadcrumb to 0 so we can commission 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 TestReadAttributeListValue_5() + CHIP_ERROR TestCommissionFromBeta_16() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = 74565ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode("beta", value); + } + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_17() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = 74565ULL; + return WaitForCommissionee("beta", value); + } + + CHIP_ERROR TestArmFailSafe_18() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read AttributeList value Error: %@", err); + __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:500U]; + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:2ULL]; + [cluster armFailSafeWithParams:params + completionHandler:^( + MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Arm fail-safe Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckBreadcrumbWasProperlySetByArmFailSafe_19() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check Breadcrumb was properly set by ArmFailSafe Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(25))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 4UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 5UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 6UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 7UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 8UL)); - VerifyOrReturn(CheckValue("", actualValue[9], 9UL)); - VerifyOrReturn(CheckValue("", actualValue[10], 10UL)); - VerifyOrReturn(CheckValue("", actualValue[11], 11UL)); - VerifyOrReturn(CheckValue("", actualValue[12], 12UL)); - VerifyOrReturn(CheckValue("", actualValue[13], 13UL)); - VerifyOrReturn(CheckValue("", actualValue[14], 14UL)); - VerifyOrReturn(CheckValue("", actualValue[15], 15UL)); - VerifyOrReturn(CheckValue("", actualValue[16], 16UL)); - VerifyOrReturn(CheckValue("", actualValue[17], 17UL)); - VerifyOrReturn(CheckValue("", actualValue[18], 18UL)); - VerifyOrReturn(CheckValue("", actualValue[19], 19UL)); - VerifyOrReturn(CheckValue("", actualValue[20], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[21], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[22], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[23], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[24], 65533UL)); + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 2ULL)); } NextTest(); @@ -88216,20 +89840,51 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadNodeLabel_6() + CHIP_ERROR TestTryToArmFailSafeFromWrongFabric_20() + { + MTRBaseDevice * device = GetDevice("beta"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:10U]; + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:5000ULL]; + [cluster armFailSafeWithParams:params + completionHandler:^( + MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Try to arm fail-safe from wrong fabric Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 4U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithExistingFailSafeArmed_21() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read NodeLabel Error: %@", err); + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check Breadcrumb was not touched by ArmFailSafe with existing fail-safe armed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"")); + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 2ULL)); } NextTest(); @@ -88238,40 +89893,47 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteNodeLabel_7() + CHIP_ERROR TestSendCommissioningCompleteFromWrongFabric_22() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseDevice * device = GetDevice("beta"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id nodeLabelArgument; - nodeLabelArgument = @"My node"; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write NodeLabel Error: %@", err); + [cluster commissioningCompleteWithCompletionHandler:^( + MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send CommissioningComplete from wrong fabric Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 2U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackNodeLabel_8() + CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByCommissioningCompleteFromWrongFabric_23() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back NodeLabel Error: %@", err); + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check Breadcrumb was not touched by CommissioningComplete from wrong fabric Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"My node")); + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 2ULL)); } NextTest(); @@ -88280,20 +89942,47 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadLocalConfigDisabled_9() + CHIP_ERROR TestCloseOutTheFailSafeGracefully_24() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read LocalConfigDisabled Error: %@", err); + [cluster commissioningCompleteWithCompletionHandler:^( + MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Close out the fail-safe gracefully Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckBreadcrumbWasResetTo0ByCommissioningComplete_25() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check Breadcrumb was reset to 0 by CommissioningComplete Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("LocalConfigDisabled", actualValue, false)); + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 0ULL)); } NextTest(); @@ -88302,40 +89991,51 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteLocalConfigDisabled_10() + CHIP_ERROR TestArmFailSafeAgain_26() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id localConfigDisabledArgument; - localConfigDisabledArgument = [NSNumber numberWithBool:true]; - [cluster writeAttributeLocalConfigDisabledWithValue:localConfigDisabledArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write LocalConfigDisabled Error: %@", err); + __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:500U]; + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:3ULL]; + [cluster armFailSafeWithParams:params + completionHandler:^( + MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Arm fail-safe again Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackLocalConfigDisabled_11() + CHIP_ERROR TestCheckBreadcrumbWasSetByArmingFailSafeAgain_27() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back LocalConfigDisabled Error: %@", err); + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check Breadcrumb was set by arming fail-safe again Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("LocalConfigDisabled", actualValue, true)); + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 3ULL)); } NextTest(); @@ -88344,33 +90044,51 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRebootTheDevice_12() + CHIP_ERROR TestForceExpireTheFailSafe_28() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestConnectToTheDeviceAgain_13() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:0U]; + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:4ULL]; + [cluster armFailSafeWithParams:params + completionHandler:^( + MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Force-expire the fail-safe Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackNodeLabelAfterReboot_14() + CHIP_ERROR TestCheckBreadcrumbWasResetByExpiringTheFailSafe_29() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back NodeLabel after reboot Error: %@", err); + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check Breadcrumb was reset by expiring the fail-safe Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"My node")); + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 0ULL)); } NextTest(); @@ -88379,86 +90097,154 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRestoreInitialNodeLabelValue_15() + CHIP_ERROR TestValidatePresenceOfSupportsConcurrentConnection_30() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id nodeLabelArgument; - nodeLabelArgument = @""; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Restore initial NodeLabel value Error: %@", err); + [cluster + readAttributeSupportsConcurrentConnectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Validate presence of SupportsConcurrentConnection Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "boolean", "boolean")); + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadBackLocalConfigDisabledAfterReboot_16() +class TestIdentifyCluster : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestIdentifyCluster() + : TestCommandBridge("TestIdentifyCluster") + , mTestIndex(0) { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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) - [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back LocalConfigDisabled after reboot Error: %@", err); + ~TestIdentifyCluster() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestIdentifyCluster\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestIdentifyCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Identify command and expect success response\n"); + err = TestSendIdentifyCommandAndExpectSuccessResponse_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)); + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("LocalConfigDisabled", actualValue, true)); - } +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; - NextTest(); - }]; + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - return CHIP_NO_ERROR; + 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 TestRestoreInitialLocalConfigDisabledValue_17() + CHIP_ERROR TestSendIdentifyCommandAndExpectSuccessResponse_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id localConfigDisabledArgument; - localConfigDisabledArgument = [NSNumber numberWithBool:false]; - [cluster writeAttributeLocalConfigDisabledWithValue:localConfigDisabledArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Restore initial LocalConfigDisabled value Error: %@", err); + __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; + params.identifyTime = [NSNumber numberWithUnsignedShort:0U]; + [cluster identifyWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Send Identify command and expect success response Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class TestFabricRemovalWhileSubscribed : public TestCommandBridge { +class TestOperationalCredentialsCluster : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestFabricRemovalWhileSubscribed() - : TestCommandBridge("TestFabricRemovalWhileSubscribed") + TestOperationalCredentialsCluster() + : TestCommandBridge("TestOperationalCredentialsCluster") , mTestIndex(0) { 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); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~TestFabricRemovalWhileSubscribed() {} + ~TestOperationalCredentialsCluster() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -88466,11 +90252,11 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestFabricRemovalWhileSubscribed\n"); + ChipLogProgress(chipTool, " **** Test Start: TestOperationalCredentialsCluster\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestFabricRemovalWhileSubscribed\n"); + ChipLogProgress(chipTool, " **** Test Complete: TestOperationalCredentialsCluster\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -88487,36 +90273,32 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read number of commissioned fabrics\n"); - err = TestReadNumberOfCommissionedFabrics_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read number of supported fabrics\n"); + err = TestReadNumberOfSupportedFabrics_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read current fabric index\n"); - err = TestReadCurrentFabricIndex_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read number of commissioned fabrics\n"); + err = TestReadNumberOfCommissionedFabrics_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Open commissioning window from alpha\n"); - err = TestOpenCommissioningWindowFromAlpha_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read current fabric index\n"); + err = TestReadCurrentFabricIndex_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Commission from beta\n"); - err = TestCommissionFromBeta_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Remove nonexistent fabric\n"); + err = TestRemoveNonexistentFabric_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved for beta\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read fabric list before setting label\n"); + err = TestReadFabricListBeforeSettingLabel_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Report: Subscribe Fabrics Attribute from beta\n"); - err = TestReportSubscribeFabricsAttributeFromBeta_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Set the fabric label\n"); + err = TestSetTheFabricLabel_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Subscribe Fabrics Attribute from beta\n"); - err = TestSubscribeFabricsAttributeFromBeta_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Remove single own fabric\n"); - err = TestRemoveSingleOwnFabric_8(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read fabric list after setting label\n"); + err = TestReadFabricListAfterSettingLabel_7(); break; } @@ -88553,9 +90335,6 @@ class TestFabricRemovalWhileSubscribed : 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. @@ -88569,13 +90348,11 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -88585,7 +90362,28 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadNumberOfCommissionedFabrics_1() + CHIP_ERROR TestReadNumberOfSupportedFabrics_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSupportedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read number of supported fabrics Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("supportedFabrics", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("supportedFabrics", [value unsignedCharValue], 4U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadNumberOfCommissionedFabrics_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOperationalCredentials * cluster = @@ -88597,12 +90395,9 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CommissionedFabrics", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintType("commissionedFabrics", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("commissionedFabrics", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintType("commissionedFabrics", "", "uint8")); NextTest(); }]; @@ -88610,7 +90405,7 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { } NSNumber * _Nonnull ourFabricIndex; - CHIP_ERROR TestReadCurrentFabricIndex_2() + CHIP_ERROR TestReadCurrentFabricIndex_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOperationalCredentials * cluster = @@ -88622,8 +90417,8 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFabricIndex", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintType("currentFabricIndex", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); { ourFabricIndex = value; } @@ -88634,136 +90429,143 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOpenCommissioningWindowFromAlpha_3() + CHIP_ERROR TestRemoveNonexistentFabric_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterAdministratorCommissioning * cluster = - [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Open commissioning window from alpha Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + params.fabricIndex = [NSNumber numberWithUnsignedChar:243U]; + [cluster removeFabricWithParams:params + completionHandler:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Remove nonexistent fabric Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - return CHIP_NO_ERROR; - } + { + id actualValue = values.statusCode; + VerifyOrReturn(CheckValue("StatusCode", actualValue, 11U)); + } - CHIP_ERROR TestCommissionFromBeta_4() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = 74565ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode("beta", value); - } + NextTest(); + }]; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = 74565ULL; - return WaitForCommissionee("beta", value); + return CHIP_NO_ERROR; } - bool testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_TestFabricRemovalWhileSubscribed_Fabrics_Reported = nil; - CHIP_ERROR TestReportSubscribeFabricsAttributeFromBeta_6() + CHIP_ERROR TestReadFabricListBeforeSettingLabel_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_TestFabricRemovalWhileSubscribed_Fabrics_Reported = ^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: Subscribe Fabrics Attribute from beta Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeFabricsWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read fabric list before setting label Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); - testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled = true; - }; + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("Label", + ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).fabricIndex, + ourFabricIndex)); + } + + NextTest(); + }]; - NextTest(); return CHIP_NO_ERROR; } - CHIP_ERROR TestSubscribeFabricsAttributeFromBeta_7() + CHIP_ERROR TestSetTheFabricLabel_6() { - MTRBaseDevice * device = GetDevice("beta"); + MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - uint16_t minIntervalArgument = 2U; - uint16_t maxIntervalArgument = 5U; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; - [cluster subscribeAttributeFabricsWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] - maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] - params:params - subscriptionEstablished:^{ - VerifyOrReturn(testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled, - SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Subscribe Fabrics Attribute from beta Error: %@", err); + __auto_type * params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; + params.label = @"Batcave"; + [cluster updateFabricLabelWithParams:params + completionHandler:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Set the fabric label Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_TestFabricRemovalWhileSubscribed_Fabrics_Reported != nil) { - ResponseHandler callback = test_TestFabricRemovalWhileSubscribed_Fabrics_Reported; - test_TestFabricRemovalWhileSubscribed_Fabrics_Reported = nil; - callback(value, err); - } - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.statusCode; + VerifyOrReturn(CheckValue("StatusCode", actualValue, 0U)); + } + + { + id actualValue = values.fabricIndex; + VerifyOrReturn(CheckValue("FabricIndex", actualValue, ourFabricIndex)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveSingleOwnFabric_8() + CHIP_ERROR TestReadFabricListAfterSettingLabel_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; - params.fabricIndex = [ourFabricIndex copy]; - [cluster removeFabricWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove single own fabric Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeFabricsWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read fabric list after setting label Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("Label", + ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"Batcave")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).fabricIndex, + ourFabricIndex)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class TestGeneralCommissioning : public TestCommandBridge { +class TestModeSelectCluster : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestGeneralCommissioning() - : TestCommandBridge("TestGeneralCommissioning") + TestModeSelectCluster() + : TestCommandBridge("TestModeSelectCluster") , mTestIndex(0) { 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); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~TestGeneralCommissioning() {} + ~TestModeSelectCluster() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -88771,11 +90573,11 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestGeneralCommissioning\n"); + ChipLogProgress(chipTool, " **** Test Start: TestModeSelectCluster\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestGeneralCommissioning\n"); + ChipLogProgress(chipTool, " **** Test Complete: TestModeSelectCluster\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -88792,127 +90594,129 @@ class TestGeneralCommissioning : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write Breadcrumb (1/2)\n"); - err = TestWriteBreadcrumb12_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read Description\n"); + err = TestReadDescription_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read back Breadcrumb (1/2)\n"); - err = TestReadBackBreadcrumb12_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read StandardNamespace\n"); + err = TestReadStandardNamespace_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write Breadcrumb (2/2)\n"); - err = TestWriteBreadcrumb22_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read SupportedModes\n"); + err = TestReadSupportedModes_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read back Breadcrumb (2/2)\n"); - err = TestReadBackBreadcrumb22_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read CurrentMode\n"); + err = TestReadCurrentMode_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reboot to reset Breadcrumb\n"); - err = TestRebootToResetBreadcrumb_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read StartUpMode\n"); + err = TestReadStartUpMode_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Connect to the device again\n"); - err = TestConnectToTheDeviceAgain_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read OnMode\n"); + err = TestReadOnMode_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read back Breadcrumb after reboot and ensure it was not persisted\n"); - err = TestReadBackBreadcrumbAfterRebootAndEnsureItWasNotPersisted_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Change to Supported Mode\n"); + err = TestChangeToSupportedMode_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Set Breadcrumb to nonzero value\n"); - err = TestSetBreadcrumbToNonzeroValue_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Verify Current Mode Change\n"); + err = TestVerifyCurrentModeChange_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Check Breadcrumb set worked\n"); - err = TestCheckBreadcrumbSetWorked_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Change to Unsupported Mode\n"); + err = TestChangeToUnsupportedMode_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Send CommissioningComplete without armed fail-safe\n"); - err = TestSendCommissioningCompleteWithoutArmedFailSafe_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Toggle OnOff\n"); + err = TestToggleOnOff_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check Breadcrumb was not touched by invalid CommissioningComplete\n"); - err = TestCheckBreadcrumbWasNotTouchedByInvalidCommissioningComplete_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Toggle OnOff\n"); + err = TestToggleOnOff_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Open Commissioning Window from alpha\n"); - err = TestOpenCommissioningWindowFromAlpha_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Verify Current Mode does not change when OnMode is null\n"); + err = TestVerifyCurrentModeDoesNotChangeWhenOnModeIsNull_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Try to arm fail-safe\n"); - err = TestTryToArmFailSafe_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Change to Unsupported OnMode\n"); + err = TestChangeToUnsupportedOnMode_13(); break; case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : Check Breadcrumb was not touched by ArmFailSafe with commissioning window open\n"); - err = TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithCommissioningWindowOpen_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Change OnMode\n"); + err = TestChangeOnMode_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reset Breadcrumb to 0 so we can commission\n"); - err = TestResetBreadcrumbTo0SoWeCanCommission_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Verify OnMode\n"); + err = TestVerifyOnMode_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Commission from beta\n"); - err = TestCommissionFromBeta_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Toggle OnOff\n"); + err = TestToggleOnOff_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait for the commissioned device to be retrieved for beta\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Toggle OnOff\n"); + err = TestToggleOnOff_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Arm fail-safe\n"); - err = TestArmFailSafe_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Verify Current Mode Changes if OnMode is not null\n"); + err = TestVerifyCurrentModeChangesIfOnModeIsNotNull_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Check Breadcrumb was properly set by ArmFailSafe\n"); - err = TestCheckBreadcrumbWasProperlySetByArmFailSafe_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Change to Unsupported StartUp Mode\n"); + err = TestChangeToUnsupportedStartUpMode_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Try to arm fail-safe from wrong fabric\n"); - err = TestTryToArmFailSafeFromWrongFabric_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Change to Supported StartUp Mode\n"); + err = TestChangeToSupportedStartUpMode_20(); break; case 21: - ChipLogProgress( - chipTool, " ***** Test Step 21 : Check Breadcrumb was not touched by ArmFailSafe with existing fail-safe armed\n"); - err = TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithExistingFailSafeArmed_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Verify StartUp Mode Change\n"); + err = TestVerifyStartUpModeChange_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Send CommissioningComplete from wrong fabric\n"); - err = TestSendCommissioningCompleteFromWrongFabric_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : Change CurrentMode to another value\n"); + err = TestChangeCurrentModeToAnotherValue_22(); break; case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Check Breadcrumb was not touched by CommissioningComplete from wrong fabric\n"); - err = TestCheckBreadcrumbWasNotTouchedByCommissioningCompleteFromWrongFabric_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : Change On Mode\n"); + err = TestChangeOnMode_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Close out the fail-safe gracefully\n"); - err = TestCloseOutTheFailSafeGracefully_24(); + ChipLogProgress(chipTool, " ***** Test Step 24 : Set StartUpOnOff\n"); + err = TestSetStartUpOnOff_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Check Breadcrumb was reset to 0 by CommissioningComplete\n"); - err = TestCheckBreadcrumbWasResetTo0ByCommissioningComplete_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : Reboot target device\n"); + err = TestRebootTargetDevice_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Arm fail-safe again\n"); - err = TestArmFailSafeAgain_26(); + ChipLogProgress(chipTool, " ***** Test Step 26 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Check Breadcrumb was set by arming fail-safe again\n"); - err = TestCheckBreadcrumbWasSetByArmingFailSafeAgain_27(); + ChipLogProgress( + chipTool, " ***** Test Step 27 : Verify Current Mode Change based on OnMode, as it overwrites StartUpMode\n"); + err = TestVerifyCurrentModeChangeBasedOnOnModeAsItOverwritesStartUpMode_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Force-expire the fail-safe\n"); - err = TestForceExpireTheFailSafe_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Change On Mode to Null\n"); + err = TestChangeOnModeToNull_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Check Breadcrumb was reset by expiring the fail-safe\n"); - err = TestCheckBreadcrumbWasResetByExpiringTheFailSafe_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Reboot target device\n"); + err = TestRebootTargetDevice_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Validate presence of SupportsConcurrentConnection\n"); - err = TestValidatePresenceOfSupportsConcurrentConnection_30(); + ChipLogProgress(chipTool, " ***** Test Step 30 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Verify Current Mode Change based on new StartUp Mode\n"); + err = TestVerifyCurrentModeChangeBasedOnNewStartUpMode_31(); break; } @@ -88953,7 +90757,7 @@ class TestGeneralCommissioning : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -88965,7 +90769,7 @@ class TestGeneralCommissioning : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); 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)); @@ -88983,7 +90787,7 @@ class TestGeneralCommissioning : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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)); @@ -89013,161 +90817,57 @@ class TestGeneralCommissioning : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - 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 = 31; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; - 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 TestWriteBreadcrumb12_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id breadcrumbArgument; - breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:137438953472ULL]; - [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write Breadcrumb (1/2) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackBreadcrumb12_2() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back Breadcrumb (1/2) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 137438953472ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteBreadcrumb22_3() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id breadcrumbArgument; - breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:81ULL]; - [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write Breadcrumb (2/2) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; + 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; + } - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestReadBackBreadcrumb22_4() + chip::System::Clock::Timeout GetWaitDuration() const override { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back Breadcrumb (2/2) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 81ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } - CHIP_ERROR TestRebootToResetBreadcrumb_5() - { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 32; - CHIP_ERROR TestConnectToTheDeviceAgain_6() + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadBackBreadcrumbAfterRebootAndEnsureItWasNotPersisted_7() + CHIP_ERROR TestReadDescription_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back Breadcrumb after reboot and ensure it was not persisted Error: %@", err); + [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Description Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 0ULL)); + VerifyOrReturn(CheckValueAsString("Description", actualValue, @"Coffee")); } NextTest(); @@ -89176,69 +90876,89 @@ class TestGeneralCommissioning : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSetBreadcrumbToNonzeroValue_8() + CHIP_ERROR TestReadStandardNamespace_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id breadcrumbArgument; - breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; - [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Set Breadcrumb to nonzero value Error: %@", err); + [cluster readAttributeStandardNamespaceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read StandardNamespace Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("StandardNamespace", actualValue)); + VerifyOrReturn(CheckValue("StandardNamespace", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckBreadcrumbSetWorked_9() + CHIP_ERROR TestReadSupportedModes_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Breadcrumb set worked Error: %@", err); + [cluster readAttributeSupportedModesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read SupportedModes Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 1ULL)); + VerifyOrReturn(CheckValue("SupportedModes", [actualValue count], static_cast(3))); + VerifyOrReturn( + CheckValueAsString("Label", ((MTRModeSelectClusterModeOptionStruct *) actualValue[0]).label, @"Black")); + VerifyOrReturn(CheckValue("Mode", ((MTRModeSelectClusterModeOptionStruct *) actualValue[0]).mode, 0U)); + VerifyOrReturn(CheckValue("SemanticTags", + [((MTRModeSelectClusterModeOptionStruct *) actualValue[0]).semanticTags count], static_cast(1))); + VerifyOrReturn( + CheckValueAsString("Label", ((MTRModeSelectClusterModeOptionStruct *) actualValue[1]).label, @"Cappuccino")); + VerifyOrReturn(CheckValue("Mode", ((MTRModeSelectClusterModeOptionStruct *) actualValue[1]).mode, 4U)); + VerifyOrReturn(CheckValue("SemanticTags", + [((MTRModeSelectClusterModeOptionStruct *) actualValue[1]).semanticTags count], static_cast(1))); + VerifyOrReturn( + CheckValueAsString("Label", ((MTRModeSelectClusterModeOptionStruct *) actualValue[2]).label, @"Espresso")); + VerifyOrReturn(CheckValue("Mode", ((MTRModeSelectClusterModeOptionStruct *) actualValue[2]).mode, 7U)); + VerifyOrReturn(CheckValue("SemanticTags", + [((MTRModeSelectClusterModeOptionStruct *) actualValue[2]).semanticTags count], static_cast(1))); } + VerifyOrReturn(CheckConstraintType("supportedModes", "list", "list")); + VerifyOrReturn(CheckConstraintMinLength("supportedModes", value, 3)); + VerifyOrReturn(CheckConstraintMaxLength("supportedModes", value, 3)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendCommissioningCompleteWithoutArmedFailSafe_10() + CHIP_ERROR TestReadCurrentMode_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster commissioningCompleteWithCompletionHandler:^( - MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send CommissioningComplete without armed fail-safe Error: %@", err); + [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read CurrentMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 3U)); + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentMode", actualValue, 0U)); } NextTest(); @@ -89247,22 +90967,23 @@ class TestGeneralCommissioning : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByInvalidCommissioningComplete_11() + CHIP_ERROR TestReadStartUpMode_5() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Breadcrumb was not touched by invalid CommissioningComplete Error: %@", err); + [cluster readAttributeStartUpModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read StartUpMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 1ULL)); + VerifyOrReturn(CheckValueNonNull("StartUpMode", actualValue)); + VerifyOrReturn(CheckValue("StartUpMode", actualValue, 0U)); } NextTest(); @@ -89271,72 +90992,72 @@ class TestGeneralCommissioning : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOpenCommissioningWindowFromAlpha_12() + CHIP_ERROR TestReadOnMode_6() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterAdministratorCommissioning * cluster = - [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha Error: %@", err); + [cluster readAttributeOnModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read OnMode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValueNull("OnMode", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTryToArmFailSafe_13() + CHIP_ERROR TestChangeToSupportedMode_7() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; - params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:10U]; - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:5000ULL]; - [cluster armFailSafeWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Try to arm fail-safe Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; + params.newMode = [NSNumber numberWithUnsignedChar:4U]; + [cluster changeToModeWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Change to Supported Mode Error: %@", err); - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 4U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull currentModeBeforeToggle; - CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithCommissioningWindowOpen_14() + CHIP_ERROR TestVerifyCurrentModeChange_8() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Breadcrumb was not touched by ArmFailSafe with commissioning window open Error: %@", err); + [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Current Mode Change Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 1ULL)); + VerifyOrReturn(CheckValue("CurrentMode", actualValue, 4U)); + } + { + currentModeBeforeToggle = value; } NextTest(); @@ -89345,88 +91066,80 @@ class TestGeneralCommissioning : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestResetBreadcrumbTo0SoWeCanCommission_15() + CHIP_ERROR TestChangeToUnsupportedMode_9() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id breadcrumbArgument; - breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:0ULL]; - [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Reset Breadcrumb to 0 so we can commission Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; + params.newMode = [NSNumber numberWithUnsignedChar:2U]; + [cluster + changeToModeWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Change to Unsupported Mode 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 TestCommissionFromBeta_16() + CHIP_ERROR TestToggleOnOff_10() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = 74565ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode("beta", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_17() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = 74565ULL; - return WaitForCommissionee("beta", value); + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Toggle OnOff Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestArmFailSafe_18() + CHIP_ERROR TestToggleOnOff_11() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; - params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:500U]; - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:2ULL]; - [cluster armFailSafeWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Arm fail-safe Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Toggle OnOff Error: %@", err); - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckBreadcrumbWasProperlySetByArmFailSafe_19() + CHIP_ERROR TestVerifyCurrentModeDoesNotChangeWhenOnModeIsNull_12() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Breadcrumb was properly set by ArmFailSafe Error: %@", err); + [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Current Mode does not change when OnMode is null Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 2ULL)); + VerifyOrReturn(CheckValue("CurrentMode", actualValue, currentModeBeforeToggle)); } NextTest(); @@ -89435,76 +91148,74 @@ class TestGeneralCommissioning : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTryToArmFailSafeFromWrongFabric_20() + CHIP_ERROR TestChangeToUnsupportedOnMode_13() { - MTRBaseDevice * device = GetDevice("beta"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; - params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:10U]; - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:5000ULL]; - [cluster armFailSafeWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Try to arm fail-safe from wrong fabric Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 4U)); - } + id onModeArgument; + onModeArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster + writeAttributeOnModeWithValue:onModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Change to Unsupported OnMode 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 TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithExistingFailSafeArmed_21() + CHIP_ERROR TestChangeOnMode_14() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Breadcrumb was not touched by ArmFailSafe with existing fail-safe armed Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id onModeArgument; + onModeArgument = [NSNumber numberWithUnsignedChar:7U]; + [cluster writeAttributeOnModeWithValue:onModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Change OnMode Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 2ULL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable OnModeValue; - CHIP_ERROR TestSendCommissioningCompleteFromWrongFabric_22() + CHIP_ERROR TestVerifyOnMode_15() { - MTRBaseDevice * device = GetDevice("beta"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster commissioningCompleteWithCompletionHandler:^( - MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send CommissioningComplete from wrong fabric Error: %@", err); + [cluster readAttributeOnModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify OnMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 2U)); + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("OnMode", actualValue)); + VerifyOrReturn(CheckValue("OnMode", actualValue, 7U)); + } + { + OnModeValue = value; } NextTest(); @@ -89513,71 +91224,56 @@ class TestGeneralCommissioning : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByCommissioningCompleteFromWrongFabric_23() + CHIP_ERROR TestToggleOnOff_16() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Breadcrumb was not touched by CommissioningComplete from wrong fabric Error: %@", err); + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Toggle OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 2ULL)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCloseOutTheFailSafeGracefully_24() + CHIP_ERROR TestToggleOnOff_17() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster commissioningCompleteWithCompletionHandler:^( - MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Close out the fail-safe gracefully Error: %@", err); + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Toggle OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckBreadcrumbWasResetTo0ByCommissioningComplete_25() + CHIP_ERROR TestVerifyCurrentModeChangesIfOnModeIsNotNull_18() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Breadcrumb was reset to 0 by CommissioningComplete Error: %@", err); + [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Current Mode Changes if OnMode is not null Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 0ULL)); + VerifyOrReturn(CheckValue("CurrentMode", actualValue, OnModeValue)); } NextTest(); @@ -89586,51 +91282,70 @@ class TestGeneralCommissioning : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestArmFailSafeAgain_26() + CHIP_ERROR TestChangeToUnsupportedStartUpMode_19() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; - params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:500U]; - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:3ULL]; - [cluster armFailSafeWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Arm fail-safe again Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); - } + id startUpModeArgument; + startUpModeArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster writeAttributeStartUpModeWithValue:startUpModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Change to Unsupported StartUp Mode 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 TestCheckBreadcrumbWasSetByArmingFailSafeAgain_27() + CHIP_ERROR TestChangeToSupportedStartUpMode_20() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id startUpModeArgument; + startUpModeArgument = [NSNumber numberWithUnsignedChar:7U]; + [cluster writeAttributeStartUpModeWithValue:startUpModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Change to Supported StartUp Mode Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyStartUpModeChange_21() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Breadcrumb was set by arming fail-safe again Error: %@", err); + [cluster readAttributeStartUpModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify StartUp Mode Change Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 3ULL)); + VerifyOrReturn(CheckValueNonNull("StartUpMode", actualValue)); + VerifyOrReturn(CheckValue("StartUpMode", actualValue, 7U)); } NextTest(); @@ -89639,197 +91354,172 @@ class TestGeneralCommissioning : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestForceExpireTheFailSafe_28() + CHIP_ERROR TestChangeCurrentModeToAnotherValue_22() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; - params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:0U]; - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:4ULL]; - [cluster armFailSafeWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Force-expire the fail-safe Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; + params.newMode = [NSNumber numberWithUnsignedChar:0U]; + [cluster changeToModeWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Change CurrentMode to another value Error: %@", err); - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckBreadcrumbWasResetByExpiringTheFailSafe_29() + CHIP_ERROR TestChangeOnMode_23() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Breadcrumb was reset by expiring the fail-safe Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id onModeArgument; + onModeArgument = [NSNumber numberWithUnsignedChar:4U]; + [cluster writeAttributeOnModeWithValue:onModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Change On Mode Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 0ULL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestValidatePresenceOfSupportsConcurrentConnection_30() + CHIP_ERROR TestSetStartUpOnOff_24() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeSupportsConcurrentConnectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Validate presence of SupportsConcurrentConnection Error: %@", err); + id startUpOnOffArgument; + startUpOnOffArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Set StartUpOnOff Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "", "bool")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } -}; -class TestIdentifyCluster : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestIdentifyCluster() - : TestCommandBridge("TestIdentifyCluster") - , mTestIndex(0) + CHIP_ERROR TestRebootTargetDevice_25() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~TestIdentifyCluster() {} + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_26() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestVerifyCurrentModeChangeBasedOnOnModeAsItOverwritesStartUpMode_27() { - CHIP_ERROR err = CHIP_NO_ERROR; + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestIdentifyCluster\n"); - } + [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Current Mode Change based on OnMode, as it overwrites StartUpMode Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestIdentifyCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentMode", actualValue, 4U)); + } - // 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 : Send Identify command and expect success response\n"); - err = TestSendIdentifyCommandAndExpectSuccessResponse_1(); - break; - } + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestChangeOnModeToNull_28() { - 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; - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + id onModeArgument; + onModeArgument = nil; + [cluster writeAttributeOnModeWithValue:onModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Change On Mode to Null Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestRebootTargetDevice_29() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); } -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 TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_30() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestSendIdentifyCommandAndExpectSuccessResponse_1() + CHIP_ERROR TestVerifyCurrentModeChangeBasedOnNewStartUpMode_31() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; - params.identifyTime = [NSNumber numberWithUnsignedShort:0U]; - [cluster identifyWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Identify command and expect success response Error: %@", err); + [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Current Mode Change based on new StartUp Mode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentMode", actualValue, 7U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class TestOperationalCredentialsCluster : public TestCommandBridge { +class TestSelfFabricRemoval : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestOperationalCredentialsCluster() - : TestCommandBridge("TestOperationalCredentialsCluster") + TestSelfFabricRemoval() + : TestCommandBridge("TestSelfFabricRemoval") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -89839,7 +91529,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~TestOperationalCredentialsCluster() {} + ~TestSelfFabricRemoval() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -89847,11 +91537,11 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestOperationalCredentialsCluster\n"); + ChipLogProgress(chipTool, " **** Test Start: TestSelfFabricRemoval\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestOperationalCredentialsCluster\n"); + ChipLogProgress(chipTool, " **** Test Complete: TestSelfFabricRemoval\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -89868,32 +91558,16 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read number of supported fabrics\n"); - err = TestReadNumberOfSupportedFabrics_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read number of commissioned fabrics\n"); + err = TestReadNumberOfCommissionedFabrics_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read number of commissioned fabrics\n"); - err = TestReadNumberOfCommissionedFabrics_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read current fabric index\n"); + err = TestReadCurrentFabricIndex_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read current fabric index\n"); - err = TestReadCurrentFabricIndex_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Remove nonexistent fabric\n"); - err = TestRemoveNonexistentFabric_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read fabric list before setting label\n"); - err = TestReadFabricListBeforeSettingLabel_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Set the fabric label\n"); - err = TestSetTheFabricLabel_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read fabric list after setting label\n"); - err = TestReadFabricListAfterSettingLabel_7(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Remove single own fabric\n"); + err = TestRemoveSingleOwnFabric_3(); break; } @@ -89918,18 +91592,6 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { 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. @@ -89943,7 +91605,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -89957,28 +91619,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadNumberOfSupportedFabrics_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOperationalCredentials * cluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSupportedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read number of supported fabrics Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("supportedFabrics", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("supportedFabrics", [value unsignedCharValue], 4U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadNumberOfCommissionedFabrics_2() + CHIP_ERROR TestReadNumberOfCommissionedFabrics_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOperationalCredentials * cluster = @@ -89990,9 +91631,12 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("commissionedFabrics", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("commissionedFabrics", [value unsignedCharValue], 1U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CommissionedFabrics", actualValue, 1U)); + } + VerifyOrReturn(CheckConstraintType("commissionedFabrics", "int8u", "int8u")); NextTest(); }]; @@ -90000,7 +91644,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { } NSNumber * _Nonnull ourFabricIndex; - CHIP_ERROR TestReadCurrentFabricIndex_3() + CHIP_ERROR TestReadCurrentFabricIndex_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOperationalCredentials * cluster = @@ -90012,8 +91656,8 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFabricIndex", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintType("currentFabricIndex", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); { ourFabricIndex = value; } @@ -90024,7 +91668,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveNonexistentFabric_4() + CHIP_ERROR TestRemoveSingleOwnFabric_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOperationalCredentials * cluster = @@ -90032,135 +91676,37 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; - params.fabricIndex = [NSNumber numberWithUnsignedChar:243U]; + params.fabricIndex = [ourFabricIndex copy]; [cluster removeFabricWithParams:params completionHandler:^( MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove nonexistent fabric Error: %@", err); + NSLog(@"Remove single own fabric Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.statusCode; - VerifyOrReturn(CheckValue("StatusCode", actualValue, 11U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadFabricListBeforeSettingLabel_5() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOperationalCredentials * cluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read fabric list before setting label Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValueAsString("Label", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).fabricIndex, - ourFabricIndex)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSetTheFabricLabel_6() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOperationalCredentials * cluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; - params.label = @"Batcave"; - [cluster updateFabricLabelWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Set the fabric label Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.statusCode; - VerifyOrReturn(CheckValue("StatusCode", actualValue, 0U)); - } - - { - id actualValue = values.fabricIndex; - VerifyOrReturn(CheckValue("FabricIndex", actualValue, ourFabricIndex)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadFabricListAfterSettingLabel_7() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOperationalCredentials * cluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read fabric list after setting label Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValueAsString("Label", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"Batcave")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).fabricIndex, - ourFabricIndex)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } }; -class TestModeSelectCluster : public TestCommandBridge { +class TestSystemCommands : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestModeSelectCluster() - : TestCommandBridge("TestModeSelectCluster") + TestSystemCommands() + : TestCommandBridge("TestSystemCommands") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("payload", &mPayload); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~TestModeSelectCluster() {} + ~TestSystemCommands() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -90168,11 +91714,11 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestModeSelectCluster\n"); + ChipLogProgress(chipTool, " **** Test Start: TestSystemCommands\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestModeSelectCluster\n"); + ChipLogProgress(chipTool, " **** Test Complete: TestSystemCommands\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -90189,129 +91735,89 @@ class TestModeSelectCluster : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read Description\n"); - err = TestReadDescription_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Stop the default accessory\n"); + err = TestStopTheDefaultAccessory_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read StandardNamespace\n"); - err = TestReadStandardNamespace_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Start the default accessory with no command line options\n"); + err = TestStartTheDefaultAccessoryWithNoCommandLineOptions_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read SupportedModes\n"); - err = TestReadSupportedModes_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Stop the default accessory by key\n"); + err = TestStopTheDefaultAccessoryByKey_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read CurrentMode\n"); - err = TestReadCurrentMode_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Start the default accessory with discriminator command line option\n"); + err = TestStartTheDefaultAccessoryWithDiscriminatorCommandLineOption_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read StartUpMode\n"); - err = TestReadStartUpMode_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Stop the default accessory\n"); + err = TestStopTheDefaultAccessory_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read OnMode\n"); - err = TestReadOnMode_6(); + ChipLogProgress( + chipTool, " ***** Test Step 6 : Start the default accessory with discriminator and port command line options\n"); + err = TestStartTheDefaultAccessoryWithDiscriminatorAndPortCommandLineOptions_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Change to Supported Mode\n"); - err = TestChangeToSupportedMode_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Stop the default accessory\n"); + err = TestStopTheDefaultAccessory_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Verify Current Mode Change\n"); - err = TestVerifyCurrentModeChange_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Start the default accessory with minCommissioningTimeout only\n"); + err = TestStartTheDefaultAccessoryWithMinCommissioningTimeoutOnly_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Change to Unsupported Mode\n"); - err = TestChangeToUnsupportedMode_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Stop the default accessory\n"); + err = TestStopTheDefaultAccessory_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Toggle OnOff\n"); - err = TestToggleOnOff_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Start the default accessory by key with all command line options\n"); + err = TestStartTheDefaultAccessoryByKeyWithAllCommandLineOptions_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Toggle OnOff\n"); - err = TestToggleOnOff_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Verify Current Mode does not change when OnMode is null\n"); - err = TestVerifyCurrentModeDoesNotChangeWhenOnModeIsNull_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Change to Unsupported OnMode\n"); - err = TestChangeToUnsupportedOnMode_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Change OnMode\n"); - err = TestChangeOnMode_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Verify OnMode\n"); - err = TestVerifyOnMode_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Toggle OnOff\n"); - err = TestToggleOnOff_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Toggle OnOff\n"); - err = TestToggleOnOff_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Verify Current Mode Changes if OnMode is not null\n"); - err = TestVerifyCurrentModeChangesIfOnModeIsNotNull_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Change to Unsupported StartUp Mode\n"); - err = TestChangeToUnsupportedStartUpMode_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Change to Supported StartUp Mode\n"); - err = TestChangeToSupportedStartUpMode_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Verify StartUp Mode Change\n"); - err = TestVerifyStartUpModeChange_21(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Start a second accessory with all command line options\n"); + err = TestStartASecondAccessoryWithAllCommandLineOptions_11(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Change CurrentMode to another value\n"); - err = TestChangeCurrentModeToAnotherValue_22(); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Commission second accessory from alpha\n"); + err = TestCommissionSecondAccessoryFromAlpha_12(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Change On Mode\n"); - err = TestChangeOnMode_23(); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait for the second commissioned device to be retrieved for alpha\n"); + err = TestWaitForTheSecondCommissionedDeviceToBeRetrievedForAlpha_13(); break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Set StartUpOnOff\n"); - err = TestSetStartUpOnOff_24(); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Stop the second accessory\n"); + err = TestStopTheSecondAccessory_14(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Reboot target device\n"); - err = TestRebootTargetDevice_25(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Start a second accessory with different KVS\n"); + err = TestStartASecondAccessoryWithDifferentKvs_15(); break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_26(); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Reboot the default accessory\n"); + err = TestRebootTheDefaultAccessory_16(); break; - case 27: - ChipLogProgress( - chipTool, " ***** Test Step 27 : Verify Current Mode Change based on OnMode, as it overwrites StartUpMode\n"); - err = TestVerifyCurrentModeChangeBasedOnOnModeAsItOverwritesStartUpMode_27(); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Reboot the default accessory by key\n"); + err = TestRebootTheDefaultAccessoryByKey_17(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Change On Mode to Null\n"); - err = TestChangeOnModeToNull_28(); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Reboot the second accessory\n"); + err = TestRebootTheSecondAccessory_18(); break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Reboot target device\n"); - err = TestRebootTargetDevice_29(); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Factory Reset the default accessory\n"); + err = TestFactoryResetTheDefaultAccessory_19(); break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_30(); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Factory Reset the default accessory by key\n"); + err = TestFactoryResetTheDefaultAccessoryByKey_20(); break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Verify Current Mode Change based on new StartUp Mode\n"); - err = TestVerifyCurrentModeChangeBasedOnNewStartUpMode_31(); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Factory Reset the second accessory\n"); + err = TestFactoryResetTheSecondAccessory_21(); break; } @@ -90352,7 +91858,7 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -90364,7 +91870,7 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -90382,7 +91888,7 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -90390,36 +91896,6 @@ class TestModeSelectCluster : public TestCommandBridge { case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - 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; } // Go on to the next test. @@ -90433,11 +91909,12 @@ class TestModeSelectCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 32; + const uint16_t mTestCount = 22; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mPayload; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -90447,497 +91924,747 @@ class TestModeSelectCluster : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadDescription_1() + CHIP_ERROR TestStopTheDefaultAccessory_1() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Description Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("Description", actualValue, @"Coffee")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop("alpha", value); } - CHIP_ERROR TestReadStandardNamespace_2() + CHIP_ERROR TestStartTheDefaultAccessoryWithNoCommandLineOptions_2() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStandardNamespaceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read StandardNamespace Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("StandardNamespace", actualValue)); - VerifyOrReturn(CheckValue("StandardNamespace", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + return Start("alpha", value); } - CHIP_ERROR TestReadSupportedModes_3() + CHIP_ERROR TestStopTheDefaultAccessoryByKey_3() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSupportedModesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read SupportedModes Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("SupportedModes", [actualValue count], static_cast(3))); - VerifyOrReturn( - CheckValueAsString("Label", ((MTRModeSelectClusterModeOptionStruct *) actualValue[0]).label, @"Black")); - VerifyOrReturn(CheckValue("Mode", ((MTRModeSelectClusterModeOptionStruct *) actualValue[0]).mode, 0U)); - VerifyOrReturn(CheckValue("SemanticTags", - [((MTRModeSelectClusterModeOptionStruct *) actualValue[0]).semanticTags count], static_cast(1))); - VerifyOrReturn( - CheckValueAsString("Label", ((MTRModeSelectClusterModeOptionStruct *) actualValue[1]).label, @"Cappuccino")); - VerifyOrReturn(CheckValue("Mode", ((MTRModeSelectClusterModeOptionStruct *) actualValue[1]).mode, 4U)); - VerifyOrReturn(CheckValue("SemanticTags", - [((MTRModeSelectClusterModeOptionStruct *) actualValue[1]).semanticTags count], static_cast(1))); - VerifyOrReturn( - CheckValueAsString("Label", ((MTRModeSelectClusterModeOptionStruct *) actualValue[2]).label, @"Espresso")); - VerifyOrReturn(CheckValue("Mode", ((MTRModeSelectClusterModeOptionStruct *) actualValue[2]).mode, 7U)); - VerifyOrReturn(CheckValue("SemanticTags", - [((MTRModeSelectClusterModeOptionStruct *) actualValue[2]).semanticTags count], static_cast(1))); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + 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("alpha", value); } - CHIP_ERROR TestReadCurrentMode_4() + CHIP_ERROR TestStartTheDefaultAccessoryWithDiscriminatorCommandLineOption_4() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read CurrentMode Error: %@", err); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = 1111U; + return Start("alpha", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestStopTheDefaultAccessory_5() + { + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop("alpha", value); + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentMode", actualValue, 0U)); - } + CHIP_ERROR TestStartTheDefaultAccessoryWithDiscriminatorAndPortCommandLineOptions_6() + { + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = 1111U; + value.port.Emplace(); + value.port.Value() = 5560U; + return Start("alpha", value); + } - NextTest(); - }]; + CHIP_ERROR TestStopTheDefaultAccessory_7() + { + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop("alpha", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestStartTheDefaultAccessoryWithMinCommissioningTimeoutOnly_8() + { + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.minCommissioningTimeout.Emplace(); + value.minCommissioningTimeout.Value() = 10U; + return Start("alpha", value); } - CHIP_ERROR TestReadStartUpMode_5() + CHIP_ERROR TestStopTheDefaultAccessory_9() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop("alpha", value); + } - [cluster readAttributeStartUpModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read StartUpMode Error: %@", err); + CHIP_ERROR TestStartTheDefaultAccessoryByKeyWithAllCommandLineOptions_10() + { + 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("alpha", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestStartASecondAccessoryWithAllCommandLineOptions_11() + { + 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("alpha", value); + } - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("StartUpMode", actualValue)); - VerifyOrReturn(CheckValue("StartUpMode", actualValue, 0U)); - } + CHIP_ERROR TestCommissionSecondAccessoryFromAlpha_12() + { + 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("alpha", value); + } - NextTest(); - }]; + CHIP_ERROR TestWaitForTheSecondCommissionedDeviceToBeRetrievedForAlpha_13() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = 3735928559ULL; + return WaitForCommissionee("alpha", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestStopTheSecondAccessory_14() + { + 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("alpha", value); } - CHIP_ERROR TestReadOnMode_6() + CHIP_ERROR TestStartASecondAccessoryWithDifferentKvs_15() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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("alpha", value); + } - [cluster readAttributeOnModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read OnMode Error: %@", err); + CHIP_ERROR TestRebootTheDefaultAccessory_16() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestRebootTheDefaultAccessoryByKey_17() + { + 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("alpha", value); + } - { - id actualValue = value; - VerifyOrReturn(CheckValueNull("OnMode", actualValue)); - } + CHIP_ERROR TestRebootTheSecondAccessory_18() + { + 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("alpha", value); + } - NextTest(); - }]; + CHIP_ERROR TestFactoryResetTheDefaultAccessory_19() + { + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset("alpha", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestFactoryResetTheDefaultAccessoryByKey_20() + { + 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("alpha", value); } - CHIP_ERROR TestChangeToSupportedMode_7() + CHIP_ERROR TestFactoryResetTheSecondAccessory_21() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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("alpha", value); + } +}; - __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; - params.newMode = [NSNumber numberWithUnsignedChar:4U]; - [cluster changeToModeWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change to Supported Mode Error: %@", err); +class TestBinding : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestBinding() + : TestCommandBridge("TestBinding") + , 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) - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + ~TestBinding() {} - NextTest(); - }]; + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull currentModeBeforeToggle; + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestBinding\n"); + } - CHIP_ERROR TestVerifyCurrentModeChange_8() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestBinding\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Current Mode Change Error: %@", err); + Wait(); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Write empty binding table\n"); + err = TestWriteEmptyBindingTable_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read empty binding table\n"); + err = TestReadEmptyBindingTable_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Write invalid binding table\n"); + err = TestWriteInvalidBindingTable_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Write binding table (endpoint 1)\n"); + err = TestWriteBindingTableEndpoint1_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read binding table (endpoint 1)\n"); + err = TestReadBindingTableEndpoint1_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Write binding table (endpoint 0)\n"); + err = TestWriteBindingTableEndpoint0_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read binding table (endpoint 0)\n"); + err = TestReadBindingTableEndpoint0_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Verify endpoint 1 not changed\n"); + err = TestVerifyEndpoint1NotChanged_8(); + break; + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentMode", actualValue, 4U)); - } - { - currentModeBeforeToggle = value; - } + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } - NextTest(); - }]; + 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), 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)); + 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; + } - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestChangeToUnsupportedMode_9() + chip::System::Clock::Timeout GetWaitDuration() const override { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; - params.newMode = [NSNumber numberWithUnsignedChar:2U]; - [cluster - changeToModeWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change to Unsupported Mode Error: %@", err); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 9; - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - return CHIP_NO_ERROR; + 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 TestToggleOnOff_10() + CHIP_ERROR TestWriteEmptyBindingTable_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Toggle OnOff Error: %@", err); + id bindingArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + bindingArgument = temp_0; + } + [cluster writeAttributeBindingWithValue:bindingArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write empty binding table 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 TestToggleOnOff_11() + CHIP_ERROR TestReadEmptyBindingTable_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Toggle OnOff Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeBindingWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read empty binding table Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(0))); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCurrentModeDoesNotChangeWhenOnModeIsNull_12() + CHIP_ERROR TestWriteInvalidBindingTable_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Current Mode does not change when OnMode is null Error: %@", err); + id bindingArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRBindingClusterTargetStruct alloc] init]; + ((MTRBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + temp_0[1] = [[MTRBindingClusterTargetStruct alloc] init]; + ((MTRBindingClusterTargetStruct *) temp_0[1]).node = [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRBindingClusterTargetStruct *) temp_0[1]).group = [NSNumber numberWithUnsignedShort:1U]; + ((MTRBindingClusterTargetStruct *) temp_0[1]).endpoint = [NSNumber numberWithUnsignedShort:1U]; + ((MTRBindingClusterTargetStruct *) temp_0[1]).cluster = [NSNumber numberWithUnsignedInt:6UL]; + ((MTRBindingClusterTargetStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentMode", actualValue, currentModeBeforeToggle)); - } + bindingArgument = temp_0; + } + [cluster writeAttributeBindingWithValue:bindingArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write invalid binding table Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestChangeToUnsupportedOnMode_13() + CHIP_ERROR TestWriteBindingTableEndpoint1_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onModeArgument; - onModeArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster - writeAttributeOnModeWithValue:onModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change to Unsupported OnMode Error: %@", err); + id bindingArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRBindingClusterTargetStruct alloc] init]; + ((MTRBindingClusterTargetStruct *) temp_0[0]).group = [NSNumber numberWithUnsignedShort:1U]; + ((MTRBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + temp_0[1] = [[MTRBindingClusterTargetStruct alloc] init]; + ((MTRBindingClusterTargetStruct *) temp_0[1]).node = [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRBindingClusterTargetStruct *) temp_0[1]).endpoint = [NSNumber numberWithUnsignedShort:1U]; + ((MTRBindingClusterTargetStruct *) temp_0[1]).cluster = [NSNumber numberWithUnsignedInt:6UL]; + ((MTRBindingClusterTargetStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + + temp_0[2] = [[MTRBindingClusterTargetStruct alloc] init]; + ((MTRBindingClusterTargetStruct *) temp_0[2]).node = [NSNumber numberWithUnsignedLongLong:2ULL]; + ((MTRBindingClusterTargetStruct *) temp_0[2]).endpoint = [NSNumber numberWithUnsignedShort:1U]; + ((MTRBindingClusterTargetStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + + bindingArgument = temp_0; + } + [cluster writeAttributeBindingWithValue:bindingArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write binding table (endpoint 1) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestChangeOnMode_14() + CHIP_ERROR TestReadBindingTableEndpoint1_5() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onModeArgument; - onModeArgument = [NSNumber numberWithUnsignedChar:7U]; - [cluster writeAttributeOnModeWithValue:onModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change OnMode Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster + readAttributeBindingWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read binding table (endpoint 1) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("Group", ((MTRBindingClusterTargetStruct *) actualValue[0]).group, 1U)); + VerifyOrReturn( + CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[1]).node, 1ULL)); + VerifyOrReturn( + CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[1]).endpoint, 1U)); + VerifyOrReturn( + CheckValue("Cluster", ((MTRBindingClusterTargetStruct *) actualValue[1]).cluster, 6UL)); + VerifyOrReturn( + CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[2]).node, 2ULL)); + VerifyOrReturn( + CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[2]).endpoint, 1U)); + VerifyOrReturn( + CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable OnModeValue; - CHIP_ERROR TestVerifyOnMode_15() + CHIP_ERROR TestWriteBindingTableEndpoint0_6() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify OnMode Error: %@", err); + id bindingArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRBindingClusterTargetStruct alloc] init]; + ((MTRBindingClusterTargetStruct *) temp_0[0]).node = [NSNumber numberWithUnsignedLongLong:3ULL]; + ((MTRBindingClusterTargetStruct *) temp_0[0]).endpoint = [NSNumber numberWithUnsignedShort:1U]; + ((MTRBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + bindingArgument = temp_0; + } + [cluster writeAttributeBindingWithValue:bindingArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write binding table (endpoint 0) Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("OnMode", actualValue)); - VerifyOrReturn(CheckValue("OnMode", actualValue, 7U)); - } - { - OnModeValue = value; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestToggleOnOff_16() + CHIP_ERROR TestReadBindingTableEndpoint0_7() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Toggle OnOff Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster + readAttributeBindingWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read binding table (endpoint 0) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[0]).node, 3ULL)); + VerifyOrReturn( + CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[0]).endpoint, 1U)); + VerifyOrReturn( + CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestToggleOnOff_17() + CHIP_ERROR TestVerifyEndpoint1NotChanged_8() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Toggle OnOff Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster + readAttributeBindingWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify endpoint 1 not changed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("Group", ((MTRBindingClusterTargetStruct *) actualValue[0]).group, 1U)); + VerifyOrReturn( + CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[1]).node, 1ULL)); + VerifyOrReturn( + CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[1]).endpoint, 1U)); + VerifyOrReturn( + CheckValue("Cluster", ((MTRBindingClusterTargetStruct *) actualValue[1]).cluster, 6UL)); + VerifyOrReturn( + CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[2]).node, 2ULL)); + VerifyOrReturn( + CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[2]).endpoint, 1U)); + VerifyOrReturn( + CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestVerifyCurrentModeChangesIfOnModeIsNotNull_18() +class TestUserLabelCluster : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestUserLabelCluster() + : TestCommandBridge("TestUserLabelCluster") + , mTestIndex(0) { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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) - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Current Mode Changes if OnMode is not null Error: %@", err); + ~TestUserLabelCluster() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentMode", actualValue, OnModeValue)); - } + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestUserLabelCluster\n"); + } - NextTest(); - }]; + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestUserLabelCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - return CHIP_NO_ERROR; + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Clear User Label List\n"); + err = TestClearUserLabelList_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read User Label List\n"); + err = TestReadUserLabelList_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Write User Label List\n"); + err = TestWriteUserLabelList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reboot target device\n"); + err = TestRebootTargetDevice_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Verify\n"); + err = TestVerify_6(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestChangeToUnsupportedStartUpMode_19() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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; + } - id startUpModeArgument; - startUpModeArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster writeAttributeStartUpModeWithValue:startUpModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change to Unsupported StartUp Mode Error: %@", err); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - return CHIP_NO_ERROR; +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 7; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestChangeToSupportedStartUpMode_20() + CHIP_ERROR TestClearUserLabelList_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id startUpModeArgument; - startUpModeArgument = [NSNumber numberWithUnsignedChar:7U]; - [cluster writeAttributeStartUpModeWithValue:startUpModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change to Supported StartUp Mode Error: %@", err); + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Clear User Label List 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 TestVerifyStartUpModeChange_21() + CHIP_ERROR TestReadUserLabelList_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify StartUp Mode Change Error: %@", err); + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read User Label List Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("StartUpMode", actualValue)); - VerifyOrReturn(CheckValue("StartUpMode", actualValue, 7U)); + VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(0))); } NextTest(); @@ -90946,99 +92673,83 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestChangeCurrentModeToAnotherValue_22() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; - params.newMode = [NSNumber numberWithUnsignedChar:0U]; - [cluster changeToModeWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change CurrentMode to another value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestChangeOnMode_23() + CHIP_ERROR TestWriteUserLabelList_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onModeArgument; - onModeArgument = [NSNumber numberWithUnsignedChar:4U]; - [cluster writeAttributeOnModeWithValue:onModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change On Mode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"room"; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"bedroom 2"; - NextTest(); - }]; + temp_0[1] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[1]).label = @"orientation"; + ((MTRUserLabelClusterLabelStruct *) temp_0[1]).value = @"North"; - return CHIP_NO_ERROR; - } + temp_0[2] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[2]).label = @"floor"; + ((MTRUserLabelClusterLabelStruct *) temp_0[2]).value = @"5"; - CHIP_ERROR TestSetStartUpOnOff_24() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + temp_0[3] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[3]).label = @"direction"; + ((MTRUserLabelClusterLabelStruct *) temp_0[3]).value = @"up"; - id startUpOnOffArgument; - startUpOnOffArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Set StartUpOnOff Error: %@", err); + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write User Label List 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 TestRebootTargetDevice_25() + CHIP_ERROR TestRebootTargetDevice_4() { chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_26() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_5() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestVerifyCurrentModeChangeBasedOnOnModeAsItOverwritesStartUpMode_27() + CHIP_ERROR TestVerify_6() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Current Mode Change based on OnMode, as it overwrites StartUpMode Error: %@", err); + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentMode", actualValue, 4U)); + VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(4))); + VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"room")); + VerifyOrReturn( + CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"bedroom 2")); + VerifyOrReturn( + CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).label, @"orientation")); + VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).value, @"North")); + VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).label, @"floor")); + VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).value, @"5")); + VerifyOrReturn( + CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).label, @"direction")); + VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).value, @"up")); } NextTest(); @@ -91046,82 +92757,180 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestChangeOnModeToNull_28() +class TestUserLabelClusterConstraints : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestUserLabelClusterConstraints() + : TestCommandBridge("TestUserLabelClusterConstraints") + , mTestIndex(0) { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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) - id onModeArgument; - onModeArgument = nil; - [cluster writeAttributeOnModeWithValue:onModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change On Mode to Null Error: %@", err); + ~TestUserLabelClusterConstraints() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - NextTest(); - }]; + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestUserLabelClusterConstraints\n"); + } - return CHIP_NO_ERROR; + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestUserLabelClusterConstraints\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Attempt to write overly long item for label\n"); + err = TestAttemptToWriteOverlyLongItemForLabel_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Attempt to write overly long item for value\n"); + err = TestAttemptToWriteOverlyLongItemForValue_2(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestRebootTargetDevice_29() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); + 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), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_30() + 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 = 3; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestVerifyCurrentModeChangeBasedOnNewStartUpMode_31() + CHIP_ERROR TestAttemptToWriteOverlyLongItemForLabel_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Current Mode Change based on new StartUp Mode Error: %@", err); + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"this is longer than sixteen characters"; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"bedroom 2"; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Attempt to write overly long item for label Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentMode", actualValue, 7U)); - } + 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 TestAttemptToWriteOverlyLongItemForValue_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"test"; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"this is longer than sixteen characters"; + + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Attempt to write overly long item for value 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 TestSelfFabricRemoval : public TestCommandBridge { +class TestArmFailSafe : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestSelfFabricRemoval() - : TestCommandBridge("TestSelfFabricRemoval") + TestArmFailSafe() + : TestCommandBridge("TestArmFailSafe") , 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) - ~TestSelfFabricRemoval() {} + ~TestArmFailSafe() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -91129,11 +92938,11 @@ class TestSelfFabricRemoval : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestSelfFabricRemoval\n"); + ChipLogProgress(chipTool, " **** Test Start: TestArmFailSafe\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestSelfFabricRemoval\n"); + ChipLogProgress(chipTool, " **** Test Complete: TestArmFailSafe\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -91146,20 +92955,40 @@ class TestSelfFabricRemoval : 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 : Reboot target device\n"); + err = TestRebootTargetDevice_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read number of commissioned fabrics\n"); - err = TestReadNumberOfCommissionedFabrics_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Wait for the alpha device to be retrieved \n"); + err = TestWaitForTheAlphaDeviceToBeRetrieved_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read current fabric index\n"); - err = TestReadCurrentFabricIndex_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Query fabrics list\n"); + err = TestQueryFabricsList_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Remove single own fabric\n"); - err = TestRemoveSingleOwnFabric_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : ArmFailSafe on target device with timeout 0\n"); + err = TestArmFailSafeOnTargetDeviceWithTimeout0_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads NodeLabel mandatory attribute of target device\n"); + err = TestReadsNodeLabelMandatoryAttributeOfTargetDevice_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Invoke AddTrustedRootCertificate without fail-safe\n"); + err = TestInvokeAddTrustedRootCertificateWithoutFailSafe_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Invoke AddNOC without fail-safe\n"); + err = TestInvokeAddNOCWithoutFailSafe_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Invoke UpdateNOC without fail-safe\n"); + err = TestInvokeUpdateNOCWithoutFailSafe_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Invoke CSRRequest without fail-safe\n"); + err = TestInvokeCSRRequestWithoutFailSafe_8(); break; } @@ -91184,6 +93013,21 @@ class TestSelfFabricRemoval : public TestCommandBridge { 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), 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; } // Go on to the next test. @@ -91197,108 +93041,219 @@ class TestSelfFabricRemoval : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 9; chip::Optional mNodeId; - chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestRebootTargetDevice_0() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } + + CHIP_ERROR TestWaitForTheAlphaDeviceToBeRetrieved_1() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadNumberOfCommissionedFabrics_1() + CHIP_ERROR TestQueryFabricsList_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCommissionedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read number of commissioned fabrics Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeFabricsWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query fabrics list Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("Label", + ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + } + + VerifyOrReturn(CheckConstraintType("fabrics", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestArmFailSafeOnTargetDeviceWithTimeout0_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:0U]; + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:0ULL]; + [cluster armFailSafeWithParams:params + completionHandler:^( + MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"ArmFailSafe on target device with timeout 0 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsNodeLabelMandatoryAttributeOfTargetDevice_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads NodeLabel mandatory attribute of target device Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CommissionedFabrics", actualValue, 1U)); + VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"")); } - VerifyOrReturn(CheckConstraintType("commissionedFabrics", "", "uint8")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull ourFabricIndex; - CHIP_ERROR TestReadCurrentFabricIndex_2() + CHIP_ERROR TestInvokeAddTrustedRootCertificateWithoutFailSafe_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current fabric index Error: %@", err); + __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; + params.rootCertificate = [[NSData alloc] initWithBytes:"00000000" length:8]; + [cluster addTrustedRootCertificateWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Invoke AddTrustedRootCertificate without fail-safe Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("currentFabricIndex", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); - { - ourFabricIndex = value; - } + return CHIP_NO_ERROR; + } - NextTest(); - }]; + CHIP_ERROR TestInvokeAddNOCWithoutFailSafe_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; + params.nocValue = [[NSData alloc] initWithBytes:"00112233" length:8]; + params.ipkValue = [[NSData alloc] initWithBytes:"\000\001\002\003\004\005\006\007\000\001\002\003\004\005\006\007" + length:16]; + params.caseAdminSubject = [NSNumber numberWithUnsignedLongLong:1234ULL]; + params.adminVendorId = [NSNumber numberWithUnsignedShort:65521U]; + [cluster addNOCWithParams:params + completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Invoke AddNOC without fail-safe Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveSingleOwnFabric_3() + CHIP_ERROR TestInvokeUpdateNOCWithoutFailSafe_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; - params.fabricIndex = [ourFabricIndex copy]; - [cluster removeFabricWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove single own fabric Error: %@", err); + __auto_type * params = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; + params.nocValue = [[NSData alloc] initWithBytes:"00112233" length:8]; + [cluster + updateNOCWithParams:params + completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Invoke UpdateNOC without fail-safe Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); + NextTest(); + }]; - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestInvokeCSRRequestWithoutFailSafe_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; + params.csrNonce = [[NSData alloc] initWithBytes:"\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\007" + length:32]; + [cluster + CSRRequestWithParams:params + completionHandler:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Invoke CSRRequest without fail-safe Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class TestSystemCommands : public TestCommandBridge { +class TestFanControl : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestSystemCommands() - : TestCommandBridge("TestSystemCommands") + TestFanControl() + : TestCommandBridge("TestFanControl") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("payload", &mPayload); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~TestSystemCommands() {} + ~TestFanControl() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -91306,11 +93261,11 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestSystemCommands\n"); + ChipLogProgress(chipTool, " **** Test Start: TestFanControl\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestSystemCommands\n"); + ChipLogProgress(chipTool, " **** Test Complete: TestFanControl\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -91327,89 +93282,100 @@ class TestSystemCommands : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Stop the default accessory\n"); - err = TestStopTheDefaultAccessory_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Write fan mode\n"); + err = TestWriteFanMode_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Start the default accessory with no command line options\n"); - err = TestStartTheDefaultAccessoryWithNoCommandLineOptions_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read back fan mode\n"); + err = TestReadBackFanMode_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Stop the default accessory by key\n"); - err = TestStopTheDefaultAccessoryByKey_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Write fan mode sequence\n"); + err = TestWriteFanModeSequence_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Start the default accessory with discriminator command line option\n"); - err = TestStartTheDefaultAccessoryWithDiscriminatorCommandLineOption_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read back fan mode sequence\n"); + err = TestReadBackFanModeSequence_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Stop the default accessory\n"); - err = TestStopTheDefaultAccessory_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Write percent setting\n"); + err = TestWritePercentSetting_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Start the default accessory with discriminator and port command line options\n"); - err = TestStartTheDefaultAccessoryWithDiscriminatorAndPortCommandLineOptions_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read back percent setting\n"); + err = TestReadBackPercentSetting_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Stop the default accessory\n"); - err = TestStopTheDefaultAccessory_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read back speed setting\n"); + err = TestReadBackSpeedSetting_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Start the default accessory with minCommissioningTimeout only\n"); - err = TestStartTheDefaultAccessoryWithMinCommissioningTimeoutOnly_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Read back speed current\n"); + err = TestReadBackSpeedCurrent_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Stop the default accessory\n"); - err = TestStopTheDefaultAccessory_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Write percent setting\n"); + err = TestWritePercentSetting_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Start the default accessory by key with all command line options\n"); - err = TestStartTheDefaultAccessoryByKeyWithAllCommandLineOptions_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Read back percent setting\n"); + err = TestReadBackPercentSetting_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Start a second accessory with all command line options\n"); - err = TestStartASecondAccessoryWithAllCommandLineOptions_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Write speed setting\n"); + err = TestWriteSpeedSetting_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Commission second accessory from alpha\n"); - err = TestCommissionSecondAccessoryFromAlpha_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Read back speed setting\n"); + err = TestReadBackSpeedSetting_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait for the second commissioned device to be retrieved for alpha\n"); - err = TestWaitForTheSecondCommissionedDeviceToBeRetrievedForAlpha_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Read back percent setting\n"); + err = TestReadBackPercentSetting_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Stop the second accessory\n"); - err = TestStopTheSecondAccessory_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Read back percent current\n"); + err = TestReadBackPercentCurrent_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Start a second accessory with different KVS\n"); - err = TestStartASecondAccessoryWithDifferentKvs_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Write speed setting\n"); + err = TestWriteSpeedSetting_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reboot the default accessory\n"); - err = TestRebootTheDefaultAccessory_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Read back speed setting\n"); + err = TestReadBackSpeedSetting_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reboot the default accessory by key\n"); - err = TestRebootTheDefaultAccessoryByKey_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Write fan mode\n"); + err = TestWriteFanMode_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reboot the second accessory\n"); - err = TestRebootTheSecondAccessory_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Read back percent setting\n"); + err = TestReadBackPercentSetting_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Factory Reset the default accessory\n"); - err = TestFactoryResetTheDefaultAccessory_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Read back percent current\n"); + err = TestReadBackPercentCurrent_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Factory Reset the default accessory by key\n"); - err = TestFactoryResetTheDefaultAccessoryByKey_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Read back speed setting\n"); + err = TestReadBackSpeedSetting_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Factory Reset the second accessory\n"); - err = TestFactoryResetTheSecondAccessory_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Read back speed current\n"); + err = TestReadBackSpeedCurrent_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Write fan mode\n"); + err = TestWriteFanMode_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Read back percent setting\n"); + err = TestReadBackPercentSetting_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Read back speed setting\n"); + err = TestReadBackSpeedSetting_24(); break; } @@ -91488,6 +93454,15 @@ class TestSystemCommands : public TestCommandBridge { 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. @@ -91501,12 +93476,11 @@ class TestSystemCommands : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; + const uint16_t mTestCount = 25; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mPayload; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -91516,747 +93490,496 @@ class TestSystemCommands : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStopTheDefaultAccessory_1() + CHIP_ERROR TestWriteFanMode_1() { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestStartTheDefaultAccessoryWithNoCommandLineOptions_2() - { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - return Start("alpha", value); - } + id fanModeArgument; + fanModeArgument = [NSNumber numberWithUnsignedChar:3U]; + [cluster writeAttributeFanModeWithValue:fanModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write fan mode Error: %@", err); - CHIP_ERROR TestStopTheDefaultAccessoryByKey_3() - { - 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("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestStartTheDefaultAccessoryWithDiscriminatorCommandLineOption_4() - { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.discriminator.Emplace(); - value.discriminator.Value() = 1111U; - return Start("alpha", value); - } + NextTest(); + }]; - CHIP_ERROR TestStopTheDefaultAccessory_5() - { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestStartTheDefaultAccessoryWithDiscriminatorAndPortCommandLineOptions_6() + CHIP_ERROR TestReadBackFanMode_2() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.discriminator.Emplace(); - value.discriminator.Value() = 1111U; - value.port.Emplace(); - value.port.Value() = 5560U; - return Start("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestStopTheDefaultAccessory_7() - { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop("alpha", value); - } + [cluster readAttributeFanModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back fan mode Error: %@", err); - CHIP_ERROR TestStartTheDefaultAccessoryWithMinCommissioningTimeoutOnly_8() - { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.minCommissioningTimeout.Emplace(); - value.minCommissioningTimeout.Value() = 10U; - return Start("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestStopTheDefaultAccessory_9() - { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop("alpha", value); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("fan mode", actualValue, 3U)); + } - CHIP_ERROR TestStartTheDefaultAccessoryByKeyWithAllCommandLineOptions_10() - { - 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("alpha", value); - } + NextTest(); + }]; - CHIP_ERROR TestStartASecondAccessoryWithAllCommandLineOptions_11() - { - 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("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestCommissionSecondAccessoryFromAlpha_12() + CHIP_ERROR TestWriteFanModeSequence_3() { - 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("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestWaitForTheSecondCommissionedDeviceToBeRetrievedForAlpha_13() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = 3735928559ULL; - return WaitForCommissionee("alpha", value); - } + id fanModeSequenceArgument; + fanModeSequenceArgument = [NSNumber numberWithUnsignedChar:5U]; + [cluster writeAttributeFanModeSequenceWithValue:fanModeSequenceArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write fan mode sequence Error: %@", err); - CHIP_ERROR TestStopTheSecondAccessory_14() - { - 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("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestStartASecondAccessoryWithDifferentKvs_15() - { - 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("alpha", value); - } + NextTest(); + }]; - CHIP_ERROR TestRebootTheDefaultAccessory_16() - { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestRebootTheDefaultAccessoryByKey_17() + CHIP_ERROR TestReadBackFanModeSequence_4() { - 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("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestRebootTheSecondAccessory_18() - { - 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("alpha", value); - } + [cluster readAttributeFanModeSequenceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back fan mode sequence Error: %@", err); - CHIP_ERROR TestFactoryResetTheDefaultAccessory_19() - { - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestFactoryResetTheDefaultAccessoryByKey_20() - { - 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("alpha", value); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("fan mode sequence", actualValue, 5U)); + } - CHIP_ERROR TestFactoryResetTheSecondAccessory_21() - { - 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("alpha", value); + NextTest(); + }]; + + return CHIP_NO_ERROR; } -}; -class TestBinding : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestBinding() - : TestCommandBridge("TestBinding") - , mTestIndex(0) + CHIP_ERROR TestWritePercentSetting_5() { - 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"); + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - ~TestBinding() {} + id percentSettingArgument; + percentSettingArgument = [NSNumber numberWithUnsignedChar:84U]; + [cluster writeAttributePercentSettingWithValue:percentSettingArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write percent setting Error: %@", err); - /////////// TestCommand Interface ///////// - void NextTest() override + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadBackPercentSetting_6() { - CHIP_ERROR err = CHIP_NO_ERROR; + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestBinding\n"); - } + [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back percent setting Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestBinding\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("percent setting", actualValue)); + VerifyOrReturn(CheckValue("percent setting", actualValue, 84U)); + } - // 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 : Write empty binding table\n"); - err = TestWriteEmptyBindingTable_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read empty binding table\n"); - err = TestReadEmptyBindingTable_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write invalid binding table\n"); - err = TestWriteInvalidBindingTable_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Write binding table (endpoint 1)\n"); - err = TestWriteBindingTableEndpoint1_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read binding table (endpoint 1)\n"); - err = TestReadBindingTableEndpoint1_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Write binding table (endpoint 0)\n"); - err = TestWriteBindingTableEndpoint0_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read binding table (endpoint 0)\n"); - err = TestReadBindingTableEndpoint0_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Verify endpoint 1 not changed\n"); - err = TestVerifyEndpoint1NotChanged_8(); - break; - } + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadBackSpeedSetting_7() { - 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), 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)); - 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; - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back speed setting Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("speed setting", actualValue)); + VerifyOrReturn(CheckValue("speed setting", actualValue, 84U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestReadBackSpeedCurrent_8() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + [cluster readAttributeSpeedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back speed current Error: %@", err); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + { + id actualValue = value; + VerifyOrReturn(CheckValue("speed current", actualValue, 84U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteEmptyBindingTable_1() + CHIP_ERROR TestWritePercentSetting_9() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id bindingArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - bindingArgument = temp_0; - } - [cluster writeAttributeBindingWithValue:bindingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write empty binding table Error: %@", err); + id percentSettingArgument; + percentSettingArgument = nil; + [cluster writeAttributePercentSettingWithValue:percentSettingArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write percent setting 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 TestReadEmptyBindingTable_2() + CHIP_ERROR TestReadBackPercentSetting_10() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster readAttributeBindingWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read empty binding table Error: %@", err); + [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back percent setting Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(0))); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("percent setting", actualValue)); + VerifyOrReturn(CheckValue("percent setting", actualValue, 84U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteInvalidBindingTable_3() + CHIP_ERROR TestWriteSpeedSetting_11() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id bindingArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRBindingClusterTargetStruct alloc] init]; - ((MTRBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - - temp_0[1] = [[MTRBindingClusterTargetStruct alloc] init]; - ((MTRBindingClusterTargetStruct *) temp_0[1]).node = [NSNumber numberWithUnsignedLongLong:1ULL]; - ((MTRBindingClusterTargetStruct *) temp_0[1]).group = [NSNumber numberWithUnsignedShort:1U]; - ((MTRBindingClusterTargetStruct *) temp_0[1]).endpoint = [NSNumber numberWithUnsignedShort:1U]; - ((MTRBindingClusterTargetStruct *) temp_0[1]).cluster = [NSNumber numberWithUnsignedInt:6UL]; - ((MTRBindingClusterTargetStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + id speedSettingArgument; + speedSettingArgument = [NSNumber numberWithUnsignedChar:73U]; + [cluster writeAttributeSpeedSettingWithValue:speedSettingArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write speed setting Error: %@", err); - bindingArgument = temp_0; - } - [cluster writeAttributeBindingWithValue:bindingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write invalid binding table Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteBindingTableEndpoint1_4() + CHIP_ERROR TestReadBackSpeedSetting_12() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id bindingArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRBindingClusterTargetStruct alloc] init]; - ((MTRBindingClusterTargetStruct *) temp_0[0]).group = [NSNumber numberWithUnsignedShort:1U]; - ((MTRBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - - temp_0[1] = [[MTRBindingClusterTargetStruct alloc] init]; - ((MTRBindingClusterTargetStruct *) temp_0[1]).node = [NSNumber numberWithUnsignedLongLong:1ULL]; - ((MTRBindingClusterTargetStruct *) temp_0[1]).endpoint = [NSNumber numberWithUnsignedShort:1U]; - ((MTRBindingClusterTargetStruct *) temp_0[1]).cluster = [NSNumber numberWithUnsignedInt:6UL]; - ((MTRBindingClusterTargetStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - - temp_0[2] = [[MTRBindingClusterTargetStruct alloc] init]; - ((MTRBindingClusterTargetStruct *) temp_0[2]).node = [NSNumber numberWithUnsignedLongLong:2ULL]; - ((MTRBindingClusterTargetStruct *) temp_0[2]).endpoint = [NSNumber numberWithUnsignedShort:1U]; - ((MTRBindingClusterTargetStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back speed setting Error: %@", err); - bindingArgument = temp_0; - } - [cluster writeAttributeBindingWithValue:bindingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write binding table (endpoint 1) Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("speed setting", actualValue)); + VerifyOrReturn(CheckValue("speed setting", actualValue, 73U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBindingTableEndpoint1_5() + CHIP_ERROR TestReadBackPercentSetting_13() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster - readAttributeBindingWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read binding table (endpoint 1) Error: %@", err); + [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back percent setting Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("Group", ((MTRBindingClusterTargetStruct *) actualValue[0]).group, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[1]).node, 1ULL)); - VerifyOrReturn( - CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[1]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("Cluster", ((MTRBindingClusterTargetStruct *) actualValue[1]).cluster, 6UL)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[2]).node, 2ULL)); - VerifyOrReturn( - CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[2]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("percent setting", actualValue)); + VerifyOrReturn(CheckValue("percent setting", actualValue, 73U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteBindingTableEndpoint0_6() + CHIP_ERROR TestReadBackPercentCurrent_14() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id bindingArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRBindingClusterTargetStruct alloc] init]; - ((MTRBindingClusterTargetStruct *) temp_0[0]).node = [NSNumber numberWithUnsignedLongLong:3ULL]; - ((MTRBindingClusterTargetStruct *) temp_0[0]).endpoint = [NSNumber numberWithUnsignedShort:1U]; - ((MTRBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + [cluster readAttributePercentCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back percent current Error: %@", err); - bindingArgument = temp_0; - } - [cluster writeAttributeBindingWithValue:bindingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write binding table (endpoint 0) Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("percent current", actualValue, 73U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBindingTableEndpoint0_7() + CHIP_ERROR TestWriteSpeedSetting_15() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster - readAttributeBindingWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read binding table (endpoint 0) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id speedSettingArgument; + speedSettingArgument = nil; + [cluster writeAttributeSpeedSettingWithValue:speedSettingArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write speed setting Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[0]).node, 3ULL)); - VerifyOrReturn( - CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[0]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyEndpoint1NotChanged_8() + CHIP_ERROR TestReadBackSpeedSetting_16() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster - readAttributeBindingWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify endpoint 1 not changed Error: %@", err); + [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back speed setting Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("Group", ((MTRBindingClusterTargetStruct *) actualValue[0]).group, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[1]).node, 1ULL)); - VerifyOrReturn( - CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[1]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("Cluster", ((MTRBindingClusterTargetStruct *) actualValue[1]).cluster, 6UL)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[2]).node, 2ULL)); - VerifyOrReturn( - CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[2]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("speed setting", actualValue)); + VerifyOrReturn(CheckValue("speed setting", actualValue, 73U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } -}; -class TestUserLabelCluster : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestUserLabelCluster() - : TestCommandBridge("TestUserLabelCluster") - , mTestIndex(0) + CHIP_ERROR TestWriteFanMode_17() { - 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"); + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - ~TestUserLabelCluster() {} + id fanModeArgument; + fanModeArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeFanModeWithValue:fanModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write fan mode Error: %@", err); - /////////// TestCommand Interface ///////// - void NextTest() override + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadBackPercentSetting_18() { - CHIP_ERROR err = CHIP_NO_ERROR; + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestUserLabelCluster\n"); - } + [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back percent setting Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestUserLabelCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("percent setting", actualValue)); + VerifyOrReturn(CheckValue("percent setting", actualValue, 0U)); + } - // 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 : Clear User Label List\n"); - err = TestClearUserLabelList_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read User Label List\n"); - err = TestReadUserLabelList_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write User Label List\n"); - err = TestWriteUserLabelList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reboot target device\n"); - err = TestRebootTargetDevice_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Verify\n"); - err = TestVerify_6(); - break; - } + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadBackPercentCurrent_19() { - 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; - } + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + [cluster readAttributePercentCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back percent current 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 = 7; + { + id actualValue = value; + VerifyOrReturn(CheckValue("percent current", actualValue, 0U)); + } - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + NextTest(); + }]; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestClearUserLabelList_1() + CHIP_ERROR TestReadBackSpeedSetting_20() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id labelListArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - labelListArgument = temp_0; - } - [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear User Label List Error: %@", err); + [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back speed setting Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("speed setting", actualValue)); + VerifyOrReturn(CheckValue("speed setting", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadUserLabelList_2() + CHIP_ERROR TestReadBackSpeedCurrent_21() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read User Label List Error: %@", err); + [cluster readAttributeSpeedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back speed current Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("speed current", actualValue, 0U)); } NextTest(); @@ -92265,83 +93988,68 @@ class TestUserLabelCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteUserLabelList_3() + CHIP_ERROR TestWriteFanMode_22() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id labelListArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"room"; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"bedroom 2"; + id fanModeArgument; + fanModeArgument = [NSNumber numberWithUnsignedChar:5U]; + [cluster writeAttributeFanModeWithValue:fanModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write fan mode Error: %@", err); - temp_0[1] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[1]).label = @"orientation"; - ((MTRUserLabelClusterLabelStruct *) temp_0[1]).value = @"North"; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - temp_0[2] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[2]).label = @"floor"; - ((MTRUserLabelClusterLabelStruct *) temp_0[2]).value = @"5"; + NextTest(); + }]; - temp_0[3] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[3]).label = @"direction"; - ((MTRUserLabelClusterLabelStruct *) temp_0[3]).value = @"up"; + return CHIP_NO_ERROR; + } - labelListArgument = temp_0; - } - [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write User Label List Error: %@", err); + CHIP_ERROR TestReadBackPercentSetting_23() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back percent setting Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - return CHIP_NO_ERROR; - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNull("percent setting", actualValue)); + } - CHIP_ERROR TestRebootTargetDevice_4() - { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } + NextTest(); + }]; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestVerify_6() + CHIP_ERROR TestReadBackSpeedSetting_24() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back speed setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"room")); - VerifyOrReturn( - CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"bedroom 2")); - VerifyOrReturn( - CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).label, @"orientation")); - VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).value, @"North")); - VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).label, @"floor")); - VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).value, @"5")); - VerifyOrReturn( - CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).label, @"direction")); - VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).value, @"up")); + VerifyOrReturn(CheckValueNull("speed setting", actualValue)); } NextTest(); @@ -92351,11 +94059,11 @@ class TestUserLabelCluster : public TestCommandBridge { } }; -class TestUserLabelClusterConstraints : public TestCommandBridge { +class TestAccessControlConstraints : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestUserLabelClusterConstraints() - : TestCommandBridge("TestUserLabelClusterConstraints") + TestAccessControlConstraints() + : TestCommandBridge("TestAccessControlConstraints") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -92365,7 +94073,7 @@ class TestUserLabelClusterConstraints : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~TestUserLabelClusterConstraints() {} + ~TestAccessControlConstraints() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -92373,11 +94081,11 @@ class TestUserLabelClusterConstraints : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestUserLabelClusterConstraints\n"); + ChipLogProgress(chipTool, " **** Test Start: TestAccessControlConstraints\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestUserLabelClusterConstraints\n"); + ChipLogProgress(chipTool, " **** Test Complete: TestAccessControlConstraints\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -92394,12 +94102,49 @@ class TestUserLabelClusterConstraints : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Attempt to write overly long item for label\n"); - err = TestAttemptToWriteOverlyLongItemForLabel_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Constraint error: PASE reserved for future (TC-ACL-2.4 step 29)\n"); + err = TestConstraintErrorPaseReservedForFutureTcAcl24Step29_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Attempt to write overly long item for value\n"); - err = TestAttemptToWriteOverlyLongItemForValue_2(); + ChipLogProgress( + chipTool, " ***** Test Step 2 : Constraint error: Invalid combination administer + group (TC-ACL-2.4 step 31)\n"); + err = TestConstraintErrorInvalidCombinationAdministerGroupTcAcl24Step31_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Constraint error: Invalid auth mode (TC-ACL-2.4 step 33)\n"); + err = TestConstraintErrorInvalidAuthModeTcAcl24Step33_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Constraint error: Invalid subject (TC-ACL-2.4 step 34)\n"); + err = TestConstraintErrorInvalidSubjectTcAcl24Step34_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Constraint error: Invalid target (TC-ACL-2.4 step 38)\n"); + err = TestConstraintErrorInvalidTargetTcAcl24Step38_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : Constraint error: target has both endpoint and device type (TC-ACL-2.4 step 42)\n"); + err = TestConstraintErrorTargetHasBothEndpointAndDeviceTypeTcAcl24Step42_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Constraint error: Invalid privilege value step 32)\n"); + err = TestConstraintErrorInvalidPrivilegeValueStep32_7(); + break; + case 8: + ChipLogProgress( + chipTool, " ***** Test Step 8 : Constraint error: invalid subject 0xFFFF_FFFF_FFFF_FFFF (TC-ACL-2.4 step 35)\n"); + err = TestConstraintErrorInvalidSubject0xFFFFFfffFfffFfffTcAcl24Step35_8(); + break; + case 9: + ChipLogProgress( + chipTool, " ***** Test Step 9 : Constraint error: invalid subject 0xFFFF_FFFD_0000_0000 (TC-ACL-2.4 step 36)\n"); + err = TestConstraintErrorInvalidSubject0xFFFFFffd00000000TcAcl24Step36_9(); + break; + case 10: + ChipLogProgress( + chipTool, " ***** Test Step 10 : Constraint error: invalid subject 0xFFFF_FFFF_FFFF_0000 (TC-ACL-2.4 step 37)\n"); + err = TestConstraintErrorInvalidSubject0xFFFFFfffFfff0000TcAcl24Step37_10(); break; } @@ -92421,6 +94166,30 @@ class TestUserLabelClusterConstraints : public TestCommandBridge { 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; } // Go on to the next test. @@ -92434,7 +94203,7 @@ class TestUserLabelClusterConstraints : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -92448,394 +94217,513 @@ class TestUserLabelClusterConstraints : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestAttemptToWriteOverlyLongItemForLabel_1() + CHIP_ERROR TestConstraintErrorPaseReservedForFutureTcAcl24Step29_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id labelListArgument; + id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"this is longer than sixteen characters"; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"bedroom 2"; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - labelListArgument = temp_0; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:1U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + aclArgument = temp_0; } - [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Attempt to write overly long item for label Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Constraint error: PASE reserved for future (TC-ACL-2.4 step 29) 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.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestAttemptToWriteOverlyLongItemForValue_2() + CHIP_ERROR TestConstraintErrorInvalidCombinationAdministerGroupTcAcl24Step31_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id labelListArgument; + id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"test"; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"this is longer than sixteen characters"; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - labelListArgument = temp_0; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + aclArgument = temp_0; } - [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Attempt to write overly long item for value Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Constraint error: Invalid combination administer + group (TC-ACL-2.4 step 31) 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.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } -}; - -class TestArmFailSafe : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestArmFailSafe() - : TestCommandBridge("TestArmFailSafe") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~TestArmFailSafe() {} - - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestConstraintErrorInvalidAuthModeTcAcl24Step33_3() { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestArmFailSafe\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestArmFailSafe\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - // 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 : Reboot target device\n"); - err = TestRebootTargetDevice_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Wait for the alpha device to be retrieved \n"); - err = TestWaitForTheAlphaDeviceToBeRetrieved_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Query fabrics list\n"); - err = TestQueryFabricsList_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : ArmFailSafe on target device with timeout 0\n"); - err = TestArmFailSafeOnTargetDeviceWithTimeout0_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads NodeLabel mandatory attribute of target device\n"); - err = TestReadsNodeLabelMandatoryAttributeOfTargetDevice_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Invoke AddTrustedRootCertificate without fail-safe\n"); - err = TestInvokeAddTrustedRootCertificateWithoutFailSafe_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Invoke AddNOC without fail-safe\n"); - err = TestInvokeAddNOCWithoutFailSafe_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Invoke UpdateNOC without fail-safe\n"); - err = TestInvokeUpdateNOCWithoutFailSafe_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Invoke CSRRequest without fail-safe\n"); - err = TestInvokeCSRRequestWithoutFailSafe_8(); - break; - } + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } + temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:4U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - 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), 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; + aclArgument = temp_0; } + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Constraint error: Invalid auth mode (TC-ACL-2.4 step 33) Error: %@", err); - // 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 mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestRebootTargetDevice_0() - { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; - CHIP_ERROR TestWaitForTheAlphaDeviceToBeRetrieved_1() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestQueryFabricsList_2() + CHIP_ERROR TestConstraintErrorInvalidSubjectTcAcl24Step34_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOperationalCredentials * cluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query fabrics list Error: %@", err); + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:0ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValueAsString("Label", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - } + aclArgument = temp_0; + } + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Constraint error: Invalid subject (TC-ACL-2.4 step 34) Error: %@", err); - VerifyOrReturn(CheckConstraintType("fabrics", "", "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; } - CHIP_ERROR TestArmFailSafeOnTargetDeviceWithTimeout0_3() + CHIP_ERROR TestConstraintErrorInvalidTargetTcAcl24Step38_5() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; - params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:0U]; - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:0ULL]; - [cluster armFailSafeWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"ArmFailSafe on target device with timeout 0 Error: %@", err); + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [[MTRAccessControlClusterTarget alloc] init]; + ((MTRAccessControlClusterTarget *) temp_3[0]).cluster = nil; + ((MTRAccessControlClusterTarget *) temp_3[0]).endpoint = nil; + ((MTRAccessControlClusterTarget *) temp_3[0]).deviceType = nil; - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); - } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + aclArgument = temp_0; + } + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Constraint error: Invalid target (TC-ACL-2.4 step 38) 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 TestReadsNodeLabelMandatoryAttributeOfTargetDevice_4() + CHIP_ERROR TestConstraintErrorTargetHasBothEndpointAndDeviceTypeTcAcl24Step42_6() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads NodeLabel mandatory attribute of target device Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"")); + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [[MTRAccessControlClusterTarget alloc] init]; + ((MTRAccessControlClusterTarget *) temp_3[0]).cluster = nil; + ((MTRAccessControlClusterTarget *) temp_3[0]).endpoint = [NSNumber numberWithUnsignedShort:22U]; + ((MTRAccessControlClusterTarget *) temp_3[0]).deviceType = [NSNumber numberWithUnsignedInt:33UL]; + + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - NextTest(); - }]; + aclArgument = temp_0; + } + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Constraint error: target has both endpoint and device type (TC-ACL-2.4 step 42) 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 TestInvokeAddTrustedRootCertificateWithoutFailSafe_5() + CHIP_ERROR TestConstraintErrorInvalidPrivilegeValueStep32_7() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOperationalCredentials * cluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; - params.rootCertificate = [[NSData alloc] initWithBytes:"00000000" length:8]; - [cluster addTrustedRootCertificateWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Invoke AddTrustedRootCertificate without fail-safe Error: %@", err); + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); - NextTest(); - }]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:6U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + aclArgument = temp_0; + } + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Constraint error: Invalid privilege value step 32) 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 TestInvokeAddNOCWithoutFailSafe_6() + CHIP_ERROR TestConstraintErrorInvalidSubject0xFFFFFfffFfffFfffTcAcl24Step35_8() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOperationalCredentials * cluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; - params.nocValue = [[NSData alloc] initWithBytes:"00112233" length:8]; - params.ipkValue = [[NSData alloc] initWithBytes:"\000\001\002\003\004\005\006\007\000\001\002\003\004\005\006\007" - length:16]; - params.caseAdminSubject = [NSNumber numberWithUnsignedLongLong:1234ULL]; - params.adminVendorId = [NSNumber numberWithUnsignedShort:65521U]; - [cluster addNOCWithParams:params - completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Invoke AddNOC without fail-safe Error: %@", err); + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); - NextTest(); - }]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + aclArgument = temp_0; + } + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Constraint error: invalid subject 0xFFFF_FFFF_FFFF_FFFF (TC-ACL-2.4 step 35) 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 TestInvokeUpdateNOCWithoutFailSafe_7() + CHIP_ERROR TestConstraintErrorInvalidSubject0xFFFFFffd00000000TcAcl24Step36_9() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOperationalCredentials * cluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; - params.nocValue = [[NSData alloc] initWithBytes:"00112233" length:8]; + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:18446744060824649728ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + aclArgument = temp_0; + } [cluster - updateNOCWithParams:params - completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Invoke UpdateNOC without fail-safe Error: %@", err); + writeAttributeAclWithValue:aclArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Constraint error: invalid subject 0xFFFF_FFFD_0000_0000 (TC-ACL-2.4 step 36) Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestInvokeCSRRequestWithoutFailSafe_8() + CHIP_ERROR TestConstraintErrorInvalidSubject0xFFFFFfffFfff0000TcAcl24Step37_10() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOperationalCredentials * cluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; - params.csrNonce = [[NSData alloc] initWithBytes:"\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\007" - length:32]; + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:18446744073709486080ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + aclArgument = temp_0; + } [cluster - CSRRequestWithParams:params - completionHandler:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Invoke CSRRequest without fail-safe Error: %@", err); + writeAttributeAclWithValue:aclArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Constraint error: invalid subject 0xFFFF_FFFF_FFFF_0000 (TC-ACL-2.4 step 37) Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); - 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 TestFanControl : public TestCommandBridge { +class TestLevelControlWithOnOffDependency : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestFanControl() - : TestCommandBridge("TestFanControl") + TestLevelControlWithOnOffDependency() + : TestCommandBridge("TestLevelControlWithOnOffDependency") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -92845,7 +94733,7 @@ class TestFanControl : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~TestFanControl() {} + ~TestLevelControlWithOnOffDependency() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -92853,11 +94741,11 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestFanControl\n"); + ChipLogProgress(chipTool, " **** Test Start: TestLevelControlWithOnOffDependency\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestFanControl\n"); + ChipLogProgress(chipTool, " **** Test Complete: TestLevelControlWithOnOffDependency\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -92874,100 +94762,132 @@ class TestFanControl : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write fan mode\n"); - err = TestWriteFanMode_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Sends a MoveToLevel command to set current level to min value\n"); + err = TestSendsAMoveToLevelCommandToSetCurrentLevelToMinValue_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read back fan mode\n"); - err = TestReadBackFanMode_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 100 ms\n"); + err = TestWait100Ms_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write fan mode sequence\n"); - err = TestWriteFanModeSequence_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read back fan mode sequence\n"); - err = TestReadBackFanModeSequence_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Write OnOffTransitionTime attribute\n"); + err = TestWriteOnOffTransitionTimeAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Write percent setting\n"); - err = TestWritePercentSetting_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 100 ms\n"); + err = TestWait100Ms_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read back percent setting\n"); - err = TestReadBackPercentSetting_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read OnOffTransitionTime attribute\n"); + err = TestReadOnOffTransitionTimeAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read back speed setting\n"); - err = TestReadBackSpeedSetting_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Write OnLevel attribute\n"); + err = TestWriteOnLevelAttribute_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read back speed current\n"); - err = TestReadBackSpeedCurrent_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 100 ms\n"); + err = TestWait100Ms_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Write percent setting\n"); - err = TestWritePercentSetting_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Read OnLevel attribute\n"); + err = TestReadOnLevelAttribute_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read back percent setting\n"); - err = TestReadBackPercentSetting_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Read MinValue attribute\n"); + err = TestReadMinValueAttribute_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Write speed setting\n"); - err = TestWriteSpeedSetting_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Send On Command\n"); + err = TestSendOnCommand_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read back speed setting\n"); - err = TestReadBackSpeedSetting_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read back percent setting\n"); - err = TestReadBackPercentSetting_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait OnOffTransitionTime\n"); + err = TestWaitOnOffTransitionTime_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read back percent current\n"); - err = TestReadBackPercentCurrent_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : If OnLevel is defined, check CurrentLevel is OnLevel value\n"); + err = TestIfOnLevelIsDefinedCheckCurrentLevelIsOnLevelValue_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Write speed setting\n"); - err = TestWriteSpeedSetting_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Send Off Command\n"); + err = TestSendOffCommand_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read back speed setting\n"); - err = TestReadBackSpeedSetting_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Write fan mode\n"); - err = TestWriteFanMode_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait OnOffTransitionTime\n"); + err = TestWaitOnOffTransitionTime_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read back percent setting\n"); - err = TestReadBackPercentSetting_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : If OnLevel is defined, check CurrentLevel is min value\n"); + err = TestIfOnLevelIsDefinedCheckCurrentLevelIsMinValue_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read back percent current\n"); - err = TestReadBackPercentCurrent_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Sends a MoveToLevel command to set current level to a mid value\n"); + err = TestSendsAMoveToLevelCommandToSetCurrentLevelToAMidValue_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Read back speed setting\n"); - err = TestReadBackSpeedSetting_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 100 ms\n"); + err = TestWait100Ms_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read back speed current\n"); - err = TestReadBackSpeedCurrent_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Write fan mode\n"); - err = TestWriteFanMode_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : Set OnLevel attribute to null\n"); + err = TestSetOnLevelAttributeToNull_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read back percent setting\n"); - err = TestReadBackPercentSetting_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 100 ms\n"); + err = TestWait100Ms_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Read back speed setting\n"); - err = TestReadBackSpeedSetting_24(); + ChipLogProgress(chipTool, " ***** Test Step 24 : Read OnLevel attribute\n"); + err = TestReadOnLevelAttribute_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Send On Command\n"); + err = TestSendOnCommand_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Wait OnOffTransitionTime\n"); + err = TestWaitOnOffTransitionTime_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : If OnLevel is not defined, check CurrentLevel is restored\n"); + err = TestIfOnLevelIsNotDefinedCheckCurrentLevelIsRestored_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Send Off Command\n"); + err = TestSendOffCommand_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Wait OnOffTransitionTime\n"); + err = TestWaitOnOffTransitionTime_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : If OnLevel is not defined, check CurrentLevel is restored\n"); + err = TestIfOnLevelIsNotDefinedCheckCurrentLevelIsRestored_32(); break; } @@ -93055,260 +94975,105 @@ class TestFanControl : public TestCommandBridge { case 24: 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 = 25; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestWriteFanMode_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id fanModeArgument; - fanModeArgument = [NSNumber numberWithUnsignedChar:3U]; - [cluster writeAttributeFanModeWithValue:fanModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write fan mode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackFanMode_2() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFanModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back fan mode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("fan mode", actualValue, 3U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteFanModeSequence_3() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id fanModeSequenceArgument; - fanModeSequenceArgument = [NSNumber numberWithUnsignedChar:5U]; - [cluster writeAttributeFanModeSequenceWithValue:fanModeSequenceArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write fan mode sequence Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackFanModeSequence_4() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFanModeSequenceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back fan mode sequence Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("fan mode sequence", actualValue, 5U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritePercentSetting_5() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id percentSettingArgument; - percentSettingArgument = [NSNumber numberWithUnsignedChar:84U]; - [cluster writeAttributePercentSettingWithValue:percentSettingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write percent setting Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackPercentSetting_6() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back percent setting Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("percent setting", actualValue)); - VerifyOrReturn(CheckValue("percent setting", actualValue, 84U)); - } - - NextTest(); - }]; + 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; + } - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestReadBackSpeedSetting_7() + chip::System::Clock::Timeout GetWaitDuration() const override { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back speed setting Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("speed setting", actualValue)); - VerifyOrReturn(CheckValue("speed setting", actualValue, 84U)); - } +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 33; - NextTest(); - }]; + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - return CHIP_NO_ERROR; + 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 TestReadBackSpeedCurrent_8() + CHIP_ERROR TestSendsAMoveToLevelCommandToSetCurrentLevelToMinValue_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back speed current Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:1U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a MoveToLevel command to set current level to min value Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("speed current", actualValue, 84U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritePercentSetting_9() + CHIP_ERROR TestWait100Ms_2() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id percentSettingArgument; - percentSettingArgument = nil; - [cluster writeAttributePercentSettingWithValue:percentSettingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write percent setting Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadBackPercentSetting_10() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back percent setting Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("percent setting", actualValue)); - VerifyOrReturn(CheckValue("percent setting", actualValue, 84U)); + VerifyOrReturn(CheckValue("current level", actualValue, 1U)); } NextTest(); @@ -93317,70 +95082,51 @@ class TestFanControl : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteSpeedSetting_11() + CHIP_ERROR TestWriteOnOffTransitionTimeAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id speedSettingArgument; - speedSettingArgument = [NSNumber numberWithUnsignedChar:73U]; - [cluster writeAttributeSpeedSettingWithValue:speedSettingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write speed setting Error: %@", err); + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write OnOffTransitionTime 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 TestReadBackSpeedSetting_12() + CHIP_ERROR TestWait100Ms_5() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back speed setting Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("speed setting", actualValue)); - VerifyOrReturn(CheckValue("speed setting", actualValue, 73U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadBackPercentSetting_13() + CHIP_ERROR TestReadOnOffTransitionTimeAttribute_6() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back percent setting Error: %@", err); + [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read OnOffTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("percent setting", actualValue)); - VerifyOrReturn(CheckValue("percent setting", actualValue, 73U)); + VerifyOrReturn(CheckValue("on off transition time", actualValue, 0U)); } NextTest(); @@ -93389,69 +95135,52 @@ class TestFanControl : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackPercentCurrent_14() + CHIP_ERROR TestWriteOnLevelAttribute_7() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back percent current Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id onLevelArgument; + onLevelArgument = [NSNumber numberWithUnsignedChar:254U]; + [cluster writeAttributeOnLevelWithValue:onLevelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write OnLevel attribute Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("percent current", actualValue, 73U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteSpeedSetting_15() + CHIP_ERROR TestWait100Ms_8() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id speedSettingArgument; - speedSettingArgument = nil; - [cluster writeAttributeSpeedSettingWithValue:speedSettingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write speed setting Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadBackSpeedSetting_16() + CHIP_ERROR TestReadOnLevelAttribute_9() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back speed setting Error: %@", err); + [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read OnLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("speed setting", actualValue)); - VerifyOrReturn(CheckValue("speed setting", actualValue, 73U)); + VerifyOrReturn(CheckValueNonNull("on level", actualValue)); + VerifyOrReturn(CheckValue("on level", actualValue, 254U)); } NextTest(); @@ -93460,45 +95189,22 @@ class TestFanControl : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteFanMode_17() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id fanModeArgument; - fanModeArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeFanModeWithValue:fanModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write fan mode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackPercentSetting_18() + CHIP_ERROR TestReadMinValueAttribute_10() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back percent setting Error: %@", err); + [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read MinValue attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("percent setting", actualValue)); - VerifyOrReturn(CheckValue("percent setting", actualValue, 0U)); + VerifyOrReturn(CheckValue("min level", actualValue, 1U)); } NextTest(); @@ -93507,47 +95213,37 @@ class TestFanControl : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackPercentCurrent_19() + CHIP_ERROR TestSendOnCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back percent current Error: %@", err); + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("percent current", actualValue, 0U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackSpeedSetting_20() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back speed setting Error: %@", err); + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("speed setting", actualValue)); - VerifyOrReturn(CheckValue("speed setting", actualValue, 0U)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } NextTest(); @@ -93556,22 +95252,29 @@ class TestFanControl : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackSpeedCurrent_21() + CHIP_ERROR TestWaitOnOffTransitionTime_13() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestIfOnLevelIsDefinedCheckCurrentLevelIsOnLevelValue_14() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back speed current Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"If OnLevel is defined, check CurrentLevel is OnLevel value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("speed current", actualValue, 0U)); + VerifyOrReturn(CheckValue("current level", actualValue, 254U)); } NextTest(); @@ -93580,68 +95283,37 @@ class TestFanControl : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteFanMode_22() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id fanModeArgument; - fanModeArgument = [NSNumber numberWithUnsignedChar:5U]; - [cluster writeAttributeFanModeWithValue:fanModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write fan mode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackPercentSetting_23() + CHIP_ERROR TestSendOffCommand_15() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back percent setting Error: %@", err); + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNull("percent setting", actualValue)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackSpeedSetting_24() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back speed setting Error: %@", err); + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNull("speed setting", actualValue)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } NextTest(); @@ -93649,663 +95321,283 @@ class TestFanControl : public TestCommandBridge { return CHIP_NO_ERROR; } -}; - -class TestAccessControlConstraints : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestAccessControlConstraints() - : TestCommandBridge("TestAccessControlConstraints") - , 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) - - ~TestAccessControlConstraints() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestAccessControlConstraints\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestAccessControlConstraints\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Constraint error: PASE reserved for future (TC-ACL-2.4 step 29)\n"); - err = TestConstraintErrorPaseReservedForFutureTcAcl24Step29_1(); - break; - case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Constraint error: Invalid combination administer + group (TC-ACL-2.4 step 31)\n"); - err = TestConstraintErrorInvalidCombinationAdministerGroupTcAcl24Step31_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Constraint error: Invalid auth mode (TC-ACL-2.4 step 33)\n"); - err = TestConstraintErrorInvalidAuthModeTcAcl24Step33_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Constraint error: Invalid subject (TC-ACL-2.4 step 34)\n"); - err = TestConstraintErrorInvalidSubjectTcAcl24Step34_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Constraint error: Invalid target (TC-ACL-2.4 step 38)\n"); - err = TestConstraintErrorInvalidTargetTcAcl24Step38_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Constraint error: target has both endpoint and device type (TC-ACL-2.4 step 42)\n"); - err = TestConstraintErrorTargetHasBothEndpointAndDeviceTypeTcAcl24Step42_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Constraint error: Invalid privilege value step 32)\n"); - err = TestConstraintErrorInvalidPrivilegeValueStep32_7(); - break; - case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Constraint error: invalid subject 0xFFFF_FFFF_FFFF_FFFF (TC-ACL-2.4 step 35)\n"); - err = TestConstraintErrorInvalidSubject0xFFFFFfffFfffFfffTcAcl24Step35_8(); - break; - case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : Constraint error: invalid subject 0xFFFF_FFFD_0000_0000 (TC-ACL-2.4 step 36)\n"); - err = TestConstraintErrorInvalidSubject0xFFFFFffd00000000TcAcl24Step36_9(); - break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Constraint error: invalid subject 0xFFFF_FFFF_FFFF_0000 (TC-ACL-2.4 step 37)\n"); - err = TestConstraintErrorInvalidSubject0xFFFFFfffFfff0000TcAcl24Step37_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), 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; - } - - // 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 TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestWaitOnOffTransitionTime_17() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 0UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestConstraintErrorPaseReservedForFutureTcAcl24Step29_1() + CHIP_ERROR TestIfOnLevelIsDefinedCheckCurrentLevelIsMinValue_18() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"If OnLevel is defined, check CurrentLevel is min value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:1U]; { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 1U)); } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - aclArgument = temp_0; - } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: PASE reserved for future (TC-ACL-2.4 step 29) Error: %@", err); - 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 TestConstraintErrorInvalidCombinationAdministerGroupTcAcl24Step31_2() + CHIP_ERROR TestSendsAMoveToLevelCommandToSetCurrentLevelToAMidValue_19() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - aclArgument = temp_0; - } - [cluster - writeAttributeAclWithValue:aclArgument + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:127U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid combination administer + group (TC-ACL-2.4 step 31) Error: %@", err); + NSLog(@"Sends a MoveToLevel command to set current level to a mid value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestConstraintErrorInvalidAuthModeTcAcl24Step33_3() + CHIP_ERROR TestWait100Ms_20() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:4U]; { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 127U)); } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - aclArgument = temp_0; - } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid auth mode (TC-ACL-2.4 step 33) Error: %@", err); - 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 TestConstraintErrorInvalidSubjectTcAcl24Step34_4() + CHIP_ERROR TestSetOnLevelAttributeToNull_22() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:0ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + id onLevelArgument; + onLevelArgument = nil; + [cluster writeAttributeOnLevelWithValue:onLevelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Set OnLevel attribute to null Error: %@", err); - aclArgument = temp_0; - } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid subject (TC-ACL-2.4 step 34) Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestConstraintErrorInvalidTargetTcAcl24Step38_5() + CHIP_ERROR TestWait100Ms_23() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadOnLevelAttribute_24() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read OnLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + id actualValue = value; + VerifyOrReturn(CheckValueNull("on level", actualValue)); } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [[MTRAccessControlClusterTarget alloc] init]; - ((MTRAccessControlClusterTarget *) temp_3[0]).cluster = nil; - ((MTRAccessControlClusterTarget *) temp_3[0]).endpoint = nil; - ((MTRAccessControlClusterTarget *) temp_3[0]).deviceType = nil; + NextTest(); + }]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + return CHIP_NO_ERROR; + } - aclArgument = temp_0; - } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid target (TC-ACL-2.4 step 38) Error: %@", err); + CHIP_ERROR TestSendOnCommand_25() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Send On Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestConstraintErrorTargetHasBothEndpointAndDeviceTypeTcAcl24Step42_6() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_26() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [[MTRAccessControlClusterTarget alloc] init]; - ((MTRAccessControlClusterTarget *) temp_3[0]).cluster = nil; - ((MTRAccessControlClusterTarget *) temp_3[0]).endpoint = [NSNumber numberWithUnsignedShort:22U]; - ((MTRAccessControlClusterTarget *) temp_3[0]).deviceType = [NSNumber numberWithUnsignedInt:33UL]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - aclArgument = temp_0; - } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: target has both endpoint and device type (TC-ACL-2.4 step 42) Error: %@", err); - 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 TestConstraintErrorInvalidPrivilegeValueStep32_7() + CHIP_ERROR TestWaitOnOffTransitionTime_27() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestIfOnLevelIsNotDefinedCheckCurrentLevelIsRestored_28() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"If OnLevel is not defined, check CurrentLevel is restored Error: %@", err); - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:6U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - aclArgument = temp_0; - } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid privilege value step 32) Error: %@", err); + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 127U)); + } - 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 TestConstraintErrorInvalidSubject0xFFFFFfffFfffFfffTcAcl24Step35_8() + CHIP_ERROR TestSendOffCommand_29() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Send Off Command Error: %@", err); - aclArgument = temp_0; - } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: invalid subject 0xFFFF_FFFF_FFFF_FFFF (TC-ACL-2.4 step 35) Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestConstraintErrorInvalidSubject0xFFFFFffd00000000TcAcl24Step36_9() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:18446744060824649728ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - aclArgument = temp_0; - } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: invalid subject 0xFFFF_FFFD_0000_0000 (TC-ACL-2.4 step 36) Error: %@", err); - 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 TestConstraintErrorInvalidSubject0xFFFFFfffFfff0000TcAcl24Step37_10() + CHIP_ERROR TestWaitOnOffTransitionTime_31() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 0UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestIfOnLevelIsNotDefinedCheckCurrentLevelIsRestored_32() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"If OnLevel is not defined, check CurrentLevel is restored Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:18446744073709486080ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 127U)); } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - aclArgument = temp_0; - } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: invalid subject 0xFFFF_FFFF_FFFF_0000 (TC-ACL-2.4 step 37) Error: %@", err); - - 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; } @@ -94917,7 +96209,7 @@ class Test_TC_DGSW_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("threadMetrics", "", "list")); + VerifyOrReturn(CheckConstraintType("threadMetrics", "list", "list")); NextTest(); }]; @@ -94937,7 +96229,7 @@ class Test_TC_DGSW_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHeapFree", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapFree", "int64u", "int64u")); NextTest(); }]; @@ -94957,7 +96249,7 @@ class Test_TC_DGSW_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHeapUsed", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapUsed", "int64u", "int64u")); NextTest(); }]; @@ -94977,7 +96269,7 @@ class Test_TC_DGSW_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "int64u", "int64u")); NextTest(); }]; @@ -95031,7 +96323,7 @@ class Test_TC_DGSW_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 1 : Reads a list of SoftwareFault struct from DUT and data type in each field of the struct must " "match the value listed in spec\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && DGSW.S.E00")) { NextTest(); return; } @@ -95250,7 +96542,7 @@ class Test_TC_DGSW_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("threadMetrics", "", "list")); + VerifyOrReturn(CheckConstraintType("threadMetrics", "list", "list")); NextTest(); }]; @@ -95270,7 +96562,7 @@ class Test_TC_DGSW_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHeapUsed", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapUsed", "int64u", "int64u")); NextTest(); }]; @@ -95290,7 +96582,7 @@ class Test_TC_DGSW_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "int64u", "int64u")); NextTest(); }]; @@ -107730,138 +109022,193 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Lock Door Command to the DUT without PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify " + "DUT responds with UNSUPPORTED_WRITE\n"); + if (ShouldSkip("!DRLK.S.A0033")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithoutPINCode_6(); + err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends Lock Door Command to the DUT with valid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads the RequirePINforRemoteOperation attribute from the DUT\n"); + if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithValidPINCode_7(); + err = TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : TH writes the RequirePINforRemoteOperation attribute value as True on the DUT\n"); - if (ShouldSkip("DRLK.S.A0033")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Lock Door Command to the DUT without PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp")) { NextTest(); return; } - err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_8(); + err = TestThSendsLockDoorCommandToTheDutWithoutPINCode_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads the RequirePINforRemoteOperation attribute from the DUT\n"); - if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Lock Door Command to the DUT with valid PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_9(); + err = TestThSendsLockDoorCommandToTheDutWithValidPINCode_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Lock Door Command to the DUT with valid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 10 : TH writes the RequirePINforRemoteOperation attribute value as True on the DUT\n"); + if (ShouldSkip("DRLK.S.A0033")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithValidPINCode_10(); + err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Lock Door Command to the DUT without valid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH writes the RequirePINforRemoteOperation attribute value as True on the DUT and Verify " + "DUT responds with UNSUPPORTED_WRITE\n"); + if (ShouldSkip("!DRLK.S.A0033")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithoutValidPINCode_11(); + err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Lock Door Command to the DUT without any argument PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads the RequirePINforRemoteOperation attribute from the DUT\n"); + if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithoutAnyArgumentPINCode_12(); + err = TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH writes WrongCodeEntryLimit attribute value as 3 on the DUT\n"); - if (ShouldSkip("DRLK.S.A0030")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Lock Door Command to the DUT with valid PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp && DRLK.S.A0033")) { NextTest(); return; } - err = TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDut_13(); + err = TestThSendsLockDoorCommandToTheDutWithValidPINCode_13(); break; case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : TH writes UserCodeTemporaryDisableTime attribute value as 5 seconds on the DUT\n"); - if (ShouldSkip("DRLK.S.A0031")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Lock Door Command to the DUT without valid PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp && DRLK.S.A0033")) { NextTest(); return; } - err = TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs5SecondsOnTheDut_14(); + err = TestThSendsLockDoorCommandToTheDutWithoutValidPINCode_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Lock Door Command to the DUT without any argument PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp && DRLK.S.A0033")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_15(); + err = TestThSendsLockDoorCommandToTheDutWithoutAnyArgumentPINCode_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 16 : TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and Verify that the DUT sends " + "Success response\n"); + if (ShouldSkip("DRLK.S.A0030")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_16(); + err = TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyThatTheDutSendsSuccessResponse_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 17 : TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and verify DUT responds with " + "UNSUPPORTED_WRITE\n"); + if (ShouldSkip("!DRLK.S.A0030")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_17(); + err = TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 18 : TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on the DUT and Verify " + "that the DUT send the Success response\n"); + if (ShouldSkip("DRLK.S.A0031")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_18(); + err = TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyThatTheDutSendTheSuccessResponse_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads UserCodeTemporaryDisableTime attribute from DUT\n"); - if (ShouldSkip("DRLK.S.A0031")) { + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on the DUT and Verify " + "DUT responds with UNSUPPORTED_WRITE\n"); + if (ShouldSkip("!DRLK.S.A0031")) { NextTest(); return; } - err = TestThReadsUserCodeTemporaryDisableTimeAttributeFromDut_19(); + err = TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends Lock Door Command to the DUT with valid PINCode\n"); + ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); if (ShouldSkip("DRLK.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithValidPINCode_20(); + err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Clean the created user\n"); - err = TestCleanTheCreatedUser_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Cleanup the created credential\n"); + ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_23(); + break; + case 24: + ChipLogProgress(chipTool, + " ***** Test Step 24 : TH reads UserCodeTemporaryDisableTime attribute from DUT and After sending 3 failure " + "responses verify that UserCodeTemporaryDisableTime attribute is triggered\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.A0031")) { + NextTest(); + return; + } + err = TestThReadsUserCodeTemporaryDisableTimeAttributeFromDutAndAfterSending3FailureResponsesVerifyThatUserCodeTemporaryDisableTimeAttributeIsTriggered_24(); + break; + case 25: + ChipLogProgress(chipTool, + " ***** Test Step 25 : TH sends Lock Command to the DUT with valid PINCode before UserCodeTemporaryDisableTime " + "attribute time expires\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsLockCommandToTheDutWithValidPINCodeBeforeUserCodeTemporaryDisableTimeAttributeTimeExpires_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Clean the created user\n"); + err = TestCleanTheCreatedUser_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Cleanup the created credential\n"); if (ShouldSkip("DRLK.S.C26.Rsp")) { NextTest(); return; } - err = TestCleanupTheCreatedCredential_22(); + err = TestCleanupTheCreatedCredential_27(); break; } @@ -107893,7 +109240,7 @@ class Test_TC_DRLK_2_2 : 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_UNSUPPORTED_WRITE)); break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -107908,39 +109255,54 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); 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), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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), 0)); + break; + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; } @@ -107956,7 +109318,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 23; + const uint16_t mTestCount = 28; chip::Optional mNodeId; chip::Optional mCluster; @@ -108192,7 +109554,56 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutPINCode_6() + CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id requirePINforRemoteOperationArgument; + requirePINforRemoteOperationArgument = [NSNumber numberWithBool:false]; + [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as False " + @"on the DUT and Verify DUT responds with UNSUPPORTED_WRITE Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeRequirePINforRemoteOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("RequirePINforRemoteOperation", actualValue, false)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutPINCode_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108211,7 +109622,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithValidPINCode_7() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithValidPINCode_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108231,7 +109642,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_8() + CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108253,7 +109664,33 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_9() + CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id requirePINforRemoteOperationArgument; + requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; + [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as True " + @"on the DUT and Verify DUT responds with UNSUPPORTED_WRITE Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108276,7 +109713,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithValidPINCode_10() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithValidPINCode_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108296,7 +109733,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutValidPINCode_11() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutValidPINCode_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108317,14 +109754,13 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutAnyArgumentPINCode_12() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutAnyArgumentPINCode_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"" length:0]; [cluster lockDoorWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Lock Door Command to the DUT without any argument PINCode Error: %@", err); @@ -108338,7 +109774,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDut_13() + CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyThatTheDutSendsSuccessResponse_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108346,20 +109782,48 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; - [cluster - writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT Error: %@", err); + [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and Verify " + @"that the DUT sends Success response 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 TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs5SecondsOnTheDut_14() + CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id wrongCodeEntryLimitArgument; + wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; + [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and verify DUT " + @"responds with UNSUPPORTED_WRITE Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyThatTheDutSendTheSuccessResponse_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108367,49 +109831,57 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { id userCodeTemporaryDisableTimeArgument; userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; - [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 5 seconds " - @"on the DUT Error: %@", - err); + [cluster + writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on " + @"the DUT and Verify that the DUT send the Success response 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 TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_15() + CHIP_ERROR + TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"12345" length:5]; - [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); + id userCodeTemporaryDisableTimeArgument; + userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; + [cluster + writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on " + @"the DUT and Verify DUT responds with UNSUPPORTED_WRITE Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_16() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"54321" length:5]; + params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; [cluster lockDoorWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); @@ -108423,14 +109895,14 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_17() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"987623" length:6]; + params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; [cluster lockDoorWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); @@ -108444,14 +109916,14 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_18() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"67890" length:5]; + params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; [cluster lockDoorWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); @@ -108465,50 +109937,47 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsUserCodeTemporaryDisableTimeAttributeFromDut_19() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads UserCodeTemporaryDisableTime attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("UserCodeTemporaryDisableTime", actualValue, 15U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithValidPINCode_20() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; + params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; [cluster lockDoorWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT with valid PINCode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_FAILURE)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanTheCreatedUser_21() + CHIP_ERROR + TestThReadsUserCodeTemporaryDisableTimeAttributeFromDutAndAfterSending3FailureResponsesVerifyThatUserCodeTemporaryDisableTimeAttributeIsTriggered_24() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not 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 TestThSendsLockCommandToTheDutWithValidPINCodeBeforeUserCodeTemporaryDisableTimeAttributeTimeExpires_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 TestCleanTheCreatedUser_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108528,7 +109997,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedCredential_22() + CHIP_ERROR TestCleanupTheCreatedCredential_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109433,70 +110902,68 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { err = TestReadTheUserBackAndVerifyItsFields_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Get Max number of Week Day schedules for user\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.A0014")) { NextTest(); return; } - err = TestGetMaxNumberOfWeekDaySchedulesForUser_3(); + err = TestThReadsNumberOfWeekDaySchedulesSupportedPerUserAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Get number of supported users\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads NumberOfTotalUsers Supported attribute\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0011")) { NextTest(); return; } - err = TestGetNumberOfSupportedUsers_4(); + err = TestThReadsNumberOfTotalUsersSupportedAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send Set Week Day Schedule Command to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH send Set Week Day Schedule Command\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0b.Rsp")) { NextTest(); return; } - err = TestSendSetWeekDayScheduleCommandToDut_5(); + err = TestThSendSetWeekDayScheduleCommand_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : send GetWeekDay Schedule Command \n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH send Get Week Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { NextTest(); return; } - err = TestSendGetWeekDayScheduleCommand_6(); + err = TestThSendGetWeekDayScheduleCommandToDut_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Send Set Week Day Schedule Command to DUT and verify INVALID_COMMAND response\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH send Set Week Day Schedule Command\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0b.Rsp")) { NextTest(); return; } - err = TestSendSetWeekDayScheduleCommandToDutAndVerifyInvalidCommandResponse_7(); + err = TestThSendSetWeekDayScheduleCommand_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : send GetWeekDay Schedule Command to DUT and verify INVALID_COMMAND response\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : TH send Get Week Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { NextTest(); return; } - err = TestSendGetWeekDayScheduleCommandToDutAndVerifyInvalidCommandResponse_8(); + err = TestThSendGetWeekDayScheduleCommandToDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Clear all week day schedules for the first user\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Clear Week Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0d.Rsp")) { NextTest(); return; } - err = TestClearAllWeekDaySchedulesForTheFirstUser_9(); + err = TestThSendsClearWeekDayScheduleCommandToDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : send GetWeekDay Schedule Command \n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Get Week Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { NextTest(); return; } - err = TestSendGetWeekDayScheduleCommand_10(); + err = TestThSendsGetWeekDayScheduleCommandToDut_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Cleanup the created user\n"); @@ -109680,7 +111147,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { } NSNumber * _Nonnull NumberOfWeekDaySchedulesSupportedPerUser; - CHIP_ERROR TestGetMaxNumberOfWeekDaySchedulesForUser_3() + CHIP_ERROR TestThReadsNumberOfWeekDaySchedulesSupportedPerUserAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109688,7 +111155,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get Max number of Week Day schedules for user Error: %@", err); + NSLog(@"TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109707,7 +111174,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { } NSNumber * _Nonnull NumberOfTotalUsersSupported; - CHIP_ERROR TestGetNumberOfSupportedUsers_4() + CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109715,7 +111182,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { [cluster readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get number of supported users Error: %@", err); + NSLog(@"TH reads NumberOfTotalUsers Supported attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109731,7 +111198,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendSetWeekDayScheduleCommandToDut_5() + CHIP_ERROR TestThSendSetWeekDayScheduleCommand_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109747,7 +111214,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.endMinute = [NSNumber numberWithUnsignedChar:55U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Set Week Day Schedule Command to DUT Error: %@", err); + NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109757,7 +111224,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetWeekDayScheduleCommand_6() + CHIP_ERROR TestThSendGetWeekDayScheduleCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109770,66 +111237,51 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { getWeekDayScheduleWithParams:params completionHandler:^( MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send GetWeekDay Schedule Command Error: %@", err); + NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn( - CheckConstraintMinValue("weekDayIndex", [values.weekDayIndex unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "weekDayIndex", [values.weekDayIndex unsignedCharValue], NumberOfWeekDaySchedulesSupportedPerUser)); + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - VerifyOrReturn( - CheckConstraintMinValue("userIndex", [values.userIndex unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "userIndex", [values.userIndex unsignedShortValue], NumberOfTotalUsersSupported)); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } { id actualValue = values.status; VerifyOrReturn(CheckValue("status", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, true)); - if (values.daysMask != nil) { - - VerifyOrReturn( - CheckConstraintMinValue("daysMask", [values.daysMask unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("daysMask", [values.daysMask unsignedCharValue], 6U)); + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 2U)); } - VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, true)); - if (values.startHour != nil) { - - VerifyOrReturn( - CheckConstraintMinValue("startHour", [values.startHour unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("startHour", [values.startHour unsignedCharValue], 23U)); + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); } - VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, true)); - if (values.startMinute != nil) { - - VerifyOrReturn( - CheckConstraintMinValue("startMinute", [values.startMinute unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("startMinute", [values.startMinute unsignedCharValue], 59U)); + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 45U)); } VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, true)); if (values.endHour != nil) { - VerifyOrReturn(CheckConstraintMinValue("endHour", [values.endHour unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("endHour", [values.endHour unsignedCharValue], 23U)); + VerifyOrReturn(CheckConstraintMinValue("endHour", [values.endHour unsignedCharValue], 16U)); } VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, true)); if (values.endMinute != nil) { VerifyOrReturn( - CheckConstraintMinValue("endMinute", [values.endMinute unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("endMinute", [values.endMinute unsignedCharValue], 59U)); + CheckConstraintMinValue("endMinute", [values.endMinute unsignedCharValue], 55U)); } NextTest(); @@ -109838,7 +111290,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendSetWeekDayScheduleCommandToDutAndVerifyInvalidCommandResponse_7() + CHIP_ERROR TestThSendSetWeekDayScheduleCommand_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109855,7 +111307,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Set Week Day Schedule Command to DUT and verify INVALID_COMMAND response Error: %@", err); + NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) @@ -109867,7 +111319,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetWeekDayScheduleCommandToDutAndVerifyInvalidCommandResponse_8() + CHIP_ERROR TestThSendGetWeekDayScheduleCommandToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109876,56 +111328,55 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster - getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send GetWeekDay Schedule Command to DUT and verify INVALID_COMMAND response Error: %@", err); + [cluster getWeekDayScheduleWithParams:params + completionHandler:^( + MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 0U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); - if (values.daysMask != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); + if (values.daysMask != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); - if (values.startHour != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); + if (values.startHour != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); - if (values.startMinute != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); + if (values.startMinute != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); - if (values.endHour != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); + if (values.endHour != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); - if (values.endMinute != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); + if (values.endMinute != nil) { + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestClearAllWeekDaySchedulesForTheFirstUser_9() + CHIP_ERROR TestThSendsClearWeekDayScheduleCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109936,7 +111387,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear all week day schedules for the first user Error: %@", err); + NSLog(@"TH sends Clear Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109946,25 +111397,25 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetWeekDayScheduleCommand_10() + CHIP_ERROR TestThSendsGetWeekDayScheduleCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:2U]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send GetWeekDay Schedule Command Error: %@", err); + NSLog(@"TH sends Get Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2U)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -110075,108 +111526,116 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { err = TestReadTheUserBackAndVerifyItsFields_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Get Max number of year Day schedules for user\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads NumberOfYearDay SchedulesSupportedPerUser attribute\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.A0015")) { NextTest(); return; } - err = TestGetMaxNumberOfYearDaySchedulesForUser_3(); + err = TestThReadsNumberOfYearDaySchedulesSupportedPerUserAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Get number of supported users\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads NumberOfTotalUsers Supported attribute\n"); if (ShouldSkip("DRLK.C.F08 && DRLK.S.A0011")) { NextTest(); return; } - err = TestGetNumberOfSupportedUsers_4(); + err = TestThReadsNumberOfTotalUsersSupportedAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send Set Year Day Schedule Command to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Set Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0e.Rsp")) { NextTest(); return; } - err = TestSendSetYearDayScheduleCommandToDut_5(); + err = TestThSendsSetYearDayScheduleCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : send Get Year Day Schedule Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Get Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestSendGetYearDayScheduleCommand_6(); + err = TestThSendsGetYearDayScheduleCommandToDut_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Send Set Year Day Schedule Command to DUT and verify INVALID_COMMAND response\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH send Set Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.C0e.Rsp")) { NextTest(); return; } - err = TestSendSetYearDayScheduleCommandToDutAndVerifyInvalidCommandResponse_7(); + err = TestThSendSetYearDayScheduleCommandToDut_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : send Get Year Day Schedule Command to DUT and Verify INVALID_FIELD response\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Get Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestSendGetYearDayScheduleCommandToDutAndVerifyInvalidFieldResponse_8(); + err = TestThSendsGetYearDayScheduleCommandToDut_8(); break; case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : send Get Year Day Schedule Command to DUT and verify FAILURE response\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Create a user with userIndex as 5\n"); + err = TestCreateAUserWithUserIndexAs5_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Get Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestSendGetYearDayScheduleCommandToDutAndVerifyFailureResponse_9(); + err = TestThSendsGetYearDayScheduleCommandToDut_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Clear a year day schedule for the first user\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Clear Year Day Schedule to DUT\n"); if (ShouldSkip("DRLK.S.C10.Rsp")) { NextTest(); return; } - err = TestClearAYearDayScheduleForTheFirstUser_10(); + err = TestThSendsClearYearDayScheduleToDut_11(); break; - case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : send Get Year Day Schedule Command to DUT and verify NOT_FOUND response\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Get Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx && DRLK.S.C10.Rsp")) { NextTest(); return; } - err = TestSendGetYearDayScheduleCommandToDutAndVerifyNotFoundResponse_11(); + err = TestThSendsGetYearDayScheduleCommandToDut_12(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Send Set Year Day Schedule Command to DUT \n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Set Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.C0e.Rsp")) { NextTest(); return; } - err = TestSendSetYearDayScheduleCommandToDut_12(); + err = TestThSendsSetYearDayScheduleCommandToDut_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : send Get Year Day Schedule Command\n"); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Get Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestSendGetYearDayScheduleCommand_13(); + err = TestThSendsGetYearDayScheduleCommandToDut_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Clear a year day schedule for the first user\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Clear Year Day Schedule to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C10.Rsp")) { NextTest(); return; } - err = TestClearAYearDayScheduleForTheFirstUser_14(); + err = TestThSendsClearYearDayScheduleToDut_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Cleanup the created user\n"); - err = TestCleanupTheCreatedUser_15(); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Clear a year day schedule for the first user\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C10.Rsp")) { + NextTest(); + return; + } + err = TestClearAYearDayScheduleForTheFirstUser_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Cleanup the created user\n"); + err = TestCleanupTheCreatedUser_17(); break; } @@ -110235,6 +111694,12 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + 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; } @@ -110250,7 +111715,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -110368,7 +111833,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { } NSNumber * _Nonnull NumberOfYearDaySchedulesSupportedPerUser; - CHIP_ERROR TestGetMaxNumberOfYearDaySchedulesForUser_3() + CHIP_ERROR TestThReadsNumberOfYearDaySchedulesSupportedPerUserAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110376,7 +111841,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get Max number of year Day schedules for user Error: %@", err); + NSLog(@"TH reads NumberOfYearDay SchedulesSupportedPerUser attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110395,7 +111860,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { } NSNumber * _Nonnull NumberOfTotalUsersSupported; - CHIP_ERROR TestGetNumberOfSupportedUsers_4() + CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110403,7 +111868,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get number of supported users Error: %@", err); + NSLog(@"TH reads NumberOfTotalUsers Supported attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110419,7 +111884,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendSetYearDayScheduleCommandToDut_5() + CHIP_ERROR TestThSendsSetYearDayScheduleCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110432,7 +111897,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.localEndTime = [NSNumber numberWithUnsignedInt:1980UL]; [cluster setYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Set Year Day Schedule Command to DUT Error: %@", err); + NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110442,7 +111907,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetYearDayScheduleCommand_6() + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110454,35 +111919,39 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster getYearDayScheduleWithParams:params completionHandler:^( MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send Get Year Day Schedule Command Error: %@", err); + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn( - CheckConstraintMinValue("yearDayIndex", [values.yearDayIndex unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("yearDayIndex", - [values.yearDayIndex unsignedCharValue], NumberOfYearDaySchedulesSupportedPerUser)); + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - VerifyOrReturn( - CheckConstraintMinValue("userIndex", [values.userIndex unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "userIndex", [values.userIndex unsignedShortValue], NumberOfTotalUsersSupported)); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } { id actualValue = values.status; VerifyOrReturn(CheckValue("status", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, true)); - if (values.localStartTime != nil) { + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 960UL)); + } - VerifyOrReturn(CheckConstraintType("localStartTime", "", "epoch-s")); + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 1980UL)); } - VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, true)); if (values.localEndTime != nil) { - VerifyOrReturn(CheckConstraintType("localEndTime", "", "epoch-s")); + VerifyOrReturn(CheckConstraintMinValue( + "localEndTime", [values.localEndTime unsignedIntValue], 961UL)); } NextTest(); @@ -110491,7 +111960,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendSetYearDayScheduleCommandToDutAndVerifyInvalidCommandResponse_7() + CHIP_ERROR TestThSendSetYearDayScheduleCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110505,7 +111974,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster setYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Set Year Day Schedule Command to DUT and verify INVALID_COMMAND response Error: %@", err); + NSLog(@"TH send Set Year Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) @@ -110517,7 +111986,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetYearDayScheduleCommandToDutAndVerifyInvalidFieldResponse_8() + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110526,44 +111995,69 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:21U]; - [cluster - getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send Get Year Day Schedule Command to DUT and Verify INVALID_FIELD response Error: %@", err); + [cluster getYearDayScheduleWithParams:params + completionHandler:^( + MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 21U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 21U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); - if (values.localStartTime != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); + if (values.localStartTime != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); - if (values.localEndTime != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); + if (values.localEndTime != nil) { + } - NextTest(); - }]; + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateAUserWithUserIndexAs5_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:5U]; + params.userName = @"xxx"; + params.userUniqueId = [NSNumber numberWithUnsignedInt:6452UL]; + params.userStatus = [NSNumber numberWithUnsignedChar:1U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; + params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; + [cluster setUserWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create a user with userIndex as 5 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetYearDayScheduleCommandToDutAndVerifyFailureResponse_9() + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110575,7 +112069,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster getYearDayScheduleWithParams:params completionHandler:^( MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send Get Year Day Schedule Command to DUT and verify FAILURE response Error: %@", err); + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110591,7 +112085,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); @@ -110608,7 +112102,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearAYearDayScheduleForTheFirstUser_10() + CHIP_ERROR TestThSendsClearYearDayScheduleToDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110619,7 +112113,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear a year day schedule for the first user Error: %@", err); + NSLog(@"TH sends Clear Year Day Schedule to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110629,7 +112123,75 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetYearDayScheduleCommandToDutAndVerifyNotFoundResponse_11() + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_12() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getYearDayScheduleWithParams:params + completionHandler:^( + MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } + + VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); + if (values.localStartTime != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); + if (values.localEndTime != nil) { + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsSetYearDayScheduleCommandToDut_13() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.localStartTime = [NSNumber numberWithUnsignedInt:1080UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:2100UL]; + [cluster setYearDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110641,7 +112203,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster getYearDayScheduleWithParams:params completionHandler:^( MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send Get Year Day Schedule Command to DUT and verify NOT_FOUND response Error: %@", err); + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110657,39 +112219,24 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); - if (values.localStartTime != nil) { + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 1080UL)); } - VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); - if (values.localEndTime != nil) { + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 2100UL)); } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendSetYearDayScheduleCommandToDut_12() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.localStartTime = [NSNumber numberWithUnsignedInt:1080UL]; - params.localEndTime = [NSNumber numberWithUnsignedInt:2100UL]; - [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Set Year Day Schedule Command to DUT Error: %@", err); + if (values.localEndTime != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintMinValue( + "localEndTime", [values.localEndTime unsignedIntValue], 1081UL)); + } NextTest(); }]; @@ -110697,54 +112244,31 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetYearDayScheduleCommand_13() + CHIP_ERROR TestThSendsClearYearDayScheduleToDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send Get Year Day Schedule Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } - - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 1080UL)); - } - - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 2100UL)); - } + __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:0U]; + [cluster clearYearDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Year Day Schedule 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 TestClearAYearDayScheduleForTheFirstUser_14() + CHIP_ERROR TestClearAYearDayScheduleForTheFirstUser_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110765,7 +112289,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedUser_15() + CHIP_ERROR TestCleanupTheCreatedUser_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110862,74 +112386,74 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { err = TestThSendsGetCredentialStatusCommand_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH sends Set Credential Command to DUT and verify the INVALID_COMMAND if any of the fields " - "are invalid\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Set Credential Command to DUT\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutAndVerifyTheInvalidCommandIfAnyOfTheFieldsAreInvalid_6(); + err = TestThSendsSetCredentialCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH sends Set Credential Command to DUT and verify response as DUPLICATE if CredentialData is " - "repeated\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends Set Credential Command to DUT\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutAndVerifyResponseAsDuplicateIfCredentialDataIsRepeated_7(); + err = TestThSendsSetCredentialCommandToDut_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : TH sends Set Credential Command to DUT and verify response as OCCUPIED if CredentialIndex is " - "repeated\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Set Credential Command to DUT\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutAndVerifyResponseAsOccupiedIfCredentialIndexIsRepeated_8(); + err = TestThSendsSetCredentialCommandToDut_8(); break; case 9: ChipLogProgress(chipTool, - " ***** Test Step 9 : TH sends Set Credential Command to DUT and verify the DUT response as OCCUPIED if the " - "CredentialIndex is not associated with the UserIndex\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + " ***** Test Step 9 : TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response " + "command with response as OCCUPIED if the CredentialIndex is repeated\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutAndVerifyTheDutResponseAsOccupiedIfTheCredentialIndexIsNotAssociatedWithTheUserIndex_9(); + err = TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Clear Credential Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Set Credential Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsClearCredentialCommandToDut_10(); + err = TestThSendsSetCredentialCommandToDut_10(); break; case 11: ChipLogProgress(chipTool, - " ***** Test Step 11 : TH sends Get Credential Status Command and verify that the CredentialType and " - "CredentialIndex for the provided value is cleared\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + " ***** Test Step 11 : TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential " + "Response command with response as OCCUPIED if the CredentialIndex is repeated\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandAndVerifyThatTheCredentialTypeAndCredentialIndexForTheProvidedValueIsCleared_11(); + err = TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Set User Command to DUT\n"); - err = TestThSendsSetUserCommandToDut_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Set Credential Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + NextTest(); + return; + } + err = TestThSendsSetCredentialCommandToDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Set Credential Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential " + "Response command with response as OCCUPIED if the CredentialIndex is repeated\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDut_13(); + err = TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Clear Credential Command to DUT\n"); @@ -110940,28 +112464,70 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { err = TestThSendsClearCredentialCommandToDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Get Credential Status Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Get Credential Status Command to DUT\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommand_15(); + err = TestThSendsGetCredentialStatusCommandToDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Get Credential Status Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Set User Command to DUT\n"); + err = TestThSendsSetUserCommandToDut_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Set Credential Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + NextTest(); + return; + } + err = TestThSendsSetCredentialCommandToDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends Clear Credential Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp")) { + NextTest(); + return; + } + err = TestThSendsClearCredentialCommandToDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH sends Get Credential Status Command\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommand_16(); + err = TestThSendsGetCredentialStatusCommand_19(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Clear Credential Command to DUT\n"); + case 20: + ChipLogProgress(chipTool, + " ***** Test Step 20 : TH sends Get Credential command to DUT and Verify that the CredentialType for the provided " + "value is cleared Verify that the CredentialIndex is cleared\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + NextTest(); + return; + } + err = TestThSendsGetCredentialCommandToDutAndVerifyThatTheCredentialTypeForTheProvidedValueIsClearedVerifyThatTheCredentialIndexIsCleared_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends Get Credential Status Command\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + NextTest(); + return; + } + err = TestThSendsGetCredentialStatusCommand_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends Clear Credential Command to DUT\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp")) { NextTest(); return; } - err = TestThSendsClearCredentialCommandToDut_17(); + err = TestThSendsClearCredentialCommandToDut_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Cleanup the created user\n"); + err = TestCleanupTheCreatedUser_23(); break; } @@ -111020,14 +112586,32 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); 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), 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)); + 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)); + break; } // Go on to the next test. @@ -111041,7 +112625,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 24; chip::Optional mNodeId; chip::Optional mCluster; @@ -111246,13 +112830,11 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("credentialExists", "", "boolean")); - if (values.userIndex != nil) { - - VerifyOrReturn( - CheckConstraintMinValue("userIndex", [values.userIndex unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "userIndex", [values.userIndex unsignedShortValue], NumberOfTotalUsersSupported)); + VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); } { @@ -111278,7 +112860,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutAndVerifyTheInvalidCommandIfAnyOfTheFieldsAreInvalid_6() + CHIP_ERROR TestThSendsSetCredentialCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -111290,16 +112872,14 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; - params.credentialData = [[NSData alloc] initWithBytes:"1234" length:4]; + params.credentialData = [[NSData alloc] initWithBytes:"4321" length:4]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; params.userStatus = [NSNumber numberWithUnsignedChar:5U]; params.userType = [NSNumber numberWithUnsignedChar:10U]; [cluster setCredentialWithParams:params completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT and verify the INVALID_COMMAND if any of the fields are " - @"invalid Error: %@", - err); + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -111325,7 +112905,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutAndVerifyResponseAsDuplicateIfCredentialDataIsRepeated_7() + CHIP_ERROR TestThSendsSetCredentialCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -111344,9 +112924,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { [cluster setCredentialWithParams:params completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT and verify response as DUPLICATE if CredentialData is " - @"repeated Error: %@", - err); + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -111372,7 +112950,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutAndVerifyResponseAsOccupiedIfCredentialIndexIsRepeated_8() + CHIP_ERROR TestThSendsSetCredentialCommandToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -111391,9 +112969,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { [cluster setCredentialWithParams:params completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT and verify response as OCCUPIED if CredentialIndex is " - @"repeated Error: %@", - err); + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -111420,7 +112996,71 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { } CHIP_ERROR - TestThSendsSetCredentialCommandToDutAndVerifyTheDutResponseAsOccupiedIfTheCredentialIndexIsNotAssociatedWithTheUserIndex_9() + TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_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 TestThSendsSetCredentialCommandToDut_10() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; + params.credential = [[MTRDoorLockClusterDlCredential alloc] init]; + ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; + ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; + + params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; + params.userIndex = [NSNumber numberWithUnsignedShort:3U]; + params.userStatus = [NSNumber numberWithUnsignedChar:0U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; + [cluster + setCredentialWithParams:params + completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 2U)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_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 TestThSendsSetCredentialCommandToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -111439,9 +113079,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { [cluster setCredentialWithParams:params completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT and verify the DUT response as OCCUPIED if the " - @"CredentialIndex is not associated with the UserIndex Error: %@", - err); + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -111467,7 +113105,17 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDut_10() + CHIP_ERROR + TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_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 TestThSendsClearCredentialCommandToDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -111490,8 +113138,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsGetCredentialStatusCommandAndVerifyThatTheCredentialTypeAndCredentialIndexForTheProvidedValueIsCleared_11() + CHIP_ERROR TestThSendsGetCredentialStatusCommandToDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -111505,9 +113152,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { [cluster getCredentialStatusWithParams:params completionHandler:^( MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command and verify that the CredentialType and " - @"CredentialIndex for the provided value is cleared Error: %@", - err); + NSLog(@"TH sends Get Credential Status Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -111542,7 +113187,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetUserCommandToDut_12() + CHIP_ERROR TestThSendsSetUserCommandToDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -111568,7 +113213,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDut_13() + CHIP_ERROR TestThSendsSetCredentialCommandToDut_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -111578,7 +113223,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[MTRDoorLockClusterDlCredential alloc] init]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; + ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; @@ -111604,7 +113249,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); } NextTest(); @@ -111613,7 +113258,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDut_14() + CHIP_ERROR TestThSendsClearCredentialCommandToDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -111636,7 +113281,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommand_15() + CHIP_ERROR TestThSendsGetCredentialStatusCommand_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -111663,7 +113308,17 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommand_16() + CHIP_ERROR + TestThSendsGetCredentialCommandToDutAndVerifyThatTheCredentialTypeForTheProvidedValueIsClearedVerifyThatTheCredentialIndexIsCleared_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); + } + + CHIP_ERROR TestThSendsGetCredentialStatusCommand_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -111712,7 +113367,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDut_17() + CHIP_ERROR TestThSendsClearCredentialCommandToDut_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -111737,6 +113392,26 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestCleanupTheCreatedUser_23() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearUserWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Cleanup the created user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class TestGroupsCluster : public TestCommandBridge { @@ -113721,7 +115396,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -113734,7 +115408,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -113814,6 +115487,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -113879,6 +115553,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), diff --git a/zzz_generated/light-switch-app/zap-generated/access.h b/zzz_generated/light-switch-app/zap-generated/access.h index 712b9fbcf17a37..0386dfe564b3f7 100644 --- a/zzz_generated/light-switch-app/zap-generated/access.h +++ b/zzz_generated/light-switch-app/zap-generated/access.h @@ -153,6 +153,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -187,6 +188,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -221,6 +223,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h index a27405e1065c73..2408c85c1bbf97 100644 --- a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h +++ b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h @@ -398,7 +398,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/lighting-app/zap-generated/access.h b/zzz_generated/lighting-app/zap-generated/access.h index e91fbd2651251c..46ba904a0c4459 100644 --- a/zzz_generated/lighting-app/zap-generated/access.h +++ b/zzz_generated/lighting-app/zap-generated/access.h @@ -171,6 +171,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -205,6 +206,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -239,6 +241,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index ef1921fdfec952..d85c3859c69fa8 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -421,7 +421,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/lock-app/zap-generated/access.h b/zzz_generated/lock-app/zap-generated/access.h index 54fc17be7f5ec2..46ef8d9aed90b6 100644 --- a/zzz_generated/lock-app/zap-generated/access.h +++ b/zzz_generated/lock-app/zap-generated/access.h @@ -212,6 +212,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -260,6 +261,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -308,6 +310,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index 89adcf20069a3b..2d158b3e3bbeae 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -455,7 +455,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/ota-provider-app/zap-generated/access.h b/zzz_generated/ota-provider-app/zap-generated/access.h index 9c0ec040c2e21e..f4bed206b84fdc 100644 --- a/zzz_generated/ota-provider-app/zap-generated/access.h +++ b/zzz_generated/ota-provider-app/zap-generated/access.h @@ -147,6 +147,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -175,6 +176,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -203,6 +205,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index 44f5fb68233cdc..3faf0a9c5e9b87 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -232,7 +232,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h index 301509a2bc2374..70f863f3eccac5 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h @@ -22,6 +22,7 @@ #include #define MATTER_PLUGINS_INIT \ + MatterDescriptorPluginServerInitCallback(); \ MatterAccessControlPluginServerInitCallback(); \ MatterBasicPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ diff --git a/zzz_generated/ota-requestor-app/zap-generated/access.h b/zzz_generated/ota-requestor-app/zap-generated/access.h index 9c0ec040c2e21e..f4bed206b84fdc 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/access.h +++ b/zzz_generated/ota-requestor-app/zap-generated/access.h @@ -147,6 +147,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -175,6 +176,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -203,6 +205,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp index b6c48d90d88d71..01b5df38040ce8 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp @@ -38,6 +38,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_BASIC_CLUSTER_ID: emberAfBasicClusterInitCallback(endpoint); break; + case ZCL_DESCRIPTOR_CLUSTER_ID: + emberAfDescriptorClusterInitCallback(endpoint); + break; case ZCL_FIXED_LABEL_CLUSTER_ID: emberAfFixedLabelClusterInitCallback(endpoint); break; @@ -92,6 +95,11 @@ void __attribute__((weak)) emberAfBasicClusterInitCallback(EndpointId endpoint) // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfDescriptorClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfFixedLabelClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index 994afafedf90bc..38f6c3c4da182c 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -90,13 +90,21 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 107 +#define GENERATED_ATTRIBUTE_COUNT 119 #define GENERATED_ATTRIBUTES \ { \ \ - /* Endpoint: 0, Cluster: Access Control (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* ACL */ \ + /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Access Control (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* ACL */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* Extension */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ @@ -237,7 +245,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -264,6 +272,14 @@ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 65534, Cluster: Descriptor (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ + \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ @@ -390,14 +406,25 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 15 +#define GENERATED_CLUSTER_COUNT 17 // clang-format off #define GENERATED_CLUSTERS { \ + { \ + /* Endpoint: 0, Cluster: Descriptor (server) */ \ + .clusterId = 0x0000001D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributeCount = 6, \ + .clusterSize = 4, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 0, Cluster: Access Control (server) */ \ .clusterId = 0x0000001F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributes = ZAP_ATTRIBUTE_INDEX(6), \ .attributeCount = 7, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -408,7 +435,7 @@ { \ /* Endpoint: 0, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(7), \ + .attributes = ZAP_ATTRIBUTE_INDEX(13), \ .attributeCount = 22, \ .clusterSize = 41, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -419,7 +446,7 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ .clusterId = 0x00000029, \ - .attributes = ZAP_ATTRIBUTE_INDEX(29), \ + .attributes = ZAP_ATTRIBUTE_INDEX(35), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -430,7 +457,7 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ .clusterId = 0x0000002A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(29), \ + .attributes = ZAP_ATTRIBUTE_INDEX(35), \ .attributeCount = 6, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -441,7 +468,7 @@ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ .clusterId = 0x0000002B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(35), \ + .attributes = ZAP_ATTRIBUTE_INDEX(41), \ .attributeCount = 4, \ .clusterSize = 42, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -452,7 +479,7 @@ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ .clusterId = 0x0000002C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(39), \ + .attributes = ZAP_ATTRIBUTE_INDEX(45), \ .attributeCount = 5, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -463,7 +490,7 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(44), \ + .attributes = ZAP_ATTRIBUTE_INDEX(50), \ .attributeCount = 7, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -474,7 +501,7 @@ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(51), \ + .attributes = ZAP_ATTRIBUTE_INDEX(57), \ .attributeCount = 10, \ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -485,7 +512,7 @@ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(61), \ + .attributes = ZAP_ATTRIBUTE_INDEX(67), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -496,7 +523,7 @@ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(72), \ + .attributes = ZAP_ATTRIBUTE_INDEX(78), \ .attributeCount = 5, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -507,7 +534,7 @@ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(77), \ + .attributes = ZAP_ATTRIBUTE_INDEX(83), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -518,7 +545,7 @@ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(85), \ + .attributes = ZAP_ATTRIBUTE_INDEX(91), \ .attributeCount = 6, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -529,7 +556,7 @@ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(91), \ + .attributes = ZAP_ATTRIBUTE_INDEX(97), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -540,7 +567,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(94), \ + .attributes = ZAP_ATTRIBUTE_INDEX(100), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -548,10 +575,21 @@ .acceptedCommandList = nullptr ,\ .generatedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 65534, Cluster: Descriptor (server) */ \ + .clusterId = 0x0000001D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(103), \ + .attributeCount = 6, \ + .clusterSize = 4, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(97), \ + .attributes = ZAP_ATTRIBUTE_INDEX(109), \ .attributeCount = 10, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -565,12 +603,12 @@ #define ZAP_CLUSTER_INDEX(index) (&generatedClusters[index]) -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 14 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 16 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 14, 204 }, { ZAP_CLUSTER_INDEX(14), 1, 0 }, \ + { ZAP_CLUSTER_INDEX(0), 15, 208 }, { ZAP_CLUSTER_INDEX(15), 2, 4 }, \ } // Largest attribute size is needed for various buffers @@ -582,7 +620,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (204) +#define ATTRIBUTE_MAX_SIZE (212) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/ota-requestor-app/zap-generated/gen_config.h b/zzz_generated/ota-requestor-app/zap-generated/gen_config.h index 65bf0bbf4e8eea..d7c7ff1bd769cd 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/gen_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/gen_config.h @@ -29,6 +29,7 @@ #define EMBER_APS_UNICAST_MESSAGE_COUNT 10 /**** Cluster endpoint counts ****/ +#define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_ACCESS_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -46,6 +47,11 @@ /**** Cluster Plugins ****/ +// Use this macro to check if the server side of the Descriptor cluster is included +#define ZCL_USING_DESCRIPTOR_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_DESCRIPTOR_SERVER +#define EMBER_AF_PLUGIN_DESCRIPTOR + // Use this macro to check if the server side of the Access Control cluster is included #define ZCL_USING_ACCESS_CONTROL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_ACCESS_CONTROL_SERVER diff --git a/zzz_generated/placeholder/app1/zap-generated/access.h b/zzz_generated/placeholder/app1/zap-generated/access.h index 7a0fd667d6e169..353b58b92b47b0 100644 --- a/zzz_generated/placeholder/app1/zap-generated/access.h +++ b/zzz_generated/placeholder/app1/zap-generated/access.h @@ -216,6 +216,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -249,6 +250,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -282,6 +284,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index 05b8a96a61ccc6..a330207c12c11e 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -339,7 +339,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -531,7 +531,7 @@ \ /* Endpoint: 0, Cluster: Application Basic (server) */ \ { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* VendorID */ \ + { 0x00000001, ZAP_TYPE(VENDOR_ID), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* VendorID */ \ { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* ProductID */ \ { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Application */ \ diff --git a/zzz_generated/placeholder/app2/zap-generated/access.h b/zzz_generated/placeholder/app2/zap-generated/access.h index 7a0fd667d6e169..353b58b92b47b0 100644 --- a/zzz_generated/placeholder/app2/zap-generated/access.h +++ b/zzz_generated/placeholder/app2/zap-generated/access.h @@ -216,6 +216,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -249,6 +250,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -282,6 +284,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index 05b8a96a61ccc6..a330207c12c11e 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -339,7 +339,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -531,7 +531,7 @@ \ /* Endpoint: 0, Cluster: Application Basic (server) */ \ { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* VendorID */ \ + { 0x00000001, ZAP_TYPE(VENDOR_ID), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* VendorID */ \ { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* ProductID */ \ { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Application */ \ diff --git a/zzz_generated/pump-app/zap-generated/access.h b/zzz_generated/pump-app/zap-generated/access.h index cb00d42d2991bd..b331312d7ffcee 100644 --- a/zzz_generated/pump-app/zap-generated/access.h +++ b/zzz_generated/pump-app/zap-generated/access.h @@ -159,6 +159,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -187,6 +188,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -215,6 +217,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index ff0d1d536a494e..c9df90c80df386 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -242,7 +242,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/pump-controller-app/zap-generated/access.h b/zzz_generated/pump-controller-app/zap-generated/access.h index 0e7132f5f2e050..83ef672d96b0ef 100644 --- a/zzz_generated/pump-controller-app/zap-generated/access.h +++ b/zzz_generated/pump-controller-app/zap-generated/access.h @@ -135,6 +135,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -163,6 +164,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -191,6 +193,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index a4a1c7adea4635..90231ad7e23d4a 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -233,7 +233,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/temperature-measurement-app/zap-generated/access.h b/zzz_generated/temperature-measurement-app/zap-generated/access.h index 7352d0fabcfd6b..36a6ccca0a66b7 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/access.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/access.h @@ -146,6 +146,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -173,6 +174,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -200,6 +202,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index fcf8bb7ed5c0cc..59f75101b8ceb3 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -78,14 +78,17 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 1 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* HourFormat */ \ + \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ { \ - (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 \ - } /* HourFormat */ \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 \ + } /* TemperatureUnit */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -180,8 +183,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -294,7 +298,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/thermostat/zap-generated/CHIPClusters.h b/zzz_generated/thermostat/zap-generated/CHIPClusters.h index e91d09cd512a65..508098f8d0ddbb 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClusters.h +++ b/zzz_generated/thermostat/zap-generated/CHIPClusters.h @@ -39,5 +39,15 @@ class DLL_EXPORT IdentifyCluster : public ClusterBase ~IdentifyCluster() {} }; +class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase +{ +public: + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} + ~OtaSoftwareUpdateProviderCluster() {} +}; + } // namespace Controller } // namespace chip diff --git a/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp index 3e268d6de55364..b78b0406165309 100644 --- a/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp @@ -432,7 +432,7 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace NetworkCommissioning -namespace OtaSoftwareUpdateProvider { +namespace OtaSoftwareUpdateRequestor { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) { @@ -441,32 +441,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::QueryImage::Id: { - Commands::QueryImage::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOtaSoftwareUpdateProviderClusterQueryImageCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::ApplyUpdateRequest::Id: { - Commands::ApplyUpdateRequest::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = - emberAfOtaSoftwareUpdateProviderClusterApplyUpdateRequestCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::NotifyUpdateApplied::Id: { - Commands::NotifyUpdateApplied::DecodableType commandData; + case Commands::AnnounceOtaProvider::Id: { + Commands::AnnounceOtaProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); } break; } @@ -487,7 +468,7 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } } -} // namespace OtaSoftwareUpdateProvider +} // namespace OtaSoftwareUpdateRequestor namespace OperationalCredentials { @@ -776,8 +757,8 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::NetworkCommissioning::Id: Clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; - case Clusters::OtaSoftwareUpdateProvider::Id: - Clusters::OtaSoftwareUpdateProvider::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + case Clusters::OtaSoftwareUpdateRequestor::Id: + Clusters::OtaSoftwareUpdateRequestor::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; case Clusters::OperationalCredentials::Id: Clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandPath, aReader); diff --git a/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h index 2b513eb1c033c0..fc1f15a7696df2 100644 --- a/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h @@ -30,7 +30,8 @@ MatterBindingPluginServerInitCallback(); \ MatterAccessControlPluginServerInitCallback(); \ MatterBasicPluginServerInitCallback(); \ - MatterOtaSoftwareUpdateProviderPluginServerInitCallback(); \ + MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ + MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); \ MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterTimeFormatLocalizationPluginServerInitCallback(); \ MatterUnitLocalizationPluginServerInitCallback(); \ diff --git a/zzz_generated/thermostat/zap-generated/access.h b/zzz_generated/thermostat/zap-generated/access.h index c9c4bde0a670c5..f9476998d89adc 100644 --- a/zzz_generated/thermostat/zap-generated/access.h +++ b/zzz_generated/thermostat/zap-generated/access.h @@ -198,6 +198,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -233,6 +234,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -268,6 +270,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/thermostat/zap-generated/af-gen-event.h b/zzz_generated/thermostat/zap-generated/af-gen-event.h index 406f4e2e4df1e4..1c0681484eceda 100644 --- a/zzz_generated/thermostat/zap-generated/af-gen-event.h +++ b/zzz_generated/thermostat/zap-generated/af-gen-event.h @@ -39,39 +39,4 @@ #ifndef __AF_GEN_EVENT__ #define __AF_GEN_EVENT__ -// Code used to configure the cluster event mechanism -#define EMBER_AF_GENERATED_EVENT_CODE \ - EmberEventControl emberAfBarrierControlClusterServerTickCallbackControl1; \ - extern void emberAfPluginColorControlServerTempTransitionEventHandler(void); \ - extern void emberAfPluginColorControlServerXyTransitionEventHandler(void); \ - extern void emberAfPluginDoorLockServerLockoutEventHandler(void); \ - extern void emberAfPluginDoorLockServerRelockEventHandler(void); \ - static void clusterTickWrapper(EmberEventControl * control, EmberAfTickFunction callback, chip::EndpointId endpoint) \ - { \ - /* emberAfPushEndpointNetworkIndex(endpoint); */ \ - emberEventControlSetInactive(control); \ - (*callback)(endpoint); \ - /* emberAfPopNetworkIndex(); */ \ - } \ - void emberAfBarrierControlClusterServerTickCallbackWrapperFunction1(void) \ - { \ - clusterTickWrapper(&emberAfBarrierControlClusterServerTickCallbackControl1, \ - emberAfBarrierControlClusterServerTickCallback, 1); \ - } - -// EmberEventData structs used to populate the EmberEventData table -#define EMBER_AF_GENERATED_EVENTS \ - { &emberAfBarrierControlClusterServerTickCallbackControl1, emberAfBarrierControlClusterServerTickCallbackWrapperFunction1 }, - -#define EMBER_AF_GENERATED_EVENT_STRINGS \ - "Barrier Control Cluster Server EP 1", "Color Control Cluster Server Plugin HueSatTransition", \ - "Color Control Cluster Server Plugin TempTransition", "Color Control Cluster Server Plugin XyTransition", \ - "Door Lock Server Cluster Plugin Lockout", "Door Lock Server Cluster Plugin Relock", "IAS Zone Server Plugin ManageQueue", - -// The length of the event context table used to track and retrieve cluster events -#define EMBER_AF_EVENT_CONTEXT_LENGTH 2 - -// EmberAfEventContext structs used to populate the EmberAfEventContext table -#define EMBER_AF_GENERATED_EVENT_CONTEXT \ - { 0x1, 0x103, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfBarrierControlClusterServerTickCallbackControl1 }, #endif // __AF_GEN_EVENT__ diff --git a/zzz_generated/thermostat/zap-generated/callback-stub.cpp b/zzz_generated/thermostat/zap-generated/callback-stub.cpp index bbce02b0dbd3a7..46ed91ffbe0fef 100644 --- a/zzz_generated/thermostat/zap-generated/callback-stub.cpp +++ b/zzz_generated/thermostat/zap-generated/callback-stub.cpp @@ -77,6 +77,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_OTA_PROVIDER_CLUSTER_ID: emberAfOtaSoftwareUpdateProviderClusterInitCallback(endpoint); break; + case ZCL_OTA_REQUESTOR_CLUSTER_ID: + emberAfOtaSoftwareUpdateRequestorClusterInitCallback(endpoint); + break; case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: emberAfOperationalCredentialsClusterInitCallback(endpoint); break; @@ -190,6 +193,11 @@ void __attribute__((weak)) emberAfOtaSoftwareUpdateProviderClusterInitCallback(E // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfOtaSoftwareUpdateRequestorClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index ee80e845d22462..91d39ce61dd167 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -78,13 +78,16 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 10 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 11 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* HourFormat */ \ \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ + \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ { (uint16_t) 0xA28, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedCoolingSetpoint */ \ { (uint16_t) 0x7D0, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedHeatingSetpoint */ \ @@ -101,7 +104,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 260 +#define GENERATED_ATTRIBUTE_COUNT 264 #define GENERATED_ATTRIBUTES \ { \ \ @@ -183,9 +186,14 @@ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ - /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { 0x00000000, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -206,8 +214,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -426,7 +435,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -521,23 +530,23 @@ { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(1600) }, /* AbsMinCoolSetpointLimit */ \ { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(3200) }, /* AbsMaxCoolSetpointLimit */ \ { 0x00000011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* OccupiedCoolingSetpoint */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* OccupiedCoolingSetpoint */ \ { 0x00000012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* OccupiedHeatingSetpoint */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* OccupiedHeatingSetpoint */ \ { 0x00000015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* MinHeatSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* MinHeatSetpointLimit */ \ { 0x00000016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* MaxHeatSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* MaxHeatSetpointLimit */ \ { 0x00000017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* MinCoolSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* MinCoolSetpointLimit */ \ { 0x00000018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* MaxCoolSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* MaxCoolSetpointLimit */ \ { 0x00000019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* MinSetpointDeadBand */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* MinSetpointDeadBand */ \ { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* ControlSequenceOfOperation */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* ControlSequenceOfOperation */ \ { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* SystemMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* SystemMode */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StartOfWeek */ \ { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* NumberOfWeeklyTransitions */ \ { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* NumberOfDailyTransitions */ \ @@ -584,29 +593,23 @@ /* AcceptedCommandList (index=0) */ \ 0x00000000 /* Identify */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */\ + /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=2) */ \ - 0x00000000 /* QueryImage */, \ - 0x00000002 /* ApplyUpdateRequest */, \ - 0x00000004 /* NotifyUpdateApplied */, \ - chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=6)*/ \ - 0x00000001 /* QueryImageResponse */, \ - 0x00000003 /* ApplyUpdateResponse */, \ + 0x00000000 /* AnnounceOtaProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* AcceptedCommandList (index=9) */ \ + /* AcceptedCommandList (index=4) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=13)*/ \ + /* GeneratedCommandList (index=8)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* AcceptedCommandList (index=17) */ \ + /* AcceptedCommandList (index=12) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -614,30 +617,30 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=24)*/ \ + /* GeneratedCommandList (index=19)*/ \ 0x00000001 /* ScanNetworksResponse */, \ 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* AcceptedCommandList (index=28) */ \ + /* AcceptedCommandList (index=23) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=30)*/ \ + /* GeneratedCommandList (index=25)*/ \ 0x00000001 /* RetrieveLogsResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Diagnostics (server) */\ - /* AcceptedCommandList (index=32) */ \ + /* AcceptedCommandList (index=27) */ \ 0x00000000 /* TestEventTrigger */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* AcceptedCommandList (index=34) */ \ + /* AcceptedCommandList (index=29) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* AcceptedCommandList (index=38) */ \ + /* AcceptedCommandList (index=33) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -647,18 +650,18 @@ 0x0000000A /* RemoveFabric */, \ 0x0000000B /* AddTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=47)*/ \ + /* GeneratedCommandList (index=42)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* AcceptedCommandList (index=52) */ \ + /* AcceptedCommandList (index=47) */ \ 0x00000000 /* Identify */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=54) */ \ + /* AcceptedCommandList (index=49) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -666,14 +669,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=61)*/ \ + /* GeneratedCommandList (index=56)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* AcceptedCommandList (index=66) */ \ + /* AcceptedCommandList (index=61) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -682,7 +685,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=74)*/ \ + /* GeneratedCommandList (index=69)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -691,13 +694,13 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Thermostat (server) */\ - /* AcceptedCommandList (index=81) */ \ + /* AcceptedCommandList (index=76) */ \ 0x00000000 /* SetpointRaiseLower */, \ 0x00000001 /* SetWeeklySchedule */, \ 0x00000002 /* GetWeeklySchedule */, \ 0x00000003 /* ClearWeeklySchedule */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=86)*/ \ + /* GeneratedCommandList (index=81)*/ \ 0x00000000 /* GetWeeklyScheduleResponse */, \ chip::kInvalidCommandId /* end of list */, \ } @@ -705,7 +708,7 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 28 +#define GENERATED_CLUSTER_COUNT 29 // clang-format off #define GENERATED_CLUSTERS { \ @@ -765,20 +768,31 @@ .generatedCommandList = nullptr ,\ },\ { \ - /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ + /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ .clusterId = 0x00000029, \ .attributes = ZAP_ATTRIBUTE_INDEX(41), \ - .attributeCount = 2, \ - .clusterSize = 6, \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ + .clusterId = 0x0000002A, \ + .attributes = ZAP_ATTRIBUTE_INDEX(41), \ + .attributeCount = 6, \ + .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 2 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 6 ) ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ .clusterId = 0x0000002B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(43), \ + .attributes = ZAP_ATTRIBUTE_INDEX(47), \ .attributeCount = 4, \ .clusterSize = 42, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -789,7 +803,7 @@ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ .clusterId = 0x0000002C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(47), \ + .attributes = ZAP_ATTRIBUTE_INDEX(51), \ .attributeCount = 5, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -800,7 +814,7 @@ { \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ .clusterId = 0x0000002D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(52), \ + .attributes = ZAP_ATTRIBUTE_INDEX(56), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -811,51 +825,51 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(55), \ + .attributes = ZAP_ATTRIBUTE_INDEX(59), \ .attributeCount = 7, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 9 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 13 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 4 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 8 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(62), \ + .attributes = ZAP_ATTRIBUTE_INDEX(66), \ .attributeCount = 10, \ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 17 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 24 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 12 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ .clusterId = 0x00000032, \ - .attributes = ZAP_ATTRIBUTE_INDEX(72), \ + .attributes = ZAP_ATTRIBUTE_INDEX(76), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(74), \ + .attributes = ZAP_ATTRIBUTE_INDEX(78), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(85), \ + .attributes = ZAP_ATTRIBUTE_INDEX(89), \ .attributeCount = 6, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -866,7 +880,7 @@ { \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ .clusterId = 0x00000035, \ - .attributes = ZAP_ATTRIBUTE_INDEX(91), \ + .attributes = ZAP_ATTRIBUTE_INDEX(95), \ .attributeCount = 65, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -877,7 +891,7 @@ { \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ .clusterId = 0x00000036, \ - .attributes = ZAP_ATTRIBUTE_INDEX(156), \ + .attributes = ZAP_ATTRIBUTE_INDEX(160), \ .attributeCount = 15, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -888,7 +902,7 @@ { \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(171), \ + .attributes = ZAP_ATTRIBUTE_INDEX(175), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -899,29 +913,29 @@ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(182), \ + .attributes = ZAP_ATTRIBUTE_INDEX(186), \ .attributeCount = 5, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 34 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(187), \ + .attributes = ZAP_ATTRIBUTE_INDEX(191), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 38 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 42 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(195), \ + .attributes = ZAP_ATTRIBUTE_INDEX(199), \ .attributeCount = 4, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -932,7 +946,7 @@ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(199), \ + .attributes = ZAP_ATTRIBUTE_INDEX(203), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -943,7 +957,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(202), \ + .attributes = ZAP_ATTRIBUTE_INDEX(206), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -954,7 +968,7 @@ { \ /* Endpoint: 1, Cluster: Identify (client) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(205), \ + .attributes = ZAP_ATTRIBUTE_INDEX(209), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -965,40 +979,40 @@ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(205), \ + .attributes = ZAP_ATTRIBUTE_INDEX(209), \ .attributeCount = 4, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(209), \ + .attributes = ZAP_ATTRIBUTE_INDEX(213), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(212), \ + .attributes = ZAP_ATTRIBUTE_INDEX(216), \ .attributeCount = 7, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(219), \ + .attributes = ZAP_ATTRIBUTE_INDEX(223), \ .attributeCount = 22, \ .clusterSize = 41, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1009,13 +1023,13 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(241), \ + .attributes = ZAP_ATTRIBUTE_INDEX(245), \ .attributeCount = 19, \ .clusterSize = 34, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 81 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 81 ) ,\ },\ } @@ -1028,7 +1042,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 22, 256 }, { ZAP_CLUSTER_INDEX(22), 6, 103 }, \ + { ZAP_CLUSTER_INDEX(0), 23, 259 }, { ZAP_CLUSTER_INDEX(23), 6, 103 }, \ } // Largest attribute size is needed for various buffers @@ -1040,7 +1054,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (74) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (359) +#define ATTRIBUTE_MAX_SIZE (362) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/thermostat/zap-generated/gen_config.h b/zzz_generated/thermostat/zap-generated/gen_config.h index 7313ea3a5b143b..35f4e7dd8ef7de 100644 --- a/zzz_generated/thermostat/zap-generated/gen_config.h +++ b/zzz_generated/thermostat/zap-generated/gen_config.h @@ -37,7 +37,8 @@ #define EMBER_AF_BINDING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ACCESS_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (2) -#define EMBER_AF_OTA_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_OTA_REQUESTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TIME_FORMAT_LOCALIZATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_UNIT_LOCALIZATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -109,10 +110,14 @@ #define EMBER_AF_PLUGIN_BASIC_SERVER #define EMBER_AF_PLUGIN_BASIC -// Use this macro to check if the server side of the OTA Software Update Provider cluster is included -#define ZCL_USING_OTA_PROVIDER_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_SERVER -#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER +// Use this macro to check if the client side of the OTA Software Update Provider cluster is included +#define ZCL_USING_OTA_PROVIDER_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_CLIENT + +// Use this macro to check if the server side of the OTA Software Update Requestor cluster is included +#define ZCL_USING_OTA_REQUESTOR_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_REQUESTOR_SERVER +#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_REQUESTOR // Use this macro to check if the server side of the Localization Configuration cluster is included #define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER diff --git a/zzz_generated/tv-app/zap-generated/access.h b/zzz_generated/tv-app/zap-generated/access.h index c1e184f84b7d29..d788c99f8e9e41 100644 --- a/zzz_generated/tv-app/zap-generated/access.h +++ b/zzz_generated/tv-app/zap-generated/access.h @@ -153,6 +153,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -181,6 +182,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 4c2e573255fe61..5462e18f473393 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -134,13 +134,16 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 3 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* HourFormat */ \ \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ + \ /* Endpoint: 2, Cluster: Level Control (server) */ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 } /* options */ \ } @@ -246,8 +249,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -466,7 +470,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -594,7 +598,7 @@ { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* options */ \ { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -665,7 +669,7 @@ \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000001, ZAP_TYPE(VENDOR_ID), 2, 0, ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* ProductID */ \ { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Application */ \ diff --git a/zzz_generated/tv-casting-app/zap-generated/access.h b/zzz_generated/tv-casting-app/zap-generated/access.h index 7400a0c2b814f7..5dc37fc3b8884f 100644 --- a/zzz_generated/tv-casting-app/zap-generated/access.h +++ b/zzz_generated/tv-casting-app/zap-generated/access.h @@ -168,6 +168,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -205,6 +206,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -242,6 +244,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 91305d7f76281c..a759b637dcc58c 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -78,13 +78,16 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 4 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 5 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* HourFormat */ \ \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ + \ /* Endpoint: 1, Cluster: On/Off (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* StartUpOnOff */ \ \ @@ -199,8 +202,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -419,7 +423,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -473,7 +477,7 @@ { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ { 0x00004003, ZAP_TYPE(ENUM8), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* StartUpOnOff */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* StartUpOnOff */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ @@ -486,7 +490,7 @@ { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* options */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* options */ \ { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -505,7 +509,7 @@ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x00000051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* out of service */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* out of service */ \ { 0x00000055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ { 0x0000006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ diff --git a/zzz_generated/window-app/zap-generated/access.h b/zzz_generated/window-app/zap-generated/access.h index c3b402fab457a8..39fc7d6cd53948 100644 --- a/zzz_generated/window-app/zap-generated/access.h +++ b/zzz_generated/window-app/zap-generated/access.h @@ -163,6 +163,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -201,6 +202,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -239,6 +241,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index cb93f93990c34b..a8c2c986a64f1a 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -419,7 +419,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \